s3: Avoid calling cli_alloc_mid twice in cli_smb_req_iov_send
[Samba.git] / librpc / gen_ndr / cli_srvsvc.c
blob045dd3c5a87175d00b07a44a818557dc07979542
1 /*
2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
7 #include "../librpc/gen_ndr/cli_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);
33 if (req == NULL) {
34 return NULL;
36 state->out_mem_ctx = NULL;
37 state->dispatch_recv = cli->dispatch_recv;
39 /* In parameters */
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;
45 /* Out parameters */
46 state->orig.out.info_ctr = _info_ctr;
47 state->orig.out.totalentries = _totalentries;
48 state->orig.out.resume_handle = _resume_handle;
50 /* Result */
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,
63 &ndr_table_srvsvc,
64 NDR_SRVSVC_NETCHARDEVENUM,
65 &state->tmp);
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);
70 return 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);
79 NTSTATUS status;
80 TALLOC_CTX *mem_ctx;
82 if (state->out_mem_ctx) {
83 mem_ctx = state->out_mem_ctx;
84 } else {
85 mem_ctx = state;
88 status = state->dispatch_recv(subreq, mem_ctx);
89 TALLOC_FREE(subreq);
90 if (!NT_STATUS_IS_OK(status)) {
91 tevent_req_nterror(req, status);
92 return;
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;
102 /* Copy result */
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,
112 TALLOC_CTX *mem_ctx,
113 WERROR *result)
115 struct rpccli_srvsvc_NetCharDevEnum_state *state = tevent_req_data(
116 req, struct rpccli_srvsvc_NetCharDevEnum_state);
117 NTSTATUS status;
119 if (tevent_req_is_nterror(req, &status)) {
120 tevent_req_received(req);
121 return status;
124 /* Steal possbile out parameters to the callers context */
125 talloc_steal(mem_ctx, state->out_mem_ctx);
127 /* Return result */
128 *result = state->orig.out.result;
130 tevent_req_received(req);
131 return NT_STATUS_OK;
134 NTSTATUS rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli,
135 TALLOC_CTX *mem_ctx,
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] */,
141 WERROR *werror)
143 struct srvsvc_NetCharDevEnum r;
144 NTSTATUS status;
146 /* In parameters */
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,
153 mem_ctx,
154 &ndr_table_srvsvc,
155 NDR_SRVSVC_NETCHARDEVENUM,
156 &r);
158 if (!NT_STATUS_IS_OK(status)) {
159 return status;
162 if (NT_STATUS_IS_ERR(status)) {
163 return 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;
173 /* Return result */
174 if (werror) {
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);
204 if (req == NULL) {
205 return NULL;
207 state->out_mem_ctx = NULL;
208 state->dispatch_recv = cli->dispatch_recv;
210 /* In parameters */
211 state->orig.in.server_unc = _server_unc;
212 state->orig.in.device_name = _device_name;
213 state->orig.in.level = _level;
215 /* Out parameters */
216 state->orig.out.info = _info;
218 /* Result */
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,
231 &ndr_table_srvsvc,
232 NDR_SRVSVC_NETCHARDEVGETINFO,
233 &state->tmp);
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);
238 return 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);
247 NTSTATUS status;
248 TALLOC_CTX *mem_ctx;
250 if (state->out_mem_ctx) {
251 mem_ctx = state->out_mem_ctx;
252 } else {
253 mem_ctx = state;
256 status = state->dispatch_recv(subreq, mem_ctx);
257 TALLOC_FREE(subreq);
258 if (!NT_STATUS_IS_OK(status)) {
259 tevent_req_nterror(req, status);
260 return;
263 /* Copy out parameters */
264 *state->orig.out.info = *state->tmp.out.info;
266 /* Copy result */
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,
276 TALLOC_CTX *mem_ctx,
277 WERROR *result)
279 struct rpccli_srvsvc_NetCharDevGetInfo_state *state = tevent_req_data(
280 req, struct rpccli_srvsvc_NetCharDevGetInfo_state);
281 NTSTATUS status;
283 if (tevent_req_is_nterror(req, &status)) {
284 tevent_req_received(req);
285 return status;
288 /* Steal possbile out parameters to the callers context */
289 talloc_steal(mem_ctx, state->out_mem_ctx);
291 /* Return result */
292 *result = state->orig.out.result;
294 tevent_req_received(req);
295 return NT_STATUS_OK;
298 NTSTATUS rpccli_srvsvc_NetCharDevGetInfo(struct rpc_pipe_client *cli,
299 TALLOC_CTX *mem_ctx,
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)] */,
304 WERROR *werror)
306 struct srvsvc_NetCharDevGetInfo r;
307 NTSTATUS status;
309 /* In parameters */
310 r.in.server_unc = server_unc;
311 r.in.device_name = device_name;
312 r.in.level = level;
314 status = cli->dispatch(cli,
315 mem_ctx,
316 &ndr_table_srvsvc,
317 NDR_SRVSVC_NETCHARDEVGETINFO,
318 &r);
320 if (!NT_STATUS_IS_OK(status)) {
321 return status;
324 if (NT_STATUS_IS_ERR(status)) {
325 return status;
328 /* Return variables */
329 *info = *r.out.info;
331 /* Return result */
332 if (werror) {
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);
361 if (req == NULL) {
362 return NULL;
364 state->out_mem_ctx = NULL;
365 state->dispatch_recv = cli->dispatch_recv;
367 /* In parameters */
368 state->orig.in.server_unc = _server_unc;
369 state->orig.in.device_name = _device_name;
370 state->orig.in.opcode = _opcode;
372 /* Out parameters */
374 /* Result */
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,
381 &ndr_table_srvsvc,
382 NDR_SRVSVC_NETCHARDEVCONTROL,
383 &state->tmp);
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);
388 return 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);
397 NTSTATUS status;
398 TALLOC_CTX *mem_ctx;
400 if (state->out_mem_ctx) {
401 mem_ctx = state->out_mem_ctx;
402 } else {
403 mem_ctx = state;
406 status = state->dispatch_recv(subreq, mem_ctx);
407 TALLOC_FREE(subreq);
408 if (!NT_STATUS_IS_OK(status)) {
409 tevent_req_nterror(req, status);
410 return;
413 /* Copy out parameters */
415 /* Copy result */
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,
425 TALLOC_CTX *mem_ctx,
426 WERROR *result)
428 struct rpccli_srvsvc_NetCharDevControl_state *state = tevent_req_data(
429 req, struct rpccli_srvsvc_NetCharDevControl_state);
430 NTSTATUS status;
432 if (tevent_req_is_nterror(req, &status)) {
433 tevent_req_received(req);
434 return status;
437 /* Steal possbile out parameters to the callers context */
438 talloc_steal(mem_ctx, state->out_mem_ctx);
440 /* Return result */
441 *result = state->orig.out.result;
443 tevent_req_received(req);
444 return NT_STATUS_OK;
447 NTSTATUS rpccli_srvsvc_NetCharDevControl(struct rpc_pipe_client *cli,
448 TALLOC_CTX *mem_ctx,
449 const char *server_unc /* [in] [unique,charset(UTF16)] */,
450 const char *device_name /* [in] [charset(UTF16)] */,
451 uint32_t opcode /* [in] */,
452 WERROR *werror)
454 struct srvsvc_NetCharDevControl r;
455 NTSTATUS status;
457 /* In parameters */
458 r.in.server_unc = server_unc;
459 r.in.device_name = device_name;
460 r.in.opcode = opcode;
462 status = cli->dispatch(cli,
463 mem_ctx,
464 &ndr_table_srvsvc,
465 NDR_SRVSVC_NETCHARDEVCONTROL,
466 &r);
468 if (!NT_STATUS_IS_OK(status)) {
469 return status;
472 if (NT_STATUS_IS_ERR(status)) {
473 return status;
476 /* Return variables */
478 /* Return result */
479 if (werror) {
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);
511 if (req == NULL) {
512 return NULL;
514 state->out_mem_ctx = NULL;
515 state->dispatch_recv = cli->dispatch_recv;
517 /* In parameters */
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;
524 /* Out parameters */
525 state->orig.out.info_ctr = _info_ctr;
526 state->orig.out.totalentries = _totalentries;
527 state->orig.out.resume_handle = _resume_handle;
529 /* Result */
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,
542 &ndr_table_srvsvc,
543 NDR_SRVSVC_NETCHARDEVQENUM,
544 &state->tmp);
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);
549 return 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);
558 NTSTATUS status;
559 TALLOC_CTX *mem_ctx;
561 if (state->out_mem_ctx) {
562 mem_ctx = state->out_mem_ctx;
563 } else {
564 mem_ctx = state;
567 status = state->dispatch_recv(subreq, mem_ctx);
568 TALLOC_FREE(subreq);
569 if (!NT_STATUS_IS_OK(status)) {
570 tevent_req_nterror(req, status);
571 return;
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;
581 /* Copy result */
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,
591 TALLOC_CTX *mem_ctx,
592 WERROR *result)
594 struct rpccli_srvsvc_NetCharDevQEnum_state *state = tevent_req_data(
595 req, struct rpccli_srvsvc_NetCharDevQEnum_state);
596 NTSTATUS status;
598 if (tevent_req_is_nterror(req, &status)) {
599 tevent_req_received(req);
600 return status;
603 /* Steal possbile out parameters to the callers context */
604 talloc_steal(mem_ctx, state->out_mem_ctx);
606 /* Return result */
607 *result = state->orig.out.result;
609 tevent_req_received(req);
610 return NT_STATUS_OK;
613 NTSTATUS rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli,
614 TALLOC_CTX *mem_ctx,
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] */,
621 WERROR *werror)
623 struct srvsvc_NetCharDevQEnum r;
624 NTSTATUS status;
626 /* In parameters */
627 r.in.server_unc = server_unc;
628 r.in.user = user;
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,
634 mem_ctx,
635 &ndr_table_srvsvc,
636 NDR_SRVSVC_NETCHARDEVQENUM,
637 &r);
639 if (!NT_STATUS_IS_OK(status)) {
640 return status;
643 if (NT_STATUS_IS_ERR(status)) {
644 return 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;
654 /* Return result */
655 if (werror) {
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);
686 if (req == NULL) {
687 return NULL;
689 state->out_mem_ctx = NULL;
690 state->dispatch_recv = cli->dispatch_recv;
692 /* In parameters */
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;
698 /* Out parameters */
699 state->orig.out.info = _info;
701 /* Result */
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,
714 &ndr_table_srvsvc,
715 NDR_SRVSVC_NETCHARDEVQGETINFO,
716 &state->tmp);
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);
721 return 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);
730 NTSTATUS status;
731 TALLOC_CTX *mem_ctx;
733 if (state->out_mem_ctx) {
734 mem_ctx = state->out_mem_ctx;
735 } else {
736 mem_ctx = state;
739 status = state->dispatch_recv(subreq, mem_ctx);
740 TALLOC_FREE(subreq);
741 if (!NT_STATUS_IS_OK(status)) {
742 tevent_req_nterror(req, status);
743 return;
746 /* Copy out parameters */
747 *state->orig.out.info = *state->tmp.out.info;
749 /* Copy result */
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,
759 TALLOC_CTX *mem_ctx,
760 WERROR *result)
762 struct rpccli_srvsvc_NetCharDevQGetInfo_state *state = tevent_req_data(
763 req, struct rpccli_srvsvc_NetCharDevQGetInfo_state);
764 NTSTATUS status;
766 if (tevent_req_is_nterror(req, &status)) {
767 tevent_req_received(req);
768 return status;
771 /* Steal possbile out parameters to the callers context */
772 talloc_steal(mem_ctx, state->out_mem_ctx);
774 /* Return result */
775 *result = state->orig.out.result;
777 tevent_req_received(req);
778 return NT_STATUS_OK;
781 NTSTATUS rpccli_srvsvc_NetCharDevQGetInfo(struct rpc_pipe_client *cli,
782 TALLOC_CTX *mem_ctx,
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)] */,
788 WERROR *werror)
790 struct srvsvc_NetCharDevQGetInfo r;
791 NTSTATUS status;
793 /* In parameters */
794 r.in.server_unc = server_unc;
795 r.in.queue_name = queue_name;
796 r.in.user = user;
797 r.in.level = level;
799 status = cli->dispatch(cli,
800 mem_ctx,
801 &ndr_table_srvsvc,
802 NDR_SRVSVC_NETCHARDEVQGETINFO,
803 &r);
805 if (!NT_STATUS_IS_OK(status)) {
806 return status;
809 if (NT_STATUS_IS_ERR(status)) {
810 return status;
813 /* Return variables */
814 *info = *r.out.info;
816 /* Return result */
817 if (werror) {
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);
848 if (req == NULL) {
849 return NULL;
851 state->out_mem_ctx = NULL;
852 state->dispatch_recv = cli->dispatch_recv;
854 /* In parameters */
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;
861 /* Out parameters */
862 state->orig.out.parm_error = _parm_error;
864 /* Result */
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,
877 &ndr_table_srvsvc,
878 NDR_SRVSVC_NETCHARDEVQSETINFO,
879 &state->tmp);
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);
884 return 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);
893 NTSTATUS status;
894 TALLOC_CTX *mem_ctx;
896 if (state->out_mem_ctx) {
897 mem_ctx = state->out_mem_ctx;
898 } else {
899 mem_ctx = state;
902 status = state->dispatch_recv(subreq, mem_ctx);
903 TALLOC_FREE(subreq);
904 if (!NT_STATUS_IS_OK(status)) {
905 tevent_req_nterror(req, status);
906 return;
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;
914 /* Copy result */
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,
924 TALLOC_CTX *mem_ctx,
925 WERROR *result)
927 struct rpccli_srvsvc_NetCharDevQSetInfo_state *state = tevent_req_data(
928 req, struct rpccli_srvsvc_NetCharDevQSetInfo_state);
929 NTSTATUS status;
931 if (tevent_req_is_nterror(req, &status)) {
932 tevent_req_received(req);
933 return status;
936 /* Steal possbile out parameters to the callers context */
937 talloc_steal(mem_ctx, state->out_mem_ctx);
939 /* Return result */
940 *result = state->orig.out.result;
942 tevent_req_received(req);
943 return NT_STATUS_OK;
946 NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli,
947 TALLOC_CTX *mem_ctx,
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] */,
953 WERROR *werror)
955 struct srvsvc_NetCharDevQSetInfo r;
956 NTSTATUS status;
958 /* In parameters */
959 r.in.server_unc = server_unc;
960 r.in.queue_name = queue_name;
961 r.in.level = level;
962 r.in.info = info;
963 r.in.parm_error = parm_error;
965 status = cli->dispatch(cli,
966 mem_ctx,
967 &ndr_table_srvsvc,
968 NDR_SRVSVC_NETCHARDEVQSETINFO,
969 &r);
971 if (!NT_STATUS_IS_OK(status)) {
972 return status;
975 if (NT_STATUS_IS_ERR(status)) {
976 return status;
979 /* Return variables */
980 if (parm_error && r.out.parm_error) {
981 *parm_error = *r.out.parm_error;
984 /* Return result */
985 if (werror) {
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);
1013 if (req == NULL) {
1014 return NULL;
1016 state->out_mem_ctx = NULL;
1017 state->dispatch_recv = cli->dispatch_recv;
1019 /* In parameters */
1020 state->orig.in.server_unc = _server_unc;
1021 state->orig.in.queue_name = _queue_name;
1023 /* Out parameters */
1025 /* Result */
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,
1032 &ndr_table_srvsvc,
1033 NDR_SRVSVC_NETCHARDEVQPURGE,
1034 &state->tmp);
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);
1039 return 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);
1048 NTSTATUS status;
1049 TALLOC_CTX *mem_ctx;
1051 if (state->out_mem_ctx) {
1052 mem_ctx = state->out_mem_ctx;
1053 } else {
1054 mem_ctx = state;
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);
1061 return;
1064 /* Copy out parameters */
1066 /* Copy result */
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,
1077 WERROR *result)
1079 struct rpccli_srvsvc_NetCharDevQPurge_state *state = tevent_req_data(
1080 req, struct rpccli_srvsvc_NetCharDevQPurge_state);
1081 NTSTATUS status;
1083 if (tevent_req_is_nterror(req, &status)) {
1084 tevent_req_received(req);
1085 return status;
1088 /* Steal possbile out parameters to the callers context */
1089 talloc_steal(mem_ctx, state->out_mem_ctx);
1091 /* Return result */
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)] */,
1102 WERROR *werror)
1104 struct srvsvc_NetCharDevQPurge r;
1105 NTSTATUS status;
1107 /* In parameters */
1108 r.in.server_unc = server_unc;
1109 r.in.queue_name = queue_name;
1111 status = cli->dispatch(cli,
1112 mem_ctx,
1113 &ndr_table_srvsvc,
1114 NDR_SRVSVC_NETCHARDEVQPURGE,
1115 &r);
1117 if (!NT_STATUS_IS_OK(status)) {
1118 return status;
1121 if (NT_STATUS_IS_ERR(status)) {
1122 return status;
1125 /* Return variables */
1127 /* Return result */
1128 if (werror) {
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);
1157 if (req == NULL) {
1158 return NULL;
1160 state->out_mem_ctx = NULL;
1161 state->dispatch_recv = cli->dispatch_recv;
1163 /* In parameters */
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 */
1170 /* Result */
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,
1177 &ndr_table_srvsvc,
1178 NDR_SRVSVC_NETCHARDEVQPURGESELF,
1179 &state->tmp);
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);
1184 return 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);
1193 NTSTATUS status;
1194 TALLOC_CTX *mem_ctx;
1196 if (state->out_mem_ctx) {
1197 mem_ctx = state->out_mem_ctx;
1198 } else {
1199 mem_ctx = state;
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);
1206 return;
1209 /* Copy out parameters */
1211 /* Copy result */
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,
1222 WERROR *result)
1224 struct rpccli_srvsvc_NetCharDevQPurgeSelf_state *state = tevent_req_data(
1225 req, struct rpccli_srvsvc_NetCharDevQPurgeSelf_state);
1226 NTSTATUS status;
1228 if (tevent_req_is_nterror(req, &status)) {
1229 tevent_req_received(req);
1230 return status;
1233 /* Steal possbile out parameters to the callers context */
1234 talloc_steal(mem_ctx, state->out_mem_ctx);
1236 /* Return result */
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)] */,
1248 WERROR *werror)
1250 struct srvsvc_NetCharDevQPurgeSelf r;
1251 NTSTATUS status;
1253 /* In parameters */
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,
1259 mem_ctx,
1260 &ndr_table_srvsvc,
1261 NDR_SRVSVC_NETCHARDEVQPURGESELF,
1262 &r);
1264 if (!NT_STATUS_IS_OK(status)) {
1265 return status;
1268 if (NT_STATUS_IS_ERR(status)) {
1269 return status;
1272 /* Return variables */
1274 /* Return result */
1275 if (werror) {
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);
1307 if (req == NULL) {
1308 return NULL;
1310 state->out_mem_ctx = NULL;
1311 state->dispatch_recv = cli->dispatch_recv;
1313 /* In parameters */
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;
1325 /* Result */
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,
1338 &ndr_table_srvsvc,
1339 NDR_SRVSVC_NETCONNENUM,
1340 &state->tmp);
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);
1345 return 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);
1354 NTSTATUS status;
1355 TALLOC_CTX *mem_ctx;
1357 if (state->out_mem_ctx) {
1358 mem_ctx = state->out_mem_ctx;
1359 } else {
1360 mem_ctx = state;
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);
1367 return;
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;
1377 /* Copy result */
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,
1388 WERROR *result)
1390 struct rpccli_srvsvc_NetConnEnum_state *state = tevent_req_data(
1391 req, struct rpccli_srvsvc_NetConnEnum_state);
1392 NTSTATUS status;
1394 if (tevent_req_is_nterror(req, &status)) {
1395 tevent_req_received(req);
1396 return status;
1399 /* Steal possbile out parameters to the callers context */
1400 talloc_steal(mem_ctx, state->out_mem_ctx);
1402 /* Return result */
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] */,
1417 WERROR *werror)
1419 struct srvsvc_NetConnEnum r;
1420 NTSTATUS status;
1422 /* In parameters */
1423 r.in.server_unc = server_unc;
1424 r.in.path = path;
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,
1430 mem_ctx,
1431 &ndr_table_srvsvc,
1432 NDR_SRVSVC_NETCONNENUM,
1433 &r);
1435 if (!NT_STATUS_IS_OK(status)) {
1436 return status;
1439 if (NT_STATUS_IS_ERR(status)) {
1440 return 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;
1450 /* Return result */
1451 if (werror) {
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);
1484 if (req == NULL) {
1485 return NULL;
1487 state->out_mem_ctx = NULL;
1488 state->dispatch_recv = cli->dispatch_recv;
1490 /* In parameters */
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;
1503 /* Result */
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,
1516 &ndr_table_srvsvc,
1517 NDR_SRVSVC_NETFILEENUM,
1518 &state->tmp);
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);
1523 return 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);
1532 NTSTATUS status;
1533 TALLOC_CTX *mem_ctx;
1535 if (state->out_mem_ctx) {
1536 mem_ctx = state->out_mem_ctx;
1537 } else {
1538 mem_ctx = state;
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);
1545 return;
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;
1555 /* Copy result */
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,
1566 WERROR *result)
1568 struct rpccli_srvsvc_NetFileEnum_state *state = tevent_req_data(
1569 req, struct rpccli_srvsvc_NetFileEnum_state);
1570 NTSTATUS status;
1572 if (tevent_req_is_nterror(req, &status)) {
1573 tevent_req_received(req);
1574 return status;
1577 /* Steal possbile out parameters to the callers context */
1578 talloc_steal(mem_ctx, state->out_mem_ctx);
1580 /* Return result */
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] */,
1596 WERROR *werror)
1598 struct srvsvc_NetFileEnum r;
1599 NTSTATUS status;
1601 /* In parameters */
1602 r.in.server_unc = server_unc;
1603 r.in.path = path;
1604 r.in.user = user;
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,
1610 mem_ctx,
1611 &ndr_table_srvsvc,
1612 NDR_SRVSVC_NETFILEENUM,
1613 &r);
1615 if (!NT_STATUS_IS_OK(status)) {
1616 return status;
1619 if (NT_STATUS_IS_ERR(status)) {
1620 return 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;
1630 /* Return result */
1631 if (werror) {
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);
1661 if (req == NULL) {
1662 return NULL;
1664 state->out_mem_ctx = NULL;
1665 state->dispatch_recv = cli->dispatch_recv;
1667 /* In parameters */
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;
1675 /* Result */
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,
1688 &ndr_table_srvsvc,
1689 NDR_SRVSVC_NETFILEGETINFO,
1690 &state->tmp);
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);
1695 return 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);
1704 NTSTATUS status;
1705 TALLOC_CTX *mem_ctx;
1707 if (state->out_mem_ctx) {
1708 mem_ctx = state->out_mem_ctx;
1709 } else {
1710 mem_ctx = state;
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);
1717 return;
1720 /* Copy out parameters */
1721 *state->orig.out.info = *state->tmp.out.info;
1723 /* Copy result */
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,
1734 WERROR *result)
1736 struct rpccli_srvsvc_NetFileGetInfo_state *state = tevent_req_data(
1737 req, struct rpccli_srvsvc_NetFileGetInfo_state);
1738 NTSTATUS status;
1740 if (tevent_req_is_nterror(req, &status)) {
1741 tevent_req_received(req);
1742 return status;
1745 /* Steal possbile out parameters to the callers context */
1746 talloc_steal(mem_ctx, state->out_mem_ctx);
1748 /* Return result */
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)] */,
1761 WERROR *werror)
1763 struct srvsvc_NetFileGetInfo r;
1764 NTSTATUS status;
1766 /* In parameters */
1767 r.in.server_unc = server_unc;
1768 r.in.fid = fid;
1769 r.in.level = level;
1771 status = cli->dispatch(cli,
1772 mem_ctx,
1773 &ndr_table_srvsvc,
1774 NDR_SRVSVC_NETFILEGETINFO,
1775 &r);
1777 if (!NT_STATUS_IS_OK(status)) {
1778 return status;
1781 if (NT_STATUS_IS_ERR(status)) {
1782 return status;
1785 /* Return variables */
1786 *info = *r.out.info;
1788 /* Return result */
1789 if (werror) {
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);
1817 if (req == NULL) {
1818 return NULL;
1820 state->out_mem_ctx = NULL;
1821 state->dispatch_recv = cli->dispatch_recv;
1823 /* In parameters */
1824 state->orig.in.server_unc = _server_unc;
1825 state->orig.in.fid = _fid;
1827 /* Out parameters */
1829 /* Result */
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,
1836 &ndr_table_srvsvc,
1837 NDR_SRVSVC_NETFILECLOSE,
1838 &state->tmp);
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);
1843 return 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);
1852 NTSTATUS status;
1853 TALLOC_CTX *mem_ctx;
1855 if (state->out_mem_ctx) {
1856 mem_ctx = state->out_mem_ctx;
1857 } else {
1858 mem_ctx = state;
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);
1865 return;
1868 /* Copy out parameters */
1870 /* Copy result */
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,
1881 WERROR *result)
1883 struct rpccli_srvsvc_NetFileClose_state *state = tevent_req_data(
1884 req, struct rpccli_srvsvc_NetFileClose_state);
1885 NTSTATUS status;
1887 if (tevent_req_is_nterror(req, &status)) {
1888 tevent_req_received(req);
1889 return status;
1892 /* Steal possbile out parameters to the callers context */
1893 talloc_steal(mem_ctx, state->out_mem_ctx);
1895 /* Return result */
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] */,
1906 WERROR *werror)
1908 struct srvsvc_NetFileClose r;
1909 NTSTATUS status;
1911 /* In parameters */
1912 r.in.server_unc = server_unc;
1913 r.in.fid = fid;
1915 status = cli->dispatch(cli,
1916 mem_ctx,
1917 &ndr_table_srvsvc,
1918 NDR_SRVSVC_NETFILECLOSE,
1919 &r);
1921 if (!NT_STATUS_IS_OK(status)) {
1922 return status;
1925 if (NT_STATUS_IS_ERR(status)) {
1926 return status;
1929 /* Return variables */
1931 /* Return result */
1932 if (werror) {
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);
1965 if (req == NULL) {
1966 return NULL;
1968 state->out_mem_ctx = NULL;
1969 state->dispatch_recv = cli->dispatch_recv;
1971 /* In parameters */
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;
1984 /* Result */
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,
1997 &ndr_table_srvsvc,
1998 NDR_SRVSVC_NETSESSENUM,
1999 &state->tmp);
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);
2004 return 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);
2013 NTSTATUS status;
2014 TALLOC_CTX *mem_ctx;
2016 if (state->out_mem_ctx) {
2017 mem_ctx = state->out_mem_ctx;
2018 } else {
2019 mem_ctx = state;
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);
2026 return;
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;
2036 /* Copy result */
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,
2047 WERROR *result)
2049 struct rpccli_srvsvc_NetSessEnum_state *state = tevent_req_data(
2050 req, struct rpccli_srvsvc_NetSessEnum_state);
2051 NTSTATUS status;
2053 if (tevent_req_is_nterror(req, &status)) {
2054 tevent_req_received(req);
2055 return status;
2058 /* Steal possbile out parameters to the callers context */
2059 talloc_steal(mem_ctx, state->out_mem_ctx);
2061 /* Return result */
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] */,
2077 WERROR *werror)
2079 struct srvsvc_NetSessEnum r;
2080 NTSTATUS status;
2082 /* In parameters */
2083 r.in.server_unc = server_unc;
2084 r.in.client = client;
2085 r.in.user = user;
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,
2091 mem_ctx,
2092 &ndr_table_srvsvc,
2093 NDR_SRVSVC_NETSESSENUM,
2094 &r);
2096 if (!NT_STATUS_IS_OK(status)) {
2097 return status;
2100 if (NT_STATUS_IS_ERR(status)) {
2101 return 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;
2111 /* Return result */
2112 if (werror) {
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);
2141 if (req == NULL) {
2142 return NULL;
2144 state->out_mem_ctx = NULL;
2145 state->dispatch_recv = cli->dispatch_recv;
2147 /* In parameters */
2148 state->orig.in.server_unc = _server_unc;
2149 state->orig.in.client = _client;
2150 state->orig.in.user = _user;
2152 /* Out parameters */
2154 /* Result */
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,
2161 &ndr_table_srvsvc,
2162 NDR_SRVSVC_NETSESSDEL,
2163 &state->tmp);
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);
2168 return 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);
2177 NTSTATUS status;
2178 TALLOC_CTX *mem_ctx;
2180 if (state->out_mem_ctx) {
2181 mem_ctx = state->out_mem_ctx;
2182 } else {
2183 mem_ctx = state;
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);
2190 return;
2193 /* Copy out parameters */
2195 /* Copy result */
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,
2206 WERROR *result)
2208 struct rpccli_srvsvc_NetSessDel_state *state = tevent_req_data(
2209 req, struct rpccli_srvsvc_NetSessDel_state);
2210 NTSTATUS status;
2212 if (tevent_req_is_nterror(req, &status)) {
2213 tevent_req_received(req);
2214 return status;
2217 /* Steal possbile out parameters to the callers context */
2218 talloc_steal(mem_ctx, state->out_mem_ctx);
2220 /* Return result */
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)] */,
2232 WERROR *werror)
2234 struct srvsvc_NetSessDel r;
2235 NTSTATUS status;
2237 /* In parameters */
2238 r.in.server_unc = server_unc;
2239 r.in.client = client;
2240 r.in.user = user;
2242 status = cli->dispatch(cli,
2243 mem_ctx,
2244 &ndr_table_srvsvc,
2245 NDR_SRVSVC_NETSESSDEL,
2246 &r);
2248 if (!NT_STATUS_IS_OK(status)) {
2249 return status;
2252 if (NT_STATUS_IS_ERR(status)) {
2253 return status;
2256 /* Return variables */
2258 /* Return result */
2259 if (werror) {
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);
2289 if (req == NULL) {
2290 return NULL;
2292 state->out_mem_ctx = NULL;
2293 state->dispatch_recv = cli->dispatch_recv;
2295 /* In parameters */
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;
2304 /* Result */
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,
2317 &ndr_table_srvsvc,
2318 NDR_SRVSVC_NETSHAREADD,
2319 &state->tmp);
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);
2324 return 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);
2333 NTSTATUS status;
2334 TALLOC_CTX *mem_ctx;
2336 if (state->out_mem_ctx) {
2337 mem_ctx = state->out_mem_ctx;
2338 } else {
2339 mem_ctx = state;
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);
2346 return;
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;
2354 /* Copy result */
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,
2365 WERROR *result)
2367 struct rpccli_srvsvc_NetShareAdd_state *state = tevent_req_data(
2368 req, struct rpccli_srvsvc_NetShareAdd_state);
2369 NTSTATUS status;
2371 if (tevent_req_is_nterror(req, &status)) {
2372 tevent_req_received(req);
2373 return status;
2376 /* Steal possbile out parameters to the callers context */
2377 talloc_steal(mem_ctx, state->out_mem_ctx);
2379 /* Return result */
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] */,
2392 WERROR *werror)
2394 struct srvsvc_NetShareAdd r;
2395 NTSTATUS status;
2397 /* In parameters */
2398 r.in.server_unc = server_unc;
2399 r.in.level = level;
2400 r.in.info = info;
2401 r.in.parm_error = parm_error;
2403 status = cli->dispatch(cli,
2404 mem_ctx,
2405 &ndr_table_srvsvc,
2406 NDR_SRVSVC_NETSHAREADD,
2407 &r);
2409 if (!NT_STATUS_IS_OK(status)) {
2410 return status;
2413 if (NT_STATUS_IS_ERR(status)) {
2414 return status;
2417 /* Return variables */
2418 if (parm_error && r.out.parm_error) {
2419 *parm_error = *r.out.parm_error;
2422 /* Return result */
2423 if (werror) {
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);
2454 if (req == NULL) {
2455 return NULL;
2457 state->out_mem_ctx = NULL;
2458 state->dispatch_recv = cli->dispatch_recv;
2460 /* In parameters */
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;
2471 /* Result */
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,
2484 &ndr_table_srvsvc,
2485 NDR_SRVSVC_NETSHAREENUMALL,
2486 &state->tmp);
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);
2491 return 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);
2500 NTSTATUS status;
2501 TALLOC_CTX *mem_ctx;
2503 if (state->out_mem_ctx) {
2504 mem_ctx = state->out_mem_ctx;
2505 } else {
2506 mem_ctx = state;
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);
2513 return;
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;
2523 /* Copy result */
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,
2534 WERROR *result)
2536 struct rpccli_srvsvc_NetShareEnumAll_state *state = tevent_req_data(
2537 req, struct rpccli_srvsvc_NetShareEnumAll_state);
2538 NTSTATUS status;
2540 if (tevent_req_is_nterror(req, &status)) {
2541 tevent_req_received(req);
2542 return status;
2545 /* Steal possbile out parameters to the callers context */
2546 talloc_steal(mem_ctx, state->out_mem_ctx);
2548 /* Return result */
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] */,
2562 WERROR *werror)
2564 struct srvsvc_NetShareEnumAll r;
2565 NTSTATUS status;
2567 /* In parameters */
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,
2574 mem_ctx,
2575 &ndr_table_srvsvc,
2576 NDR_SRVSVC_NETSHAREENUMALL,
2577 &r);
2579 if (!NT_STATUS_IS_OK(status)) {
2580 return status;
2583 if (NT_STATUS_IS_ERR(status)) {
2584 return 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;
2594 /* Return result */
2595 if (werror) {
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);
2625 if (req == NULL) {
2626 return NULL;
2628 state->out_mem_ctx = NULL;
2629 state->dispatch_recv = cli->dispatch_recv;
2631 /* In parameters */
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;
2639 /* Result */
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,
2652 &ndr_table_srvsvc,
2653 NDR_SRVSVC_NETSHAREGETINFO,
2654 &state->tmp);
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);
2659 return 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);
2668 NTSTATUS status;
2669 TALLOC_CTX *mem_ctx;
2671 if (state->out_mem_ctx) {
2672 mem_ctx = state->out_mem_ctx;
2673 } else {
2674 mem_ctx = state;
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);
2681 return;
2684 /* Copy out parameters */
2685 *state->orig.out.info = *state->tmp.out.info;
2687 /* Copy result */
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,
2698 WERROR *result)
2700 struct rpccli_srvsvc_NetShareGetInfo_state *state = tevent_req_data(
2701 req, struct rpccli_srvsvc_NetShareGetInfo_state);
2702 NTSTATUS status;
2704 if (tevent_req_is_nterror(req, &status)) {
2705 tevent_req_received(req);
2706 return status;
2709 /* Steal possbile out parameters to the callers context */
2710 talloc_steal(mem_ctx, state->out_mem_ctx);
2712 /* Return result */
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)] */,
2725 WERROR *werror)
2727 struct srvsvc_NetShareGetInfo r;
2728 NTSTATUS status;
2730 /* In parameters */
2731 r.in.server_unc = server_unc;
2732 r.in.share_name = share_name;
2733 r.in.level = level;
2735 status = cli->dispatch(cli,
2736 mem_ctx,
2737 &ndr_table_srvsvc,
2738 NDR_SRVSVC_NETSHAREGETINFO,
2739 &r);
2741 if (!NT_STATUS_IS_OK(status)) {
2742 return status;
2745 if (NT_STATUS_IS_ERR(status)) {
2746 return status;
2749 /* Return variables */
2750 *info = *r.out.info;
2752 /* Return result */
2753 if (werror) {
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);
2784 if (req == NULL) {
2785 return NULL;
2787 state->out_mem_ctx = NULL;
2788 state->dispatch_recv = cli->dispatch_recv;
2790 /* In parameters */
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;
2800 /* Result */
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,
2813 &ndr_table_srvsvc,
2814 NDR_SRVSVC_NETSHARESETINFO,
2815 &state->tmp);
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);
2820 return 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);
2829 NTSTATUS status;
2830 TALLOC_CTX *mem_ctx;
2832 if (state->out_mem_ctx) {
2833 mem_ctx = state->out_mem_ctx;
2834 } else {
2835 mem_ctx = state;
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);
2842 return;
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;
2850 /* Copy result */
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,
2861 WERROR *result)
2863 struct rpccli_srvsvc_NetShareSetInfo_state *state = tevent_req_data(
2864 req, struct rpccli_srvsvc_NetShareSetInfo_state);
2865 NTSTATUS status;
2867 if (tevent_req_is_nterror(req, &status)) {
2868 tevent_req_received(req);
2869 return status;
2872 /* Steal possbile out parameters to the callers context */
2873 talloc_steal(mem_ctx, state->out_mem_ctx);
2875 /* Return result */
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] */,
2889 WERROR *werror)
2891 struct srvsvc_NetShareSetInfo r;
2892 NTSTATUS status;
2894 /* In parameters */
2895 r.in.server_unc = server_unc;
2896 r.in.share_name = share_name;
2897 r.in.level = level;
2898 r.in.info = info;
2899 r.in.parm_error = parm_error;
2901 status = cli->dispatch(cli,
2902 mem_ctx,
2903 &ndr_table_srvsvc,
2904 NDR_SRVSVC_NETSHARESETINFO,
2905 &r);
2907 if (!NT_STATUS_IS_OK(status)) {
2908 return status;
2911 if (NT_STATUS_IS_ERR(status)) {
2912 return status;
2915 /* Return variables */
2916 if (parm_error && r.out.parm_error) {
2917 *parm_error = *r.out.parm_error;
2920 /* Return result */
2921 if (werror) {
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);
2950 if (req == NULL) {
2951 return NULL;
2953 state->out_mem_ctx = NULL;
2954 state->dispatch_recv = cli->dispatch_recv;
2956 /* In parameters */
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 */
2963 /* Result */
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,
2970 &ndr_table_srvsvc,
2971 NDR_SRVSVC_NETSHAREDEL,
2972 &state->tmp);
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);
2977 return 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);
2986 NTSTATUS status;
2987 TALLOC_CTX *mem_ctx;
2989 if (state->out_mem_ctx) {
2990 mem_ctx = state->out_mem_ctx;
2991 } else {
2992 mem_ctx = state;
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);
2999 return;
3002 /* Copy out parameters */
3004 /* Copy result */
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,
3015 WERROR *result)
3017 struct rpccli_srvsvc_NetShareDel_state *state = tevent_req_data(
3018 req, struct rpccli_srvsvc_NetShareDel_state);
3019 NTSTATUS status;
3021 if (tevent_req_is_nterror(req, &status)) {
3022 tevent_req_received(req);
3023 return status;
3026 /* Steal possbile out parameters to the callers context */
3027 talloc_steal(mem_ctx, state->out_mem_ctx);
3029 /* Return result */
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] */,
3041 WERROR *werror)
3043 struct srvsvc_NetShareDel r;
3044 NTSTATUS status;
3046 /* In parameters */
3047 r.in.server_unc = server_unc;
3048 r.in.share_name = share_name;
3049 r.in.reserved = reserved;
3051 status = cli->dispatch(cli,
3052 mem_ctx,
3053 &ndr_table_srvsvc,
3054 NDR_SRVSVC_NETSHAREDEL,
3055 &r);
3057 if (!NT_STATUS_IS_OK(status)) {
3058 return status;
3061 if (NT_STATUS_IS_ERR(status)) {
3062 return status;
3065 /* Return variables */
3067 /* Return result */
3068 if (werror) {
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);
3097 if (req == NULL) {
3098 return NULL;
3100 state->out_mem_ctx = NULL;
3101 state->dispatch_recv = cli->dispatch_recv;
3103 /* In parameters */
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 */
3110 /* Result */
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,
3117 &ndr_table_srvsvc,
3118 NDR_SRVSVC_NETSHAREDELSTICKY,
3119 &state->tmp);
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);
3124 return 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);
3133 NTSTATUS status;
3134 TALLOC_CTX *mem_ctx;
3136 if (state->out_mem_ctx) {
3137 mem_ctx = state->out_mem_ctx;
3138 } else {
3139 mem_ctx = state;
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);
3146 return;
3149 /* Copy out parameters */
3151 /* Copy result */
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,
3162 WERROR *result)
3164 struct rpccli_srvsvc_NetShareDelSticky_state *state = tevent_req_data(
3165 req, struct rpccli_srvsvc_NetShareDelSticky_state);
3166 NTSTATUS status;
3168 if (tevent_req_is_nterror(req, &status)) {
3169 tevent_req_received(req);
3170 return status;
3173 /* Steal possbile out parameters to the callers context */
3174 talloc_steal(mem_ctx, state->out_mem_ctx);
3176 /* Return result */
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] */,
3188 WERROR *werror)
3190 struct srvsvc_NetShareDelSticky r;
3191 NTSTATUS status;
3193 /* In parameters */
3194 r.in.server_unc = server_unc;
3195 r.in.share_name = share_name;
3196 r.in.reserved = reserved;
3198 status = cli->dispatch(cli,
3199 mem_ctx,
3200 &ndr_table_srvsvc,
3201 NDR_SRVSVC_NETSHAREDELSTICKY,
3202 &r);
3204 if (!NT_STATUS_IS_OK(status)) {
3205 return status;
3208 if (NT_STATUS_IS_ERR(status)) {
3209 return status;
3212 /* Return variables */
3214 /* Return result */
3215 if (werror) {
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);
3244 if (req == NULL) {
3245 return NULL;
3247 state->out_mem_ctx = NULL;
3248 state->dispatch_recv = cli->dispatch_recv;
3250 /* In parameters */
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;
3257 /* Result */
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,
3270 &ndr_table_srvsvc,
3271 NDR_SRVSVC_NETSHARECHECK,
3272 &state->tmp);
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);
3277 return 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);
3286 NTSTATUS status;
3287 TALLOC_CTX *mem_ctx;
3289 if (state->out_mem_ctx) {
3290 mem_ctx = state->out_mem_ctx;
3291 } else {
3292 mem_ctx = state;
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);
3299 return;
3302 /* Copy out parameters */
3303 *state->orig.out.type = *state->tmp.out.type;
3305 /* Copy result */
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,
3316 WERROR *result)
3318 struct rpccli_srvsvc_NetShareCheck_state *state = tevent_req_data(
3319 req, struct rpccli_srvsvc_NetShareCheck_state);
3320 NTSTATUS status;
3322 if (tevent_req_is_nterror(req, &status)) {
3323 tevent_req_received(req);
3324 return status;
3327 /* Steal possbile out parameters to the callers context */
3328 talloc_steal(mem_ctx, state->out_mem_ctx);
3330 /* Return result */
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] */,
3342 WERROR *werror)
3344 struct srvsvc_NetShareCheck r;
3345 NTSTATUS status;
3347 /* In parameters */
3348 r.in.server_unc = server_unc;
3349 r.in.device_name = device_name;
3351 status = cli->dispatch(cli,
3352 mem_ctx,
3353 &ndr_table_srvsvc,
3354 NDR_SRVSVC_NETSHARECHECK,
3355 &r);
3357 if (!NT_STATUS_IS_OK(status)) {
3358 return status;
3361 if (NT_STATUS_IS_ERR(status)) {
3362 return status;
3365 /* Return variables */
3366 *type = *r.out.type;
3368 /* Return result */
3369 if (werror) {
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);
3398 if (req == NULL) {
3399 return NULL;
3401 state->out_mem_ctx = NULL;
3402 state->dispatch_recv = cli->dispatch_recv;
3404 /* In parameters */
3405 state->orig.in.server_unc = _server_unc;
3406 state->orig.in.level = _level;
3408 /* Out parameters */
3409 state->orig.out.info = _info;
3411 /* Result */
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,
3424 &ndr_table_srvsvc,
3425 NDR_SRVSVC_NETSRVGETINFO,
3426 &state->tmp);
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);
3431 return 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);
3440 NTSTATUS status;
3441 TALLOC_CTX *mem_ctx;
3443 if (state->out_mem_ctx) {
3444 mem_ctx = state->out_mem_ctx;
3445 } else {
3446 mem_ctx = state;
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);
3453 return;
3456 /* Copy out parameters */
3457 *state->orig.out.info = *state->tmp.out.info;
3459 /* Copy result */
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,
3470 WERROR *result)
3472 struct rpccli_srvsvc_NetSrvGetInfo_state *state = tevent_req_data(
3473 req, struct rpccli_srvsvc_NetSrvGetInfo_state);
3474 NTSTATUS status;
3476 if (tevent_req_is_nterror(req, &status)) {
3477 tevent_req_received(req);
3478 return status;
3481 /* Steal possbile out parameters to the callers context */
3482 talloc_steal(mem_ctx, state->out_mem_ctx);
3484 /* Return result */
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)] */,
3496 WERROR *werror)
3498 struct srvsvc_NetSrvGetInfo r;
3499 NTSTATUS status;
3501 /* In parameters */
3502 r.in.server_unc = server_unc;
3503 r.in.level = level;
3505 status = cli->dispatch(cli,
3506 mem_ctx,
3507 &ndr_table_srvsvc,
3508 NDR_SRVSVC_NETSRVGETINFO,
3509 &r);
3511 if (!NT_STATUS_IS_OK(status)) {
3512 return status;
3515 if (NT_STATUS_IS_ERR(status)) {
3516 return status;
3519 /* Return variables */
3520 *info = *r.out.info;
3522 /* Return result */
3523 if (werror) {
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);
3553 if (req == NULL) {
3554 return NULL;
3556 state->out_mem_ctx = NULL;
3557 state->dispatch_recv = cli->dispatch_recv;
3559 /* In parameters */
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;
3568 /* Result */
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,
3581 &ndr_table_srvsvc,
3582 NDR_SRVSVC_NETSRVSETINFO,
3583 &state->tmp);
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);
3588 return 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);
3597 NTSTATUS status;
3598 TALLOC_CTX *mem_ctx;
3600 if (state->out_mem_ctx) {
3601 mem_ctx = state->out_mem_ctx;
3602 } else {
3603 mem_ctx = state;
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);
3610 return;
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;
3618 /* Copy result */
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,
3629 WERROR *result)
3631 struct rpccli_srvsvc_NetSrvSetInfo_state *state = tevent_req_data(
3632 req, struct rpccli_srvsvc_NetSrvSetInfo_state);
3633 NTSTATUS status;
3635 if (tevent_req_is_nterror(req, &status)) {
3636 tevent_req_received(req);
3637 return status;
3640 /* Steal possbile out parameters to the callers context */
3641 talloc_steal(mem_ctx, state->out_mem_ctx);
3643 /* Return result */
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] */,
3656 WERROR *werror)
3658 struct srvsvc_NetSrvSetInfo r;
3659 NTSTATUS status;
3661 /* In parameters */
3662 r.in.server_unc = server_unc;
3663 r.in.level = level;
3664 r.in.info = info;
3665 r.in.parm_error = parm_error;
3667 status = cli->dispatch(cli,
3668 mem_ctx,
3669 &ndr_table_srvsvc,
3670 NDR_SRVSVC_NETSRVSETINFO,
3671 &r);
3673 if (!NT_STATUS_IS_OK(status)) {
3674 return status;
3677 if (NT_STATUS_IS_ERR(status)) {
3678 return status;
3681 /* Return variables */
3682 if (parm_error && r.out.parm_error) {
3683 *parm_error = *r.out.parm_error;
3686 /* Return result */
3687 if (werror) {
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);
3719 if (req == NULL) {
3720 return NULL;
3722 state->out_mem_ctx = NULL;
3723 state->dispatch_recv = cli->dispatch_recv;
3725 /* In parameters */
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;
3737 /* Result */
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,
3750 &ndr_table_srvsvc,
3751 NDR_SRVSVC_NETDISKENUM,
3752 &state->tmp);
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);
3757 return 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);
3766 NTSTATUS status;
3767 TALLOC_CTX *mem_ctx;
3769 if (state->out_mem_ctx) {
3770 mem_ctx = state->out_mem_ctx;
3771 } else {
3772 mem_ctx = state;
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);
3779 return;
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;
3789 /* Copy result */
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,
3800 WERROR *result)
3802 struct rpccli_srvsvc_NetDiskEnum_state *state = tevent_req_data(
3803 req, struct rpccli_srvsvc_NetDiskEnum_state);
3804 NTSTATUS status;
3806 if (tevent_req_is_nterror(req, &status)) {
3807 tevent_req_received(req);
3808 return status;
3811 /* Steal possbile out parameters to the callers context */
3812 talloc_steal(mem_ctx, state->out_mem_ctx);
3814 /* Return result */
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] */,
3829 WERROR *werror)
3831 struct srvsvc_NetDiskEnum r;
3832 NTSTATUS status;
3834 /* In parameters */
3835 r.in.server_unc = server_unc;
3836 r.in.level = level;
3837 r.in.info = info;
3838 r.in.maxlen = maxlen;
3839 r.in.resume_handle = resume_handle;
3841 status = cli->dispatch(cli,
3842 mem_ctx,
3843 &ndr_table_srvsvc,
3844 NDR_SRVSVC_NETDISKENUM,
3845 &r);
3847 if (!NT_STATUS_IS_OK(status)) {
3848 return status;
3851 if (NT_STATUS_IS_ERR(status)) {
3852 return 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;
3862 /* Return result */
3863 if (werror) {
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);
3894 if (req == NULL) {
3895 return NULL;
3897 state->out_mem_ctx = NULL;
3898 state->dispatch_recv = cli->dispatch_recv;
3900 /* In parameters */
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;
3909 /* Result */
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,
3922 &ndr_table_srvsvc,
3923 NDR_SRVSVC_NETSERVERSTATISTICSGET,
3924 &state->tmp);
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);
3929 return 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);
3938 NTSTATUS status;
3939 TALLOC_CTX *mem_ctx;
3941 if (state->out_mem_ctx) {
3942 mem_ctx = state->out_mem_ctx;
3943 } else {
3944 mem_ctx = state;
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);
3951 return;
3954 /* Copy out parameters */
3955 *state->orig.out.stats = *state->tmp.out.stats;
3957 /* Copy result */
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,
3968 WERROR *result)
3970 struct rpccli_srvsvc_NetServerStatisticsGet_state *state = tevent_req_data(
3971 req, struct rpccli_srvsvc_NetServerStatisticsGet_state);
3972 NTSTATUS status;
3974 if (tevent_req_is_nterror(req, &status)) {
3975 tevent_req_received(req);
3976 return status;
3979 /* Steal possbile out parameters to the callers context */
3980 talloc_steal(mem_ctx, state->out_mem_ctx);
3982 /* Return result */
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] */,
3996 WERROR *werror)
3998 struct srvsvc_NetServerStatisticsGet r;
3999 NTSTATUS status;
4001 /* In parameters */
4002 r.in.server_unc = server_unc;
4003 r.in.service = service;
4004 r.in.level = level;
4005 r.in.options = options;
4007 status = cli->dispatch(cli,
4008 mem_ctx,
4009 &ndr_table_srvsvc,
4010 NDR_SRVSVC_NETSERVERSTATISTICSGET,
4011 &r);
4013 if (!NT_STATUS_IS_OK(status)) {
4014 return status;
4017 if (NT_STATUS_IS_ERR(status)) {
4018 return status;
4021 /* Return variables */
4022 *stats = *r.out.stats;
4024 /* Return result */
4025 if (werror) {
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);
4054 if (req == NULL) {
4055 return NULL;
4057 state->out_mem_ctx = NULL;
4058 state->dispatch_recv = cli->dispatch_recv;
4060 /* In parameters */
4061 state->orig.in.server_unc = _server_unc;
4062 state->orig.in.level = _level;
4063 state->orig.in.info = _info;
4065 /* Out parameters */
4067 /* Result */
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,
4074 &ndr_table_srvsvc,
4075 NDR_SRVSVC_NETTRANSPORTADD,
4076 &state->tmp);
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);
4081 return 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);
4090 NTSTATUS status;
4091 TALLOC_CTX *mem_ctx;
4093 if (state->out_mem_ctx) {
4094 mem_ctx = state->out_mem_ctx;
4095 } else {
4096 mem_ctx = state;
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);
4103 return;
4106 /* Copy out parameters */
4108 /* Copy result */
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,
4119 WERROR *result)
4121 struct rpccli_srvsvc_NetTransportAdd_state *state = tevent_req_data(
4122 req, struct rpccli_srvsvc_NetTransportAdd_state);
4123 NTSTATUS status;
4125 if (tevent_req_is_nterror(req, &status)) {
4126 tevent_req_received(req);
4127 return status;
4130 /* Steal possbile out parameters to the callers context */
4131 talloc_steal(mem_ctx, state->out_mem_ctx);
4133 /* Return result */
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)] */,
4145 WERROR *werror)
4147 struct srvsvc_NetTransportAdd r;
4148 NTSTATUS status;
4150 /* In parameters */
4151 r.in.server_unc = server_unc;
4152 r.in.level = level;
4153 r.in.info = info;
4155 status = cli->dispatch(cli,
4156 mem_ctx,
4157 &ndr_table_srvsvc,
4158 NDR_SRVSVC_NETTRANSPORTADD,
4159 &r);
4161 if (!NT_STATUS_IS_OK(status)) {
4162 return status;
4165 if (NT_STATUS_IS_ERR(status)) {
4166 return status;
4169 /* Return variables */
4171 /* Return result */
4172 if (werror) {
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);
4203 if (req == NULL) {
4204 return NULL;
4206 state->out_mem_ctx = NULL;
4207 state->dispatch_recv = cli->dispatch_recv;
4209 /* In parameters */
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;
4220 /* Result */
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,
4233 &ndr_table_srvsvc,
4234 NDR_SRVSVC_NETTRANSPORTENUM,
4235 &state->tmp);
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);
4240 return 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);
4249 NTSTATUS status;
4250 TALLOC_CTX *mem_ctx;
4252 if (state->out_mem_ctx) {
4253 mem_ctx = state->out_mem_ctx;
4254 } else {
4255 mem_ctx = state;
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);
4262 return;
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;
4272 /* Copy result */
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,
4283 WERROR *result)
4285 struct rpccli_srvsvc_NetTransportEnum_state *state = tevent_req_data(
4286 req, struct rpccli_srvsvc_NetTransportEnum_state);
4287 NTSTATUS status;
4289 if (tevent_req_is_nterror(req, &status)) {
4290 tevent_req_received(req);
4291 return status;
4294 /* Steal possbile out parameters to the callers context */
4295 talloc_steal(mem_ctx, state->out_mem_ctx);
4297 /* Return result */
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] */,
4311 WERROR *werror)
4313 struct srvsvc_NetTransportEnum r;
4314 NTSTATUS status;
4316 /* In parameters */
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,
4323 mem_ctx,
4324 &ndr_table_srvsvc,
4325 NDR_SRVSVC_NETTRANSPORTENUM,
4326 &r);
4328 if (!NT_STATUS_IS_OK(status)) {
4329 return status;
4332 if (NT_STATUS_IS_ERR(status)) {
4333 return 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;
4343 /* Return result */
4344 if (werror) {
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);
4373 if (req == NULL) {
4374 return NULL;
4376 state->out_mem_ctx = NULL;
4377 state->dispatch_recv = cli->dispatch_recv;
4379 /* In parameters */
4380 state->orig.in.server_unc = _server_unc;
4381 state->orig.in.level = _level;
4382 state->orig.in.info0 = _info0;
4384 /* Out parameters */
4386 /* Result */
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,
4393 &ndr_table_srvsvc,
4394 NDR_SRVSVC_NETTRANSPORTDEL,
4395 &state->tmp);
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);
4400 return 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);
4409 NTSTATUS status;
4410 TALLOC_CTX *mem_ctx;
4412 if (state->out_mem_ctx) {
4413 mem_ctx = state->out_mem_ctx;
4414 } else {
4415 mem_ctx = state;
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);
4422 return;
4425 /* Copy out parameters */
4427 /* Copy result */
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,
4438 WERROR *result)
4440 struct rpccli_srvsvc_NetTransportDel_state *state = tevent_req_data(
4441 req, struct rpccli_srvsvc_NetTransportDel_state);
4442 NTSTATUS status;
4444 if (tevent_req_is_nterror(req, &status)) {
4445 tevent_req_received(req);
4446 return status;
4449 /* Steal possbile out parameters to the callers context */
4450 talloc_steal(mem_ctx, state->out_mem_ctx);
4452 /* Return result */
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] */,
4464 WERROR *werror)
4466 struct srvsvc_NetTransportDel r;
4467 NTSTATUS status;
4469 /* In parameters */
4470 r.in.server_unc = server_unc;
4471 r.in.level = level;
4472 r.in.info0 = info0;
4474 status = cli->dispatch(cli,
4475 mem_ctx,
4476 &ndr_table_srvsvc,
4477 NDR_SRVSVC_NETTRANSPORTDEL,
4478 &r);
4480 if (!NT_STATUS_IS_OK(status)) {
4481 return status;
4484 if (NT_STATUS_IS_ERR(status)) {
4485 return status;
4488 /* Return variables */
4490 /* Return result */
4491 if (werror) {
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);
4519 if (req == NULL) {
4520 return NULL;
4522 state->out_mem_ctx = NULL;
4523 state->dispatch_recv = cli->dispatch_recv;
4525 /* In parameters */
4526 state->orig.in.server_unc = _server_unc;
4528 /* Out parameters */
4529 state->orig.out.info = _info;
4531 /* Result */
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,
4544 &ndr_table_srvsvc,
4545 NDR_SRVSVC_NETREMOTETOD,
4546 &state->tmp);
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);
4551 return 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);
4560 NTSTATUS status;
4561 TALLOC_CTX *mem_ctx;
4563 if (state->out_mem_ctx) {
4564 mem_ctx = state->out_mem_ctx;
4565 } else {
4566 mem_ctx = state;
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);
4573 return;
4576 /* Copy out parameters */
4577 *state->orig.out.info = *state->tmp.out.info;
4579 /* Copy result */
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,
4590 WERROR *result)
4592 struct rpccli_srvsvc_NetRemoteTOD_state *state = tevent_req_data(
4593 req, struct rpccli_srvsvc_NetRemoteTOD_state);
4594 NTSTATUS status;
4596 if (tevent_req_is_nterror(req, &status)) {
4597 tevent_req_received(req);
4598 return status;
4601 /* Steal possbile out parameters to the callers context */
4602 talloc_steal(mem_ctx, state->out_mem_ctx);
4604 /* Return result */
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] */,
4615 WERROR *werror)
4617 struct srvsvc_NetRemoteTOD r;
4618 NTSTATUS status;
4620 /* In parameters */
4621 r.in.server_unc = server_unc;
4623 status = cli->dispatch(cli,
4624 mem_ctx,
4625 &ndr_table_srvsvc,
4626 NDR_SRVSVC_NETREMOTETOD,
4627 &r);
4629 if (!NT_STATUS_IS_OK(status)) {
4630 return status;
4633 if (NT_STATUS_IS_ERR(status)) {
4634 return status;
4637 /* Return variables */
4638 *info = *r.out.info;
4640 /* Return result */
4641 if (werror) {
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);
4671 if (req == NULL) {
4672 return NULL;
4674 state->out_mem_ctx = NULL;
4675 state->dispatch_recv = cli->dispatch_recv;
4677 /* In parameters */
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 */
4685 /* Result */
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,
4692 &ndr_table_srvsvc,
4693 NDR_SRVSVC_NETSETSERVICEBITS,
4694 &state->tmp);
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);
4699 return 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);
4708 NTSTATUS status;
4709 TALLOC_CTX *mem_ctx;
4711 if (state->out_mem_ctx) {
4712 mem_ctx = state->out_mem_ctx;
4713 } else {
4714 mem_ctx = state;
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);
4721 return;
4724 /* Copy out parameters */
4726 /* Copy result */
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,
4737 WERROR *result)
4739 struct rpccli_srvsvc_NetSetServiceBits_state *state = tevent_req_data(
4740 req, struct rpccli_srvsvc_NetSetServiceBits_state);
4741 NTSTATUS status;
4743 if (tevent_req_is_nterror(req, &status)) {
4744 tevent_req_received(req);
4745 return status;
4748 /* Steal possbile out parameters to the callers context */
4749 talloc_steal(mem_ctx, state->out_mem_ctx);
4751 /* Return result */
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] */,
4764 WERROR *werror)
4766 struct srvsvc_NetSetServiceBits r;
4767 NTSTATUS status;
4769 /* In parameters */
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,
4776 mem_ctx,
4777 &ndr_table_srvsvc,
4778 NDR_SRVSVC_NETSETSERVICEBITS,
4779 &r);
4781 if (!NT_STATUS_IS_OK(status)) {
4782 return status;
4785 if (NT_STATUS_IS_ERR(status)) {
4786 return status;
4789 /* Return variables */
4791 /* Return result */
4792 if (werror) {
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);
4822 if (req == NULL) {
4823 return NULL;
4825 state->out_mem_ctx = NULL;
4826 state->dispatch_recv = cli->dispatch_recv;
4828 /* In parameters */
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;
4836 /* Result */
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,
4849 &ndr_table_srvsvc,
4850 NDR_SRVSVC_NETPATHTYPE,
4851 &state->tmp);
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);
4856 return 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);
4865 NTSTATUS status;
4866 TALLOC_CTX *mem_ctx;
4868 if (state->out_mem_ctx) {
4869 mem_ctx = state->out_mem_ctx;
4870 } else {
4871 mem_ctx = state;
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);
4878 return;
4881 /* Copy out parameters */
4882 *state->orig.out.pathtype = *state->tmp.out.pathtype;
4884 /* Copy result */
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,
4895 WERROR *result)
4897 struct rpccli_srvsvc_NetPathType_state *state = tevent_req_data(
4898 req, struct rpccli_srvsvc_NetPathType_state);
4899 NTSTATUS status;
4901 if (tevent_req_is_nterror(req, &status)) {
4902 tevent_req_received(req);
4903 return status;
4906 /* Steal possbile out parameters to the callers context */
4907 talloc_steal(mem_ctx, state->out_mem_ctx);
4909 /* Return result */
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] */,
4922 WERROR *werror)
4924 struct srvsvc_NetPathType r;
4925 NTSTATUS status;
4927 /* In parameters */
4928 r.in.server_unc = server_unc;
4929 r.in.path = path;
4930 r.in.pathflags = pathflags;
4932 status = cli->dispatch(cli,
4933 mem_ctx,
4934 &ndr_table_srvsvc,
4935 NDR_SRVSVC_NETPATHTYPE,
4936 &r);
4938 if (!NT_STATUS_IS_OK(status)) {
4939 return status;
4942 if (NT_STATUS_IS_ERR(status)) {
4943 return status;
4946 /* Return variables */
4947 *pathtype = *r.out.pathtype;
4949 /* Return result */
4950 if (werror) {
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);
4983 if (req == NULL) {
4984 return NULL;
4986 state->out_mem_ctx = NULL;
4987 state->dispatch_recv = cli->dispatch_recv;
4989 /* In parameters */
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;
5001 /* Result */
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,
5014 &ndr_table_srvsvc,
5015 NDR_SRVSVC_NETPATHCANONICALIZE,
5016 &state->tmp);
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);
5021 return 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);
5030 NTSTATUS status;
5031 TALLOC_CTX *mem_ctx;
5033 if (state->out_mem_ctx) {
5034 mem_ctx = state->out_mem_ctx;
5035 } else {
5036 mem_ctx = state;
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);
5043 return;
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;
5050 /* Copy result */
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,
5061 WERROR *result)
5063 struct rpccli_srvsvc_NetPathCanonicalize_state *state = tevent_req_data(
5064 req, struct rpccli_srvsvc_NetPathCanonicalize_state);
5065 NTSTATUS status;
5067 if (tevent_req_is_nterror(req, &status)) {
5068 tevent_req_received(req);
5069 return status;
5072 /* Steal possbile out parameters to the callers context */
5073 talloc_steal(mem_ctx, state->out_mem_ctx);
5075 /* Return result */
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] */,
5091 WERROR *werror)
5093 struct srvsvc_NetPathCanonicalize r;
5094 NTSTATUS status;
5096 /* In parameters */
5097 r.in.server_unc = server_unc;
5098 r.in.path = path;
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,
5105 mem_ctx,
5106 &ndr_table_srvsvc,
5107 NDR_SRVSVC_NETPATHCANONICALIZE,
5108 &r);
5110 if (!NT_STATUS_IS_OK(status)) {
5111 return status;
5114 if (NT_STATUS_IS_ERR(status)) {
5115 return status;
5118 /* Return variables */
5119 memcpy(can_path, r.out.can_path, (r.in.maxbuf) * sizeof(*can_path));
5120 *pathtype = *r.out.pathtype;
5122 /* Return result */
5123 if (werror) {
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);
5154 if (req == NULL) {
5155 return NULL;
5157 state->out_mem_ctx = NULL;
5158 state->dispatch_recv = cli->dispatch_recv;
5160 /* In parameters */
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 */
5169 /* Result */
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,
5176 &ndr_table_srvsvc,
5177 NDR_SRVSVC_NETPATHCOMPARE,
5178 &state->tmp);
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);
5183 return 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);
5192 NTSTATUS status;
5193 TALLOC_CTX *mem_ctx;
5195 if (state->out_mem_ctx) {
5196 mem_ctx = state->out_mem_ctx;
5197 } else {
5198 mem_ctx = state;
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);
5205 return;
5208 /* Copy out parameters */
5210 /* Copy result */
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,
5221 WERROR *result)
5223 struct rpccli_srvsvc_NetPathCompare_state *state = tevent_req_data(
5224 req, struct rpccli_srvsvc_NetPathCompare_state);
5225 NTSTATUS status;
5227 if (tevent_req_is_nterror(req, &status)) {
5228 tevent_req_received(req);
5229 return status;
5232 /* Steal possbile out parameters to the callers context */
5233 talloc_steal(mem_ctx, state->out_mem_ctx);
5235 /* Return result */
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] */,
5249 WERROR *werror)
5251 struct srvsvc_NetPathCompare r;
5252 NTSTATUS status;
5254 /* In parameters */
5255 r.in.server_unc = server_unc;
5256 r.in.path1 = path1;
5257 r.in.path2 = path2;
5258 r.in.pathtype = pathtype;
5259 r.in.pathflags = pathflags;
5261 status = cli->dispatch(cli,
5262 mem_ctx,
5263 &ndr_table_srvsvc,
5264 NDR_SRVSVC_NETPATHCOMPARE,
5265 &r);
5267 if (!NT_STATUS_IS_OK(status)) {
5268 return status;
5271 if (NT_STATUS_IS_ERR(status)) {
5272 return status;
5275 /* Return variables */
5277 /* Return result */
5278 if (werror) {
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);
5308 if (req == NULL) {
5309 return NULL;
5311 state->out_mem_ctx = NULL;
5312 state->dispatch_recv = cli->dispatch_recv;
5314 /* In parameters */
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 */
5322 /* Result */
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,
5329 &ndr_table_srvsvc,
5330 NDR_SRVSVC_NETNAMEVALIDATE,
5331 &state->tmp);
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);
5336 return 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);
5345 NTSTATUS status;
5346 TALLOC_CTX *mem_ctx;
5348 if (state->out_mem_ctx) {
5349 mem_ctx = state->out_mem_ctx;
5350 } else {
5351 mem_ctx = state;
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);
5358 return;
5361 /* Copy out parameters */
5363 /* Copy result */
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,
5374 WERROR *result)
5376 struct rpccli_srvsvc_NetNameValidate_state *state = tevent_req_data(
5377 req, struct rpccli_srvsvc_NetNameValidate_state);
5378 NTSTATUS status;
5380 if (tevent_req_is_nterror(req, &status)) {
5381 tevent_req_received(req);
5382 return status;
5385 /* Steal possbile out parameters to the callers context */
5386 talloc_steal(mem_ctx, state->out_mem_ctx);
5388 /* Return result */
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] */,
5401 WERROR *werror)
5403 struct srvsvc_NetNameValidate r;
5404 NTSTATUS status;
5406 /* In parameters */
5407 r.in.server_unc = server_unc;
5408 r.in.name = name;
5409 r.in.name_type = name_type;
5410 r.in.flags = flags;
5412 status = cli->dispatch(cli,
5413 mem_ctx,
5414 &ndr_table_srvsvc,
5415 NDR_SRVSVC_NETNAMEVALIDATE,
5416 &r);
5418 if (!NT_STATUS_IS_OK(status)) {
5419 return status;
5422 if (NT_STATUS_IS_ERR(status)) {
5423 return status;
5426 /* Return variables */
5428 /* Return result */
5429 if (werror) {
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);
5455 if (req == NULL) {
5456 return NULL;
5458 state->out_mem_ctx = NULL;
5459 state->dispatch_recv = cli->dispatch_recv;
5461 /* In parameters */
5463 /* Out parameters */
5465 /* Result */
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,
5472 &ndr_table_srvsvc,
5473 NDR_SRVSVC_NETRPRNAMECANONICALIZE,
5474 &state->tmp);
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);
5479 return 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);
5488 NTSTATUS status;
5489 TALLOC_CTX *mem_ctx;
5491 if (state->out_mem_ctx) {
5492 mem_ctx = state->out_mem_ctx;
5493 } else {
5494 mem_ctx = state;
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);
5501 return;
5504 /* Copy out parameters */
5506 /* Copy result */
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,
5517 WERROR *result)
5519 struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state *state = tevent_req_data(
5520 req, struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state);
5521 NTSTATUS status;
5523 if (tevent_req_is_nterror(req, &status)) {
5524 tevent_req_received(req);
5525 return status;
5528 /* Steal possbile out parameters to the callers context */
5529 talloc_steal(mem_ctx, state->out_mem_ctx);
5531 /* Return result */
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,
5540 WERROR *werror)
5542 struct srvsvc_NETRPRNAMECANONICALIZE r;
5543 NTSTATUS status;
5545 /* In parameters */
5547 status = cli->dispatch(cli,
5548 mem_ctx,
5549 &ndr_table_srvsvc,
5550 NDR_SRVSVC_NETRPRNAMECANONICALIZE,
5551 &r);
5553 if (!NT_STATUS_IS_OK(status)) {
5554 return status;
5557 if (NT_STATUS_IS_ERR(status)) {
5558 return status;
5561 /* Return variables */
5563 /* Return result */
5564 if (werror) {
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);
5595 if (req == NULL) {
5596 return NULL;
5598 state->out_mem_ctx = NULL;
5599 state->dispatch_recv = cli->dispatch_recv;
5601 /* In parameters */
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 */
5610 /* Result */
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,
5617 &ndr_table_srvsvc,
5618 NDR_SRVSVC_NETPRNAMECOMPARE,
5619 &state->tmp);
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);
5624 return 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);
5633 NTSTATUS status;
5634 TALLOC_CTX *mem_ctx;
5636 if (state->out_mem_ctx) {
5637 mem_ctx = state->out_mem_ctx;
5638 } else {
5639 mem_ctx = state;
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);
5646 return;
5649 /* Copy out parameters */
5651 /* Copy result */
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,
5662 WERROR *result)
5664 struct rpccli_srvsvc_NetPRNameCompare_state *state = tevent_req_data(
5665 req, struct rpccli_srvsvc_NetPRNameCompare_state);
5666 NTSTATUS status;
5668 if (tevent_req_is_nterror(req, &status)) {
5669 tevent_req_received(req);
5670 return status;
5673 /* Steal possbile out parameters to the callers context */
5674 talloc_steal(mem_ctx, state->out_mem_ctx);
5676 /* Return result */
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] */,
5690 WERROR *werror)
5692 struct srvsvc_NetPRNameCompare r;
5693 NTSTATUS status;
5695 /* In parameters */
5696 r.in.server_unc = server_unc;
5697 r.in.name1 = name1;
5698 r.in.name2 = name2;
5699 r.in.name_type = name_type;
5700 r.in.flags = flags;
5702 status = cli->dispatch(cli,
5703 mem_ctx,
5704 &ndr_table_srvsvc,
5705 NDR_SRVSVC_NETPRNAMECOMPARE,
5706 &r);
5708 if (!NT_STATUS_IS_OK(status)) {
5709 return status;
5712 if (NT_STATUS_IS_ERR(status)) {
5713 return status;
5716 /* Return variables */
5718 /* Return result */
5719 if (werror) {
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);
5750 if (req == NULL) {
5751 return NULL;
5753 state->out_mem_ctx = NULL;
5754 state->dispatch_recv = cli->dispatch_recv;
5756 /* In parameters */
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;
5767 /* Result */
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,
5780 &ndr_table_srvsvc,
5781 NDR_SRVSVC_NETSHAREENUM,
5782 &state->tmp);
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);
5787 return 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);
5796 NTSTATUS status;
5797 TALLOC_CTX *mem_ctx;
5799 if (state->out_mem_ctx) {
5800 mem_ctx = state->out_mem_ctx;
5801 } else {
5802 mem_ctx = state;
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);
5809 return;
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;
5819 /* Copy result */
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,
5830 WERROR *result)
5832 struct rpccli_srvsvc_NetShareEnum_state *state = tevent_req_data(
5833 req, struct rpccli_srvsvc_NetShareEnum_state);
5834 NTSTATUS status;
5836 if (tevent_req_is_nterror(req, &status)) {
5837 tevent_req_received(req);
5838 return status;
5841 /* Steal possbile out parameters to the callers context */
5842 talloc_steal(mem_ctx, state->out_mem_ctx);
5844 /* Return result */
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] */,
5858 WERROR *werror)
5860 struct srvsvc_NetShareEnum r;
5861 NTSTATUS status;
5863 /* In parameters */
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,
5870 mem_ctx,
5871 &ndr_table_srvsvc,
5872 NDR_SRVSVC_NETSHAREENUM,
5873 &r);
5875 if (!NT_STATUS_IS_OK(status)) {
5876 return status;
5879 if (NT_STATUS_IS_ERR(status)) {
5880 return 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;
5890 /* Return result */
5891 if (werror) {
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);
5921 if (req == NULL) {
5922 return NULL;
5924 state->out_mem_ctx = NULL;
5925 state->dispatch_recv = cli->dispatch_recv;
5927 /* In parameters */
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;
5935 /* Result */
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,
5948 &ndr_table_srvsvc,
5949 NDR_SRVSVC_NETSHAREDELSTART,
5950 &state->tmp);
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);
5955 return 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);
5964 NTSTATUS status;
5965 TALLOC_CTX *mem_ctx;
5967 if (state->out_mem_ctx) {
5968 mem_ctx = state->out_mem_ctx;
5969 } else {
5970 mem_ctx = state;
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);
5977 return;
5980 /* Copy out parameters */
5981 if (state->orig.out.hnd && state->tmp.out.hnd) {
5982 *state->orig.out.hnd = *state->tmp.out.hnd;
5985 /* Copy result */
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,
5996 WERROR *result)
5998 struct rpccli_srvsvc_NetShareDelStart_state *state = tevent_req_data(
5999 req, struct rpccli_srvsvc_NetShareDelStart_state);
6000 NTSTATUS status;
6002 if (tevent_req_is_nterror(req, &status)) {
6003 tevent_req_received(req);
6004 return status;
6007 /* Steal possbile out parameters to the callers context */
6008 talloc_steal(mem_ctx, state->out_mem_ctx);
6010 /* Return result */
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] */,
6023 WERROR *werror)
6025 struct srvsvc_NetShareDelStart r;
6026 NTSTATUS status;
6028 /* In parameters */
6029 r.in.server_unc = server_unc;
6030 r.in.share = share;
6031 r.in.reserved = reserved;
6033 status = cli->dispatch(cli,
6034 mem_ctx,
6035 &ndr_table_srvsvc,
6036 NDR_SRVSVC_NETSHAREDELSTART,
6037 &r);
6039 if (!NT_STATUS_IS_OK(status)) {
6040 return status;
6043 if (NT_STATUS_IS_ERR(status)) {
6044 return status;
6047 /* Return variables */
6048 if (hnd && r.out.hnd) {
6049 *hnd = *r.out.hnd;
6052 /* Return result */
6053 if (werror) {
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);
6080 if (req == NULL) {
6081 return NULL;
6083 state->out_mem_ctx = NULL;
6084 state->dispatch_recv = cli->dispatch_recv;
6086 /* In parameters */
6087 state->orig.in.hnd = _hnd;
6089 /* Out parameters */
6090 state->orig.out.hnd = _hnd;
6092 /* Result */
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,
6105 &ndr_table_srvsvc,
6106 NDR_SRVSVC_NETSHAREDELCOMMIT,
6107 &state->tmp);
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);
6112 return 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);
6121 NTSTATUS status;
6122 TALLOC_CTX *mem_ctx;
6124 if (state->out_mem_ctx) {
6125 mem_ctx = state->out_mem_ctx;
6126 } else {
6127 mem_ctx = state;
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);
6134 return;
6137 /* Copy out parameters */
6138 if (state->orig.out.hnd && state->tmp.out.hnd) {
6139 *state->orig.out.hnd = *state->tmp.out.hnd;
6142 /* Copy result */
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,
6153 WERROR *result)
6155 struct rpccli_srvsvc_NetShareDelCommit_state *state = tevent_req_data(
6156 req, struct rpccli_srvsvc_NetShareDelCommit_state);
6157 NTSTATUS status;
6159 if (tevent_req_is_nterror(req, &status)) {
6160 tevent_req_received(req);
6161 return status;
6164 /* Steal possbile out parameters to the callers context */
6165 talloc_steal(mem_ctx, state->out_mem_ctx);
6167 /* Return result */
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] */,
6177 WERROR *werror)
6179 struct srvsvc_NetShareDelCommit r;
6180 NTSTATUS status;
6182 /* In parameters */
6183 r.in.hnd = hnd;
6185 status = cli->dispatch(cli,
6186 mem_ctx,
6187 &ndr_table_srvsvc,
6188 NDR_SRVSVC_NETSHAREDELCOMMIT,
6189 &r);
6191 if (!NT_STATUS_IS_OK(status)) {
6192 return status;
6195 if (NT_STATUS_IS_ERR(status)) {
6196 return status;
6199 /* Return variables */
6200 if (hnd && r.out.hnd) {
6201 *hnd = *r.out.hnd;
6204 /* Return result */
6205 if (werror) {
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);
6236 if (req == NULL) {
6237 return NULL;
6239 state->out_mem_ctx = NULL;
6240 state->dispatch_recv = cli->dispatch_recv;
6242 /* In parameters */
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;
6251 /* Result */
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,
6264 &ndr_table_srvsvc,
6265 NDR_SRVSVC_NETGETFILESECURITY,
6266 &state->tmp);
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);
6271 return 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);
6280 NTSTATUS status;
6281 TALLOC_CTX *mem_ctx;
6283 if (state->out_mem_ctx) {
6284 mem_ctx = state->out_mem_ctx;
6285 } else {
6286 mem_ctx = state;
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);
6293 return;
6296 /* Copy out parameters */
6297 *state->orig.out.sd_buf = *state->tmp.out.sd_buf;
6299 /* Copy result */
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,
6310 WERROR *result)
6312 struct rpccli_srvsvc_NetGetFileSecurity_state *state = tevent_req_data(
6313 req, struct rpccli_srvsvc_NetGetFileSecurity_state);
6314 NTSTATUS status;
6316 if (tevent_req_is_nterror(req, &status)) {
6317 tevent_req_received(req);
6318 return status;
6321 /* Steal possbile out parameters to the callers context */
6322 talloc_steal(mem_ctx, state->out_mem_ctx);
6324 /* Return result */
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] */,
6338 WERROR *werror)
6340 struct srvsvc_NetGetFileSecurity r;
6341 NTSTATUS status;
6343 /* In parameters */
6344 r.in.server_unc = server_unc;
6345 r.in.share = share;
6346 r.in.file = file;
6347 r.in.securityinformation = securityinformation;
6349 status = cli->dispatch(cli,
6350 mem_ctx,
6351 &ndr_table_srvsvc,
6352 NDR_SRVSVC_NETGETFILESECURITY,
6353 &r);
6355 if (!NT_STATUS_IS_OK(status)) {
6356 return status;
6359 if (NT_STATUS_IS_ERR(status)) {
6360 return status;
6363 /* Return variables */
6364 *sd_buf = *r.out.sd_buf;
6366 /* Return result */
6367 if (werror) {
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);
6398 if (req == NULL) {
6399 return NULL;
6401 state->out_mem_ctx = NULL;
6402 state->dispatch_recv = cli->dispatch_recv;
6404 /* In parameters */
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 */
6413 /* Result */
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,
6420 &ndr_table_srvsvc,
6421 NDR_SRVSVC_NETSETFILESECURITY,
6422 &state->tmp);
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);
6427 return 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);
6436 NTSTATUS status;
6437 TALLOC_CTX *mem_ctx;
6439 if (state->out_mem_ctx) {
6440 mem_ctx = state->out_mem_ctx;
6441 } else {
6442 mem_ctx = state;
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);
6449 return;
6452 /* Copy out parameters */
6454 /* Copy result */
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,
6465 WERROR *result)
6467 struct rpccli_srvsvc_NetSetFileSecurity_state *state = tevent_req_data(
6468 req, struct rpccli_srvsvc_NetSetFileSecurity_state);
6469 NTSTATUS status;
6471 if (tevent_req_is_nterror(req, &status)) {
6472 tevent_req_received(req);
6473 return status;
6476 /* Steal possbile out parameters to the callers context */
6477 talloc_steal(mem_ctx, state->out_mem_ctx);
6479 /* Return result */
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] */,
6493 WERROR *werror)
6495 struct srvsvc_NetSetFileSecurity r;
6496 NTSTATUS status;
6498 /* In parameters */
6499 r.in.server_unc = server_unc;
6500 r.in.share = share;
6501 r.in.file = file;
6502 r.in.securityinformation = securityinformation;
6503 r.in.sd_buf = sd_buf;
6505 status = cli->dispatch(cli,
6506 mem_ctx,
6507 &ndr_table_srvsvc,
6508 NDR_SRVSVC_NETSETFILESECURITY,
6509 &r);
6511 if (!NT_STATUS_IS_OK(status)) {
6512 return status;
6515 if (NT_STATUS_IS_ERR(status)) {
6516 return status;
6519 /* Return variables */
6521 /* Return result */
6522 if (werror) {
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);
6551 if (req == NULL) {
6552 return NULL;
6554 state->out_mem_ctx = NULL;
6555 state->dispatch_recv = cli->dispatch_recv;
6557 /* In parameters */
6558 state->orig.in.server_unc = _server_unc;
6559 state->orig.in.level = _level;
6560 state->orig.in.info = _info;
6562 /* Out parameters */
6564 /* Result */
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,
6571 &ndr_table_srvsvc,
6572 NDR_SRVSVC_NETSERVERTRANSPORTADDEX,
6573 &state->tmp);
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);
6578 return 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);
6587 NTSTATUS status;
6588 TALLOC_CTX *mem_ctx;
6590 if (state->out_mem_ctx) {
6591 mem_ctx = state->out_mem_ctx;
6592 } else {
6593 mem_ctx = state;
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);
6600 return;
6603 /* Copy out parameters */
6605 /* Copy result */
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,
6616 WERROR *result)
6618 struct rpccli_srvsvc_NetServerTransportAddEx_state *state = tevent_req_data(
6619 req, struct rpccli_srvsvc_NetServerTransportAddEx_state);
6620 NTSTATUS status;
6622 if (tevent_req_is_nterror(req, &status)) {
6623 tevent_req_received(req);
6624 return status;
6627 /* Steal possbile out parameters to the callers context */
6628 talloc_steal(mem_ctx, state->out_mem_ctx);
6630 /* Return result */
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)] */,
6642 WERROR *werror)
6644 struct srvsvc_NetServerTransportAddEx r;
6645 NTSTATUS status;
6647 /* In parameters */
6648 r.in.server_unc = server_unc;
6649 r.in.level = level;
6650 r.in.info = info;
6652 status = cli->dispatch(cli,
6653 mem_ctx,
6654 &ndr_table_srvsvc,
6655 NDR_SRVSVC_NETSERVERTRANSPORTADDEX,
6656 &r);
6658 if (!NT_STATUS_IS_OK(status)) {
6659 return status;
6662 if (NT_STATUS_IS_ERR(status)) {
6663 return status;
6666 /* Return variables */
6668 /* Return result */
6669 if (werror) {
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);
6701 if (req == NULL) {
6702 return NULL;
6704 state->out_mem_ctx = NULL;
6705 state->dispatch_recv = cli->dispatch_recv;
6707 /* In parameters */
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 */
6717 /* Result */
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,
6724 &ndr_table_srvsvc,
6725 NDR_SRVSVC_NETSERVERSETSERVICEBITSEX,
6726 &state->tmp);
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);
6731 return 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);
6740 NTSTATUS status;
6741 TALLOC_CTX *mem_ctx;
6743 if (state->out_mem_ctx) {
6744 mem_ctx = state->out_mem_ctx;
6745 } else {
6746 mem_ctx = state;
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);
6753 return;
6756 /* Copy out parameters */
6758 /* Copy result */
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,
6769 WERROR *result)
6771 struct rpccli_srvsvc_NetServerSetServiceBitsEx_state *state = tevent_req_data(
6772 req, struct rpccli_srvsvc_NetServerSetServiceBitsEx_state);
6773 NTSTATUS status;
6775 if (tevent_req_is_nterror(req, &status)) {
6776 tevent_req_received(req);
6777 return status;
6780 /* Steal possbile out parameters to the callers context */
6781 talloc_steal(mem_ctx, state->out_mem_ctx);
6783 /* Return result */
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] */,
6798 WERROR *werror)
6800 struct srvsvc_NetServerSetServiceBitsEx r;
6801 NTSTATUS status;
6803 /* In parameters */
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,
6812 mem_ctx,
6813 &ndr_table_srvsvc,
6814 NDR_SRVSVC_NETSERVERSETSERVICEBITSEX,
6815 &r);
6817 if (!NT_STATUS_IS_OK(status)) {
6818 return status;
6821 if (NT_STATUS_IS_ERR(status)) {
6822 return status;
6825 /* Return variables */
6827 /* Return result */
6828 if (werror) {
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);
6854 if (req == NULL) {
6855 return NULL;
6857 state->out_mem_ctx = NULL;
6858 state->dispatch_recv = cli->dispatch_recv;
6860 /* In parameters */
6862 /* Out parameters */
6864 /* Result */
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,
6871 &ndr_table_srvsvc,
6872 NDR_SRVSVC_NETRDFSGETVERSION,
6873 &state->tmp);
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);
6878 return 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);
6887 NTSTATUS status;
6888 TALLOC_CTX *mem_ctx;
6890 if (state->out_mem_ctx) {
6891 mem_ctx = state->out_mem_ctx;
6892 } else {
6893 mem_ctx = state;
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);
6900 return;
6903 /* Copy out parameters */
6905 /* Copy result */
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,
6916 WERROR *result)
6918 struct rpccli_srvsvc_NETRDFSGETVERSION_state *state = tevent_req_data(
6919 req, struct rpccli_srvsvc_NETRDFSGETVERSION_state);
6920 NTSTATUS status;
6922 if (tevent_req_is_nterror(req, &status)) {
6923 tevent_req_received(req);
6924 return status;
6927 /* Steal possbile out parameters to the callers context */
6928 talloc_steal(mem_ctx, state->out_mem_ctx);
6930 /* Return result */
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,
6939 WERROR *werror)
6941 struct srvsvc_NETRDFSGETVERSION r;
6942 NTSTATUS status;
6944 /* In parameters */
6946 status = cli->dispatch(cli,
6947 mem_ctx,
6948 &ndr_table_srvsvc,
6949 NDR_SRVSVC_NETRDFSGETVERSION,
6950 &r);
6952 if (!NT_STATUS_IS_OK(status)) {
6953 return status;
6956 if (NT_STATUS_IS_ERR(status)) {
6957 return status;
6960 /* Return variables */
6962 /* Return result */
6963 if (werror) {
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);
6989 if (req == NULL) {
6990 return NULL;
6992 state->out_mem_ctx = NULL;
6993 state->dispatch_recv = cli->dispatch_recv;
6995 /* In parameters */
6997 /* Out parameters */
6999 /* Result */
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,
7006 &ndr_table_srvsvc,
7007 NDR_SRVSVC_NETRDFSCREATELOCALPARTITION,
7008 &state->tmp);
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);
7013 return 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);
7022 NTSTATUS status;
7023 TALLOC_CTX *mem_ctx;
7025 if (state->out_mem_ctx) {
7026 mem_ctx = state->out_mem_ctx;
7027 } else {
7028 mem_ctx = state;
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);
7035 return;
7038 /* Copy out parameters */
7040 /* Copy result */
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,
7051 WERROR *result)
7053 struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state *state = tevent_req_data(
7054 req, struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state);
7055 NTSTATUS status;
7057 if (tevent_req_is_nterror(req, &status)) {
7058 tevent_req_received(req);
7059 return status;
7062 /* Steal possbile out parameters to the callers context */
7063 talloc_steal(mem_ctx, state->out_mem_ctx);
7065 /* Return result */
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,
7074 WERROR *werror)
7076 struct srvsvc_NETRDFSCREATELOCALPARTITION r;
7077 NTSTATUS status;
7079 /* In parameters */
7081 status = cli->dispatch(cli,
7082 mem_ctx,
7083 &ndr_table_srvsvc,
7084 NDR_SRVSVC_NETRDFSCREATELOCALPARTITION,
7085 &r);
7087 if (!NT_STATUS_IS_OK(status)) {
7088 return status;
7091 if (NT_STATUS_IS_ERR(status)) {
7092 return status;
7095 /* Return variables */
7097 /* Return result */
7098 if (werror) {
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);
7124 if (req == NULL) {
7125 return NULL;
7127 state->out_mem_ctx = NULL;
7128 state->dispatch_recv = cli->dispatch_recv;
7130 /* In parameters */
7132 /* Out parameters */
7134 /* Result */
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,
7141 &ndr_table_srvsvc,
7142 NDR_SRVSVC_NETRDFSDELETELOCALPARTITION,
7143 &state->tmp);
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);
7148 return 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);
7157 NTSTATUS status;
7158 TALLOC_CTX *mem_ctx;
7160 if (state->out_mem_ctx) {
7161 mem_ctx = state->out_mem_ctx;
7162 } else {
7163 mem_ctx = state;
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);
7170 return;
7173 /* Copy out parameters */
7175 /* Copy result */
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,
7186 WERROR *result)
7188 struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state *state = tevent_req_data(
7189 req, struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state);
7190 NTSTATUS status;
7192 if (tevent_req_is_nterror(req, &status)) {
7193 tevent_req_received(req);
7194 return status;
7197 /* Steal possbile out parameters to the callers context */
7198 talloc_steal(mem_ctx, state->out_mem_ctx);
7200 /* Return result */
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,
7209 WERROR *werror)
7211 struct srvsvc_NETRDFSDELETELOCALPARTITION r;
7212 NTSTATUS status;
7214 /* In parameters */
7216 status = cli->dispatch(cli,
7217 mem_ctx,
7218 &ndr_table_srvsvc,
7219 NDR_SRVSVC_NETRDFSDELETELOCALPARTITION,
7220 &r);
7222 if (!NT_STATUS_IS_OK(status)) {
7223 return status;
7226 if (NT_STATUS_IS_ERR(status)) {
7227 return status;
7230 /* Return variables */
7232 /* Return result */
7233 if (werror) {
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);
7259 if (req == NULL) {
7260 return NULL;
7262 state->out_mem_ctx = NULL;
7263 state->dispatch_recv = cli->dispatch_recv;
7265 /* In parameters */
7267 /* Out parameters */
7269 /* Result */
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,
7276 &ndr_table_srvsvc,
7277 NDR_SRVSVC_NETRDFSSETLOCALVOLUMESTATE,
7278 &state->tmp);
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);
7283 return 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);
7292 NTSTATUS status;
7293 TALLOC_CTX *mem_ctx;
7295 if (state->out_mem_ctx) {
7296 mem_ctx = state->out_mem_ctx;
7297 } else {
7298 mem_ctx = state;
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);
7305 return;
7308 /* Copy out parameters */
7310 /* Copy result */
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,
7321 WERROR *result)
7323 struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state *state = tevent_req_data(
7324 req, struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state);
7325 NTSTATUS status;
7327 if (tevent_req_is_nterror(req, &status)) {
7328 tevent_req_received(req);
7329 return status;
7332 /* Steal possbile out parameters to the callers context */
7333 talloc_steal(mem_ctx, state->out_mem_ctx);
7335 /* Return result */
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,
7344 WERROR *werror)
7346 struct srvsvc_NETRDFSSETLOCALVOLUMESTATE r;
7347 NTSTATUS status;
7349 /* In parameters */
7351 status = cli->dispatch(cli,
7352 mem_ctx,
7353 &ndr_table_srvsvc,
7354 NDR_SRVSVC_NETRDFSSETLOCALVOLUMESTATE,
7355 &r);
7357 if (!NT_STATUS_IS_OK(status)) {
7358 return status;
7361 if (NT_STATUS_IS_ERR(status)) {
7362 return status;
7365 /* Return variables */
7367 /* Return result */
7368 if (werror) {
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);
7394 if (req == NULL) {
7395 return NULL;
7397 state->out_mem_ctx = NULL;
7398 state->dispatch_recv = cli->dispatch_recv;
7400 /* In parameters */
7402 /* Out parameters */
7404 /* Result */
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,
7411 &ndr_table_srvsvc,
7412 NDR_SRVSVC_NETRDFSSETSERVERINFO,
7413 &state->tmp);
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);
7418 return 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);
7427 NTSTATUS status;
7428 TALLOC_CTX *mem_ctx;
7430 if (state->out_mem_ctx) {
7431 mem_ctx = state->out_mem_ctx;
7432 } else {
7433 mem_ctx = state;
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);
7440 return;
7443 /* Copy out parameters */
7445 /* Copy result */
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,
7456 WERROR *result)
7458 struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state *state = tevent_req_data(
7459 req, struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state);
7460 NTSTATUS status;
7462 if (tevent_req_is_nterror(req, &status)) {
7463 tevent_req_received(req);
7464 return status;
7467 /* Steal possbile out parameters to the callers context */
7468 talloc_steal(mem_ctx, state->out_mem_ctx);
7470 /* Return result */
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,
7479 WERROR *werror)
7481 struct srvsvc_NETRDFSSETSERVERINFO r;
7482 NTSTATUS status;
7484 /* In parameters */
7486 status = cli->dispatch(cli,
7487 mem_ctx,
7488 &ndr_table_srvsvc,
7489 NDR_SRVSVC_NETRDFSSETSERVERINFO,
7490 &r);
7492 if (!NT_STATUS_IS_OK(status)) {
7493 return status;
7496 if (NT_STATUS_IS_ERR(status)) {
7497 return status;
7500 /* Return variables */
7502 /* Return result */
7503 if (werror) {
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);
7529 if (req == NULL) {
7530 return NULL;
7532 state->out_mem_ctx = NULL;
7533 state->dispatch_recv = cli->dispatch_recv;
7535 /* In parameters */
7537 /* Out parameters */
7539 /* Result */
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,
7546 &ndr_table_srvsvc,
7547 NDR_SRVSVC_NETRDFSCREATEEXITPOINT,
7548 &state->tmp);
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);
7553 return 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);
7562 NTSTATUS status;
7563 TALLOC_CTX *mem_ctx;
7565 if (state->out_mem_ctx) {
7566 mem_ctx = state->out_mem_ctx;
7567 } else {
7568 mem_ctx = state;
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);
7575 return;
7578 /* Copy out parameters */
7580 /* Copy result */
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,
7591 WERROR *result)
7593 struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state *state = tevent_req_data(
7594 req, struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state);
7595 NTSTATUS status;
7597 if (tevent_req_is_nterror(req, &status)) {
7598 tevent_req_received(req);
7599 return status;
7602 /* Steal possbile out parameters to the callers context */
7603 talloc_steal(mem_ctx, state->out_mem_ctx);
7605 /* Return result */
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,
7614 WERROR *werror)
7616 struct srvsvc_NETRDFSCREATEEXITPOINT r;
7617 NTSTATUS status;
7619 /* In parameters */
7621 status = cli->dispatch(cli,
7622 mem_ctx,
7623 &ndr_table_srvsvc,
7624 NDR_SRVSVC_NETRDFSCREATEEXITPOINT,
7625 &r);
7627 if (!NT_STATUS_IS_OK(status)) {
7628 return status;
7631 if (NT_STATUS_IS_ERR(status)) {
7632 return status;
7635 /* Return variables */
7637 /* Return result */
7638 if (werror) {
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);
7664 if (req == NULL) {
7665 return NULL;
7667 state->out_mem_ctx = NULL;
7668 state->dispatch_recv = cli->dispatch_recv;
7670 /* In parameters */
7672 /* Out parameters */
7674 /* Result */
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,
7681 &ndr_table_srvsvc,
7682 NDR_SRVSVC_NETRDFSDELETEEXITPOINT,
7683 &state->tmp);
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);
7688 return 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);
7697 NTSTATUS status;
7698 TALLOC_CTX *mem_ctx;
7700 if (state->out_mem_ctx) {
7701 mem_ctx = state->out_mem_ctx;
7702 } else {
7703 mem_ctx = state;
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);
7710 return;
7713 /* Copy out parameters */
7715 /* Copy result */
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,
7726 WERROR *result)
7728 struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state *state = tevent_req_data(
7729 req, struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state);
7730 NTSTATUS status;
7732 if (tevent_req_is_nterror(req, &status)) {
7733 tevent_req_received(req);
7734 return status;
7737 /* Steal possbile out parameters to the callers context */
7738 talloc_steal(mem_ctx, state->out_mem_ctx);
7740 /* Return result */
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,
7749 WERROR *werror)
7751 struct srvsvc_NETRDFSDELETEEXITPOINT r;
7752 NTSTATUS status;
7754 /* In parameters */
7756 status = cli->dispatch(cli,
7757 mem_ctx,
7758 &ndr_table_srvsvc,
7759 NDR_SRVSVC_NETRDFSDELETEEXITPOINT,
7760 &r);
7762 if (!NT_STATUS_IS_OK(status)) {
7763 return status;
7766 if (NT_STATUS_IS_ERR(status)) {
7767 return status;
7770 /* Return variables */
7772 /* Return result */
7773 if (werror) {
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);
7799 if (req == NULL) {
7800 return NULL;
7802 state->out_mem_ctx = NULL;
7803 state->dispatch_recv = cli->dispatch_recv;
7805 /* In parameters */
7807 /* Out parameters */
7809 /* Result */
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,
7816 &ndr_table_srvsvc,
7817 NDR_SRVSVC_NETRDFSMODIFYPREFIX,
7818 &state->tmp);
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);
7823 return 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);
7832 NTSTATUS status;
7833 TALLOC_CTX *mem_ctx;
7835 if (state->out_mem_ctx) {
7836 mem_ctx = state->out_mem_ctx;
7837 } else {
7838 mem_ctx = state;
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);
7845 return;
7848 /* Copy out parameters */
7850 /* Copy result */
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,
7861 WERROR *result)
7863 struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state *state = tevent_req_data(
7864 req, struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state);
7865 NTSTATUS status;
7867 if (tevent_req_is_nterror(req, &status)) {
7868 tevent_req_received(req);
7869 return status;
7872 /* Steal possbile out parameters to the callers context */
7873 talloc_steal(mem_ctx, state->out_mem_ctx);
7875 /* Return result */
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,
7884 WERROR *werror)
7886 struct srvsvc_NETRDFSMODIFYPREFIX r;
7887 NTSTATUS status;
7889 /* In parameters */
7891 status = cli->dispatch(cli,
7892 mem_ctx,
7893 &ndr_table_srvsvc,
7894 NDR_SRVSVC_NETRDFSMODIFYPREFIX,
7895 &r);
7897 if (!NT_STATUS_IS_OK(status)) {
7898 return status;
7901 if (NT_STATUS_IS_ERR(status)) {
7902 return status;
7905 /* Return variables */
7907 /* Return result */
7908 if (werror) {
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);
7934 if (req == NULL) {
7935 return NULL;
7937 state->out_mem_ctx = NULL;
7938 state->dispatch_recv = cli->dispatch_recv;
7940 /* In parameters */
7942 /* Out parameters */
7944 /* Result */
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,
7951 &ndr_table_srvsvc,
7952 NDR_SRVSVC_NETRDFSFIXLOCALVOLUME,
7953 &state->tmp);
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);
7958 return 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);
7967 NTSTATUS status;
7968 TALLOC_CTX *mem_ctx;
7970 if (state->out_mem_ctx) {
7971 mem_ctx = state->out_mem_ctx;
7972 } else {
7973 mem_ctx = state;
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);
7980 return;
7983 /* Copy out parameters */
7985 /* Copy result */
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,
7996 WERROR *result)
7998 struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state *state = tevent_req_data(
7999 req, struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state);
8000 NTSTATUS status;
8002 if (tevent_req_is_nterror(req, &status)) {
8003 tevent_req_received(req);
8004 return status;
8007 /* Steal possbile out parameters to the callers context */
8008 talloc_steal(mem_ctx, state->out_mem_ctx);
8010 /* Return result */
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,
8019 WERROR *werror)
8021 struct srvsvc_NETRDFSFIXLOCALVOLUME r;
8022 NTSTATUS status;
8024 /* In parameters */
8026 status = cli->dispatch(cli,
8027 mem_ctx,
8028 &ndr_table_srvsvc,
8029 NDR_SRVSVC_NETRDFSFIXLOCALVOLUME,
8030 &r);
8032 if (!NT_STATUS_IS_OK(status)) {
8033 return status;
8036 if (NT_STATUS_IS_ERR(status)) {
8037 return status;
8040 /* Return variables */
8042 /* Return result */
8043 if (werror) {
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);
8069 if (req == NULL) {
8070 return NULL;
8072 state->out_mem_ctx = NULL;
8073 state->dispatch_recv = cli->dispatch_recv;
8075 /* In parameters */
8077 /* Out parameters */
8079 /* Result */
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,
8086 &ndr_table_srvsvc,
8087 NDR_SRVSVC_NETRDFSMANAGERREPORTSITEINFO,
8088 &state->tmp);
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);
8093 return 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);
8102 NTSTATUS status;
8103 TALLOC_CTX *mem_ctx;
8105 if (state->out_mem_ctx) {
8106 mem_ctx = state->out_mem_ctx;
8107 } else {
8108 mem_ctx = state;
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);
8115 return;
8118 /* Copy out parameters */
8120 /* Copy result */
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,
8131 WERROR *result)
8133 struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state *state = tevent_req_data(
8134 req, struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state);
8135 NTSTATUS status;
8137 if (tevent_req_is_nterror(req, &status)) {
8138 tevent_req_received(req);
8139 return status;
8142 /* Steal possbile out parameters to the callers context */
8143 talloc_steal(mem_ctx, state->out_mem_ctx);
8145 /* Return result */
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,
8154 WERROR *werror)
8156 struct srvsvc_NETRDFSMANAGERREPORTSITEINFO r;
8157 NTSTATUS status;
8159 /* In parameters */
8161 status = cli->dispatch(cli,
8162 mem_ctx,
8163 &ndr_table_srvsvc,
8164 NDR_SRVSVC_NETRDFSMANAGERREPORTSITEINFO,
8165 &r);
8167 if (!NT_STATUS_IS_OK(status)) {
8168 return status;
8171 if (NT_STATUS_IS_ERR(status)) {
8172 return status;
8175 /* Return variables */
8177 /* Return result */
8178 if (werror) {
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);
8204 if (req == NULL) {
8205 return NULL;
8207 state->out_mem_ctx = NULL;
8208 state->dispatch_recv = cli->dispatch_recv;
8210 /* In parameters */
8212 /* Out parameters */
8214 /* Result */
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,
8221 &ndr_table_srvsvc,
8222 NDR_SRVSVC_NETRSERVERTRANSPORTDELEX,
8223 &state->tmp);
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);
8228 return 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);
8237 NTSTATUS status;
8238 TALLOC_CTX *mem_ctx;
8240 if (state->out_mem_ctx) {
8241 mem_ctx = state->out_mem_ctx;
8242 } else {
8243 mem_ctx = state;
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);
8250 return;
8253 /* Copy out parameters */
8255 /* Copy result */
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,
8266 WERROR *result)
8268 struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state *state = tevent_req_data(
8269 req, struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state);
8270 NTSTATUS status;
8272 if (tevent_req_is_nterror(req, &status)) {
8273 tevent_req_received(req);
8274 return status;
8277 /* Steal possbile out parameters to the callers context */
8278 talloc_steal(mem_ctx, state->out_mem_ctx);
8280 /* Return result */
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,
8289 WERROR *werror)
8291 struct srvsvc_NETRSERVERTRANSPORTDELEX r;
8292 NTSTATUS status;
8294 /* In parameters */
8296 status = cli->dispatch(cli,
8297 mem_ctx,
8298 &ndr_table_srvsvc,
8299 NDR_SRVSVC_NETRSERVERTRANSPORTDELEX,
8300 &r);
8302 if (!NT_STATUS_IS_OK(status)) {
8303 return status;
8306 if (NT_STATUS_IS_ERR(status)) {
8307 return status;
8310 /* Return variables */
8312 /* Return result */
8313 if (werror) {
8314 *werror = r.out.result;
8317 return werror_to_ntstatus(r.out.result);