s4:descriptor - cosmetic
[Samba/aatanasov.git] / librpc / gen_ndr / cli_srvsvc.c
blob652fd9e0ecc38f85bcc2804bcd86c8139d62aedd
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 if (DEBUGLEVEL >= 10) {
54 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevEnum, &state->orig);
57 state->out_mem_ctx = talloc_named_const(state, 0,
58 "rpccli_srvsvc_NetCharDevEnum_out_memory");
59 if (tevent_req_nomem(state->out_mem_ctx, req)) {
60 return tevent_req_post(req, ev);
63 /* make a temporary copy, that we pass to the dispatch function */
64 state->tmp = state->orig;
66 subreq = cli->dispatch_send(state, ev, cli,
67 &ndr_table_srvsvc,
68 NDR_SRVSVC_NETCHARDEVENUM,
69 &state->tmp);
70 if (tevent_req_nomem(subreq, req)) {
71 return tevent_req_post(req, ev);
73 tevent_req_set_callback(subreq, rpccli_srvsvc_NetCharDevEnum_done, req);
74 return req;
77 static void rpccli_srvsvc_NetCharDevEnum_done(struct tevent_req *subreq)
79 struct tevent_req *req = tevent_req_callback_data(
80 subreq, struct tevent_req);
81 struct rpccli_srvsvc_NetCharDevEnum_state *state = tevent_req_data(
82 req, struct rpccli_srvsvc_NetCharDevEnum_state);
83 NTSTATUS status;
84 TALLOC_CTX *mem_ctx;
86 if (state->out_mem_ctx) {
87 mem_ctx = state->out_mem_ctx;
88 } else {
89 mem_ctx = state;
92 status = state->dispatch_recv(subreq, mem_ctx);
93 TALLOC_FREE(subreq);
94 if (!NT_STATUS_IS_OK(status)) {
95 tevent_req_nterror(req, status);
96 return;
99 /* Copy out parameters */
100 *state->orig.out.info_ctr = *state->tmp.out.info_ctr;
101 *state->orig.out.totalentries = *state->tmp.out.totalentries;
102 if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
103 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
106 /* Copy result */
107 state->orig.out.result = state->tmp.out.result;
109 /* Reset temporary structure */
110 ZERO_STRUCT(state->tmp);
112 if (DEBUGLEVEL >= 10) {
113 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevEnum, &state->orig);
116 tevent_req_done(req);
119 NTSTATUS rpccli_srvsvc_NetCharDevEnum_recv(struct tevent_req *req,
120 TALLOC_CTX *mem_ctx,
121 WERROR *result)
123 struct rpccli_srvsvc_NetCharDevEnum_state *state = tevent_req_data(
124 req, struct rpccli_srvsvc_NetCharDevEnum_state);
125 NTSTATUS status;
127 if (tevent_req_is_nterror(req, &status)) {
128 tevent_req_received(req);
129 return status;
132 /* Steal possbile out parameters to the callers context */
133 talloc_steal(mem_ctx, state->out_mem_ctx);
135 /* Return result */
136 *result = state->orig.out.result;
138 tevent_req_received(req);
139 return NT_STATUS_OK;
142 NTSTATUS rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli,
143 TALLOC_CTX *mem_ctx,
144 const char *server_unc /* [in] [unique,charset(UTF16)] */,
145 struct srvsvc_NetCharDevInfoCtr *info_ctr /* [in,out] [ref] */,
146 uint32_t max_buffer /* [in] */,
147 uint32_t *totalentries /* [out] [ref] */,
148 uint32_t *resume_handle /* [in,out] [unique] */,
149 WERROR *werror)
151 struct srvsvc_NetCharDevEnum r;
152 NTSTATUS status;
154 /* In parameters */
155 r.in.server_unc = server_unc;
156 r.in.info_ctr = info_ctr;
157 r.in.max_buffer = max_buffer;
158 r.in.resume_handle = resume_handle;
160 if (DEBUGLEVEL >= 10) {
161 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevEnum, &r);
164 status = cli->dispatch(cli,
165 mem_ctx,
166 &ndr_table_srvsvc,
167 NDR_SRVSVC_NETCHARDEVENUM,
168 &r);
170 if (!NT_STATUS_IS_OK(status)) {
171 return status;
174 if (DEBUGLEVEL >= 10) {
175 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevEnum, &r);
178 if (NT_STATUS_IS_ERR(status)) {
179 return status;
182 /* Return variables */
183 *info_ctr = *r.out.info_ctr;
184 *totalentries = *r.out.totalentries;
185 if (resume_handle && r.out.resume_handle) {
186 *resume_handle = *r.out.resume_handle;
189 /* Return result */
190 if (werror) {
191 *werror = r.out.result;
194 return werror_to_ntstatus(r.out.result);
197 struct rpccli_srvsvc_NetCharDevGetInfo_state {
198 struct srvsvc_NetCharDevGetInfo orig;
199 struct srvsvc_NetCharDevGetInfo tmp;
200 TALLOC_CTX *out_mem_ctx;
201 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
204 static void rpccli_srvsvc_NetCharDevGetInfo_done(struct tevent_req *subreq);
206 struct tevent_req *rpccli_srvsvc_NetCharDevGetInfo_send(TALLOC_CTX *mem_ctx,
207 struct tevent_context *ev,
208 struct rpc_pipe_client *cli,
209 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
210 const char *_device_name /* [in] [charset(UTF16)] */,
211 uint32_t _level /* [in] */,
212 union srvsvc_NetCharDevInfo *_info /* [out] [ref,switch_is(level)] */)
214 struct tevent_req *req;
215 struct rpccli_srvsvc_NetCharDevGetInfo_state *state;
216 struct tevent_req *subreq;
218 req = tevent_req_create(mem_ctx, &state,
219 struct rpccli_srvsvc_NetCharDevGetInfo_state);
220 if (req == NULL) {
221 return NULL;
223 state->out_mem_ctx = NULL;
224 state->dispatch_recv = cli->dispatch_recv;
226 /* In parameters */
227 state->orig.in.server_unc = _server_unc;
228 state->orig.in.device_name = _device_name;
229 state->orig.in.level = _level;
231 /* Out parameters */
232 state->orig.out.info = _info;
234 /* Result */
235 ZERO_STRUCT(state->orig.out.result);
237 if (DEBUGLEVEL >= 10) {
238 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevGetInfo, &state->orig);
241 state->out_mem_ctx = talloc_named_const(state, 0,
242 "rpccli_srvsvc_NetCharDevGetInfo_out_memory");
243 if (tevent_req_nomem(state->out_mem_ctx, req)) {
244 return tevent_req_post(req, ev);
247 /* make a temporary copy, that we pass to the dispatch function */
248 state->tmp = state->orig;
250 subreq = cli->dispatch_send(state, ev, cli,
251 &ndr_table_srvsvc,
252 NDR_SRVSVC_NETCHARDEVGETINFO,
253 &state->tmp);
254 if (tevent_req_nomem(subreq, req)) {
255 return tevent_req_post(req, ev);
257 tevent_req_set_callback(subreq, rpccli_srvsvc_NetCharDevGetInfo_done, req);
258 return req;
261 static void rpccli_srvsvc_NetCharDevGetInfo_done(struct tevent_req *subreq)
263 struct tevent_req *req = tevent_req_callback_data(
264 subreq, struct tevent_req);
265 struct rpccli_srvsvc_NetCharDevGetInfo_state *state = tevent_req_data(
266 req, struct rpccli_srvsvc_NetCharDevGetInfo_state);
267 NTSTATUS status;
268 TALLOC_CTX *mem_ctx;
270 if (state->out_mem_ctx) {
271 mem_ctx = state->out_mem_ctx;
272 } else {
273 mem_ctx = state;
276 status = state->dispatch_recv(subreq, mem_ctx);
277 TALLOC_FREE(subreq);
278 if (!NT_STATUS_IS_OK(status)) {
279 tevent_req_nterror(req, status);
280 return;
283 /* Copy out parameters */
284 *state->orig.out.info = *state->tmp.out.info;
286 /* Copy result */
287 state->orig.out.result = state->tmp.out.result;
289 /* Reset temporary structure */
290 ZERO_STRUCT(state->tmp);
292 if (DEBUGLEVEL >= 10) {
293 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevGetInfo, &state->orig);
296 tevent_req_done(req);
299 NTSTATUS rpccli_srvsvc_NetCharDevGetInfo_recv(struct tevent_req *req,
300 TALLOC_CTX *mem_ctx,
301 WERROR *result)
303 struct rpccli_srvsvc_NetCharDevGetInfo_state *state = tevent_req_data(
304 req, struct rpccli_srvsvc_NetCharDevGetInfo_state);
305 NTSTATUS status;
307 if (tevent_req_is_nterror(req, &status)) {
308 tevent_req_received(req);
309 return status;
312 /* Steal possbile out parameters to the callers context */
313 talloc_steal(mem_ctx, state->out_mem_ctx);
315 /* Return result */
316 *result = state->orig.out.result;
318 tevent_req_received(req);
319 return NT_STATUS_OK;
322 NTSTATUS rpccli_srvsvc_NetCharDevGetInfo(struct rpc_pipe_client *cli,
323 TALLOC_CTX *mem_ctx,
324 const char *server_unc /* [in] [unique,charset(UTF16)] */,
325 const char *device_name /* [in] [charset(UTF16)] */,
326 uint32_t level /* [in] */,
327 union srvsvc_NetCharDevInfo *info /* [out] [ref,switch_is(level)] */,
328 WERROR *werror)
330 struct srvsvc_NetCharDevGetInfo r;
331 NTSTATUS status;
333 /* In parameters */
334 r.in.server_unc = server_unc;
335 r.in.device_name = device_name;
336 r.in.level = level;
338 if (DEBUGLEVEL >= 10) {
339 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevGetInfo, &r);
342 status = cli->dispatch(cli,
343 mem_ctx,
344 &ndr_table_srvsvc,
345 NDR_SRVSVC_NETCHARDEVGETINFO,
346 &r);
348 if (!NT_STATUS_IS_OK(status)) {
349 return status;
352 if (DEBUGLEVEL >= 10) {
353 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevGetInfo, &r);
356 if (NT_STATUS_IS_ERR(status)) {
357 return status;
360 /* Return variables */
361 *info = *r.out.info;
363 /* Return result */
364 if (werror) {
365 *werror = r.out.result;
368 return werror_to_ntstatus(r.out.result);
371 struct rpccli_srvsvc_NetCharDevControl_state {
372 struct srvsvc_NetCharDevControl orig;
373 struct srvsvc_NetCharDevControl tmp;
374 TALLOC_CTX *out_mem_ctx;
375 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
378 static void rpccli_srvsvc_NetCharDevControl_done(struct tevent_req *subreq);
380 struct tevent_req *rpccli_srvsvc_NetCharDevControl_send(TALLOC_CTX *mem_ctx,
381 struct tevent_context *ev,
382 struct rpc_pipe_client *cli,
383 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
384 const char *_device_name /* [in] [charset(UTF16)] */,
385 uint32_t _opcode /* [in] */)
387 struct tevent_req *req;
388 struct rpccli_srvsvc_NetCharDevControl_state *state;
389 struct tevent_req *subreq;
391 req = tevent_req_create(mem_ctx, &state,
392 struct rpccli_srvsvc_NetCharDevControl_state);
393 if (req == NULL) {
394 return NULL;
396 state->out_mem_ctx = NULL;
397 state->dispatch_recv = cli->dispatch_recv;
399 /* In parameters */
400 state->orig.in.server_unc = _server_unc;
401 state->orig.in.device_name = _device_name;
402 state->orig.in.opcode = _opcode;
404 /* Out parameters */
406 /* Result */
407 ZERO_STRUCT(state->orig.out.result);
409 if (DEBUGLEVEL >= 10) {
410 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevControl, &state->orig);
413 /* make a temporary copy, that we pass to the dispatch function */
414 state->tmp = state->orig;
416 subreq = cli->dispatch_send(state, ev, cli,
417 &ndr_table_srvsvc,
418 NDR_SRVSVC_NETCHARDEVCONTROL,
419 &state->tmp);
420 if (tevent_req_nomem(subreq, req)) {
421 return tevent_req_post(req, ev);
423 tevent_req_set_callback(subreq, rpccli_srvsvc_NetCharDevControl_done, req);
424 return req;
427 static void rpccli_srvsvc_NetCharDevControl_done(struct tevent_req *subreq)
429 struct tevent_req *req = tevent_req_callback_data(
430 subreq, struct tevent_req);
431 struct rpccli_srvsvc_NetCharDevControl_state *state = tevent_req_data(
432 req, struct rpccli_srvsvc_NetCharDevControl_state);
433 NTSTATUS status;
434 TALLOC_CTX *mem_ctx;
436 if (state->out_mem_ctx) {
437 mem_ctx = state->out_mem_ctx;
438 } else {
439 mem_ctx = state;
442 status = state->dispatch_recv(subreq, mem_ctx);
443 TALLOC_FREE(subreq);
444 if (!NT_STATUS_IS_OK(status)) {
445 tevent_req_nterror(req, status);
446 return;
449 /* Copy out parameters */
451 /* Copy result */
452 state->orig.out.result = state->tmp.out.result;
454 /* Reset temporary structure */
455 ZERO_STRUCT(state->tmp);
457 if (DEBUGLEVEL >= 10) {
458 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevControl, &state->orig);
461 tevent_req_done(req);
464 NTSTATUS rpccli_srvsvc_NetCharDevControl_recv(struct tevent_req *req,
465 TALLOC_CTX *mem_ctx,
466 WERROR *result)
468 struct rpccli_srvsvc_NetCharDevControl_state *state = tevent_req_data(
469 req, struct rpccli_srvsvc_NetCharDevControl_state);
470 NTSTATUS status;
472 if (tevent_req_is_nterror(req, &status)) {
473 tevent_req_received(req);
474 return status;
477 /* Steal possbile out parameters to the callers context */
478 talloc_steal(mem_ctx, state->out_mem_ctx);
480 /* Return result */
481 *result = state->orig.out.result;
483 tevent_req_received(req);
484 return NT_STATUS_OK;
487 NTSTATUS rpccli_srvsvc_NetCharDevControl(struct rpc_pipe_client *cli,
488 TALLOC_CTX *mem_ctx,
489 const char *server_unc /* [in] [unique,charset(UTF16)] */,
490 const char *device_name /* [in] [charset(UTF16)] */,
491 uint32_t opcode /* [in] */,
492 WERROR *werror)
494 struct srvsvc_NetCharDevControl r;
495 NTSTATUS status;
497 /* In parameters */
498 r.in.server_unc = server_unc;
499 r.in.device_name = device_name;
500 r.in.opcode = opcode;
502 if (DEBUGLEVEL >= 10) {
503 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevControl, &r);
506 status = cli->dispatch(cli,
507 mem_ctx,
508 &ndr_table_srvsvc,
509 NDR_SRVSVC_NETCHARDEVCONTROL,
510 &r);
512 if (!NT_STATUS_IS_OK(status)) {
513 return status;
516 if (DEBUGLEVEL >= 10) {
517 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevControl, &r);
520 if (NT_STATUS_IS_ERR(status)) {
521 return status;
524 /* Return variables */
526 /* Return result */
527 if (werror) {
528 *werror = r.out.result;
531 return werror_to_ntstatus(r.out.result);
534 struct rpccli_srvsvc_NetCharDevQEnum_state {
535 struct srvsvc_NetCharDevQEnum orig;
536 struct srvsvc_NetCharDevQEnum tmp;
537 TALLOC_CTX *out_mem_ctx;
538 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
541 static void rpccli_srvsvc_NetCharDevQEnum_done(struct tevent_req *subreq);
543 struct tevent_req *rpccli_srvsvc_NetCharDevQEnum_send(TALLOC_CTX *mem_ctx,
544 struct tevent_context *ev,
545 struct rpc_pipe_client *cli,
546 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
547 const char *_user /* [in] [unique,charset(UTF16)] */,
548 struct srvsvc_NetCharDevQInfoCtr *_info_ctr /* [in,out] [ref] */,
549 uint32_t _max_buffer /* [in] */,
550 uint32_t *_totalentries /* [out] [ref] */,
551 uint32_t *_resume_handle /* [in,out] [unique] */)
553 struct tevent_req *req;
554 struct rpccli_srvsvc_NetCharDevQEnum_state *state;
555 struct tevent_req *subreq;
557 req = tevent_req_create(mem_ctx, &state,
558 struct rpccli_srvsvc_NetCharDevQEnum_state);
559 if (req == NULL) {
560 return NULL;
562 state->out_mem_ctx = NULL;
563 state->dispatch_recv = cli->dispatch_recv;
565 /* In parameters */
566 state->orig.in.server_unc = _server_unc;
567 state->orig.in.user = _user;
568 state->orig.in.info_ctr = _info_ctr;
569 state->orig.in.max_buffer = _max_buffer;
570 state->orig.in.resume_handle = _resume_handle;
572 /* Out parameters */
573 state->orig.out.info_ctr = _info_ctr;
574 state->orig.out.totalentries = _totalentries;
575 state->orig.out.resume_handle = _resume_handle;
577 /* Result */
578 ZERO_STRUCT(state->orig.out.result);
580 if (DEBUGLEVEL >= 10) {
581 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQEnum, &state->orig);
584 state->out_mem_ctx = talloc_named_const(state, 0,
585 "rpccli_srvsvc_NetCharDevQEnum_out_memory");
586 if (tevent_req_nomem(state->out_mem_ctx, req)) {
587 return tevent_req_post(req, ev);
590 /* make a temporary copy, that we pass to the dispatch function */
591 state->tmp = state->orig;
593 subreq = cli->dispatch_send(state, ev, cli,
594 &ndr_table_srvsvc,
595 NDR_SRVSVC_NETCHARDEVQENUM,
596 &state->tmp);
597 if (tevent_req_nomem(subreq, req)) {
598 return tevent_req_post(req, ev);
600 tevent_req_set_callback(subreq, rpccli_srvsvc_NetCharDevQEnum_done, req);
601 return req;
604 static void rpccli_srvsvc_NetCharDevQEnum_done(struct tevent_req *subreq)
606 struct tevent_req *req = tevent_req_callback_data(
607 subreq, struct tevent_req);
608 struct rpccli_srvsvc_NetCharDevQEnum_state *state = tevent_req_data(
609 req, struct rpccli_srvsvc_NetCharDevQEnum_state);
610 NTSTATUS status;
611 TALLOC_CTX *mem_ctx;
613 if (state->out_mem_ctx) {
614 mem_ctx = state->out_mem_ctx;
615 } else {
616 mem_ctx = state;
619 status = state->dispatch_recv(subreq, mem_ctx);
620 TALLOC_FREE(subreq);
621 if (!NT_STATUS_IS_OK(status)) {
622 tevent_req_nterror(req, status);
623 return;
626 /* Copy out parameters */
627 *state->orig.out.info_ctr = *state->tmp.out.info_ctr;
628 *state->orig.out.totalentries = *state->tmp.out.totalentries;
629 if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
630 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
633 /* Copy result */
634 state->orig.out.result = state->tmp.out.result;
636 /* Reset temporary structure */
637 ZERO_STRUCT(state->tmp);
639 if (DEBUGLEVEL >= 10) {
640 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQEnum, &state->orig);
643 tevent_req_done(req);
646 NTSTATUS rpccli_srvsvc_NetCharDevQEnum_recv(struct tevent_req *req,
647 TALLOC_CTX *mem_ctx,
648 WERROR *result)
650 struct rpccli_srvsvc_NetCharDevQEnum_state *state = tevent_req_data(
651 req, struct rpccli_srvsvc_NetCharDevQEnum_state);
652 NTSTATUS status;
654 if (tevent_req_is_nterror(req, &status)) {
655 tevent_req_received(req);
656 return status;
659 /* Steal possbile out parameters to the callers context */
660 talloc_steal(mem_ctx, state->out_mem_ctx);
662 /* Return result */
663 *result = state->orig.out.result;
665 tevent_req_received(req);
666 return NT_STATUS_OK;
669 NTSTATUS rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli,
670 TALLOC_CTX *mem_ctx,
671 const char *server_unc /* [in] [unique,charset(UTF16)] */,
672 const char *user /* [in] [unique,charset(UTF16)] */,
673 struct srvsvc_NetCharDevQInfoCtr *info_ctr /* [in,out] [ref] */,
674 uint32_t max_buffer /* [in] */,
675 uint32_t *totalentries /* [out] [ref] */,
676 uint32_t *resume_handle /* [in,out] [unique] */,
677 WERROR *werror)
679 struct srvsvc_NetCharDevQEnum r;
680 NTSTATUS status;
682 /* In parameters */
683 r.in.server_unc = server_unc;
684 r.in.user = user;
685 r.in.info_ctr = info_ctr;
686 r.in.max_buffer = max_buffer;
687 r.in.resume_handle = resume_handle;
689 if (DEBUGLEVEL >= 10) {
690 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQEnum, &r);
693 status = cli->dispatch(cli,
694 mem_ctx,
695 &ndr_table_srvsvc,
696 NDR_SRVSVC_NETCHARDEVQENUM,
697 &r);
699 if (!NT_STATUS_IS_OK(status)) {
700 return status;
703 if (DEBUGLEVEL >= 10) {
704 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQEnum, &r);
707 if (NT_STATUS_IS_ERR(status)) {
708 return status;
711 /* Return variables */
712 *info_ctr = *r.out.info_ctr;
713 *totalentries = *r.out.totalentries;
714 if (resume_handle && r.out.resume_handle) {
715 *resume_handle = *r.out.resume_handle;
718 /* Return result */
719 if (werror) {
720 *werror = r.out.result;
723 return werror_to_ntstatus(r.out.result);
726 struct rpccli_srvsvc_NetCharDevQGetInfo_state {
727 struct srvsvc_NetCharDevQGetInfo orig;
728 struct srvsvc_NetCharDevQGetInfo tmp;
729 TALLOC_CTX *out_mem_ctx;
730 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
733 static void rpccli_srvsvc_NetCharDevQGetInfo_done(struct tevent_req *subreq);
735 struct tevent_req *rpccli_srvsvc_NetCharDevQGetInfo_send(TALLOC_CTX *mem_ctx,
736 struct tevent_context *ev,
737 struct rpc_pipe_client *cli,
738 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
739 const char *_queue_name /* [in] [charset(UTF16)] */,
740 const char *_user /* [in] [charset(UTF16)] */,
741 uint32_t _level /* [in] */,
742 union srvsvc_NetCharDevQInfo *_info /* [out] [ref,switch_is(level)] */)
744 struct tevent_req *req;
745 struct rpccli_srvsvc_NetCharDevQGetInfo_state *state;
746 struct tevent_req *subreq;
748 req = tevent_req_create(mem_ctx, &state,
749 struct rpccli_srvsvc_NetCharDevQGetInfo_state);
750 if (req == NULL) {
751 return NULL;
753 state->out_mem_ctx = NULL;
754 state->dispatch_recv = cli->dispatch_recv;
756 /* In parameters */
757 state->orig.in.server_unc = _server_unc;
758 state->orig.in.queue_name = _queue_name;
759 state->orig.in.user = _user;
760 state->orig.in.level = _level;
762 /* Out parameters */
763 state->orig.out.info = _info;
765 /* Result */
766 ZERO_STRUCT(state->orig.out.result);
768 if (DEBUGLEVEL >= 10) {
769 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQGetInfo, &state->orig);
772 state->out_mem_ctx = talloc_named_const(state, 0,
773 "rpccli_srvsvc_NetCharDevQGetInfo_out_memory");
774 if (tevent_req_nomem(state->out_mem_ctx, req)) {
775 return tevent_req_post(req, ev);
778 /* make a temporary copy, that we pass to the dispatch function */
779 state->tmp = state->orig;
781 subreq = cli->dispatch_send(state, ev, cli,
782 &ndr_table_srvsvc,
783 NDR_SRVSVC_NETCHARDEVQGETINFO,
784 &state->tmp);
785 if (tevent_req_nomem(subreq, req)) {
786 return tevent_req_post(req, ev);
788 tevent_req_set_callback(subreq, rpccli_srvsvc_NetCharDevQGetInfo_done, req);
789 return req;
792 static void rpccli_srvsvc_NetCharDevQGetInfo_done(struct tevent_req *subreq)
794 struct tevent_req *req = tevent_req_callback_data(
795 subreq, struct tevent_req);
796 struct rpccli_srvsvc_NetCharDevQGetInfo_state *state = tevent_req_data(
797 req, struct rpccli_srvsvc_NetCharDevQGetInfo_state);
798 NTSTATUS status;
799 TALLOC_CTX *mem_ctx;
801 if (state->out_mem_ctx) {
802 mem_ctx = state->out_mem_ctx;
803 } else {
804 mem_ctx = state;
807 status = state->dispatch_recv(subreq, mem_ctx);
808 TALLOC_FREE(subreq);
809 if (!NT_STATUS_IS_OK(status)) {
810 tevent_req_nterror(req, status);
811 return;
814 /* Copy out parameters */
815 *state->orig.out.info = *state->tmp.out.info;
817 /* Copy result */
818 state->orig.out.result = state->tmp.out.result;
820 /* Reset temporary structure */
821 ZERO_STRUCT(state->tmp);
823 if (DEBUGLEVEL >= 10) {
824 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQGetInfo, &state->orig);
827 tevent_req_done(req);
830 NTSTATUS rpccli_srvsvc_NetCharDevQGetInfo_recv(struct tevent_req *req,
831 TALLOC_CTX *mem_ctx,
832 WERROR *result)
834 struct rpccli_srvsvc_NetCharDevQGetInfo_state *state = tevent_req_data(
835 req, struct rpccli_srvsvc_NetCharDevQGetInfo_state);
836 NTSTATUS status;
838 if (tevent_req_is_nterror(req, &status)) {
839 tevent_req_received(req);
840 return status;
843 /* Steal possbile out parameters to the callers context */
844 talloc_steal(mem_ctx, state->out_mem_ctx);
846 /* Return result */
847 *result = state->orig.out.result;
849 tevent_req_received(req);
850 return NT_STATUS_OK;
853 NTSTATUS rpccli_srvsvc_NetCharDevQGetInfo(struct rpc_pipe_client *cli,
854 TALLOC_CTX *mem_ctx,
855 const char *server_unc /* [in] [unique,charset(UTF16)] */,
856 const char *queue_name /* [in] [charset(UTF16)] */,
857 const char *user /* [in] [charset(UTF16)] */,
858 uint32_t level /* [in] */,
859 union srvsvc_NetCharDevQInfo *info /* [out] [ref,switch_is(level)] */,
860 WERROR *werror)
862 struct srvsvc_NetCharDevQGetInfo r;
863 NTSTATUS status;
865 /* In parameters */
866 r.in.server_unc = server_unc;
867 r.in.queue_name = queue_name;
868 r.in.user = user;
869 r.in.level = level;
871 if (DEBUGLEVEL >= 10) {
872 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQGetInfo, &r);
875 status = cli->dispatch(cli,
876 mem_ctx,
877 &ndr_table_srvsvc,
878 NDR_SRVSVC_NETCHARDEVQGETINFO,
879 &r);
881 if (!NT_STATUS_IS_OK(status)) {
882 return status;
885 if (DEBUGLEVEL >= 10) {
886 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQGetInfo, &r);
889 if (NT_STATUS_IS_ERR(status)) {
890 return status;
893 /* Return variables */
894 *info = *r.out.info;
896 /* Return result */
897 if (werror) {
898 *werror = r.out.result;
901 return werror_to_ntstatus(r.out.result);
904 struct rpccli_srvsvc_NetCharDevQSetInfo_state {
905 struct srvsvc_NetCharDevQSetInfo orig;
906 struct srvsvc_NetCharDevQSetInfo tmp;
907 TALLOC_CTX *out_mem_ctx;
908 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
911 static void rpccli_srvsvc_NetCharDevQSetInfo_done(struct tevent_req *subreq);
913 struct tevent_req *rpccli_srvsvc_NetCharDevQSetInfo_send(TALLOC_CTX *mem_ctx,
914 struct tevent_context *ev,
915 struct rpc_pipe_client *cli,
916 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
917 const char *_queue_name /* [in] [charset(UTF16)] */,
918 uint32_t _level /* [in] */,
919 union srvsvc_NetCharDevQInfo _info /* [in] [switch_is(level)] */,
920 uint32_t *_parm_error /* [in,out] [unique] */)
922 struct tevent_req *req;
923 struct rpccli_srvsvc_NetCharDevQSetInfo_state *state;
924 struct tevent_req *subreq;
926 req = tevent_req_create(mem_ctx, &state,
927 struct rpccli_srvsvc_NetCharDevQSetInfo_state);
928 if (req == NULL) {
929 return NULL;
931 state->out_mem_ctx = NULL;
932 state->dispatch_recv = cli->dispatch_recv;
934 /* In parameters */
935 state->orig.in.server_unc = _server_unc;
936 state->orig.in.queue_name = _queue_name;
937 state->orig.in.level = _level;
938 state->orig.in.info = _info;
939 state->orig.in.parm_error = _parm_error;
941 /* Out parameters */
942 state->orig.out.parm_error = _parm_error;
944 /* Result */
945 ZERO_STRUCT(state->orig.out.result);
947 if (DEBUGLEVEL >= 10) {
948 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQSetInfo, &state->orig);
951 state->out_mem_ctx = talloc_named_const(state, 0,
952 "rpccli_srvsvc_NetCharDevQSetInfo_out_memory");
953 if (tevent_req_nomem(state->out_mem_ctx, req)) {
954 return tevent_req_post(req, ev);
957 /* make a temporary copy, that we pass to the dispatch function */
958 state->tmp = state->orig;
960 subreq = cli->dispatch_send(state, ev, cli,
961 &ndr_table_srvsvc,
962 NDR_SRVSVC_NETCHARDEVQSETINFO,
963 &state->tmp);
964 if (tevent_req_nomem(subreq, req)) {
965 return tevent_req_post(req, ev);
967 tevent_req_set_callback(subreq, rpccli_srvsvc_NetCharDevQSetInfo_done, req);
968 return req;
971 static void rpccli_srvsvc_NetCharDevQSetInfo_done(struct tevent_req *subreq)
973 struct tevent_req *req = tevent_req_callback_data(
974 subreq, struct tevent_req);
975 struct rpccli_srvsvc_NetCharDevQSetInfo_state *state = tevent_req_data(
976 req, struct rpccli_srvsvc_NetCharDevQSetInfo_state);
977 NTSTATUS status;
978 TALLOC_CTX *mem_ctx;
980 if (state->out_mem_ctx) {
981 mem_ctx = state->out_mem_ctx;
982 } else {
983 mem_ctx = state;
986 status = state->dispatch_recv(subreq, mem_ctx);
987 TALLOC_FREE(subreq);
988 if (!NT_STATUS_IS_OK(status)) {
989 tevent_req_nterror(req, status);
990 return;
993 /* Copy out parameters */
994 if (state->orig.out.parm_error && state->tmp.out.parm_error) {
995 *state->orig.out.parm_error = *state->tmp.out.parm_error;
998 /* Copy result */
999 state->orig.out.result = state->tmp.out.result;
1001 /* Reset temporary structure */
1002 ZERO_STRUCT(state->tmp);
1004 if (DEBUGLEVEL >= 10) {
1005 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQSetInfo, &state->orig);
1008 tevent_req_done(req);
1011 NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo_recv(struct tevent_req *req,
1012 TALLOC_CTX *mem_ctx,
1013 WERROR *result)
1015 struct rpccli_srvsvc_NetCharDevQSetInfo_state *state = tevent_req_data(
1016 req, struct rpccli_srvsvc_NetCharDevQSetInfo_state);
1017 NTSTATUS status;
1019 if (tevent_req_is_nterror(req, &status)) {
1020 tevent_req_received(req);
1021 return status;
1024 /* Steal possbile out parameters to the callers context */
1025 talloc_steal(mem_ctx, state->out_mem_ctx);
1027 /* Return result */
1028 *result = state->orig.out.result;
1030 tevent_req_received(req);
1031 return NT_STATUS_OK;
1034 NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli,
1035 TALLOC_CTX *mem_ctx,
1036 const char *server_unc /* [in] [unique,charset(UTF16)] */,
1037 const char *queue_name /* [in] [charset(UTF16)] */,
1038 uint32_t level /* [in] */,
1039 union srvsvc_NetCharDevQInfo info /* [in] [switch_is(level)] */,
1040 uint32_t *parm_error /* [in,out] [unique] */,
1041 WERROR *werror)
1043 struct srvsvc_NetCharDevQSetInfo r;
1044 NTSTATUS status;
1046 /* In parameters */
1047 r.in.server_unc = server_unc;
1048 r.in.queue_name = queue_name;
1049 r.in.level = level;
1050 r.in.info = info;
1051 r.in.parm_error = parm_error;
1053 if (DEBUGLEVEL >= 10) {
1054 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQSetInfo, &r);
1057 status = cli->dispatch(cli,
1058 mem_ctx,
1059 &ndr_table_srvsvc,
1060 NDR_SRVSVC_NETCHARDEVQSETINFO,
1061 &r);
1063 if (!NT_STATUS_IS_OK(status)) {
1064 return status;
1067 if (DEBUGLEVEL >= 10) {
1068 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQSetInfo, &r);
1071 if (NT_STATUS_IS_ERR(status)) {
1072 return status;
1075 /* Return variables */
1076 if (parm_error && r.out.parm_error) {
1077 *parm_error = *r.out.parm_error;
1080 /* Return result */
1081 if (werror) {
1082 *werror = r.out.result;
1085 return werror_to_ntstatus(r.out.result);
1088 struct rpccli_srvsvc_NetCharDevQPurge_state {
1089 struct srvsvc_NetCharDevQPurge orig;
1090 struct srvsvc_NetCharDevQPurge tmp;
1091 TALLOC_CTX *out_mem_ctx;
1092 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1095 static void rpccli_srvsvc_NetCharDevQPurge_done(struct tevent_req *subreq);
1097 struct tevent_req *rpccli_srvsvc_NetCharDevQPurge_send(TALLOC_CTX *mem_ctx,
1098 struct tevent_context *ev,
1099 struct rpc_pipe_client *cli,
1100 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
1101 const char *_queue_name /* [in] [charset(UTF16)] */)
1103 struct tevent_req *req;
1104 struct rpccli_srvsvc_NetCharDevQPurge_state *state;
1105 struct tevent_req *subreq;
1107 req = tevent_req_create(mem_ctx, &state,
1108 struct rpccli_srvsvc_NetCharDevQPurge_state);
1109 if (req == NULL) {
1110 return NULL;
1112 state->out_mem_ctx = NULL;
1113 state->dispatch_recv = cli->dispatch_recv;
1115 /* In parameters */
1116 state->orig.in.server_unc = _server_unc;
1117 state->orig.in.queue_name = _queue_name;
1119 /* Out parameters */
1121 /* Result */
1122 ZERO_STRUCT(state->orig.out.result);
1124 if (DEBUGLEVEL >= 10) {
1125 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQPurge, &state->orig);
1128 /* make a temporary copy, that we pass to the dispatch function */
1129 state->tmp = state->orig;
1131 subreq = cli->dispatch_send(state, ev, cli,
1132 &ndr_table_srvsvc,
1133 NDR_SRVSVC_NETCHARDEVQPURGE,
1134 &state->tmp);
1135 if (tevent_req_nomem(subreq, req)) {
1136 return tevent_req_post(req, ev);
1138 tevent_req_set_callback(subreq, rpccli_srvsvc_NetCharDevQPurge_done, req);
1139 return req;
1142 static void rpccli_srvsvc_NetCharDevQPurge_done(struct tevent_req *subreq)
1144 struct tevent_req *req = tevent_req_callback_data(
1145 subreq, struct tevent_req);
1146 struct rpccli_srvsvc_NetCharDevQPurge_state *state = tevent_req_data(
1147 req, struct rpccli_srvsvc_NetCharDevQPurge_state);
1148 NTSTATUS status;
1149 TALLOC_CTX *mem_ctx;
1151 if (state->out_mem_ctx) {
1152 mem_ctx = state->out_mem_ctx;
1153 } else {
1154 mem_ctx = state;
1157 status = state->dispatch_recv(subreq, mem_ctx);
1158 TALLOC_FREE(subreq);
1159 if (!NT_STATUS_IS_OK(status)) {
1160 tevent_req_nterror(req, status);
1161 return;
1164 /* Copy out parameters */
1166 /* Copy result */
1167 state->orig.out.result = state->tmp.out.result;
1169 /* Reset temporary structure */
1170 ZERO_STRUCT(state->tmp);
1172 if (DEBUGLEVEL >= 10) {
1173 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurge, &state->orig);
1176 tevent_req_done(req);
1179 NTSTATUS rpccli_srvsvc_NetCharDevQPurge_recv(struct tevent_req *req,
1180 TALLOC_CTX *mem_ctx,
1181 WERROR *result)
1183 struct rpccli_srvsvc_NetCharDevQPurge_state *state = tevent_req_data(
1184 req, struct rpccli_srvsvc_NetCharDevQPurge_state);
1185 NTSTATUS status;
1187 if (tevent_req_is_nterror(req, &status)) {
1188 tevent_req_received(req);
1189 return status;
1192 /* Steal possbile out parameters to the callers context */
1193 talloc_steal(mem_ctx, state->out_mem_ctx);
1195 /* Return result */
1196 *result = state->orig.out.result;
1198 tevent_req_received(req);
1199 return NT_STATUS_OK;
1202 NTSTATUS rpccli_srvsvc_NetCharDevQPurge(struct rpc_pipe_client *cli,
1203 TALLOC_CTX *mem_ctx,
1204 const char *server_unc /* [in] [unique,charset(UTF16)] */,
1205 const char *queue_name /* [in] [charset(UTF16)] */,
1206 WERROR *werror)
1208 struct srvsvc_NetCharDevQPurge r;
1209 NTSTATUS status;
1211 /* In parameters */
1212 r.in.server_unc = server_unc;
1213 r.in.queue_name = queue_name;
1215 if (DEBUGLEVEL >= 10) {
1216 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQPurge, &r);
1219 status = cli->dispatch(cli,
1220 mem_ctx,
1221 &ndr_table_srvsvc,
1222 NDR_SRVSVC_NETCHARDEVQPURGE,
1223 &r);
1225 if (!NT_STATUS_IS_OK(status)) {
1226 return status;
1229 if (DEBUGLEVEL >= 10) {
1230 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurge, &r);
1233 if (NT_STATUS_IS_ERR(status)) {
1234 return status;
1237 /* Return variables */
1239 /* Return result */
1240 if (werror) {
1241 *werror = r.out.result;
1244 return werror_to_ntstatus(r.out.result);
1247 struct rpccli_srvsvc_NetCharDevQPurgeSelf_state {
1248 struct srvsvc_NetCharDevQPurgeSelf orig;
1249 struct srvsvc_NetCharDevQPurgeSelf tmp;
1250 TALLOC_CTX *out_mem_ctx;
1251 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1254 static void rpccli_srvsvc_NetCharDevQPurgeSelf_done(struct tevent_req *subreq);
1256 struct tevent_req *rpccli_srvsvc_NetCharDevQPurgeSelf_send(TALLOC_CTX *mem_ctx,
1257 struct tevent_context *ev,
1258 struct rpc_pipe_client *cli,
1259 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
1260 const char *_queue_name /* [in] [charset(UTF16)] */,
1261 const char *_computer_name /* [in] [charset(UTF16)] */)
1263 struct tevent_req *req;
1264 struct rpccli_srvsvc_NetCharDevQPurgeSelf_state *state;
1265 struct tevent_req *subreq;
1267 req = tevent_req_create(mem_ctx, &state,
1268 struct rpccli_srvsvc_NetCharDevQPurgeSelf_state);
1269 if (req == NULL) {
1270 return NULL;
1272 state->out_mem_ctx = NULL;
1273 state->dispatch_recv = cli->dispatch_recv;
1275 /* In parameters */
1276 state->orig.in.server_unc = _server_unc;
1277 state->orig.in.queue_name = _queue_name;
1278 state->orig.in.computer_name = _computer_name;
1280 /* Out parameters */
1282 /* Result */
1283 ZERO_STRUCT(state->orig.out.result);
1285 if (DEBUGLEVEL >= 10) {
1286 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQPurgeSelf, &state->orig);
1289 /* make a temporary copy, that we pass to the dispatch function */
1290 state->tmp = state->orig;
1292 subreq = cli->dispatch_send(state, ev, cli,
1293 &ndr_table_srvsvc,
1294 NDR_SRVSVC_NETCHARDEVQPURGESELF,
1295 &state->tmp);
1296 if (tevent_req_nomem(subreq, req)) {
1297 return tevent_req_post(req, ev);
1299 tevent_req_set_callback(subreq, rpccli_srvsvc_NetCharDevQPurgeSelf_done, req);
1300 return req;
1303 static void rpccli_srvsvc_NetCharDevQPurgeSelf_done(struct tevent_req *subreq)
1305 struct tevent_req *req = tevent_req_callback_data(
1306 subreq, struct tevent_req);
1307 struct rpccli_srvsvc_NetCharDevQPurgeSelf_state *state = tevent_req_data(
1308 req, struct rpccli_srvsvc_NetCharDevQPurgeSelf_state);
1309 NTSTATUS status;
1310 TALLOC_CTX *mem_ctx;
1312 if (state->out_mem_ctx) {
1313 mem_ctx = state->out_mem_ctx;
1314 } else {
1315 mem_ctx = state;
1318 status = state->dispatch_recv(subreq, mem_ctx);
1319 TALLOC_FREE(subreq);
1320 if (!NT_STATUS_IS_OK(status)) {
1321 tevent_req_nterror(req, status);
1322 return;
1325 /* Copy out parameters */
1327 /* Copy result */
1328 state->orig.out.result = state->tmp.out.result;
1330 /* Reset temporary structure */
1331 ZERO_STRUCT(state->tmp);
1333 if (DEBUGLEVEL >= 10) {
1334 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurgeSelf, &state->orig);
1337 tevent_req_done(req);
1340 NTSTATUS rpccli_srvsvc_NetCharDevQPurgeSelf_recv(struct tevent_req *req,
1341 TALLOC_CTX *mem_ctx,
1342 WERROR *result)
1344 struct rpccli_srvsvc_NetCharDevQPurgeSelf_state *state = tevent_req_data(
1345 req, struct rpccli_srvsvc_NetCharDevQPurgeSelf_state);
1346 NTSTATUS status;
1348 if (tevent_req_is_nterror(req, &status)) {
1349 tevent_req_received(req);
1350 return status;
1353 /* Steal possbile out parameters to the callers context */
1354 talloc_steal(mem_ctx, state->out_mem_ctx);
1356 /* Return result */
1357 *result = state->orig.out.result;
1359 tevent_req_received(req);
1360 return NT_STATUS_OK;
1363 NTSTATUS rpccli_srvsvc_NetCharDevQPurgeSelf(struct rpc_pipe_client *cli,
1364 TALLOC_CTX *mem_ctx,
1365 const char *server_unc /* [in] [unique,charset(UTF16)] */,
1366 const char *queue_name /* [in] [charset(UTF16)] */,
1367 const char *computer_name /* [in] [charset(UTF16)] */,
1368 WERROR *werror)
1370 struct srvsvc_NetCharDevQPurgeSelf r;
1371 NTSTATUS status;
1373 /* In parameters */
1374 r.in.server_unc = server_unc;
1375 r.in.queue_name = queue_name;
1376 r.in.computer_name = computer_name;
1378 if (DEBUGLEVEL >= 10) {
1379 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQPurgeSelf, &r);
1382 status = cli->dispatch(cli,
1383 mem_ctx,
1384 &ndr_table_srvsvc,
1385 NDR_SRVSVC_NETCHARDEVQPURGESELF,
1386 &r);
1388 if (!NT_STATUS_IS_OK(status)) {
1389 return status;
1392 if (DEBUGLEVEL >= 10) {
1393 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurgeSelf, &r);
1396 if (NT_STATUS_IS_ERR(status)) {
1397 return status;
1400 /* Return variables */
1402 /* Return result */
1403 if (werror) {
1404 *werror = r.out.result;
1407 return werror_to_ntstatus(r.out.result);
1410 struct rpccli_srvsvc_NetConnEnum_state {
1411 struct srvsvc_NetConnEnum orig;
1412 struct srvsvc_NetConnEnum tmp;
1413 TALLOC_CTX *out_mem_ctx;
1414 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1417 static void rpccli_srvsvc_NetConnEnum_done(struct tevent_req *subreq);
1419 struct tevent_req *rpccli_srvsvc_NetConnEnum_send(TALLOC_CTX *mem_ctx,
1420 struct tevent_context *ev,
1421 struct rpc_pipe_client *cli,
1422 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
1423 const char *_path /* [in] [unique,charset(UTF16)] */,
1424 struct srvsvc_NetConnInfoCtr *_info_ctr /* [in,out] [ref] */,
1425 uint32_t _max_buffer /* [in] */,
1426 uint32_t *_totalentries /* [out] [ref] */,
1427 uint32_t *_resume_handle /* [in,out] [unique] */)
1429 struct tevent_req *req;
1430 struct rpccli_srvsvc_NetConnEnum_state *state;
1431 struct tevent_req *subreq;
1433 req = tevent_req_create(mem_ctx, &state,
1434 struct rpccli_srvsvc_NetConnEnum_state);
1435 if (req == NULL) {
1436 return NULL;
1438 state->out_mem_ctx = NULL;
1439 state->dispatch_recv = cli->dispatch_recv;
1441 /* In parameters */
1442 state->orig.in.server_unc = _server_unc;
1443 state->orig.in.path = _path;
1444 state->orig.in.info_ctr = _info_ctr;
1445 state->orig.in.max_buffer = _max_buffer;
1446 state->orig.in.resume_handle = _resume_handle;
1448 /* Out parameters */
1449 state->orig.out.info_ctr = _info_ctr;
1450 state->orig.out.totalentries = _totalentries;
1451 state->orig.out.resume_handle = _resume_handle;
1453 /* Result */
1454 ZERO_STRUCT(state->orig.out.result);
1456 if (DEBUGLEVEL >= 10) {
1457 NDR_PRINT_IN_DEBUG(srvsvc_NetConnEnum, &state->orig);
1460 state->out_mem_ctx = talloc_named_const(state, 0,
1461 "rpccli_srvsvc_NetConnEnum_out_memory");
1462 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1463 return tevent_req_post(req, ev);
1466 /* make a temporary copy, that we pass to the dispatch function */
1467 state->tmp = state->orig;
1469 subreq = cli->dispatch_send(state, ev, cli,
1470 &ndr_table_srvsvc,
1471 NDR_SRVSVC_NETCONNENUM,
1472 &state->tmp);
1473 if (tevent_req_nomem(subreq, req)) {
1474 return tevent_req_post(req, ev);
1476 tevent_req_set_callback(subreq, rpccli_srvsvc_NetConnEnum_done, req);
1477 return req;
1480 static void rpccli_srvsvc_NetConnEnum_done(struct tevent_req *subreq)
1482 struct tevent_req *req = tevent_req_callback_data(
1483 subreq, struct tevent_req);
1484 struct rpccli_srvsvc_NetConnEnum_state *state = tevent_req_data(
1485 req, struct rpccli_srvsvc_NetConnEnum_state);
1486 NTSTATUS status;
1487 TALLOC_CTX *mem_ctx;
1489 if (state->out_mem_ctx) {
1490 mem_ctx = state->out_mem_ctx;
1491 } else {
1492 mem_ctx = state;
1495 status = state->dispatch_recv(subreq, mem_ctx);
1496 TALLOC_FREE(subreq);
1497 if (!NT_STATUS_IS_OK(status)) {
1498 tevent_req_nterror(req, status);
1499 return;
1502 /* Copy out parameters */
1503 *state->orig.out.info_ctr = *state->tmp.out.info_ctr;
1504 *state->orig.out.totalentries = *state->tmp.out.totalentries;
1505 if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
1506 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
1509 /* Copy result */
1510 state->orig.out.result = state->tmp.out.result;
1512 /* Reset temporary structure */
1513 ZERO_STRUCT(state->tmp);
1515 if (DEBUGLEVEL >= 10) {
1516 NDR_PRINT_OUT_DEBUG(srvsvc_NetConnEnum, &state->orig);
1519 tevent_req_done(req);
1522 NTSTATUS rpccli_srvsvc_NetConnEnum_recv(struct tevent_req *req,
1523 TALLOC_CTX *mem_ctx,
1524 WERROR *result)
1526 struct rpccli_srvsvc_NetConnEnum_state *state = tevent_req_data(
1527 req, struct rpccli_srvsvc_NetConnEnum_state);
1528 NTSTATUS status;
1530 if (tevent_req_is_nterror(req, &status)) {
1531 tevent_req_received(req);
1532 return status;
1535 /* Steal possbile out parameters to the callers context */
1536 talloc_steal(mem_ctx, state->out_mem_ctx);
1538 /* Return result */
1539 *result = state->orig.out.result;
1541 tevent_req_received(req);
1542 return NT_STATUS_OK;
1545 NTSTATUS rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client *cli,
1546 TALLOC_CTX *mem_ctx,
1547 const char *server_unc /* [in] [unique,charset(UTF16)] */,
1548 const char *path /* [in] [unique,charset(UTF16)] */,
1549 struct srvsvc_NetConnInfoCtr *info_ctr /* [in,out] [ref] */,
1550 uint32_t max_buffer /* [in] */,
1551 uint32_t *totalentries /* [out] [ref] */,
1552 uint32_t *resume_handle /* [in,out] [unique] */,
1553 WERROR *werror)
1555 struct srvsvc_NetConnEnum r;
1556 NTSTATUS status;
1558 /* In parameters */
1559 r.in.server_unc = server_unc;
1560 r.in.path = path;
1561 r.in.info_ctr = info_ctr;
1562 r.in.max_buffer = max_buffer;
1563 r.in.resume_handle = resume_handle;
1565 if (DEBUGLEVEL >= 10) {
1566 NDR_PRINT_IN_DEBUG(srvsvc_NetConnEnum, &r);
1569 status = cli->dispatch(cli,
1570 mem_ctx,
1571 &ndr_table_srvsvc,
1572 NDR_SRVSVC_NETCONNENUM,
1573 &r);
1575 if (!NT_STATUS_IS_OK(status)) {
1576 return status;
1579 if (DEBUGLEVEL >= 10) {
1580 NDR_PRINT_OUT_DEBUG(srvsvc_NetConnEnum, &r);
1583 if (NT_STATUS_IS_ERR(status)) {
1584 return status;
1587 /* Return variables */
1588 *info_ctr = *r.out.info_ctr;
1589 *totalentries = *r.out.totalentries;
1590 if (resume_handle && r.out.resume_handle) {
1591 *resume_handle = *r.out.resume_handle;
1594 /* Return result */
1595 if (werror) {
1596 *werror = r.out.result;
1599 return werror_to_ntstatus(r.out.result);
1602 struct rpccli_srvsvc_NetFileEnum_state {
1603 struct srvsvc_NetFileEnum orig;
1604 struct srvsvc_NetFileEnum tmp;
1605 TALLOC_CTX *out_mem_ctx;
1606 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1609 static void rpccli_srvsvc_NetFileEnum_done(struct tevent_req *subreq);
1611 struct tevent_req *rpccli_srvsvc_NetFileEnum_send(TALLOC_CTX *mem_ctx,
1612 struct tevent_context *ev,
1613 struct rpc_pipe_client *cli,
1614 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
1615 const char *_path /* [in] [unique,charset(UTF16)] */,
1616 const char *_user /* [in] [unique,charset(UTF16)] */,
1617 struct srvsvc_NetFileInfoCtr *_info_ctr /* [in,out] [ref] */,
1618 uint32_t _max_buffer /* [in] */,
1619 uint32_t *_totalentries /* [out] [ref] */,
1620 uint32_t *_resume_handle /* [in,out] [unique] */)
1622 struct tevent_req *req;
1623 struct rpccli_srvsvc_NetFileEnum_state *state;
1624 struct tevent_req *subreq;
1626 req = tevent_req_create(mem_ctx, &state,
1627 struct rpccli_srvsvc_NetFileEnum_state);
1628 if (req == NULL) {
1629 return NULL;
1631 state->out_mem_ctx = NULL;
1632 state->dispatch_recv = cli->dispatch_recv;
1634 /* In parameters */
1635 state->orig.in.server_unc = _server_unc;
1636 state->orig.in.path = _path;
1637 state->orig.in.user = _user;
1638 state->orig.in.info_ctr = _info_ctr;
1639 state->orig.in.max_buffer = _max_buffer;
1640 state->orig.in.resume_handle = _resume_handle;
1642 /* Out parameters */
1643 state->orig.out.info_ctr = _info_ctr;
1644 state->orig.out.totalentries = _totalentries;
1645 state->orig.out.resume_handle = _resume_handle;
1647 /* Result */
1648 ZERO_STRUCT(state->orig.out.result);
1650 if (DEBUGLEVEL >= 10) {
1651 NDR_PRINT_IN_DEBUG(srvsvc_NetFileEnum, &state->orig);
1654 state->out_mem_ctx = talloc_named_const(state, 0,
1655 "rpccli_srvsvc_NetFileEnum_out_memory");
1656 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1657 return tevent_req_post(req, ev);
1660 /* make a temporary copy, that we pass to the dispatch function */
1661 state->tmp = state->orig;
1663 subreq = cli->dispatch_send(state, ev, cli,
1664 &ndr_table_srvsvc,
1665 NDR_SRVSVC_NETFILEENUM,
1666 &state->tmp);
1667 if (tevent_req_nomem(subreq, req)) {
1668 return tevent_req_post(req, ev);
1670 tevent_req_set_callback(subreq, rpccli_srvsvc_NetFileEnum_done, req);
1671 return req;
1674 static void rpccli_srvsvc_NetFileEnum_done(struct tevent_req *subreq)
1676 struct tevent_req *req = tevent_req_callback_data(
1677 subreq, struct tevent_req);
1678 struct rpccli_srvsvc_NetFileEnum_state *state = tevent_req_data(
1679 req, struct rpccli_srvsvc_NetFileEnum_state);
1680 NTSTATUS status;
1681 TALLOC_CTX *mem_ctx;
1683 if (state->out_mem_ctx) {
1684 mem_ctx = state->out_mem_ctx;
1685 } else {
1686 mem_ctx = state;
1689 status = state->dispatch_recv(subreq, mem_ctx);
1690 TALLOC_FREE(subreq);
1691 if (!NT_STATUS_IS_OK(status)) {
1692 tevent_req_nterror(req, status);
1693 return;
1696 /* Copy out parameters */
1697 *state->orig.out.info_ctr = *state->tmp.out.info_ctr;
1698 *state->orig.out.totalentries = *state->tmp.out.totalentries;
1699 if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
1700 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
1703 /* Copy result */
1704 state->orig.out.result = state->tmp.out.result;
1706 /* Reset temporary structure */
1707 ZERO_STRUCT(state->tmp);
1709 if (DEBUGLEVEL >= 10) {
1710 NDR_PRINT_OUT_DEBUG(srvsvc_NetFileEnum, &state->orig);
1713 tevent_req_done(req);
1716 NTSTATUS rpccli_srvsvc_NetFileEnum_recv(struct tevent_req *req,
1717 TALLOC_CTX *mem_ctx,
1718 WERROR *result)
1720 struct rpccli_srvsvc_NetFileEnum_state *state = tevent_req_data(
1721 req, struct rpccli_srvsvc_NetFileEnum_state);
1722 NTSTATUS status;
1724 if (tevent_req_is_nterror(req, &status)) {
1725 tevent_req_received(req);
1726 return status;
1729 /* Steal possbile out parameters to the callers context */
1730 talloc_steal(mem_ctx, state->out_mem_ctx);
1732 /* Return result */
1733 *result = state->orig.out.result;
1735 tevent_req_received(req);
1736 return NT_STATUS_OK;
1739 NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli,
1740 TALLOC_CTX *mem_ctx,
1741 const char *server_unc /* [in] [unique,charset(UTF16)] */,
1742 const char *path /* [in] [unique,charset(UTF16)] */,
1743 const char *user /* [in] [unique,charset(UTF16)] */,
1744 struct srvsvc_NetFileInfoCtr *info_ctr /* [in,out] [ref] */,
1745 uint32_t max_buffer /* [in] */,
1746 uint32_t *totalentries /* [out] [ref] */,
1747 uint32_t *resume_handle /* [in,out] [unique] */,
1748 WERROR *werror)
1750 struct srvsvc_NetFileEnum r;
1751 NTSTATUS status;
1753 /* In parameters */
1754 r.in.server_unc = server_unc;
1755 r.in.path = path;
1756 r.in.user = user;
1757 r.in.info_ctr = info_ctr;
1758 r.in.max_buffer = max_buffer;
1759 r.in.resume_handle = resume_handle;
1761 if (DEBUGLEVEL >= 10) {
1762 NDR_PRINT_IN_DEBUG(srvsvc_NetFileEnum, &r);
1765 status = cli->dispatch(cli,
1766 mem_ctx,
1767 &ndr_table_srvsvc,
1768 NDR_SRVSVC_NETFILEENUM,
1769 &r);
1771 if (!NT_STATUS_IS_OK(status)) {
1772 return status;
1775 if (DEBUGLEVEL >= 10) {
1776 NDR_PRINT_OUT_DEBUG(srvsvc_NetFileEnum, &r);
1779 if (NT_STATUS_IS_ERR(status)) {
1780 return status;
1783 /* Return variables */
1784 *info_ctr = *r.out.info_ctr;
1785 *totalentries = *r.out.totalentries;
1786 if (resume_handle && r.out.resume_handle) {
1787 *resume_handle = *r.out.resume_handle;
1790 /* Return result */
1791 if (werror) {
1792 *werror = r.out.result;
1795 return werror_to_ntstatus(r.out.result);
1798 struct rpccli_srvsvc_NetFileGetInfo_state {
1799 struct srvsvc_NetFileGetInfo orig;
1800 struct srvsvc_NetFileGetInfo tmp;
1801 TALLOC_CTX *out_mem_ctx;
1802 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1805 static void rpccli_srvsvc_NetFileGetInfo_done(struct tevent_req *subreq);
1807 struct tevent_req *rpccli_srvsvc_NetFileGetInfo_send(TALLOC_CTX *mem_ctx,
1808 struct tevent_context *ev,
1809 struct rpc_pipe_client *cli,
1810 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
1811 uint32_t _fid /* [in] */,
1812 uint32_t _level /* [in] */,
1813 union srvsvc_NetFileInfo *_info /* [out] [ref,switch_is(level)] */)
1815 struct tevent_req *req;
1816 struct rpccli_srvsvc_NetFileGetInfo_state *state;
1817 struct tevent_req *subreq;
1819 req = tevent_req_create(mem_ctx, &state,
1820 struct rpccli_srvsvc_NetFileGetInfo_state);
1821 if (req == NULL) {
1822 return NULL;
1824 state->out_mem_ctx = NULL;
1825 state->dispatch_recv = cli->dispatch_recv;
1827 /* In parameters */
1828 state->orig.in.server_unc = _server_unc;
1829 state->orig.in.fid = _fid;
1830 state->orig.in.level = _level;
1832 /* Out parameters */
1833 state->orig.out.info = _info;
1835 /* Result */
1836 ZERO_STRUCT(state->orig.out.result);
1838 if (DEBUGLEVEL >= 10) {
1839 NDR_PRINT_IN_DEBUG(srvsvc_NetFileGetInfo, &state->orig);
1842 state->out_mem_ctx = talloc_named_const(state, 0,
1843 "rpccli_srvsvc_NetFileGetInfo_out_memory");
1844 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1845 return tevent_req_post(req, ev);
1848 /* make a temporary copy, that we pass to the dispatch function */
1849 state->tmp = state->orig;
1851 subreq = cli->dispatch_send(state, ev, cli,
1852 &ndr_table_srvsvc,
1853 NDR_SRVSVC_NETFILEGETINFO,
1854 &state->tmp);
1855 if (tevent_req_nomem(subreq, req)) {
1856 return tevent_req_post(req, ev);
1858 tevent_req_set_callback(subreq, rpccli_srvsvc_NetFileGetInfo_done, req);
1859 return req;
1862 static void rpccli_srvsvc_NetFileGetInfo_done(struct tevent_req *subreq)
1864 struct tevent_req *req = tevent_req_callback_data(
1865 subreq, struct tevent_req);
1866 struct rpccli_srvsvc_NetFileGetInfo_state *state = tevent_req_data(
1867 req, struct rpccli_srvsvc_NetFileGetInfo_state);
1868 NTSTATUS status;
1869 TALLOC_CTX *mem_ctx;
1871 if (state->out_mem_ctx) {
1872 mem_ctx = state->out_mem_ctx;
1873 } else {
1874 mem_ctx = state;
1877 status = state->dispatch_recv(subreq, mem_ctx);
1878 TALLOC_FREE(subreq);
1879 if (!NT_STATUS_IS_OK(status)) {
1880 tevent_req_nterror(req, status);
1881 return;
1884 /* Copy out parameters */
1885 *state->orig.out.info = *state->tmp.out.info;
1887 /* Copy result */
1888 state->orig.out.result = state->tmp.out.result;
1890 /* Reset temporary structure */
1891 ZERO_STRUCT(state->tmp);
1893 if (DEBUGLEVEL >= 10) {
1894 NDR_PRINT_OUT_DEBUG(srvsvc_NetFileGetInfo, &state->orig);
1897 tevent_req_done(req);
1900 NTSTATUS rpccli_srvsvc_NetFileGetInfo_recv(struct tevent_req *req,
1901 TALLOC_CTX *mem_ctx,
1902 WERROR *result)
1904 struct rpccli_srvsvc_NetFileGetInfo_state *state = tevent_req_data(
1905 req, struct rpccli_srvsvc_NetFileGetInfo_state);
1906 NTSTATUS status;
1908 if (tevent_req_is_nterror(req, &status)) {
1909 tevent_req_received(req);
1910 return status;
1913 /* Steal possbile out parameters to the callers context */
1914 talloc_steal(mem_ctx, state->out_mem_ctx);
1916 /* Return result */
1917 *result = state->orig.out.result;
1919 tevent_req_received(req);
1920 return NT_STATUS_OK;
1923 NTSTATUS rpccli_srvsvc_NetFileGetInfo(struct rpc_pipe_client *cli,
1924 TALLOC_CTX *mem_ctx,
1925 const char *server_unc /* [in] [unique,charset(UTF16)] */,
1926 uint32_t fid /* [in] */,
1927 uint32_t level /* [in] */,
1928 union srvsvc_NetFileInfo *info /* [out] [ref,switch_is(level)] */,
1929 WERROR *werror)
1931 struct srvsvc_NetFileGetInfo r;
1932 NTSTATUS status;
1934 /* In parameters */
1935 r.in.server_unc = server_unc;
1936 r.in.fid = fid;
1937 r.in.level = level;
1939 if (DEBUGLEVEL >= 10) {
1940 NDR_PRINT_IN_DEBUG(srvsvc_NetFileGetInfo, &r);
1943 status = cli->dispatch(cli,
1944 mem_ctx,
1945 &ndr_table_srvsvc,
1946 NDR_SRVSVC_NETFILEGETINFO,
1947 &r);
1949 if (!NT_STATUS_IS_OK(status)) {
1950 return status;
1953 if (DEBUGLEVEL >= 10) {
1954 NDR_PRINT_OUT_DEBUG(srvsvc_NetFileGetInfo, &r);
1957 if (NT_STATUS_IS_ERR(status)) {
1958 return status;
1961 /* Return variables */
1962 *info = *r.out.info;
1964 /* Return result */
1965 if (werror) {
1966 *werror = r.out.result;
1969 return werror_to_ntstatus(r.out.result);
1972 struct rpccli_srvsvc_NetFileClose_state {
1973 struct srvsvc_NetFileClose orig;
1974 struct srvsvc_NetFileClose tmp;
1975 TALLOC_CTX *out_mem_ctx;
1976 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1979 static void rpccli_srvsvc_NetFileClose_done(struct tevent_req *subreq);
1981 struct tevent_req *rpccli_srvsvc_NetFileClose_send(TALLOC_CTX *mem_ctx,
1982 struct tevent_context *ev,
1983 struct rpc_pipe_client *cli,
1984 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
1985 uint32_t _fid /* [in] */)
1987 struct tevent_req *req;
1988 struct rpccli_srvsvc_NetFileClose_state *state;
1989 struct tevent_req *subreq;
1991 req = tevent_req_create(mem_ctx, &state,
1992 struct rpccli_srvsvc_NetFileClose_state);
1993 if (req == NULL) {
1994 return NULL;
1996 state->out_mem_ctx = NULL;
1997 state->dispatch_recv = cli->dispatch_recv;
1999 /* In parameters */
2000 state->orig.in.server_unc = _server_unc;
2001 state->orig.in.fid = _fid;
2003 /* Out parameters */
2005 /* Result */
2006 ZERO_STRUCT(state->orig.out.result);
2008 if (DEBUGLEVEL >= 10) {
2009 NDR_PRINT_IN_DEBUG(srvsvc_NetFileClose, &state->orig);
2012 /* make a temporary copy, that we pass to the dispatch function */
2013 state->tmp = state->orig;
2015 subreq = cli->dispatch_send(state, ev, cli,
2016 &ndr_table_srvsvc,
2017 NDR_SRVSVC_NETFILECLOSE,
2018 &state->tmp);
2019 if (tevent_req_nomem(subreq, req)) {
2020 return tevent_req_post(req, ev);
2022 tevent_req_set_callback(subreq, rpccli_srvsvc_NetFileClose_done, req);
2023 return req;
2026 static void rpccli_srvsvc_NetFileClose_done(struct tevent_req *subreq)
2028 struct tevent_req *req = tevent_req_callback_data(
2029 subreq, struct tevent_req);
2030 struct rpccli_srvsvc_NetFileClose_state *state = tevent_req_data(
2031 req, struct rpccli_srvsvc_NetFileClose_state);
2032 NTSTATUS status;
2033 TALLOC_CTX *mem_ctx;
2035 if (state->out_mem_ctx) {
2036 mem_ctx = state->out_mem_ctx;
2037 } else {
2038 mem_ctx = state;
2041 status = state->dispatch_recv(subreq, mem_ctx);
2042 TALLOC_FREE(subreq);
2043 if (!NT_STATUS_IS_OK(status)) {
2044 tevent_req_nterror(req, status);
2045 return;
2048 /* Copy out parameters */
2050 /* Copy result */
2051 state->orig.out.result = state->tmp.out.result;
2053 /* Reset temporary structure */
2054 ZERO_STRUCT(state->tmp);
2056 if (DEBUGLEVEL >= 10) {
2057 NDR_PRINT_OUT_DEBUG(srvsvc_NetFileClose, &state->orig);
2060 tevent_req_done(req);
2063 NTSTATUS rpccli_srvsvc_NetFileClose_recv(struct tevent_req *req,
2064 TALLOC_CTX *mem_ctx,
2065 WERROR *result)
2067 struct rpccli_srvsvc_NetFileClose_state *state = tevent_req_data(
2068 req, struct rpccli_srvsvc_NetFileClose_state);
2069 NTSTATUS status;
2071 if (tevent_req_is_nterror(req, &status)) {
2072 tevent_req_received(req);
2073 return status;
2076 /* Steal possbile out parameters to the callers context */
2077 talloc_steal(mem_ctx, state->out_mem_ctx);
2079 /* Return result */
2080 *result = state->orig.out.result;
2082 tevent_req_received(req);
2083 return NT_STATUS_OK;
2086 NTSTATUS rpccli_srvsvc_NetFileClose(struct rpc_pipe_client *cli,
2087 TALLOC_CTX *mem_ctx,
2088 const char *server_unc /* [in] [unique,charset(UTF16)] */,
2089 uint32_t fid /* [in] */,
2090 WERROR *werror)
2092 struct srvsvc_NetFileClose r;
2093 NTSTATUS status;
2095 /* In parameters */
2096 r.in.server_unc = server_unc;
2097 r.in.fid = fid;
2099 if (DEBUGLEVEL >= 10) {
2100 NDR_PRINT_IN_DEBUG(srvsvc_NetFileClose, &r);
2103 status = cli->dispatch(cli,
2104 mem_ctx,
2105 &ndr_table_srvsvc,
2106 NDR_SRVSVC_NETFILECLOSE,
2107 &r);
2109 if (!NT_STATUS_IS_OK(status)) {
2110 return status;
2113 if (DEBUGLEVEL >= 10) {
2114 NDR_PRINT_OUT_DEBUG(srvsvc_NetFileClose, &r);
2117 if (NT_STATUS_IS_ERR(status)) {
2118 return status;
2121 /* Return variables */
2123 /* Return result */
2124 if (werror) {
2125 *werror = r.out.result;
2128 return werror_to_ntstatus(r.out.result);
2131 struct rpccli_srvsvc_NetSessEnum_state {
2132 struct srvsvc_NetSessEnum orig;
2133 struct srvsvc_NetSessEnum tmp;
2134 TALLOC_CTX *out_mem_ctx;
2135 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2138 static void rpccli_srvsvc_NetSessEnum_done(struct tevent_req *subreq);
2140 struct tevent_req *rpccli_srvsvc_NetSessEnum_send(TALLOC_CTX *mem_ctx,
2141 struct tevent_context *ev,
2142 struct rpc_pipe_client *cli,
2143 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
2144 const char *_client /* [in] [unique,charset(UTF16)] */,
2145 const char *_user /* [in] [unique,charset(UTF16)] */,
2146 struct srvsvc_NetSessInfoCtr *_info_ctr /* [in,out] [ref] */,
2147 uint32_t _max_buffer /* [in] */,
2148 uint32_t *_totalentries /* [out] [ref] */,
2149 uint32_t *_resume_handle /* [in,out] [unique] */)
2151 struct tevent_req *req;
2152 struct rpccli_srvsvc_NetSessEnum_state *state;
2153 struct tevent_req *subreq;
2155 req = tevent_req_create(mem_ctx, &state,
2156 struct rpccli_srvsvc_NetSessEnum_state);
2157 if (req == NULL) {
2158 return NULL;
2160 state->out_mem_ctx = NULL;
2161 state->dispatch_recv = cli->dispatch_recv;
2163 /* In parameters */
2164 state->orig.in.server_unc = _server_unc;
2165 state->orig.in.client = _client;
2166 state->orig.in.user = _user;
2167 state->orig.in.info_ctr = _info_ctr;
2168 state->orig.in.max_buffer = _max_buffer;
2169 state->orig.in.resume_handle = _resume_handle;
2171 /* Out parameters */
2172 state->orig.out.info_ctr = _info_ctr;
2173 state->orig.out.totalentries = _totalentries;
2174 state->orig.out.resume_handle = _resume_handle;
2176 /* Result */
2177 ZERO_STRUCT(state->orig.out.result);
2179 if (DEBUGLEVEL >= 10) {
2180 NDR_PRINT_IN_DEBUG(srvsvc_NetSessEnum, &state->orig);
2183 state->out_mem_ctx = talloc_named_const(state, 0,
2184 "rpccli_srvsvc_NetSessEnum_out_memory");
2185 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2186 return tevent_req_post(req, ev);
2189 /* make a temporary copy, that we pass to the dispatch function */
2190 state->tmp = state->orig;
2192 subreq = cli->dispatch_send(state, ev, cli,
2193 &ndr_table_srvsvc,
2194 NDR_SRVSVC_NETSESSENUM,
2195 &state->tmp);
2196 if (tevent_req_nomem(subreq, req)) {
2197 return tevent_req_post(req, ev);
2199 tevent_req_set_callback(subreq, rpccli_srvsvc_NetSessEnum_done, req);
2200 return req;
2203 static void rpccli_srvsvc_NetSessEnum_done(struct tevent_req *subreq)
2205 struct tevent_req *req = tevent_req_callback_data(
2206 subreq, struct tevent_req);
2207 struct rpccli_srvsvc_NetSessEnum_state *state = tevent_req_data(
2208 req, struct rpccli_srvsvc_NetSessEnum_state);
2209 NTSTATUS status;
2210 TALLOC_CTX *mem_ctx;
2212 if (state->out_mem_ctx) {
2213 mem_ctx = state->out_mem_ctx;
2214 } else {
2215 mem_ctx = state;
2218 status = state->dispatch_recv(subreq, mem_ctx);
2219 TALLOC_FREE(subreq);
2220 if (!NT_STATUS_IS_OK(status)) {
2221 tevent_req_nterror(req, status);
2222 return;
2225 /* Copy out parameters */
2226 *state->orig.out.info_ctr = *state->tmp.out.info_ctr;
2227 *state->orig.out.totalentries = *state->tmp.out.totalentries;
2228 if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
2229 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
2232 /* Copy result */
2233 state->orig.out.result = state->tmp.out.result;
2235 /* Reset temporary structure */
2236 ZERO_STRUCT(state->tmp);
2238 if (DEBUGLEVEL >= 10) {
2239 NDR_PRINT_OUT_DEBUG(srvsvc_NetSessEnum, &state->orig);
2242 tevent_req_done(req);
2245 NTSTATUS rpccli_srvsvc_NetSessEnum_recv(struct tevent_req *req,
2246 TALLOC_CTX *mem_ctx,
2247 WERROR *result)
2249 struct rpccli_srvsvc_NetSessEnum_state *state = tevent_req_data(
2250 req, struct rpccli_srvsvc_NetSessEnum_state);
2251 NTSTATUS status;
2253 if (tevent_req_is_nterror(req, &status)) {
2254 tevent_req_received(req);
2255 return status;
2258 /* Steal possbile out parameters to the callers context */
2259 talloc_steal(mem_ctx, state->out_mem_ctx);
2261 /* Return result */
2262 *result = state->orig.out.result;
2264 tevent_req_received(req);
2265 return NT_STATUS_OK;
2268 NTSTATUS rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client *cli,
2269 TALLOC_CTX *mem_ctx,
2270 const char *server_unc /* [in] [unique,charset(UTF16)] */,
2271 const char *client /* [in] [unique,charset(UTF16)] */,
2272 const char *user /* [in] [unique,charset(UTF16)] */,
2273 struct srvsvc_NetSessInfoCtr *info_ctr /* [in,out] [ref] */,
2274 uint32_t max_buffer /* [in] */,
2275 uint32_t *totalentries /* [out] [ref] */,
2276 uint32_t *resume_handle /* [in,out] [unique] */,
2277 WERROR *werror)
2279 struct srvsvc_NetSessEnum r;
2280 NTSTATUS status;
2282 /* In parameters */
2283 r.in.server_unc = server_unc;
2284 r.in.client = client;
2285 r.in.user = user;
2286 r.in.info_ctr = info_ctr;
2287 r.in.max_buffer = max_buffer;
2288 r.in.resume_handle = resume_handle;
2290 if (DEBUGLEVEL >= 10) {
2291 NDR_PRINT_IN_DEBUG(srvsvc_NetSessEnum, &r);
2294 status = cli->dispatch(cli,
2295 mem_ctx,
2296 &ndr_table_srvsvc,
2297 NDR_SRVSVC_NETSESSENUM,
2298 &r);
2300 if (!NT_STATUS_IS_OK(status)) {
2301 return status;
2304 if (DEBUGLEVEL >= 10) {
2305 NDR_PRINT_OUT_DEBUG(srvsvc_NetSessEnum, &r);
2308 if (NT_STATUS_IS_ERR(status)) {
2309 return status;
2312 /* Return variables */
2313 *info_ctr = *r.out.info_ctr;
2314 *totalentries = *r.out.totalentries;
2315 if (resume_handle && r.out.resume_handle) {
2316 *resume_handle = *r.out.resume_handle;
2319 /* Return result */
2320 if (werror) {
2321 *werror = r.out.result;
2324 return werror_to_ntstatus(r.out.result);
2327 struct rpccli_srvsvc_NetSessDel_state {
2328 struct srvsvc_NetSessDel orig;
2329 struct srvsvc_NetSessDel tmp;
2330 TALLOC_CTX *out_mem_ctx;
2331 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2334 static void rpccli_srvsvc_NetSessDel_done(struct tevent_req *subreq);
2336 struct tevent_req *rpccli_srvsvc_NetSessDel_send(TALLOC_CTX *mem_ctx,
2337 struct tevent_context *ev,
2338 struct rpc_pipe_client *cli,
2339 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
2340 const char *_client /* [in] [unique,charset(UTF16)] */,
2341 const char *_user /* [in] [unique,charset(UTF16)] */)
2343 struct tevent_req *req;
2344 struct rpccli_srvsvc_NetSessDel_state *state;
2345 struct tevent_req *subreq;
2347 req = tevent_req_create(mem_ctx, &state,
2348 struct rpccli_srvsvc_NetSessDel_state);
2349 if (req == NULL) {
2350 return NULL;
2352 state->out_mem_ctx = NULL;
2353 state->dispatch_recv = cli->dispatch_recv;
2355 /* In parameters */
2356 state->orig.in.server_unc = _server_unc;
2357 state->orig.in.client = _client;
2358 state->orig.in.user = _user;
2360 /* Out parameters */
2362 /* Result */
2363 ZERO_STRUCT(state->orig.out.result);
2365 if (DEBUGLEVEL >= 10) {
2366 NDR_PRINT_IN_DEBUG(srvsvc_NetSessDel, &state->orig);
2369 /* make a temporary copy, that we pass to the dispatch function */
2370 state->tmp = state->orig;
2372 subreq = cli->dispatch_send(state, ev, cli,
2373 &ndr_table_srvsvc,
2374 NDR_SRVSVC_NETSESSDEL,
2375 &state->tmp);
2376 if (tevent_req_nomem(subreq, req)) {
2377 return tevent_req_post(req, ev);
2379 tevent_req_set_callback(subreq, rpccli_srvsvc_NetSessDel_done, req);
2380 return req;
2383 static void rpccli_srvsvc_NetSessDel_done(struct tevent_req *subreq)
2385 struct tevent_req *req = tevent_req_callback_data(
2386 subreq, struct tevent_req);
2387 struct rpccli_srvsvc_NetSessDel_state *state = tevent_req_data(
2388 req, struct rpccli_srvsvc_NetSessDel_state);
2389 NTSTATUS status;
2390 TALLOC_CTX *mem_ctx;
2392 if (state->out_mem_ctx) {
2393 mem_ctx = state->out_mem_ctx;
2394 } else {
2395 mem_ctx = state;
2398 status = state->dispatch_recv(subreq, mem_ctx);
2399 TALLOC_FREE(subreq);
2400 if (!NT_STATUS_IS_OK(status)) {
2401 tevent_req_nterror(req, status);
2402 return;
2405 /* Copy out parameters */
2407 /* Copy result */
2408 state->orig.out.result = state->tmp.out.result;
2410 /* Reset temporary structure */
2411 ZERO_STRUCT(state->tmp);
2413 if (DEBUGLEVEL >= 10) {
2414 NDR_PRINT_OUT_DEBUG(srvsvc_NetSessDel, &state->orig);
2417 tevent_req_done(req);
2420 NTSTATUS rpccli_srvsvc_NetSessDel_recv(struct tevent_req *req,
2421 TALLOC_CTX *mem_ctx,
2422 WERROR *result)
2424 struct rpccli_srvsvc_NetSessDel_state *state = tevent_req_data(
2425 req, struct rpccli_srvsvc_NetSessDel_state);
2426 NTSTATUS status;
2428 if (tevent_req_is_nterror(req, &status)) {
2429 tevent_req_received(req);
2430 return status;
2433 /* Steal possbile out parameters to the callers context */
2434 talloc_steal(mem_ctx, state->out_mem_ctx);
2436 /* Return result */
2437 *result = state->orig.out.result;
2439 tevent_req_received(req);
2440 return NT_STATUS_OK;
2443 NTSTATUS rpccli_srvsvc_NetSessDel(struct rpc_pipe_client *cli,
2444 TALLOC_CTX *mem_ctx,
2445 const char *server_unc /* [in] [unique,charset(UTF16)] */,
2446 const char *client /* [in] [unique,charset(UTF16)] */,
2447 const char *user /* [in] [unique,charset(UTF16)] */,
2448 WERROR *werror)
2450 struct srvsvc_NetSessDel r;
2451 NTSTATUS status;
2453 /* In parameters */
2454 r.in.server_unc = server_unc;
2455 r.in.client = client;
2456 r.in.user = user;
2458 if (DEBUGLEVEL >= 10) {
2459 NDR_PRINT_IN_DEBUG(srvsvc_NetSessDel, &r);
2462 status = cli->dispatch(cli,
2463 mem_ctx,
2464 &ndr_table_srvsvc,
2465 NDR_SRVSVC_NETSESSDEL,
2466 &r);
2468 if (!NT_STATUS_IS_OK(status)) {
2469 return status;
2472 if (DEBUGLEVEL >= 10) {
2473 NDR_PRINT_OUT_DEBUG(srvsvc_NetSessDel, &r);
2476 if (NT_STATUS_IS_ERR(status)) {
2477 return status;
2480 /* Return variables */
2482 /* Return result */
2483 if (werror) {
2484 *werror = r.out.result;
2487 return werror_to_ntstatus(r.out.result);
2490 struct rpccli_srvsvc_NetShareAdd_state {
2491 struct srvsvc_NetShareAdd orig;
2492 struct srvsvc_NetShareAdd tmp;
2493 TALLOC_CTX *out_mem_ctx;
2494 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2497 static void rpccli_srvsvc_NetShareAdd_done(struct tevent_req *subreq);
2499 struct tevent_req *rpccli_srvsvc_NetShareAdd_send(TALLOC_CTX *mem_ctx,
2500 struct tevent_context *ev,
2501 struct rpc_pipe_client *cli,
2502 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
2503 uint32_t _level /* [in] */,
2504 union srvsvc_NetShareInfo *_info /* [in] [ref,switch_is(level)] */,
2505 uint32_t *_parm_error /* [in,out] [unique] */)
2507 struct tevent_req *req;
2508 struct rpccli_srvsvc_NetShareAdd_state *state;
2509 struct tevent_req *subreq;
2511 req = tevent_req_create(mem_ctx, &state,
2512 struct rpccli_srvsvc_NetShareAdd_state);
2513 if (req == NULL) {
2514 return NULL;
2516 state->out_mem_ctx = NULL;
2517 state->dispatch_recv = cli->dispatch_recv;
2519 /* In parameters */
2520 state->orig.in.server_unc = _server_unc;
2521 state->orig.in.level = _level;
2522 state->orig.in.info = _info;
2523 state->orig.in.parm_error = _parm_error;
2525 /* Out parameters */
2526 state->orig.out.parm_error = _parm_error;
2528 /* Result */
2529 ZERO_STRUCT(state->orig.out.result);
2531 if (DEBUGLEVEL >= 10) {
2532 NDR_PRINT_IN_DEBUG(srvsvc_NetShareAdd, &state->orig);
2535 state->out_mem_ctx = talloc_named_const(state, 0,
2536 "rpccli_srvsvc_NetShareAdd_out_memory");
2537 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2538 return tevent_req_post(req, ev);
2541 /* make a temporary copy, that we pass to the dispatch function */
2542 state->tmp = state->orig;
2544 subreq = cli->dispatch_send(state, ev, cli,
2545 &ndr_table_srvsvc,
2546 NDR_SRVSVC_NETSHAREADD,
2547 &state->tmp);
2548 if (tevent_req_nomem(subreq, req)) {
2549 return tevent_req_post(req, ev);
2551 tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareAdd_done, req);
2552 return req;
2555 static void rpccli_srvsvc_NetShareAdd_done(struct tevent_req *subreq)
2557 struct tevent_req *req = tevent_req_callback_data(
2558 subreq, struct tevent_req);
2559 struct rpccli_srvsvc_NetShareAdd_state *state = tevent_req_data(
2560 req, struct rpccli_srvsvc_NetShareAdd_state);
2561 NTSTATUS status;
2562 TALLOC_CTX *mem_ctx;
2564 if (state->out_mem_ctx) {
2565 mem_ctx = state->out_mem_ctx;
2566 } else {
2567 mem_ctx = state;
2570 status = state->dispatch_recv(subreq, mem_ctx);
2571 TALLOC_FREE(subreq);
2572 if (!NT_STATUS_IS_OK(status)) {
2573 tevent_req_nterror(req, status);
2574 return;
2577 /* Copy out parameters */
2578 if (state->orig.out.parm_error && state->tmp.out.parm_error) {
2579 *state->orig.out.parm_error = *state->tmp.out.parm_error;
2582 /* Copy result */
2583 state->orig.out.result = state->tmp.out.result;
2585 /* Reset temporary structure */
2586 ZERO_STRUCT(state->tmp);
2588 if (DEBUGLEVEL >= 10) {
2589 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareAdd, &state->orig);
2592 tevent_req_done(req);
2595 NTSTATUS rpccli_srvsvc_NetShareAdd_recv(struct tevent_req *req,
2596 TALLOC_CTX *mem_ctx,
2597 WERROR *result)
2599 struct rpccli_srvsvc_NetShareAdd_state *state = tevent_req_data(
2600 req, struct rpccli_srvsvc_NetShareAdd_state);
2601 NTSTATUS status;
2603 if (tevent_req_is_nterror(req, &status)) {
2604 tevent_req_received(req);
2605 return status;
2608 /* Steal possbile out parameters to the callers context */
2609 talloc_steal(mem_ctx, state->out_mem_ctx);
2611 /* Return result */
2612 *result = state->orig.out.result;
2614 tevent_req_received(req);
2615 return NT_STATUS_OK;
2618 NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli,
2619 TALLOC_CTX *mem_ctx,
2620 const char *server_unc /* [in] [unique,charset(UTF16)] */,
2621 uint32_t level /* [in] */,
2622 union srvsvc_NetShareInfo *info /* [in] [ref,switch_is(level)] */,
2623 uint32_t *parm_error /* [in,out] [unique] */,
2624 WERROR *werror)
2626 struct srvsvc_NetShareAdd r;
2627 NTSTATUS status;
2629 /* In parameters */
2630 r.in.server_unc = server_unc;
2631 r.in.level = level;
2632 r.in.info = info;
2633 r.in.parm_error = parm_error;
2635 if (DEBUGLEVEL >= 10) {
2636 NDR_PRINT_IN_DEBUG(srvsvc_NetShareAdd, &r);
2639 status = cli->dispatch(cli,
2640 mem_ctx,
2641 &ndr_table_srvsvc,
2642 NDR_SRVSVC_NETSHAREADD,
2643 &r);
2645 if (!NT_STATUS_IS_OK(status)) {
2646 return status;
2649 if (DEBUGLEVEL >= 10) {
2650 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareAdd, &r);
2653 if (NT_STATUS_IS_ERR(status)) {
2654 return status;
2657 /* Return variables */
2658 if (parm_error && r.out.parm_error) {
2659 *parm_error = *r.out.parm_error;
2662 /* Return result */
2663 if (werror) {
2664 *werror = r.out.result;
2667 return werror_to_ntstatus(r.out.result);
2670 struct rpccli_srvsvc_NetShareEnumAll_state {
2671 struct srvsvc_NetShareEnumAll orig;
2672 struct srvsvc_NetShareEnumAll tmp;
2673 TALLOC_CTX *out_mem_ctx;
2674 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2677 static void rpccli_srvsvc_NetShareEnumAll_done(struct tevent_req *subreq);
2679 struct tevent_req *rpccli_srvsvc_NetShareEnumAll_send(TALLOC_CTX *mem_ctx,
2680 struct tevent_context *ev,
2681 struct rpc_pipe_client *cli,
2682 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
2683 struct srvsvc_NetShareInfoCtr *_info_ctr /* [in,out] [ref] */,
2684 uint32_t _max_buffer /* [in] */,
2685 uint32_t *_totalentries /* [out] [ref] */,
2686 uint32_t *_resume_handle /* [in,out] [unique] */)
2688 struct tevent_req *req;
2689 struct rpccli_srvsvc_NetShareEnumAll_state *state;
2690 struct tevent_req *subreq;
2692 req = tevent_req_create(mem_ctx, &state,
2693 struct rpccli_srvsvc_NetShareEnumAll_state);
2694 if (req == NULL) {
2695 return NULL;
2697 state->out_mem_ctx = NULL;
2698 state->dispatch_recv = cli->dispatch_recv;
2700 /* In parameters */
2701 state->orig.in.server_unc = _server_unc;
2702 state->orig.in.info_ctr = _info_ctr;
2703 state->orig.in.max_buffer = _max_buffer;
2704 state->orig.in.resume_handle = _resume_handle;
2706 /* Out parameters */
2707 state->orig.out.info_ctr = _info_ctr;
2708 state->orig.out.totalentries = _totalentries;
2709 state->orig.out.resume_handle = _resume_handle;
2711 /* Result */
2712 ZERO_STRUCT(state->orig.out.result);
2714 if (DEBUGLEVEL >= 10) {
2715 NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnumAll, &state->orig);
2718 state->out_mem_ctx = talloc_named_const(state, 0,
2719 "rpccli_srvsvc_NetShareEnumAll_out_memory");
2720 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2721 return tevent_req_post(req, ev);
2724 /* make a temporary copy, that we pass to the dispatch function */
2725 state->tmp = state->orig;
2727 subreq = cli->dispatch_send(state, ev, cli,
2728 &ndr_table_srvsvc,
2729 NDR_SRVSVC_NETSHAREENUMALL,
2730 &state->tmp);
2731 if (tevent_req_nomem(subreq, req)) {
2732 return tevent_req_post(req, ev);
2734 tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareEnumAll_done, req);
2735 return req;
2738 static void rpccli_srvsvc_NetShareEnumAll_done(struct tevent_req *subreq)
2740 struct tevent_req *req = tevent_req_callback_data(
2741 subreq, struct tevent_req);
2742 struct rpccli_srvsvc_NetShareEnumAll_state *state = tevent_req_data(
2743 req, struct rpccli_srvsvc_NetShareEnumAll_state);
2744 NTSTATUS status;
2745 TALLOC_CTX *mem_ctx;
2747 if (state->out_mem_ctx) {
2748 mem_ctx = state->out_mem_ctx;
2749 } else {
2750 mem_ctx = state;
2753 status = state->dispatch_recv(subreq, mem_ctx);
2754 TALLOC_FREE(subreq);
2755 if (!NT_STATUS_IS_OK(status)) {
2756 tevent_req_nterror(req, status);
2757 return;
2760 /* Copy out parameters */
2761 *state->orig.out.info_ctr = *state->tmp.out.info_ctr;
2762 *state->orig.out.totalentries = *state->tmp.out.totalentries;
2763 if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
2764 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
2767 /* Copy result */
2768 state->orig.out.result = state->tmp.out.result;
2770 /* Reset temporary structure */
2771 ZERO_STRUCT(state->tmp);
2773 if (DEBUGLEVEL >= 10) {
2774 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnumAll, &state->orig);
2777 tevent_req_done(req);
2780 NTSTATUS rpccli_srvsvc_NetShareEnumAll_recv(struct tevent_req *req,
2781 TALLOC_CTX *mem_ctx,
2782 WERROR *result)
2784 struct rpccli_srvsvc_NetShareEnumAll_state *state = tevent_req_data(
2785 req, struct rpccli_srvsvc_NetShareEnumAll_state);
2786 NTSTATUS status;
2788 if (tevent_req_is_nterror(req, &status)) {
2789 tevent_req_received(req);
2790 return status;
2793 /* Steal possbile out parameters to the callers context */
2794 talloc_steal(mem_ctx, state->out_mem_ctx);
2796 /* Return result */
2797 *result = state->orig.out.result;
2799 tevent_req_received(req);
2800 return NT_STATUS_OK;
2803 NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli,
2804 TALLOC_CTX *mem_ctx,
2805 const char *server_unc /* [in] [unique,charset(UTF16)] */,
2806 struct srvsvc_NetShareInfoCtr *info_ctr /* [in,out] [ref] */,
2807 uint32_t max_buffer /* [in] */,
2808 uint32_t *totalentries /* [out] [ref] */,
2809 uint32_t *resume_handle /* [in,out] [unique] */,
2810 WERROR *werror)
2812 struct srvsvc_NetShareEnumAll r;
2813 NTSTATUS status;
2815 /* In parameters */
2816 r.in.server_unc = server_unc;
2817 r.in.info_ctr = info_ctr;
2818 r.in.max_buffer = max_buffer;
2819 r.in.resume_handle = resume_handle;
2821 if (DEBUGLEVEL >= 10) {
2822 NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnumAll, &r);
2825 status = cli->dispatch(cli,
2826 mem_ctx,
2827 &ndr_table_srvsvc,
2828 NDR_SRVSVC_NETSHAREENUMALL,
2829 &r);
2831 if (!NT_STATUS_IS_OK(status)) {
2832 return status;
2835 if (DEBUGLEVEL >= 10) {
2836 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnumAll, &r);
2839 if (NT_STATUS_IS_ERR(status)) {
2840 return status;
2843 /* Return variables */
2844 *info_ctr = *r.out.info_ctr;
2845 *totalentries = *r.out.totalentries;
2846 if (resume_handle && r.out.resume_handle) {
2847 *resume_handle = *r.out.resume_handle;
2850 /* Return result */
2851 if (werror) {
2852 *werror = r.out.result;
2855 return werror_to_ntstatus(r.out.result);
2858 struct rpccli_srvsvc_NetShareGetInfo_state {
2859 struct srvsvc_NetShareGetInfo orig;
2860 struct srvsvc_NetShareGetInfo tmp;
2861 TALLOC_CTX *out_mem_ctx;
2862 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2865 static void rpccli_srvsvc_NetShareGetInfo_done(struct tevent_req *subreq);
2867 struct tevent_req *rpccli_srvsvc_NetShareGetInfo_send(TALLOC_CTX *mem_ctx,
2868 struct tevent_context *ev,
2869 struct rpc_pipe_client *cli,
2870 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
2871 const char *_share_name /* [in] [charset(UTF16)] */,
2872 uint32_t _level /* [in] */,
2873 union srvsvc_NetShareInfo *_info /* [out] [ref,switch_is(level)] */)
2875 struct tevent_req *req;
2876 struct rpccli_srvsvc_NetShareGetInfo_state *state;
2877 struct tevent_req *subreq;
2879 req = tevent_req_create(mem_ctx, &state,
2880 struct rpccli_srvsvc_NetShareGetInfo_state);
2881 if (req == NULL) {
2882 return NULL;
2884 state->out_mem_ctx = NULL;
2885 state->dispatch_recv = cli->dispatch_recv;
2887 /* In parameters */
2888 state->orig.in.server_unc = _server_unc;
2889 state->orig.in.share_name = _share_name;
2890 state->orig.in.level = _level;
2892 /* Out parameters */
2893 state->orig.out.info = _info;
2895 /* Result */
2896 ZERO_STRUCT(state->orig.out.result);
2898 if (DEBUGLEVEL >= 10) {
2899 NDR_PRINT_IN_DEBUG(srvsvc_NetShareGetInfo, &state->orig);
2902 state->out_mem_ctx = talloc_named_const(state, 0,
2903 "rpccli_srvsvc_NetShareGetInfo_out_memory");
2904 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2905 return tevent_req_post(req, ev);
2908 /* make a temporary copy, that we pass to the dispatch function */
2909 state->tmp = state->orig;
2911 subreq = cli->dispatch_send(state, ev, cli,
2912 &ndr_table_srvsvc,
2913 NDR_SRVSVC_NETSHAREGETINFO,
2914 &state->tmp);
2915 if (tevent_req_nomem(subreq, req)) {
2916 return tevent_req_post(req, ev);
2918 tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareGetInfo_done, req);
2919 return req;
2922 static void rpccli_srvsvc_NetShareGetInfo_done(struct tevent_req *subreq)
2924 struct tevent_req *req = tevent_req_callback_data(
2925 subreq, struct tevent_req);
2926 struct rpccli_srvsvc_NetShareGetInfo_state *state = tevent_req_data(
2927 req, struct rpccli_srvsvc_NetShareGetInfo_state);
2928 NTSTATUS status;
2929 TALLOC_CTX *mem_ctx;
2931 if (state->out_mem_ctx) {
2932 mem_ctx = state->out_mem_ctx;
2933 } else {
2934 mem_ctx = state;
2937 status = state->dispatch_recv(subreq, mem_ctx);
2938 TALLOC_FREE(subreq);
2939 if (!NT_STATUS_IS_OK(status)) {
2940 tevent_req_nterror(req, status);
2941 return;
2944 /* Copy out parameters */
2945 *state->orig.out.info = *state->tmp.out.info;
2947 /* Copy result */
2948 state->orig.out.result = state->tmp.out.result;
2950 /* Reset temporary structure */
2951 ZERO_STRUCT(state->tmp);
2953 if (DEBUGLEVEL >= 10) {
2954 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareGetInfo, &state->orig);
2957 tevent_req_done(req);
2960 NTSTATUS rpccli_srvsvc_NetShareGetInfo_recv(struct tevent_req *req,
2961 TALLOC_CTX *mem_ctx,
2962 WERROR *result)
2964 struct rpccli_srvsvc_NetShareGetInfo_state *state = tevent_req_data(
2965 req, struct rpccli_srvsvc_NetShareGetInfo_state);
2966 NTSTATUS status;
2968 if (tevent_req_is_nterror(req, &status)) {
2969 tevent_req_received(req);
2970 return status;
2973 /* Steal possbile out parameters to the callers context */
2974 talloc_steal(mem_ctx, state->out_mem_ctx);
2976 /* Return result */
2977 *result = state->orig.out.result;
2979 tevent_req_received(req);
2980 return NT_STATUS_OK;
2983 NTSTATUS rpccli_srvsvc_NetShareGetInfo(struct rpc_pipe_client *cli,
2984 TALLOC_CTX *mem_ctx,
2985 const char *server_unc /* [in] [unique,charset(UTF16)] */,
2986 const char *share_name /* [in] [charset(UTF16)] */,
2987 uint32_t level /* [in] */,
2988 union srvsvc_NetShareInfo *info /* [out] [ref,switch_is(level)] */,
2989 WERROR *werror)
2991 struct srvsvc_NetShareGetInfo r;
2992 NTSTATUS status;
2994 /* In parameters */
2995 r.in.server_unc = server_unc;
2996 r.in.share_name = share_name;
2997 r.in.level = level;
2999 if (DEBUGLEVEL >= 10) {
3000 NDR_PRINT_IN_DEBUG(srvsvc_NetShareGetInfo, &r);
3003 status = cli->dispatch(cli,
3004 mem_ctx,
3005 &ndr_table_srvsvc,
3006 NDR_SRVSVC_NETSHAREGETINFO,
3007 &r);
3009 if (!NT_STATUS_IS_OK(status)) {
3010 return status;
3013 if (DEBUGLEVEL >= 10) {
3014 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareGetInfo, &r);
3017 if (NT_STATUS_IS_ERR(status)) {
3018 return status;
3021 /* Return variables */
3022 *info = *r.out.info;
3024 /* Return result */
3025 if (werror) {
3026 *werror = r.out.result;
3029 return werror_to_ntstatus(r.out.result);
3032 struct rpccli_srvsvc_NetShareSetInfo_state {
3033 struct srvsvc_NetShareSetInfo orig;
3034 struct srvsvc_NetShareSetInfo tmp;
3035 TALLOC_CTX *out_mem_ctx;
3036 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3039 static void rpccli_srvsvc_NetShareSetInfo_done(struct tevent_req *subreq);
3041 struct tevent_req *rpccli_srvsvc_NetShareSetInfo_send(TALLOC_CTX *mem_ctx,
3042 struct tevent_context *ev,
3043 struct rpc_pipe_client *cli,
3044 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
3045 const char *_share_name /* [in] [charset(UTF16)] */,
3046 uint32_t _level /* [in] */,
3047 union srvsvc_NetShareInfo *_info /* [in] [ref,switch_is(level)] */,
3048 uint32_t *_parm_error /* [in,out] [unique] */)
3050 struct tevent_req *req;
3051 struct rpccli_srvsvc_NetShareSetInfo_state *state;
3052 struct tevent_req *subreq;
3054 req = tevent_req_create(mem_ctx, &state,
3055 struct rpccli_srvsvc_NetShareSetInfo_state);
3056 if (req == NULL) {
3057 return NULL;
3059 state->out_mem_ctx = NULL;
3060 state->dispatch_recv = cli->dispatch_recv;
3062 /* In parameters */
3063 state->orig.in.server_unc = _server_unc;
3064 state->orig.in.share_name = _share_name;
3065 state->orig.in.level = _level;
3066 state->orig.in.info = _info;
3067 state->orig.in.parm_error = _parm_error;
3069 /* Out parameters */
3070 state->orig.out.parm_error = _parm_error;
3072 /* Result */
3073 ZERO_STRUCT(state->orig.out.result);
3075 if (DEBUGLEVEL >= 10) {
3076 NDR_PRINT_IN_DEBUG(srvsvc_NetShareSetInfo, &state->orig);
3079 state->out_mem_ctx = talloc_named_const(state, 0,
3080 "rpccli_srvsvc_NetShareSetInfo_out_memory");
3081 if (tevent_req_nomem(state->out_mem_ctx, req)) {
3082 return tevent_req_post(req, ev);
3085 /* make a temporary copy, that we pass to the dispatch function */
3086 state->tmp = state->orig;
3088 subreq = cli->dispatch_send(state, ev, cli,
3089 &ndr_table_srvsvc,
3090 NDR_SRVSVC_NETSHARESETINFO,
3091 &state->tmp);
3092 if (tevent_req_nomem(subreq, req)) {
3093 return tevent_req_post(req, ev);
3095 tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareSetInfo_done, req);
3096 return req;
3099 static void rpccli_srvsvc_NetShareSetInfo_done(struct tevent_req *subreq)
3101 struct tevent_req *req = tevent_req_callback_data(
3102 subreq, struct tevent_req);
3103 struct rpccli_srvsvc_NetShareSetInfo_state *state = tevent_req_data(
3104 req, struct rpccli_srvsvc_NetShareSetInfo_state);
3105 NTSTATUS status;
3106 TALLOC_CTX *mem_ctx;
3108 if (state->out_mem_ctx) {
3109 mem_ctx = state->out_mem_ctx;
3110 } else {
3111 mem_ctx = state;
3114 status = state->dispatch_recv(subreq, mem_ctx);
3115 TALLOC_FREE(subreq);
3116 if (!NT_STATUS_IS_OK(status)) {
3117 tevent_req_nterror(req, status);
3118 return;
3121 /* Copy out parameters */
3122 if (state->orig.out.parm_error && state->tmp.out.parm_error) {
3123 *state->orig.out.parm_error = *state->tmp.out.parm_error;
3126 /* Copy result */
3127 state->orig.out.result = state->tmp.out.result;
3129 /* Reset temporary structure */
3130 ZERO_STRUCT(state->tmp);
3132 if (DEBUGLEVEL >= 10) {
3133 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareSetInfo, &state->orig);
3136 tevent_req_done(req);
3139 NTSTATUS rpccli_srvsvc_NetShareSetInfo_recv(struct tevent_req *req,
3140 TALLOC_CTX *mem_ctx,
3141 WERROR *result)
3143 struct rpccli_srvsvc_NetShareSetInfo_state *state = tevent_req_data(
3144 req, struct rpccli_srvsvc_NetShareSetInfo_state);
3145 NTSTATUS status;
3147 if (tevent_req_is_nterror(req, &status)) {
3148 tevent_req_received(req);
3149 return status;
3152 /* Steal possbile out parameters to the callers context */
3153 talloc_steal(mem_ctx, state->out_mem_ctx);
3155 /* Return result */
3156 *result = state->orig.out.result;
3158 tevent_req_received(req);
3159 return NT_STATUS_OK;
3162 NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli,
3163 TALLOC_CTX *mem_ctx,
3164 const char *server_unc /* [in] [unique,charset(UTF16)] */,
3165 const char *share_name /* [in] [charset(UTF16)] */,
3166 uint32_t level /* [in] */,
3167 union srvsvc_NetShareInfo *info /* [in] [ref,switch_is(level)] */,
3168 uint32_t *parm_error /* [in,out] [unique] */,
3169 WERROR *werror)
3171 struct srvsvc_NetShareSetInfo r;
3172 NTSTATUS status;
3174 /* In parameters */
3175 r.in.server_unc = server_unc;
3176 r.in.share_name = share_name;
3177 r.in.level = level;
3178 r.in.info = info;
3179 r.in.parm_error = parm_error;
3181 if (DEBUGLEVEL >= 10) {
3182 NDR_PRINT_IN_DEBUG(srvsvc_NetShareSetInfo, &r);
3185 status = cli->dispatch(cli,
3186 mem_ctx,
3187 &ndr_table_srvsvc,
3188 NDR_SRVSVC_NETSHARESETINFO,
3189 &r);
3191 if (!NT_STATUS_IS_OK(status)) {
3192 return status;
3195 if (DEBUGLEVEL >= 10) {
3196 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareSetInfo, &r);
3199 if (NT_STATUS_IS_ERR(status)) {
3200 return status;
3203 /* Return variables */
3204 if (parm_error && r.out.parm_error) {
3205 *parm_error = *r.out.parm_error;
3208 /* Return result */
3209 if (werror) {
3210 *werror = r.out.result;
3213 return werror_to_ntstatus(r.out.result);
3216 struct rpccli_srvsvc_NetShareDel_state {
3217 struct srvsvc_NetShareDel orig;
3218 struct srvsvc_NetShareDel tmp;
3219 TALLOC_CTX *out_mem_ctx;
3220 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3223 static void rpccli_srvsvc_NetShareDel_done(struct tevent_req *subreq);
3225 struct tevent_req *rpccli_srvsvc_NetShareDel_send(TALLOC_CTX *mem_ctx,
3226 struct tevent_context *ev,
3227 struct rpc_pipe_client *cli,
3228 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
3229 const char *_share_name /* [in] [charset(UTF16)] */,
3230 uint32_t _reserved /* [in] */)
3232 struct tevent_req *req;
3233 struct rpccli_srvsvc_NetShareDel_state *state;
3234 struct tevent_req *subreq;
3236 req = tevent_req_create(mem_ctx, &state,
3237 struct rpccli_srvsvc_NetShareDel_state);
3238 if (req == NULL) {
3239 return NULL;
3241 state->out_mem_ctx = NULL;
3242 state->dispatch_recv = cli->dispatch_recv;
3244 /* In parameters */
3245 state->orig.in.server_unc = _server_unc;
3246 state->orig.in.share_name = _share_name;
3247 state->orig.in.reserved = _reserved;
3249 /* Out parameters */
3251 /* Result */
3252 ZERO_STRUCT(state->orig.out.result);
3254 if (DEBUGLEVEL >= 10) {
3255 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDel, &state->orig);
3258 /* make a temporary copy, that we pass to the dispatch function */
3259 state->tmp = state->orig;
3261 subreq = cli->dispatch_send(state, ev, cli,
3262 &ndr_table_srvsvc,
3263 NDR_SRVSVC_NETSHAREDEL,
3264 &state->tmp);
3265 if (tevent_req_nomem(subreq, req)) {
3266 return tevent_req_post(req, ev);
3268 tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareDel_done, req);
3269 return req;
3272 static void rpccli_srvsvc_NetShareDel_done(struct tevent_req *subreq)
3274 struct tevent_req *req = tevent_req_callback_data(
3275 subreq, struct tevent_req);
3276 struct rpccli_srvsvc_NetShareDel_state *state = tevent_req_data(
3277 req, struct rpccli_srvsvc_NetShareDel_state);
3278 NTSTATUS status;
3279 TALLOC_CTX *mem_ctx;
3281 if (state->out_mem_ctx) {
3282 mem_ctx = state->out_mem_ctx;
3283 } else {
3284 mem_ctx = state;
3287 status = state->dispatch_recv(subreq, mem_ctx);
3288 TALLOC_FREE(subreq);
3289 if (!NT_STATUS_IS_OK(status)) {
3290 tevent_req_nterror(req, status);
3291 return;
3294 /* Copy out parameters */
3296 /* Copy result */
3297 state->orig.out.result = state->tmp.out.result;
3299 /* Reset temporary structure */
3300 ZERO_STRUCT(state->tmp);
3302 if (DEBUGLEVEL >= 10) {
3303 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDel, &state->orig);
3306 tevent_req_done(req);
3309 NTSTATUS rpccli_srvsvc_NetShareDel_recv(struct tevent_req *req,
3310 TALLOC_CTX *mem_ctx,
3311 WERROR *result)
3313 struct rpccli_srvsvc_NetShareDel_state *state = tevent_req_data(
3314 req, struct rpccli_srvsvc_NetShareDel_state);
3315 NTSTATUS status;
3317 if (tevent_req_is_nterror(req, &status)) {
3318 tevent_req_received(req);
3319 return status;
3322 /* Steal possbile out parameters to the callers context */
3323 talloc_steal(mem_ctx, state->out_mem_ctx);
3325 /* Return result */
3326 *result = state->orig.out.result;
3328 tevent_req_received(req);
3329 return NT_STATUS_OK;
3332 NTSTATUS rpccli_srvsvc_NetShareDel(struct rpc_pipe_client *cli,
3333 TALLOC_CTX *mem_ctx,
3334 const char *server_unc /* [in] [unique,charset(UTF16)] */,
3335 const char *share_name /* [in] [charset(UTF16)] */,
3336 uint32_t reserved /* [in] */,
3337 WERROR *werror)
3339 struct srvsvc_NetShareDel r;
3340 NTSTATUS status;
3342 /* In parameters */
3343 r.in.server_unc = server_unc;
3344 r.in.share_name = share_name;
3345 r.in.reserved = reserved;
3347 if (DEBUGLEVEL >= 10) {
3348 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDel, &r);
3351 status = cli->dispatch(cli,
3352 mem_ctx,
3353 &ndr_table_srvsvc,
3354 NDR_SRVSVC_NETSHAREDEL,
3355 &r);
3357 if (!NT_STATUS_IS_OK(status)) {
3358 return status;
3361 if (DEBUGLEVEL >= 10) {
3362 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDel, &r);
3365 if (NT_STATUS_IS_ERR(status)) {
3366 return status;
3369 /* Return variables */
3371 /* Return result */
3372 if (werror) {
3373 *werror = r.out.result;
3376 return werror_to_ntstatus(r.out.result);
3379 struct rpccli_srvsvc_NetShareDelSticky_state {
3380 struct srvsvc_NetShareDelSticky orig;
3381 struct srvsvc_NetShareDelSticky tmp;
3382 TALLOC_CTX *out_mem_ctx;
3383 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3386 static void rpccli_srvsvc_NetShareDelSticky_done(struct tevent_req *subreq);
3388 struct tevent_req *rpccli_srvsvc_NetShareDelSticky_send(TALLOC_CTX *mem_ctx,
3389 struct tevent_context *ev,
3390 struct rpc_pipe_client *cli,
3391 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
3392 const char *_share_name /* [in] [charset(UTF16)] */,
3393 uint32_t _reserved /* [in] */)
3395 struct tevent_req *req;
3396 struct rpccli_srvsvc_NetShareDelSticky_state *state;
3397 struct tevent_req *subreq;
3399 req = tevent_req_create(mem_ctx, &state,
3400 struct rpccli_srvsvc_NetShareDelSticky_state);
3401 if (req == NULL) {
3402 return NULL;
3404 state->out_mem_ctx = NULL;
3405 state->dispatch_recv = cli->dispatch_recv;
3407 /* In parameters */
3408 state->orig.in.server_unc = _server_unc;
3409 state->orig.in.share_name = _share_name;
3410 state->orig.in.reserved = _reserved;
3412 /* Out parameters */
3414 /* Result */
3415 ZERO_STRUCT(state->orig.out.result);
3417 if (DEBUGLEVEL >= 10) {
3418 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelSticky, &state->orig);
3421 /* make a temporary copy, that we pass to the dispatch function */
3422 state->tmp = state->orig;
3424 subreq = cli->dispatch_send(state, ev, cli,
3425 &ndr_table_srvsvc,
3426 NDR_SRVSVC_NETSHAREDELSTICKY,
3427 &state->tmp);
3428 if (tevent_req_nomem(subreq, req)) {
3429 return tevent_req_post(req, ev);
3431 tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareDelSticky_done, req);
3432 return req;
3435 static void rpccli_srvsvc_NetShareDelSticky_done(struct tevent_req *subreq)
3437 struct tevent_req *req = tevent_req_callback_data(
3438 subreq, struct tevent_req);
3439 struct rpccli_srvsvc_NetShareDelSticky_state *state = tevent_req_data(
3440 req, struct rpccli_srvsvc_NetShareDelSticky_state);
3441 NTSTATUS status;
3442 TALLOC_CTX *mem_ctx;
3444 if (state->out_mem_ctx) {
3445 mem_ctx = state->out_mem_ctx;
3446 } else {
3447 mem_ctx = state;
3450 status = state->dispatch_recv(subreq, mem_ctx);
3451 TALLOC_FREE(subreq);
3452 if (!NT_STATUS_IS_OK(status)) {
3453 tevent_req_nterror(req, status);
3454 return;
3457 /* Copy out parameters */
3459 /* Copy result */
3460 state->orig.out.result = state->tmp.out.result;
3462 /* Reset temporary structure */
3463 ZERO_STRUCT(state->tmp);
3465 if (DEBUGLEVEL >= 10) {
3466 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelSticky, &state->orig);
3469 tevent_req_done(req);
3472 NTSTATUS rpccli_srvsvc_NetShareDelSticky_recv(struct tevent_req *req,
3473 TALLOC_CTX *mem_ctx,
3474 WERROR *result)
3476 struct rpccli_srvsvc_NetShareDelSticky_state *state = tevent_req_data(
3477 req, struct rpccli_srvsvc_NetShareDelSticky_state);
3478 NTSTATUS status;
3480 if (tevent_req_is_nterror(req, &status)) {
3481 tevent_req_received(req);
3482 return status;
3485 /* Steal possbile out parameters to the callers context */
3486 talloc_steal(mem_ctx, state->out_mem_ctx);
3488 /* Return result */
3489 *result = state->orig.out.result;
3491 tevent_req_received(req);
3492 return NT_STATUS_OK;
3495 NTSTATUS rpccli_srvsvc_NetShareDelSticky(struct rpc_pipe_client *cli,
3496 TALLOC_CTX *mem_ctx,
3497 const char *server_unc /* [in] [unique,charset(UTF16)] */,
3498 const char *share_name /* [in] [charset(UTF16)] */,
3499 uint32_t reserved /* [in] */,
3500 WERROR *werror)
3502 struct srvsvc_NetShareDelSticky r;
3503 NTSTATUS status;
3505 /* In parameters */
3506 r.in.server_unc = server_unc;
3507 r.in.share_name = share_name;
3508 r.in.reserved = reserved;
3510 if (DEBUGLEVEL >= 10) {
3511 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelSticky, &r);
3514 status = cli->dispatch(cli,
3515 mem_ctx,
3516 &ndr_table_srvsvc,
3517 NDR_SRVSVC_NETSHAREDELSTICKY,
3518 &r);
3520 if (!NT_STATUS_IS_OK(status)) {
3521 return status;
3524 if (DEBUGLEVEL >= 10) {
3525 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelSticky, &r);
3528 if (NT_STATUS_IS_ERR(status)) {
3529 return status;
3532 /* Return variables */
3534 /* Return result */
3535 if (werror) {
3536 *werror = r.out.result;
3539 return werror_to_ntstatus(r.out.result);
3542 struct rpccli_srvsvc_NetShareCheck_state {
3543 struct srvsvc_NetShareCheck orig;
3544 struct srvsvc_NetShareCheck tmp;
3545 TALLOC_CTX *out_mem_ctx;
3546 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3549 static void rpccli_srvsvc_NetShareCheck_done(struct tevent_req *subreq);
3551 struct tevent_req *rpccli_srvsvc_NetShareCheck_send(TALLOC_CTX *mem_ctx,
3552 struct tevent_context *ev,
3553 struct rpc_pipe_client *cli,
3554 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
3555 const char *_device_name /* [in] [charset(UTF16)] */,
3556 enum srvsvc_ShareType *_type /* [out] [ref] */)
3558 struct tevent_req *req;
3559 struct rpccli_srvsvc_NetShareCheck_state *state;
3560 struct tevent_req *subreq;
3562 req = tevent_req_create(mem_ctx, &state,
3563 struct rpccli_srvsvc_NetShareCheck_state);
3564 if (req == NULL) {
3565 return NULL;
3567 state->out_mem_ctx = NULL;
3568 state->dispatch_recv = cli->dispatch_recv;
3570 /* In parameters */
3571 state->orig.in.server_unc = _server_unc;
3572 state->orig.in.device_name = _device_name;
3574 /* Out parameters */
3575 state->orig.out.type = _type;
3577 /* Result */
3578 ZERO_STRUCT(state->orig.out.result);
3580 if (DEBUGLEVEL >= 10) {
3581 NDR_PRINT_IN_DEBUG(srvsvc_NetShareCheck, &state->orig);
3584 state->out_mem_ctx = talloc_named_const(state, 0,
3585 "rpccli_srvsvc_NetShareCheck_out_memory");
3586 if (tevent_req_nomem(state->out_mem_ctx, req)) {
3587 return tevent_req_post(req, ev);
3590 /* make a temporary copy, that we pass to the dispatch function */
3591 state->tmp = state->orig;
3593 subreq = cli->dispatch_send(state, ev, cli,
3594 &ndr_table_srvsvc,
3595 NDR_SRVSVC_NETSHARECHECK,
3596 &state->tmp);
3597 if (tevent_req_nomem(subreq, req)) {
3598 return tevent_req_post(req, ev);
3600 tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareCheck_done, req);
3601 return req;
3604 static void rpccli_srvsvc_NetShareCheck_done(struct tevent_req *subreq)
3606 struct tevent_req *req = tevent_req_callback_data(
3607 subreq, struct tevent_req);
3608 struct rpccli_srvsvc_NetShareCheck_state *state = tevent_req_data(
3609 req, struct rpccli_srvsvc_NetShareCheck_state);
3610 NTSTATUS status;
3611 TALLOC_CTX *mem_ctx;
3613 if (state->out_mem_ctx) {
3614 mem_ctx = state->out_mem_ctx;
3615 } else {
3616 mem_ctx = state;
3619 status = state->dispatch_recv(subreq, mem_ctx);
3620 TALLOC_FREE(subreq);
3621 if (!NT_STATUS_IS_OK(status)) {
3622 tevent_req_nterror(req, status);
3623 return;
3626 /* Copy out parameters */
3627 *state->orig.out.type = *state->tmp.out.type;
3629 /* Copy result */
3630 state->orig.out.result = state->tmp.out.result;
3632 /* Reset temporary structure */
3633 ZERO_STRUCT(state->tmp);
3635 if (DEBUGLEVEL >= 10) {
3636 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareCheck, &state->orig);
3639 tevent_req_done(req);
3642 NTSTATUS rpccli_srvsvc_NetShareCheck_recv(struct tevent_req *req,
3643 TALLOC_CTX *mem_ctx,
3644 WERROR *result)
3646 struct rpccli_srvsvc_NetShareCheck_state *state = tevent_req_data(
3647 req, struct rpccli_srvsvc_NetShareCheck_state);
3648 NTSTATUS status;
3650 if (tevent_req_is_nterror(req, &status)) {
3651 tevent_req_received(req);
3652 return status;
3655 /* Steal possbile out parameters to the callers context */
3656 talloc_steal(mem_ctx, state->out_mem_ctx);
3658 /* Return result */
3659 *result = state->orig.out.result;
3661 tevent_req_received(req);
3662 return NT_STATUS_OK;
3665 NTSTATUS rpccli_srvsvc_NetShareCheck(struct rpc_pipe_client *cli,
3666 TALLOC_CTX *mem_ctx,
3667 const char *server_unc /* [in] [unique,charset(UTF16)] */,
3668 const char *device_name /* [in] [charset(UTF16)] */,
3669 enum srvsvc_ShareType *type /* [out] [ref] */,
3670 WERROR *werror)
3672 struct srvsvc_NetShareCheck r;
3673 NTSTATUS status;
3675 /* In parameters */
3676 r.in.server_unc = server_unc;
3677 r.in.device_name = device_name;
3679 if (DEBUGLEVEL >= 10) {
3680 NDR_PRINT_IN_DEBUG(srvsvc_NetShareCheck, &r);
3683 status = cli->dispatch(cli,
3684 mem_ctx,
3685 &ndr_table_srvsvc,
3686 NDR_SRVSVC_NETSHARECHECK,
3687 &r);
3689 if (!NT_STATUS_IS_OK(status)) {
3690 return status;
3693 if (DEBUGLEVEL >= 10) {
3694 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareCheck, &r);
3697 if (NT_STATUS_IS_ERR(status)) {
3698 return status;
3701 /* Return variables */
3702 *type = *r.out.type;
3704 /* Return result */
3705 if (werror) {
3706 *werror = r.out.result;
3709 return werror_to_ntstatus(r.out.result);
3712 struct rpccli_srvsvc_NetSrvGetInfo_state {
3713 struct srvsvc_NetSrvGetInfo orig;
3714 struct srvsvc_NetSrvGetInfo tmp;
3715 TALLOC_CTX *out_mem_ctx;
3716 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3719 static void rpccli_srvsvc_NetSrvGetInfo_done(struct tevent_req *subreq);
3721 struct tevent_req *rpccli_srvsvc_NetSrvGetInfo_send(TALLOC_CTX *mem_ctx,
3722 struct tevent_context *ev,
3723 struct rpc_pipe_client *cli,
3724 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
3725 uint32_t _level /* [in] */,
3726 union srvsvc_NetSrvInfo *_info /* [out] [ref,switch_is(level)] */)
3728 struct tevent_req *req;
3729 struct rpccli_srvsvc_NetSrvGetInfo_state *state;
3730 struct tevent_req *subreq;
3732 req = tevent_req_create(mem_ctx, &state,
3733 struct rpccli_srvsvc_NetSrvGetInfo_state);
3734 if (req == NULL) {
3735 return NULL;
3737 state->out_mem_ctx = NULL;
3738 state->dispatch_recv = cli->dispatch_recv;
3740 /* In parameters */
3741 state->orig.in.server_unc = _server_unc;
3742 state->orig.in.level = _level;
3744 /* Out parameters */
3745 state->orig.out.info = _info;
3747 /* Result */
3748 ZERO_STRUCT(state->orig.out.result);
3750 if (DEBUGLEVEL >= 10) {
3751 NDR_PRINT_IN_DEBUG(srvsvc_NetSrvGetInfo, &state->orig);
3754 state->out_mem_ctx = talloc_named_const(state, 0,
3755 "rpccli_srvsvc_NetSrvGetInfo_out_memory");
3756 if (tevent_req_nomem(state->out_mem_ctx, req)) {
3757 return tevent_req_post(req, ev);
3760 /* make a temporary copy, that we pass to the dispatch function */
3761 state->tmp = state->orig;
3763 subreq = cli->dispatch_send(state, ev, cli,
3764 &ndr_table_srvsvc,
3765 NDR_SRVSVC_NETSRVGETINFO,
3766 &state->tmp);
3767 if (tevent_req_nomem(subreq, req)) {
3768 return tevent_req_post(req, ev);
3770 tevent_req_set_callback(subreq, rpccli_srvsvc_NetSrvGetInfo_done, req);
3771 return req;
3774 static void rpccli_srvsvc_NetSrvGetInfo_done(struct tevent_req *subreq)
3776 struct tevent_req *req = tevent_req_callback_data(
3777 subreq, struct tevent_req);
3778 struct rpccli_srvsvc_NetSrvGetInfo_state *state = tevent_req_data(
3779 req, struct rpccli_srvsvc_NetSrvGetInfo_state);
3780 NTSTATUS status;
3781 TALLOC_CTX *mem_ctx;
3783 if (state->out_mem_ctx) {
3784 mem_ctx = state->out_mem_ctx;
3785 } else {
3786 mem_ctx = state;
3789 status = state->dispatch_recv(subreq, mem_ctx);
3790 TALLOC_FREE(subreq);
3791 if (!NT_STATUS_IS_OK(status)) {
3792 tevent_req_nterror(req, status);
3793 return;
3796 /* Copy out parameters */
3797 *state->orig.out.info = *state->tmp.out.info;
3799 /* Copy result */
3800 state->orig.out.result = state->tmp.out.result;
3802 /* Reset temporary structure */
3803 ZERO_STRUCT(state->tmp);
3805 if (DEBUGLEVEL >= 10) {
3806 NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvGetInfo, &state->orig);
3809 tevent_req_done(req);
3812 NTSTATUS rpccli_srvsvc_NetSrvGetInfo_recv(struct tevent_req *req,
3813 TALLOC_CTX *mem_ctx,
3814 WERROR *result)
3816 struct rpccli_srvsvc_NetSrvGetInfo_state *state = tevent_req_data(
3817 req, struct rpccli_srvsvc_NetSrvGetInfo_state);
3818 NTSTATUS status;
3820 if (tevent_req_is_nterror(req, &status)) {
3821 tevent_req_received(req);
3822 return status;
3825 /* Steal possbile out parameters to the callers context */
3826 talloc_steal(mem_ctx, state->out_mem_ctx);
3828 /* Return result */
3829 *result = state->orig.out.result;
3831 tevent_req_received(req);
3832 return NT_STATUS_OK;
3835 NTSTATUS rpccli_srvsvc_NetSrvGetInfo(struct rpc_pipe_client *cli,
3836 TALLOC_CTX *mem_ctx,
3837 const char *server_unc /* [in] [unique,charset(UTF16)] */,
3838 uint32_t level /* [in] */,
3839 union srvsvc_NetSrvInfo *info /* [out] [ref,switch_is(level)] */,
3840 WERROR *werror)
3842 struct srvsvc_NetSrvGetInfo r;
3843 NTSTATUS status;
3845 /* In parameters */
3846 r.in.server_unc = server_unc;
3847 r.in.level = level;
3849 if (DEBUGLEVEL >= 10) {
3850 NDR_PRINT_IN_DEBUG(srvsvc_NetSrvGetInfo, &r);
3853 status = cli->dispatch(cli,
3854 mem_ctx,
3855 &ndr_table_srvsvc,
3856 NDR_SRVSVC_NETSRVGETINFO,
3857 &r);
3859 if (!NT_STATUS_IS_OK(status)) {
3860 return status;
3863 if (DEBUGLEVEL >= 10) {
3864 NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvGetInfo, &r);
3867 if (NT_STATUS_IS_ERR(status)) {
3868 return status;
3871 /* Return variables */
3872 *info = *r.out.info;
3874 /* Return result */
3875 if (werror) {
3876 *werror = r.out.result;
3879 return werror_to_ntstatus(r.out.result);
3882 struct rpccli_srvsvc_NetSrvSetInfo_state {
3883 struct srvsvc_NetSrvSetInfo orig;
3884 struct srvsvc_NetSrvSetInfo tmp;
3885 TALLOC_CTX *out_mem_ctx;
3886 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3889 static void rpccli_srvsvc_NetSrvSetInfo_done(struct tevent_req *subreq);
3891 struct tevent_req *rpccli_srvsvc_NetSrvSetInfo_send(TALLOC_CTX *mem_ctx,
3892 struct tevent_context *ev,
3893 struct rpc_pipe_client *cli,
3894 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
3895 uint32_t _level /* [in] */,
3896 union srvsvc_NetSrvInfo *_info /* [in] [ref,switch_is(level)] */,
3897 uint32_t *_parm_error /* [in,out] [unique] */)
3899 struct tevent_req *req;
3900 struct rpccli_srvsvc_NetSrvSetInfo_state *state;
3901 struct tevent_req *subreq;
3903 req = tevent_req_create(mem_ctx, &state,
3904 struct rpccli_srvsvc_NetSrvSetInfo_state);
3905 if (req == NULL) {
3906 return NULL;
3908 state->out_mem_ctx = NULL;
3909 state->dispatch_recv = cli->dispatch_recv;
3911 /* In parameters */
3912 state->orig.in.server_unc = _server_unc;
3913 state->orig.in.level = _level;
3914 state->orig.in.info = _info;
3915 state->orig.in.parm_error = _parm_error;
3917 /* Out parameters */
3918 state->orig.out.parm_error = _parm_error;
3920 /* Result */
3921 ZERO_STRUCT(state->orig.out.result);
3923 if (DEBUGLEVEL >= 10) {
3924 NDR_PRINT_IN_DEBUG(srvsvc_NetSrvSetInfo, &state->orig);
3927 state->out_mem_ctx = talloc_named_const(state, 0,
3928 "rpccli_srvsvc_NetSrvSetInfo_out_memory");
3929 if (tevent_req_nomem(state->out_mem_ctx, req)) {
3930 return tevent_req_post(req, ev);
3933 /* make a temporary copy, that we pass to the dispatch function */
3934 state->tmp = state->orig;
3936 subreq = cli->dispatch_send(state, ev, cli,
3937 &ndr_table_srvsvc,
3938 NDR_SRVSVC_NETSRVSETINFO,
3939 &state->tmp);
3940 if (tevent_req_nomem(subreq, req)) {
3941 return tevent_req_post(req, ev);
3943 tevent_req_set_callback(subreq, rpccli_srvsvc_NetSrvSetInfo_done, req);
3944 return req;
3947 static void rpccli_srvsvc_NetSrvSetInfo_done(struct tevent_req *subreq)
3949 struct tevent_req *req = tevent_req_callback_data(
3950 subreq, struct tevent_req);
3951 struct rpccli_srvsvc_NetSrvSetInfo_state *state = tevent_req_data(
3952 req, struct rpccli_srvsvc_NetSrvSetInfo_state);
3953 NTSTATUS status;
3954 TALLOC_CTX *mem_ctx;
3956 if (state->out_mem_ctx) {
3957 mem_ctx = state->out_mem_ctx;
3958 } else {
3959 mem_ctx = state;
3962 status = state->dispatch_recv(subreq, mem_ctx);
3963 TALLOC_FREE(subreq);
3964 if (!NT_STATUS_IS_OK(status)) {
3965 tevent_req_nterror(req, status);
3966 return;
3969 /* Copy out parameters */
3970 if (state->orig.out.parm_error && state->tmp.out.parm_error) {
3971 *state->orig.out.parm_error = *state->tmp.out.parm_error;
3974 /* Copy result */
3975 state->orig.out.result = state->tmp.out.result;
3977 /* Reset temporary structure */
3978 ZERO_STRUCT(state->tmp);
3980 if (DEBUGLEVEL >= 10) {
3981 NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvSetInfo, &state->orig);
3984 tevent_req_done(req);
3987 NTSTATUS rpccli_srvsvc_NetSrvSetInfo_recv(struct tevent_req *req,
3988 TALLOC_CTX *mem_ctx,
3989 WERROR *result)
3991 struct rpccli_srvsvc_NetSrvSetInfo_state *state = tevent_req_data(
3992 req, struct rpccli_srvsvc_NetSrvSetInfo_state);
3993 NTSTATUS status;
3995 if (tevent_req_is_nterror(req, &status)) {
3996 tevent_req_received(req);
3997 return status;
4000 /* Steal possbile out parameters to the callers context */
4001 talloc_steal(mem_ctx, state->out_mem_ctx);
4003 /* Return result */
4004 *result = state->orig.out.result;
4006 tevent_req_received(req);
4007 return NT_STATUS_OK;
4010 NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli,
4011 TALLOC_CTX *mem_ctx,
4012 const char *server_unc /* [in] [unique,charset(UTF16)] */,
4013 uint32_t level /* [in] */,
4014 union srvsvc_NetSrvInfo *info /* [in] [ref,switch_is(level)] */,
4015 uint32_t *parm_error /* [in,out] [unique] */,
4016 WERROR *werror)
4018 struct srvsvc_NetSrvSetInfo r;
4019 NTSTATUS status;
4021 /* In parameters */
4022 r.in.server_unc = server_unc;
4023 r.in.level = level;
4024 r.in.info = info;
4025 r.in.parm_error = parm_error;
4027 if (DEBUGLEVEL >= 10) {
4028 NDR_PRINT_IN_DEBUG(srvsvc_NetSrvSetInfo, &r);
4031 status = cli->dispatch(cli,
4032 mem_ctx,
4033 &ndr_table_srvsvc,
4034 NDR_SRVSVC_NETSRVSETINFO,
4035 &r);
4037 if (!NT_STATUS_IS_OK(status)) {
4038 return status;
4041 if (DEBUGLEVEL >= 10) {
4042 NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvSetInfo, &r);
4045 if (NT_STATUS_IS_ERR(status)) {
4046 return status;
4049 /* Return variables */
4050 if (parm_error && r.out.parm_error) {
4051 *parm_error = *r.out.parm_error;
4054 /* Return result */
4055 if (werror) {
4056 *werror = r.out.result;
4059 return werror_to_ntstatus(r.out.result);
4062 struct rpccli_srvsvc_NetDiskEnum_state {
4063 struct srvsvc_NetDiskEnum orig;
4064 struct srvsvc_NetDiskEnum tmp;
4065 TALLOC_CTX *out_mem_ctx;
4066 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4069 static void rpccli_srvsvc_NetDiskEnum_done(struct tevent_req *subreq);
4071 struct tevent_req *rpccli_srvsvc_NetDiskEnum_send(TALLOC_CTX *mem_ctx,
4072 struct tevent_context *ev,
4073 struct rpc_pipe_client *cli,
4074 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
4075 uint32_t _level /* [in] */,
4076 struct srvsvc_NetDiskInfo *_info /* [in,out] [ref] */,
4077 uint32_t _maxlen /* [in] */,
4078 uint32_t *_totalentries /* [out] [ref] */,
4079 uint32_t *_resume_handle /* [in,out] [unique] */)
4081 struct tevent_req *req;
4082 struct rpccli_srvsvc_NetDiskEnum_state *state;
4083 struct tevent_req *subreq;
4085 req = tevent_req_create(mem_ctx, &state,
4086 struct rpccli_srvsvc_NetDiskEnum_state);
4087 if (req == NULL) {
4088 return NULL;
4090 state->out_mem_ctx = NULL;
4091 state->dispatch_recv = cli->dispatch_recv;
4093 /* In parameters */
4094 state->orig.in.server_unc = _server_unc;
4095 state->orig.in.level = _level;
4096 state->orig.in.info = _info;
4097 state->orig.in.maxlen = _maxlen;
4098 state->orig.in.resume_handle = _resume_handle;
4100 /* Out parameters */
4101 state->orig.out.info = _info;
4102 state->orig.out.totalentries = _totalentries;
4103 state->orig.out.resume_handle = _resume_handle;
4105 /* Result */
4106 ZERO_STRUCT(state->orig.out.result);
4108 if (DEBUGLEVEL >= 10) {
4109 NDR_PRINT_IN_DEBUG(srvsvc_NetDiskEnum, &state->orig);
4112 state->out_mem_ctx = talloc_named_const(state, 0,
4113 "rpccli_srvsvc_NetDiskEnum_out_memory");
4114 if (tevent_req_nomem(state->out_mem_ctx, req)) {
4115 return tevent_req_post(req, ev);
4118 /* make a temporary copy, that we pass to the dispatch function */
4119 state->tmp = state->orig;
4121 subreq = cli->dispatch_send(state, ev, cli,
4122 &ndr_table_srvsvc,
4123 NDR_SRVSVC_NETDISKENUM,
4124 &state->tmp);
4125 if (tevent_req_nomem(subreq, req)) {
4126 return tevent_req_post(req, ev);
4128 tevent_req_set_callback(subreq, rpccli_srvsvc_NetDiskEnum_done, req);
4129 return req;
4132 static void rpccli_srvsvc_NetDiskEnum_done(struct tevent_req *subreq)
4134 struct tevent_req *req = tevent_req_callback_data(
4135 subreq, struct tevent_req);
4136 struct rpccli_srvsvc_NetDiskEnum_state *state = tevent_req_data(
4137 req, struct rpccli_srvsvc_NetDiskEnum_state);
4138 NTSTATUS status;
4139 TALLOC_CTX *mem_ctx;
4141 if (state->out_mem_ctx) {
4142 mem_ctx = state->out_mem_ctx;
4143 } else {
4144 mem_ctx = state;
4147 status = state->dispatch_recv(subreq, mem_ctx);
4148 TALLOC_FREE(subreq);
4149 if (!NT_STATUS_IS_OK(status)) {
4150 tevent_req_nterror(req, status);
4151 return;
4154 /* Copy out parameters */
4155 *state->orig.out.info = *state->tmp.out.info;
4156 *state->orig.out.totalentries = *state->tmp.out.totalentries;
4157 if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
4158 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
4161 /* Copy result */
4162 state->orig.out.result = state->tmp.out.result;
4164 /* Reset temporary structure */
4165 ZERO_STRUCT(state->tmp);
4167 if (DEBUGLEVEL >= 10) {
4168 NDR_PRINT_OUT_DEBUG(srvsvc_NetDiskEnum, &state->orig);
4171 tevent_req_done(req);
4174 NTSTATUS rpccli_srvsvc_NetDiskEnum_recv(struct tevent_req *req,
4175 TALLOC_CTX *mem_ctx,
4176 WERROR *result)
4178 struct rpccli_srvsvc_NetDiskEnum_state *state = tevent_req_data(
4179 req, struct rpccli_srvsvc_NetDiskEnum_state);
4180 NTSTATUS status;
4182 if (tevent_req_is_nterror(req, &status)) {
4183 tevent_req_received(req);
4184 return status;
4187 /* Steal possbile out parameters to the callers context */
4188 talloc_steal(mem_ctx, state->out_mem_ctx);
4190 /* Return result */
4191 *result = state->orig.out.result;
4193 tevent_req_received(req);
4194 return NT_STATUS_OK;
4197 NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli,
4198 TALLOC_CTX *mem_ctx,
4199 const char *server_unc /* [in] [unique,charset(UTF16)] */,
4200 uint32_t level /* [in] */,
4201 struct srvsvc_NetDiskInfo *info /* [in,out] [ref] */,
4202 uint32_t maxlen /* [in] */,
4203 uint32_t *totalentries /* [out] [ref] */,
4204 uint32_t *resume_handle /* [in,out] [unique] */,
4205 WERROR *werror)
4207 struct srvsvc_NetDiskEnum r;
4208 NTSTATUS status;
4210 /* In parameters */
4211 r.in.server_unc = server_unc;
4212 r.in.level = level;
4213 r.in.info = info;
4214 r.in.maxlen = maxlen;
4215 r.in.resume_handle = resume_handle;
4217 if (DEBUGLEVEL >= 10) {
4218 NDR_PRINT_IN_DEBUG(srvsvc_NetDiskEnum, &r);
4221 status = cli->dispatch(cli,
4222 mem_ctx,
4223 &ndr_table_srvsvc,
4224 NDR_SRVSVC_NETDISKENUM,
4225 &r);
4227 if (!NT_STATUS_IS_OK(status)) {
4228 return status;
4231 if (DEBUGLEVEL >= 10) {
4232 NDR_PRINT_OUT_DEBUG(srvsvc_NetDiskEnum, &r);
4235 if (NT_STATUS_IS_ERR(status)) {
4236 return status;
4239 /* Return variables */
4240 *info = *r.out.info;
4241 *totalentries = *r.out.totalentries;
4242 if (resume_handle && r.out.resume_handle) {
4243 *resume_handle = *r.out.resume_handle;
4246 /* Return result */
4247 if (werror) {
4248 *werror = r.out.result;
4251 return werror_to_ntstatus(r.out.result);
4254 struct rpccli_srvsvc_NetServerStatisticsGet_state {
4255 struct srvsvc_NetServerStatisticsGet orig;
4256 struct srvsvc_NetServerStatisticsGet tmp;
4257 TALLOC_CTX *out_mem_ctx;
4258 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4261 static void rpccli_srvsvc_NetServerStatisticsGet_done(struct tevent_req *subreq);
4263 struct tevent_req *rpccli_srvsvc_NetServerStatisticsGet_send(TALLOC_CTX *mem_ctx,
4264 struct tevent_context *ev,
4265 struct rpc_pipe_client *cli,
4266 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
4267 const char *_service /* [in] [unique,charset(UTF16)] */,
4268 uint32_t _level /* [in] */,
4269 uint32_t _options /* [in] */,
4270 struct srvsvc_Statistics **_stats /* [out] [ref] */)
4272 struct tevent_req *req;
4273 struct rpccli_srvsvc_NetServerStatisticsGet_state *state;
4274 struct tevent_req *subreq;
4276 req = tevent_req_create(mem_ctx, &state,
4277 struct rpccli_srvsvc_NetServerStatisticsGet_state);
4278 if (req == NULL) {
4279 return NULL;
4281 state->out_mem_ctx = NULL;
4282 state->dispatch_recv = cli->dispatch_recv;
4284 /* In parameters */
4285 state->orig.in.server_unc = _server_unc;
4286 state->orig.in.service = _service;
4287 state->orig.in.level = _level;
4288 state->orig.in.options = _options;
4290 /* Out parameters */
4291 state->orig.out.stats = _stats;
4293 /* Result */
4294 ZERO_STRUCT(state->orig.out.result);
4296 if (DEBUGLEVEL >= 10) {
4297 NDR_PRINT_IN_DEBUG(srvsvc_NetServerStatisticsGet, &state->orig);
4300 state->out_mem_ctx = talloc_named_const(state, 0,
4301 "rpccli_srvsvc_NetServerStatisticsGet_out_memory");
4302 if (tevent_req_nomem(state->out_mem_ctx, req)) {
4303 return tevent_req_post(req, ev);
4306 /* make a temporary copy, that we pass to the dispatch function */
4307 state->tmp = state->orig;
4309 subreq = cli->dispatch_send(state, ev, cli,
4310 &ndr_table_srvsvc,
4311 NDR_SRVSVC_NETSERVERSTATISTICSGET,
4312 &state->tmp);
4313 if (tevent_req_nomem(subreq, req)) {
4314 return tevent_req_post(req, ev);
4316 tevent_req_set_callback(subreq, rpccli_srvsvc_NetServerStatisticsGet_done, req);
4317 return req;
4320 static void rpccli_srvsvc_NetServerStatisticsGet_done(struct tevent_req *subreq)
4322 struct tevent_req *req = tevent_req_callback_data(
4323 subreq, struct tevent_req);
4324 struct rpccli_srvsvc_NetServerStatisticsGet_state *state = tevent_req_data(
4325 req, struct rpccli_srvsvc_NetServerStatisticsGet_state);
4326 NTSTATUS status;
4327 TALLOC_CTX *mem_ctx;
4329 if (state->out_mem_ctx) {
4330 mem_ctx = state->out_mem_ctx;
4331 } else {
4332 mem_ctx = state;
4335 status = state->dispatch_recv(subreq, mem_ctx);
4336 TALLOC_FREE(subreq);
4337 if (!NT_STATUS_IS_OK(status)) {
4338 tevent_req_nterror(req, status);
4339 return;
4342 /* Copy out parameters */
4343 *state->orig.out.stats = *state->tmp.out.stats;
4345 /* Copy result */
4346 state->orig.out.result = state->tmp.out.result;
4348 /* Reset temporary structure */
4349 ZERO_STRUCT(state->tmp);
4351 if (DEBUGLEVEL >= 10) {
4352 NDR_PRINT_OUT_DEBUG(srvsvc_NetServerStatisticsGet, &state->orig);
4355 tevent_req_done(req);
4358 NTSTATUS rpccli_srvsvc_NetServerStatisticsGet_recv(struct tevent_req *req,
4359 TALLOC_CTX *mem_ctx,
4360 WERROR *result)
4362 struct rpccli_srvsvc_NetServerStatisticsGet_state *state = tevent_req_data(
4363 req, struct rpccli_srvsvc_NetServerStatisticsGet_state);
4364 NTSTATUS status;
4366 if (tevent_req_is_nterror(req, &status)) {
4367 tevent_req_received(req);
4368 return status;
4371 /* Steal possbile out parameters to the callers context */
4372 talloc_steal(mem_ctx, state->out_mem_ctx);
4374 /* Return result */
4375 *result = state->orig.out.result;
4377 tevent_req_received(req);
4378 return NT_STATUS_OK;
4381 NTSTATUS rpccli_srvsvc_NetServerStatisticsGet(struct rpc_pipe_client *cli,
4382 TALLOC_CTX *mem_ctx,
4383 const char *server_unc /* [in] [unique,charset(UTF16)] */,
4384 const char *service /* [in] [unique,charset(UTF16)] */,
4385 uint32_t level /* [in] */,
4386 uint32_t options /* [in] */,
4387 struct srvsvc_Statistics **stats /* [out] [ref] */,
4388 WERROR *werror)
4390 struct srvsvc_NetServerStatisticsGet r;
4391 NTSTATUS status;
4393 /* In parameters */
4394 r.in.server_unc = server_unc;
4395 r.in.service = service;
4396 r.in.level = level;
4397 r.in.options = options;
4399 if (DEBUGLEVEL >= 10) {
4400 NDR_PRINT_IN_DEBUG(srvsvc_NetServerStatisticsGet, &r);
4403 status = cli->dispatch(cli,
4404 mem_ctx,
4405 &ndr_table_srvsvc,
4406 NDR_SRVSVC_NETSERVERSTATISTICSGET,
4407 &r);
4409 if (!NT_STATUS_IS_OK(status)) {
4410 return status;
4413 if (DEBUGLEVEL >= 10) {
4414 NDR_PRINT_OUT_DEBUG(srvsvc_NetServerStatisticsGet, &r);
4417 if (NT_STATUS_IS_ERR(status)) {
4418 return status;
4421 /* Return variables */
4422 *stats = *r.out.stats;
4424 /* Return result */
4425 if (werror) {
4426 *werror = r.out.result;
4429 return werror_to_ntstatus(r.out.result);
4432 struct rpccli_srvsvc_NetTransportAdd_state {
4433 struct srvsvc_NetTransportAdd orig;
4434 struct srvsvc_NetTransportAdd tmp;
4435 TALLOC_CTX *out_mem_ctx;
4436 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4439 static void rpccli_srvsvc_NetTransportAdd_done(struct tevent_req *subreq);
4441 struct tevent_req *rpccli_srvsvc_NetTransportAdd_send(TALLOC_CTX *mem_ctx,
4442 struct tevent_context *ev,
4443 struct rpc_pipe_client *cli,
4444 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
4445 uint32_t _level /* [in] */,
4446 union srvsvc_NetTransportInfo _info /* [in] [switch_is(level)] */)
4448 struct tevent_req *req;
4449 struct rpccli_srvsvc_NetTransportAdd_state *state;
4450 struct tevent_req *subreq;
4452 req = tevent_req_create(mem_ctx, &state,
4453 struct rpccli_srvsvc_NetTransportAdd_state);
4454 if (req == NULL) {
4455 return NULL;
4457 state->out_mem_ctx = NULL;
4458 state->dispatch_recv = cli->dispatch_recv;
4460 /* In parameters */
4461 state->orig.in.server_unc = _server_unc;
4462 state->orig.in.level = _level;
4463 state->orig.in.info = _info;
4465 /* Out parameters */
4467 /* Result */
4468 ZERO_STRUCT(state->orig.out.result);
4470 if (DEBUGLEVEL >= 10) {
4471 NDR_PRINT_IN_DEBUG(srvsvc_NetTransportAdd, &state->orig);
4474 /* make a temporary copy, that we pass to the dispatch function */
4475 state->tmp = state->orig;
4477 subreq = cli->dispatch_send(state, ev, cli,
4478 &ndr_table_srvsvc,
4479 NDR_SRVSVC_NETTRANSPORTADD,
4480 &state->tmp);
4481 if (tevent_req_nomem(subreq, req)) {
4482 return tevent_req_post(req, ev);
4484 tevent_req_set_callback(subreq, rpccli_srvsvc_NetTransportAdd_done, req);
4485 return req;
4488 static void rpccli_srvsvc_NetTransportAdd_done(struct tevent_req *subreq)
4490 struct tevent_req *req = tevent_req_callback_data(
4491 subreq, struct tevent_req);
4492 struct rpccli_srvsvc_NetTransportAdd_state *state = tevent_req_data(
4493 req, struct rpccli_srvsvc_NetTransportAdd_state);
4494 NTSTATUS status;
4495 TALLOC_CTX *mem_ctx;
4497 if (state->out_mem_ctx) {
4498 mem_ctx = state->out_mem_ctx;
4499 } else {
4500 mem_ctx = state;
4503 status = state->dispatch_recv(subreq, mem_ctx);
4504 TALLOC_FREE(subreq);
4505 if (!NT_STATUS_IS_OK(status)) {
4506 tevent_req_nterror(req, status);
4507 return;
4510 /* Copy out parameters */
4512 /* Copy result */
4513 state->orig.out.result = state->tmp.out.result;
4515 /* Reset temporary structure */
4516 ZERO_STRUCT(state->tmp);
4518 if (DEBUGLEVEL >= 10) {
4519 NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportAdd, &state->orig);
4522 tevent_req_done(req);
4525 NTSTATUS rpccli_srvsvc_NetTransportAdd_recv(struct tevent_req *req,
4526 TALLOC_CTX *mem_ctx,
4527 WERROR *result)
4529 struct rpccli_srvsvc_NetTransportAdd_state *state = tevent_req_data(
4530 req, struct rpccli_srvsvc_NetTransportAdd_state);
4531 NTSTATUS status;
4533 if (tevent_req_is_nterror(req, &status)) {
4534 tevent_req_received(req);
4535 return status;
4538 /* Steal possbile out parameters to the callers context */
4539 talloc_steal(mem_ctx, state->out_mem_ctx);
4541 /* Return result */
4542 *result = state->orig.out.result;
4544 tevent_req_received(req);
4545 return NT_STATUS_OK;
4548 NTSTATUS rpccli_srvsvc_NetTransportAdd(struct rpc_pipe_client *cli,
4549 TALLOC_CTX *mem_ctx,
4550 const char *server_unc /* [in] [unique,charset(UTF16)] */,
4551 uint32_t level /* [in] */,
4552 union srvsvc_NetTransportInfo info /* [in] [switch_is(level)] */,
4553 WERROR *werror)
4555 struct srvsvc_NetTransportAdd r;
4556 NTSTATUS status;
4558 /* In parameters */
4559 r.in.server_unc = server_unc;
4560 r.in.level = level;
4561 r.in.info = info;
4563 if (DEBUGLEVEL >= 10) {
4564 NDR_PRINT_IN_DEBUG(srvsvc_NetTransportAdd, &r);
4567 status = cli->dispatch(cli,
4568 mem_ctx,
4569 &ndr_table_srvsvc,
4570 NDR_SRVSVC_NETTRANSPORTADD,
4571 &r);
4573 if (!NT_STATUS_IS_OK(status)) {
4574 return status;
4577 if (DEBUGLEVEL >= 10) {
4578 NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportAdd, &r);
4581 if (NT_STATUS_IS_ERR(status)) {
4582 return status;
4585 /* Return variables */
4587 /* Return result */
4588 if (werror) {
4589 *werror = r.out.result;
4592 return werror_to_ntstatus(r.out.result);
4595 struct rpccli_srvsvc_NetTransportEnum_state {
4596 struct srvsvc_NetTransportEnum orig;
4597 struct srvsvc_NetTransportEnum tmp;
4598 TALLOC_CTX *out_mem_ctx;
4599 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4602 static void rpccli_srvsvc_NetTransportEnum_done(struct tevent_req *subreq);
4604 struct tevent_req *rpccli_srvsvc_NetTransportEnum_send(TALLOC_CTX *mem_ctx,
4605 struct tevent_context *ev,
4606 struct rpc_pipe_client *cli,
4607 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
4608 struct srvsvc_NetTransportInfoCtr *_transports /* [in,out] [ref] */,
4609 uint32_t _max_buffer /* [in] */,
4610 uint32_t *_totalentries /* [out] [ref] */,
4611 uint32_t *_resume_handle /* [in,out] [unique] */)
4613 struct tevent_req *req;
4614 struct rpccli_srvsvc_NetTransportEnum_state *state;
4615 struct tevent_req *subreq;
4617 req = tevent_req_create(mem_ctx, &state,
4618 struct rpccli_srvsvc_NetTransportEnum_state);
4619 if (req == NULL) {
4620 return NULL;
4622 state->out_mem_ctx = NULL;
4623 state->dispatch_recv = cli->dispatch_recv;
4625 /* In parameters */
4626 state->orig.in.server_unc = _server_unc;
4627 state->orig.in.transports = _transports;
4628 state->orig.in.max_buffer = _max_buffer;
4629 state->orig.in.resume_handle = _resume_handle;
4631 /* Out parameters */
4632 state->orig.out.transports = _transports;
4633 state->orig.out.totalentries = _totalentries;
4634 state->orig.out.resume_handle = _resume_handle;
4636 /* Result */
4637 ZERO_STRUCT(state->orig.out.result);
4639 if (DEBUGLEVEL >= 10) {
4640 NDR_PRINT_IN_DEBUG(srvsvc_NetTransportEnum, &state->orig);
4643 state->out_mem_ctx = talloc_named_const(state, 0,
4644 "rpccli_srvsvc_NetTransportEnum_out_memory");
4645 if (tevent_req_nomem(state->out_mem_ctx, req)) {
4646 return tevent_req_post(req, ev);
4649 /* make a temporary copy, that we pass to the dispatch function */
4650 state->tmp = state->orig;
4652 subreq = cli->dispatch_send(state, ev, cli,
4653 &ndr_table_srvsvc,
4654 NDR_SRVSVC_NETTRANSPORTENUM,
4655 &state->tmp);
4656 if (tevent_req_nomem(subreq, req)) {
4657 return tevent_req_post(req, ev);
4659 tevent_req_set_callback(subreq, rpccli_srvsvc_NetTransportEnum_done, req);
4660 return req;
4663 static void rpccli_srvsvc_NetTransportEnum_done(struct tevent_req *subreq)
4665 struct tevent_req *req = tevent_req_callback_data(
4666 subreq, struct tevent_req);
4667 struct rpccli_srvsvc_NetTransportEnum_state *state = tevent_req_data(
4668 req, struct rpccli_srvsvc_NetTransportEnum_state);
4669 NTSTATUS status;
4670 TALLOC_CTX *mem_ctx;
4672 if (state->out_mem_ctx) {
4673 mem_ctx = state->out_mem_ctx;
4674 } else {
4675 mem_ctx = state;
4678 status = state->dispatch_recv(subreq, mem_ctx);
4679 TALLOC_FREE(subreq);
4680 if (!NT_STATUS_IS_OK(status)) {
4681 tevent_req_nterror(req, status);
4682 return;
4685 /* Copy out parameters */
4686 *state->orig.out.transports = *state->tmp.out.transports;
4687 *state->orig.out.totalentries = *state->tmp.out.totalentries;
4688 if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
4689 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
4692 /* Copy result */
4693 state->orig.out.result = state->tmp.out.result;
4695 /* Reset temporary structure */
4696 ZERO_STRUCT(state->tmp);
4698 if (DEBUGLEVEL >= 10) {
4699 NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportEnum, &state->orig);
4702 tevent_req_done(req);
4705 NTSTATUS rpccli_srvsvc_NetTransportEnum_recv(struct tevent_req *req,
4706 TALLOC_CTX *mem_ctx,
4707 WERROR *result)
4709 struct rpccli_srvsvc_NetTransportEnum_state *state = tevent_req_data(
4710 req, struct rpccli_srvsvc_NetTransportEnum_state);
4711 NTSTATUS status;
4713 if (tevent_req_is_nterror(req, &status)) {
4714 tevent_req_received(req);
4715 return status;
4718 /* Steal possbile out parameters to the callers context */
4719 talloc_steal(mem_ctx, state->out_mem_ctx);
4721 /* Return result */
4722 *result = state->orig.out.result;
4724 tevent_req_received(req);
4725 return NT_STATUS_OK;
4728 NTSTATUS rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli,
4729 TALLOC_CTX *mem_ctx,
4730 const char *server_unc /* [in] [unique,charset(UTF16)] */,
4731 struct srvsvc_NetTransportInfoCtr *transports /* [in,out] [ref] */,
4732 uint32_t max_buffer /* [in] */,
4733 uint32_t *totalentries /* [out] [ref] */,
4734 uint32_t *resume_handle /* [in,out] [unique] */,
4735 WERROR *werror)
4737 struct srvsvc_NetTransportEnum r;
4738 NTSTATUS status;
4740 /* In parameters */
4741 r.in.server_unc = server_unc;
4742 r.in.transports = transports;
4743 r.in.max_buffer = max_buffer;
4744 r.in.resume_handle = resume_handle;
4746 if (DEBUGLEVEL >= 10) {
4747 NDR_PRINT_IN_DEBUG(srvsvc_NetTransportEnum, &r);
4750 status = cli->dispatch(cli,
4751 mem_ctx,
4752 &ndr_table_srvsvc,
4753 NDR_SRVSVC_NETTRANSPORTENUM,
4754 &r);
4756 if (!NT_STATUS_IS_OK(status)) {
4757 return status;
4760 if (DEBUGLEVEL >= 10) {
4761 NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportEnum, &r);
4764 if (NT_STATUS_IS_ERR(status)) {
4765 return status;
4768 /* Return variables */
4769 *transports = *r.out.transports;
4770 *totalentries = *r.out.totalentries;
4771 if (resume_handle && r.out.resume_handle) {
4772 *resume_handle = *r.out.resume_handle;
4775 /* Return result */
4776 if (werror) {
4777 *werror = r.out.result;
4780 return werror_to_ntstatus(r.out.result);
4783 struct rpccli_srvsvc_NetTransportDel_state {
4784 struct srvsvc_NetTransportDel orig;
4785 struct srvsvc_NetTransportDel tmp;
4786 TALLOC_CTX *out_mem_ctx;
4787 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4790 static void rpccli_srvsvc_NetTransportDel_done(struct tevent_req *subreq);
4792 struct tevent_req *rpccli_srvsvc_NetTransportDel_send(TALLOC_CTX *mem_ctx,
4793 struct tevent_context *ev,
4794 struct rpc_pipe_client *cli,
4795 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
4796 uint32_t _level /* [in] */,
4797 struct srvsvc_NetTransportInfo0 *_info0 /* [in] [ref] */)
4799 struct tevent_req *req;
4800 struct rpccli_srvsvc_NetTransportDel_state *state;
4801 struct tevent_req *subreq;
4803 req = tevent_req_create(mem_ctx, &state,
4804 struct rpccli_srvsvc_NetTransportDel_state);
4805 if (req == NULL) {
4806 return NULL;
4808 state->out_mem_ctx = NULL;
4809 state->dispatch_recv = cli->dispatch_recv;
4811 /* In parameters */
4812 state->orig.in.server_unc = _server_unc;
4813 state->orig.in.level = _level;
4814 state->orig.in.info0 = _info0;
4816 /* Out parameters */
4818 /* Result */
4819 ZERO_STRUCT(state->orig.out.result);
4821 if (DEBUGLEVEL >= 10) {
4822 NDR_PRINT_IN_DEBUG(srvsvc_NetTransportDel, &state->orig);
4825 /* make a temporary copy, that we pass to the dispatch function */
4826 state->tmp = state->orig;
4828 subreq = cli->dispatch_send(state, ev, cli,
4829 &ndr_table_srvsvc,
4830 NDR_SRVSVC_NETTRANSPORTDEL,
4831 &state->tmp);
4832 if (tevent_req_nomem(subreq, req)) {
4833 return tevent_req_post(req, ev);
4835 tevent_req_set_callback(subreq, rpccli_srvsvc_NetTransportDel_done, req);
4836 return req;
4839 static void rpccli_srvsvc_NetTransportDel_done(struct tevent_req *subreq)
4841 struct tevent_req *req = tevent_req_callback_data(
4842 subreq, struct tevent_req);
4843 struct rpccli_srvsvc_NetTransportDel_state *state = tevent_req_data(
4844 req, struct rpccli_srvsvc_NetTransportDel_state);
4845 NTSTATUS status;
4846 TALLOC_CTX *mem_ctx;
4848 if (state->out_mem_ctx) {
4849 mem_ctx = state->out_mem_ctx;
4850 } else {
4851 mem_ctx = state;
4854 status = state->dispatch_recv(subreq, mem_ctx);
4855 TALLOC_FREE(subreq);
4856 if (!NT_STATUS_IS_OK(status)) {
4857 tevent_req_nterror(req, status);
4858 return;
4861 /* Copy out parameters */
4863 /* Copy result */
4864 state->orig.out.result = state->tmp.out.result;
4866 /* Reset temporary structure */
4867 ZERO_STRUCT(state->tmp);
4869 if (DEBUGLEVEL >= 10) {
4870 NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportDel, &state->orig);
4873 tevent_req_done(req);
4876 NTSTATUS rpccli_srvsvc_NetTransportDel_recv(struct tevent_req *req,
4877 TALLOC_CTX *mem_ctx,
4878 WERROR *result)
4880 struct rpccli_srvsvc_NetTransportDel_state *state = tevent_req_data(
4881 req, struct rpccli_srvsvc_NetTransportDel_state);
4882 NTSTATUS status;
4884 if (tevent_req_is_nterror(req, &status)) {
4885 tevent_req_received(req);
4886 return status;
4889 /* Steal possbile out parameters to the callers context */
4890 talloc_steal(mem_ctx, state->out_mem_ctx);
4892 /* Return result */
4893 *result = state->orig.out.result;
4895 tevent_req_received(req);
4896 return NT_STATUS_OK;
4899 NTSTATUS rpccli_srvsvc_NetTransportDel(struct rpc_pipe_client *cli,
4900 TALLOC_CTX *mem_ctx,
4901 const char *server_unc /* [in] [unique,charset(UTF16)] */,
4902 uint32_t level /* [in] */,
4903 struct srvsvc_NetTransportInfo0 *info0 /* [in] [ref] */,
4904 WERROR *werror)
4906 struct srvsvc_NetTransportDel r;
4907 NTSTATUS status;
4909 /* In parameters */
4910 r.in.server_unc = server_unc;
4911 r.in.level = level;
4912 r.in.info0 = info0;
4914 if (DEBUGLEVEL >= 10) {
4915 NDR_PRINT_IN_DEBUG(srvsvc_NetTransportDel, &r);
4918 status = cli->dispatch(cli,
4919 mem_ctx,
4920 &ndr_table_srvsvc,
4921 NDR_SRVSVC_NETTRANSPORTDEL,
4922 &r);
4924 if (!NT_STATUS_IS_OK(status)) {
4925 return status;
4928 if (DEBUGLEVEL >= 10) {
4929 NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportDel, &r);
4932 if (NT_STATUS_IS_ERR(status)) {
4933 return status;
4936 /* Return variables */
4938 /* Return result */
4939 if (werror) {
4940 *werror = r.out.result;
4943 return werror_to_ntstatus(r.out.result);
4946 struct rpccli_srvsvc_NetRemoteTOD_state {
4947 struct srvsvc_NetRemoteTOD orig;
4948 struct srvsvc_NetRemoteTOD tmp;
4949 TALLOC_CTX *out_mem_ctx;
4950 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4953 static void rpccli_srvsvc_NetRemoteTOD_done(struct tevent_req *subreq);
4955 struct tevent_req *rpccli_srvsvc_NetRemoteTOD_send(TALLOC_CTX *mem_ctx,
4956 struct tevent_context *ev,
4957 struct rpc_pipe_client *cli,
4958 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
4959 struct srvsvc_NetRemoteTODInfo **_info /* [out] [ref] */)
4961 struct tevent_req *req;
4962 struct rpccli_srvsvc_NetRemoteTOD_state *state;
4963 struct tevent_req *subreq;
4965 req = tevent_req_create(mem_ctx, &state,
4966 struct rpccli_srvsvc_NetRemoteTOD_state);
4967 if (req == NULL) {
4968 return NULL;
4970 state->out_mem_ctx = NULL;
4971 state->dispatch_recv = cli->dispatch_recv;
4973 /* In parameters */
4974 state->orig.in.server_unc = _server_unc;
4976 /* Out parameters */
4977 state->orig.out.info = _info;
4979 /* Result */
4980 ZERO_STRUCT(state->orig.out.result);
4982 if (DEBUGLEVEL >= 10) {
4983 NDR_PRINT_IN_DEBUG(srvsvc_NetRemoteTOD, &state->orig);
4986 state->out_mem_ctx = talloc_named_const(state, 0,
4987 "rpccli_srvsvc_NetRemoteTOD_out_memory");
4988 if (tevent_req_nomem(state->out_mem_ctx, req)) {
4989 return tevent_req_post(req, ev);
4992 /* make a temporary copy, that we pass to the dispatch function */
4993 state->tmp = state->orig;
4995 subreq = cli->dispatch_send(state, ev, cli,
4996 &ndr_table_srvsvc,
4997 NDR_SRVSVC_NETREMOTETOD,
4998 &state->tmp);
4999 if (tevent_req_nomem(subreq, req)) {
5000 return tevent_req_post(req, ev);
5002 tevent_req_set_callback(subreq, rpccli_srvsvc_NetRemoteTOD_done, req);
5003 return req;
5006 static void rpccli_srvsvc_NetRemoteTOD_done(struct tevent_req *subreq)
5008 struct tevent_req *req = tevent_req_callback_data(
5009 subreq, struct tevent_req);
5010 struct rpccli_srvsvc_NetRemoteTOD_state *state = tevent_req_data(
5011 req, struct rpccli_srvsvc_NetRemoteTOD_state);
5012 NTSTATUS status;
5013 TALLOC_CTX *mem_ctx;
5015 if (state->out_mem_ctx) {
5016 mem_ctx = state->out_mem_ctx;
5017 } else {
5018 mem_ctx = state;
5021 status = state->dispatch_recv(subreq, mem_ctx);
5022 TALLOC_FREE(subreq);
5023 if (!NT_STATUS_IS_OK(status)) {
5024 tevent_req_nterror(req, status);
5025 return;
5028 /* Copy out parameters */
5029 *state->orig.out.info = *state->tmp.out.info;
5031 /* Copy result */
5032 state->orig.out.result = state->tmp.out.result;
5034 /* Reset temporary structure */
5035 ZERO_STRUCT(state->tmp);
5037 if (DEBUGLEVEL >= 10) {
5038 NDR_PRINT_OUT_DEBUG(srvsvc_NetRemoteTOD, &state->orig);
5041 tevent_req_done(req);
5044 NTSTATUS rpccli_srvsvc_NetRemoteTOD_recv(struct tevent_req *req,
5045 TALLOC_CTX *mem_ctx,
5046 WERROR *result)
5048 struct rpccli_srvsvc_NetRemoteTOD_state *state = tevent_req_data(
5049 req, struct rpccli_srvsvc_NetRemoteTOD_state);
5050 NTSTATUS status;
5052 if (tevent_req_is_nterror(req, &status)) {
5053 tevent_req_received(req);
5054 return status;
5057 /* Steal possbile out parameters to the callers context */
5058 talloc_steal(mem_ctx, state->out_mem_ctx);
5060 /* Return result */
5061 *result = state->orig.out.result;
5063 tevent_req_received(req);
5064 return NT_STATUS_OK;
5067 NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli,
5068 TALLOC_CTX *mem_ctx,
5069 const char *server_unc /* [in] [unique,charset(UTF16)] */,
5070 struct srvsvc_NetRemoteTODInfo **info /* [out] [ref] */,
5071 WERROR *werror)
5073 struct srvsvc_NetRemoteTOD r;
5074 NTSTATUS status;
5076 /* In parameters */
5077 r.in.server_unc = server_unc;
5079 if (DEBUGLEVEL >= 10) {
5080 NDR_PRINT_IN_DEBUG(srvsvc_NetRemoteTOD, &r);
5083 status = cli->dispatch(cli,
5084 mem_ctx,
5085 &ndr_table_srvsvc,
5086 NDR_SRVSVC_NETREMOTETOD,
5087 &r);
5089 if (!NT_STATUS_IS_OK(status)) {
5090 return status;
5093 if (DEBUGLEVEL >= 10) {
5094 NDR_PRINT_OUT_DEBUG(srvsvc_NetRemoteTOD, &r);
5097 if (NT_STATUS_IS_ERR(status)) {
5098 return status;
5101 /* Return variables */
5102 *info = *r.out.info;
5104 /* Return result */
5105 if (werror) {
5106 *werror = r.out.result;
5109 return werror_to_ntstatus(r.out.result);
5112 struct rpccli_srvsvc_NetSetServiceBits_state {
5113 struct srvsvc_NetSetServiceBits orig;
5114 struct srvsvc_NetSetServiceBits tmp;
5115 TALLOC_CTX *out_mem_ctx;
5116 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5119 static void rpccli_srvsvc_NetSetServiceBits_done(struct tevent_req *subreq);
5121 struct tevent_req *rpccli_srvsvc_NetSetServiceBits_send(TALLOC_CTX *mem_ctx,
5122 struct tevent_context *ev,
5123 struct rpc_pipe_client *cli,
5124 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
5125 const char *_transport /* [in] [unique,charset(UTF16)] */,
5126 uint32_t _servicebits /* [in] */,
5127 uint32_t _updateimmediately /* [in] */)
5129 struct tevent_req *req;
5130 struct rpccli_srvsvc_NetSetServiceBits_state *state;
5131 struct tevent_req *subreq;
5133 req = tevent_req_create(mem_ctx, &state,
5134 struct rpccli_srvsvc_NetSetServiceBits_state);
5135 if (req == NULL) {
5136 return NULL;
5138 state->out_mem_ctx = NULL;
5139 state->dispatch_recv = cli->dispatch_recv;
5141 /* In parameters */
5142 state->orig.in.server_unc = _server_unc;
5143 state->orig.in.transport = _transport;
5144 state->orig.in.servicebits = _servicebits;
5145 state->orig.in.updateimmediately = _updateimmediately;
5147 /* Out parameters */
5149 /* Result */
5150 ZERO_STRUCT(state->orig.out.result);
5152 if (DEBUGLEVEL >= 10) {
5153 NDR_PRINT_IN_DEBUG(srvsvc_NetSetServiceBits, &state->orig);
5156 /* make a temporary copy, that we pass to the dispatch function */
5157 state->tmp = state->orig;
5159 subreq = cli->dispatch_send(state, ev, cli,
5160 &ndr_table_srvsvc,
5161 NDR_SRVSVC_NETSETSERVICEBITS,
5162 &state->tmp);
5163 if (tevent_req_nomem(subreq, req)) {
5164 return tevent_req_post(req, ev);
5166 tevent_req_set_callback(subreq, rpccli_srvsvc_NetSetServiceBits_done, req);
5167 return req;
5170 static void rpccli_srvsvc_NetSetServiceBits_done(struct tevent_req *subreq)
5172 struct tevent_req *req = tevent_req_callback_data(
5173 subreq, struct tevent_req);
5174 struct rpccli_srvsvc_NetSetServiceBits_state *state = tevent_req_data(
5175 req, struct rpccli_srvsvc_NetSetServiceBits_state);
5176 NTSTATUS status;
5177 TALLOC_CTX *mem_ctx;
5179 if (state->out_mem_ctx) {
5180 mem_ctx = state->out_mem_ctx;
5181 } else {
5182 mem_ctx = state;
5185 status = state->dispatch_recv(subreq, mem_ctx);
5186 TALLOC_FREE(subreq);
5187 if (!NT_STATUS_IS_OK(status)) {
5188 tevent_req_nterror(req, status);
5189 return;
5192 /* Copy out parameters */
5194 /* Copy result */
5195 state->orig.out.result = state->tmp.out.result;
5197 /* Reset temporary structure */
5198 ZERO_STRUCT(state->tmp);
5200 if (DEBUGLEVEL >= 10) {
5201 NDR_PRINT_OUT_DEBUG(srvsvc_NetSetServiceBits, &state->orig);
5204 tevent_req_done(req);
5207 NTSTATUS rpccli_srvsvc_NetSetServiceBits_recv(struct tevent_req *req,
5208 TALLOC_CTX *mem_ctx,
5209 WERROR *result)
5211 struct rpccli_srvsvc_NetSetServiceBits_state *state = tevent_req_data(
5212 req, struct rpccli_srvsvc_NetSetServiceBits_state);
5213 NTSTATUS status;
5215 if (tevent_req_is_nterror(req, &status)) {
5216 tevent_req_received(req);
5217 return status;
5220 /* Steal possbile out parameters to the callers context */
5221 talloc_steal(mem_ctx, state->out_mem_ctx);
5223 /* Return result */
5224 *result = state->orig.out.result;
5226 tevent_req_received(req);
5227 return NT_STATUS_OK;
5230 NTSTATUS rpccli_srvsvc_NetSetServiceBits(struct rpc_pipe_client *cli,
5231 TALLOC_CTX *mem_ctx,
5232 const char *server_unc /* [in] [unique,charset(UTF16)] */,
5233 const char *transport /* [in] [unique,charset(UTF16)] */,
5234 uint32_t servicebits /* [in] */,
5235 uint32_t updateimmediately /* [in] */,
5236 WERROR *werror)
5238 struct srvsvc_NetSetServiceBits r;
5239 NTSTATUS status;
5241 /* In parameters */
5242 r.in.server_unc = server_unc;
5243 r.in.transport = transport;
5244 r.in.servicebits = servicebits;
5245 r.in.updateimmediately = updateimmediately;
5247 if (DEBUGLEVEL >= 10) {
5248 NDR_PRINT_IN_DEBUG(srvsvc_NetSetServiceBits, &r);
5251 status = cli->dispatch(cli,
5252 mem_ctx,
5253 &ndr_table_srvsvc,
5254 NDR_SRVSVC_NETSETSERVICEBITS,
5255 &r);
5257 if (!NT_STATUS_IS_OK(status)) {
5258 return status;
5261 if (DEBUGLEVEL >= 10) {
5262 NDR_PRINT_OUT_DEBUG(srvsvc_NetSetServiceBits, &r);
5265 if (NT_STATUS_IS_ERR(status)) {
5266 return status;
5269 /* Return variables */
5271 /* Return result */
5272 if (werror) {
5273 *werror = r.out.result;
5276 return werror_to_ntstatus(r.out.result);
5279 struct rpccli_srvsvc_NetPathType_state {
5280 struct srvsvc_NetPathType orig;
5281 struct srvsvc_NetPathType tmp;
5282 TALLOC_CTX *out_mem_ctx;
5283 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5286 static void rpccli_srvsvc_NetPathType_done(struct tevent_req *subreq);
5288 struct tevent_req *rpccli_srvsvc_NetPathType_send(TALLOC_CTX *mem_ctx,
5289 struct tevent_context *ev,
5290 struct rpc_pipe_client *cli,
5291 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
5292 const char *_path /* [in] [charset(UTF16)] */,
5293 uint32_t _pathflags /* [in] */,
5294 uint32_t *_pathtype /* [out] [ref] */)
5296 struct tevent_req *req;
5297 struct rpccli_srvsvc_NetPathType_state *state;
5298 struct tevent_req *subreq;
5300 req = tevent_req_create(mem_ctx, &state,
5301 struct rpccli_srvsvc_NetPathType_state);
5302 if (req == NULL) {
5303 return NULL;
5305 state->out_mem_ctx = NULL;
5306 state->dispatch_recv = cli->dispatch_recv;
5308 /* In parameters */
5309 state->orig.in.server_unc = _server_unc;
5310 state->orig.in.path = _path;
5311 state->orig.in.pathflags = _pathflags;
5313 /* Out parameters */
5314 state->orig.out.pathtype = _pathtype;
5316 /* Result */
5317 ZERO_STRUCT(state->orig.out.result);
5319 if (DEBUGLEVEL >= 10) {
5320 NDR_PRINT_IN_DEBUG(srvsvc_NetPathType, &state->orig);
5323 state->out_mem_ctx = talloc_named_const(state, 0,
5324 "rpccli_srvsvc_NetPathType_out_memory");
5325 if (tevent_req_nomem(state->out_mem_ctx, req)) {
5326 return tevent_req_post(req, ev);
5329 /* make a temporary copy, that we pass to the dispatch function */
5330 state->tmp = state->orig;
5332 subreq = cli->dispatch_send(state, ev, cli,
5333 &ndr_table_srvsvc,
5334 NDR_SRVSVC_NETPATHTYPE,
5335 &state->tmp);
5336 if (tevent_req_nomem(subreq, req)) {
5337 return tevent_req_post(req, ev);
5339 tevent_req_set_callback(subreq, rpccli_srvsvc_NetPathType_done, req);
5340 return req;
5343 static void rpccli_srvsvc_NetPathType_done(struct tevent_req *subreq)
5345 struct tevent_req *req = tevent_req_callback_data(
5346 subreq, struct tevent_req);
5347 struct rpccli_srvsvc_NetPathType_state *state = tevent_req_data(
5348 req, struct rpccli_srvsvc_NetPathType_state);
5349 NTSTATUS status;
5350 TALLOC_CTX *mem_ctx;
5352 if (state->out_mem_ctx) {
5353 mem_ctx = state->out_mem_ctx;
5354 } else {
5355 mem_ctx = state;
5358 status = state->dispatch_recv(subreq, mem_ctx);
5359 TALLOC_FREE(subreq);
5360 if (!NT_STATUS_IS_OK(status)) {
5361 tevent_req_nterror(req, status);
5362 return;
5365 /* Copy out parameters */
5366 *state->orig.out.pathtype = *state->tmp.out.pathtype;
5368 /* Copy result */
5369 state->orig.out.result = state->tmp.out.result;
5371 /* Reset temporary structure */
5372 ZERO_STRUCT(state->tmp);
5374 if (DEBUGLEVEL >= 10) {
5375 NDR_PRINT_OUT_DEBUG(srvsvc_NetPathType, &state->orig);
5378 tevent_req_done(req);
5381 NTSTATUS rpccli_srvsvc_NetPathType_recv(struct tevent_req *req,
5382 TALLOC_CTX *mem_ctx,
5383 WERROR *result)
5385 struct rpccli_srvsvc_NetPathType_state *state = tevent_req_data(
5386 req, struct rpccli_srvsvc_NetPathType_state);
5387 NTSTATUS status;
5389 if (tevent_req_is_nterror(req, &status)) {
5390 tevent_req_received(req);
5391 return status;
5394 /* Steal possbile out parameters to the callers context */
5395 talloc_steal(mem_ctx, state->out_mem_ctx);
5397 /* Return result */
5398 *result = state->orig.out.result;
5400 tevent_req_received(req);
5401 return NT_STATUS_OK;
5404 NTSTATUS rpccli_srvsvc_NetPathType(struct rpc_pipe_client *cli,
5405 TALLOC_CTX *mem_ctx,
5406 const char *server_unc /* [in] [unique,charset(UTF16)] */,
5407 const char *path /* [in] [charset(UTF16)] */,
5408 uint32_t pathflags /* [in] */,
5409 uint32_t *pathtype /* [out] [ref] */,
5410 WERROR *werror)
5412 struct srvsvc_NetPathType r;
5413 NTSTATUS status;
5415 /* In parameters */
5416 r.in.server_unc = server_unc;
5417 r.in.path = path;
5418 r.in.pathflags = pathflags;
5420 if (DEBUGLEVEL >= 10) {
5421 NDR_PRINT_IN_DEBUG(srvsvc_NetPathType, &r);
5424 status = cli->dispatch(cli,
5425 mem_ctx,
5426 &ndr_table_srvsvc,
5427 NDR_SRVSVC_NETPATHTYPE,
5428 &r);
5430 if (!NT_STATUS_IS_OK(status)) {
5431 return status;
5434 if (DEBUGLEVEL >= 10) {
5435 NDR_PRINT_OUT_DEBUG(srvsvc_NetPathType, &r);
5438 if (NT_STATUS_IS_ERR(status)) {
5439 return status;
5442 /* Return variables */
5443 *pathtype = *r.out.pathtype;
5445 /* Return result */
5446 if (werror) {
5447 *werror = r.out.result;
5450 return werror_to_ntstatus(r.out.result);
5453 struct rpccli_srvsvc_NetPathCanonicalize_state {
5454 struct srvsvc_NetPathCanonicalize orig;
5455 struct srvsvc_NetPathCanonicalize tmp;
5456 TALLOC_CTX *out_mem_ctx;
5457 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5460 static void rpccli_srvsvc_NetPathCanonicalize_done(struct tevent_req *subreq);
5462 struct tevent_req *rpccli_srvsvc_NetPathCanonicalize_send(TALLOC_CTX *mem_ctx,
5463 struct tevent_context *ev,
5464 struct rpc_pipe_client *cli,
5465 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
5466 const char *_path /* [in] [charset(UTF16)] */,
5467 uint8_t *_can_path /* [out] [size_is(maxbuf)] */,
5468 uint32_t _maxbuf /* [in] */,
5469 const char *_prefix /* [in] [charset(UTF16)] */,
5470 uint32_t *_pathtype /* [in,out] [ref] */,
5471 uint32_t _pathflags /* [in] */)
5473 struct tevent_req *req;
5474 struct rpccli_srvsvc_NetPathCanonicalize_state *state;
5475 struct tevent_req *subreq;
5477 req = tevent_req_create(mem_ctx, &state,
5478 struct rpccli_srvsvc_NetPathCanonicalize_state);
5479 if (req == NULL) {
5480 return NULL;
5482 state->out_mem_ctx = NULL;
5483 state->dispatch_recv = cli->dispatch_recv;
5485 /* In parameters */
5486 state->orig.in.server_unc = _server_unc;
5487 state->orig.in.path = _path;
5488 state->orig.in.maxbuf = _maxbuf;
5489 state->orig.in.prefix = _prefix;
5490 state->orig.in.pathtype = _pathtype;
5491 state->orig.in.pathflags = _pathflags;
5493 /* Out parameters */
5494 state->orig.out.can_path = _can_path;
5495 state->orig.out.pathtype = _pathtype;
5497 /* Result */
5498 ZERO_STRUCT(state->orig.out.result);
5500 if (DEBUGLEVEL >= 10) {
5501 NDR_PRINT_IN_DEBUG(srvsvc_NetPathCanonicalize, &state->orig);
5504 state->out_mem_ctx = talloc_named_const(state, 0,
5505 "rpccli_srvsvc_NetPathCanonicalize_out_memory");
5506 if (tevent_req_nomem(state->out_mem_ctx, req)) {
5507 return tevent_req_post(req, ev);
5510 /* make a temporary copy, that we pass to the dispatch function */
5511 state->tmp = state->orig;
5513 subreq = cli->dispatch_send(state, ev, cli,
5514 &ndr_table_srvsvc,
5515 NDR_SRVSVC_NETPATHCANONICALIZE,
5516 &state->tmp);
5517 if (tevent_req_nomem(subreq, req)) {
5518 return tevent_req_post(req, ev);
5520 tevent_req_set_callback(subreq, rpccli_srvsvc_NetPathCanonicalize_done, req);
5521 return req;
5524 static void rpccli_srvsvc_NetPathCanonicalize_done(struct tevent_req *subreq)
5526 struct tevent_req *req = tevent_req_callback_data(
5527 subreq, struct tevent_req);
5528 struct rpccli_srvsvc_NetPathCanonicalize_state *state = tevent_req_data(
5529 req, struct rpccli_srvsvc_NetPathCanonicalize_state);
5530 NTSTATUS status;
5531 TALLOC_CTX *mem_ctx;
5533 if (state->out_mem_ctx) {
5534 mem_ctx = state->out_mem_ctx;
5535 } else {
5536 mem_ctx = state;
5539 status = state->dispatch_recv(subreq, mem_ctx);
5540 TALLOC_FREE(subreq);
5541 if (!NT_STATUS_IS_OK(status)) {
5542 tevent_req_nterror(req, status);
5543 return;
5546 /* Copy out parameters */
5547 memcpy(state->orig.out.can_path, state->tmp.out.can_path, state->tmp.in.maxbuf * sizeof(*state->orig.out.can_path));
5548 *state->orig.out.pathtype = *state->tmp.out.pathtype;
5550 /* Copy result */
5551 state->orig.out.result = state->tmp.out.result;
5553 /* Reset temporary structure */
5554 ZERO_STRUCT(state->tmp);
5556 if (DEBUGLEVEL >= 10) {
5557 NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCanonicalize, &state->orig);
5560 tevent_req_done(req);
5563 NTSTATUS rpccli_srvsvc_NetPathCanonicalize_recv(struct tevent_req *req,
5564 TALLOC_CTX *mem_ctx,
5565 WERROR *result)
5567 struct rpccli_srvsvc_NetPathCanonicalize_state *state = tevent_req_data(
5568 req, struct rpccli_srvsvc_NetPathCanonicalize_state);
5569 NTSTATUS status;
5571 if (tevent_req_is_nterror(req, &status)) {
5572 tevent_req_received(req);
5573 return status;
5576 /* Steal possbile out parameters to the callers context */
5577 talloc_steal(mem_ctx, state->out_mem_ctx);
5579 /* Return result */
5580 *result = state->orig.out.result;
5582 tevent_req_received(req);
5583 return NT_STATUS_OK;
5586 NTSTATUS rpccli_srvsvc_NetPathCanonicalize(struct rpc_pipe_client *cli,
5587 TALLOC_CTX *mem_ctx,
5588 const char *server_unc /* [in] [unique,charset(UTF16)] */,
5589 const char *path /* [in] [charset(UTF16)] */,
5590 uint8_t *can_path /* [out] [size_is(maxbuf)] */,
5591 uint32_t maxbuf /* [in] */,
5592 const char *prefix /* [in] [charset(UTF16)] */,
5593 uint32_t *pathtype /* [in,out] [ref] */,
5594 uint32_t pathflags /* [in] */,
5595 WERROR *werror)
5597 struct srvsvc_NetPathCanonicalize r;
5598 NTSTATUS status;
5600 /* In parameters */
5601 r.in.server_unc = server_unc;
5602 r.in.path = path;
5603 r.in.maxbuf = maxbuf;
5604 r.in.prefix = prefix;
5605 r.in.pathtype = pathtype;
5606 r.in.pathflags = pathflags;
5608 if (DEBUGLEVEL >= 10) {
5609 NDR_PRINT_IN_DEBUG(srvsvc_NetPathCanonicalize, &r);
5612 status = cli->dispatch(cli,
5613 mem_ctx,
5614 &ndr_table_srvsvc,
5615 NDR_SRVSVC_NETPATHCANONICALIZE,
5616 &r);
5618 if (!NT_STATUS_IS_OK(status)) {
5619 return status;
5622 if (DEBUGLEVEL >= 10) {
5623 NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCanonicalize, &r);
5626 if (NT_STATUS_IS_ERR(status)) {
5627 return status;
5630 /* Return variables */
5631 memcpy(can_path, r.out.can_path, r.in.maxbuf * sizeof(*can_path));
5632 *pathtype = *r.out.pathtype;
5634 /* Return result */
5635 if (werror) {
5636 *werror = r.out.result;
5639 return werror_to_ntstatus(r.out.result);
5642 struct rpccli_srvsvc_NetPathCompare_state {
5643 struct srvsvc_NetPathCompare orig;
5644 struct srvsvc_NetPathCompare tmp;
5645 TALLOC_CTX *out_mem_ctx;
5646 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5649 static void rpccli_srvsvc_NetPathCompare_done(struct tevent_req *subreq);
5651 struct tevent_req *rpccli_srvsvc_NetPathCompare_send(TALLOC_CTX *mem_ctx,
5652 struct tevent_context *ev,
5653 struct rpc_pipe_client *cli,
5654 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
5655 const char *_path1 /* [in] [charset(UTF16)] */,
5656 const char *_path2 /* [in] [charset(UTF16)] */,
5657 uint32_t _pathtype /* [in] */,
5658 uint32_t _pathflags /* [in] */)
5660 struct tevent_req *req;
5661 struct rpccli_srvsvc_NetPathCompare_state *state;
5662 struct tevent_req *subreq;
5664 req = tevent_req_create(mem_ctx, &state,
5665 struct rpccli_srvsvc_NetPathCompare_state);
5666 if (req == NULL) {
5667 return NULL;
5669 state->out_mem_ctx = NULL;
5670 state->dispatch_recv = cli->dispatch_recv;
5672 /* In parameters */
5673 state->orig.in.server_unc = _server_unc;
5674 state->orig.in.path1 = _path1;
5675 state->orig.in.path2 = _path2;
5676 state->orig.in.pathtype = _pathtype;
5677 state->orig.in.pathflags = _pathflags;
5679 /* Out parameters */
5681 /* Result */
5682 ZERO_STRUCT(state->orig.out.result);
5684 if (DEBUGLEVEL >= 10) {
5685 NDR_PRINT_IN_DEBUG(srvsvc_NetPathCompare, &state->orig);
5688 /* make a temporary copy, that we pass to the dispatch function */
5689 state->tmp = state->orig;
5691 subreq = cli->dispatch_send(state, ev, cli,
5692 &ndr_table_srvsvc,
5693 NDR_SRVSVC_NETPATHCOMPARE,
5694 &state->tmp);
5695 if (tevent_req_nomem(subreq, req)) {
5696 return tevent_req_post(req, ev);
5698 tevent_req_set_callback(subreq, rpccli_srvsvc_NetPathCompare_done, req);
5699 return req;
5702 static void rpccli_srvsvc_NetPathCompare_done(struct tevent_req *subreq)
5704 struct tevent_req *req = tevent_req_callback_data(
5705 subreq, struct tevent_req);
5706 struct rpccli_srvsvc_NetPathCompare_state *state = tevent_req_data(
5707 req, struct rpccli_srvsvc_NetPathCompare_state);
5708 NTSTATUS status;
5709 TALLOC_CTX *mem_ctx;
5711 if (state->out_mem_ctx) {
5712 mem_ctx = state->out_mem_ctx;
5713 } else {
5714 mem_ctx = state;
5717 status = state->dispatch_recv(subreq, mem_ctx);
5718 TALLOC_FREE(subreq);
5719 if (!NT_STATUS_IS_OK(status)) {
5720 tevent_req_nterror(req, status);
5721 return;
5724 /* Copy out parameters */
5726 /* Copy result */
5727 state->orig.out.result = state->tmp.out.result;
5729 /* Reset temporary structure */
5730 ZERO_STRUCT(state->tmp);
5732 if (DEBUGLEVEL >= 10) {
5733 NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCompare, &state->orig);
5736 tevent_req_done(req);
5739 NTSTATUS rpccli_srvsvc_NetPathCompare_recv(struct tevent_req *req,
5740 TALLOC_CTX *mem_ctx,
5741 WERROR *result)
5743 struct rpccli_srvsvc_NetPathCompare_state *state = tevent_req_data(
5744 req, struct rpccli_srvsvc_NetPathCompare_state);
5745 NTSTATUS status;
5747 if (tevent_req_is_nterror(req, &status)) {
5748 tevent_req_received(req);
5749 return status;
5752 /* Steal possbile out parameters to the callers context */
5753 talloc_steal(mem_ctx, state->out_mem_ctx);
5755 /* Return result */
5756 *result = state->orig.out.result;
5758 tevent_req_received(req);
5759 return NT_STATUS_OK;
5762 NTSTATUS rpccli_srvsvc_NetPathCompare(struct rpc_pipe_client *cli,
5763 TALLOC_CTX *mem_ctx,
5764 const char *server_unc /* [in] [unique,charset(UTF16)] */,
5765 const char *path1 /* [in] [charset(UTF16)] */,
5766 const char *path2 /* [in] [charset(UTF16)] */,
5767 uint32_t pathtype /* [in] */,
5768 uint32_t pathflags /* [in] */,
5769 WERROR *werror)
5771 struct srvsvc_NetPathCompare r;
5772 NTSTATUS status;
5774 /* In parameters */
5775 r.in.server_unc = server_unc;
5776 r.in.path1 = path1;
5777 r.in.path2 = path2;
5778 r.in.pathtype = pathtype;
5779 r.in.pathflags = pathflags;
5781 if (DEBUGLEVEL >= 10) {
5782 NDR_PRINT_IN_DEBUG(srvsvc_NetPathCompare, &r);
5785 status = cli->dispatch(cli,
5786 mem_ctx,
5787 &ndr_table_srvsvc,
5788 NDR_SRVSVC_NETPATHCOMPARE,
5789 &r);
5791 if (!NT_STATUS_IS_OK(status)) {
5792 return status;
5795 if (DEBUGLEVEL >= 10) {
5796 NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCompare, &r);
5799 if (NT_STATUS_IS_ERR(status)) {
5800 return status;
5803 /* Return variables */
5805 /* Return result */
5806 if (werror) {
5807 *werror = r.out.result;
5810 return werror_to_ntstatus(r.out.result);
5813 struct rpccli_srvsvc_NetNameValidate_state {
5814 struct srvsvc_NetNameValidate orig;
5815 struct srvsvc_NetNameValidate tmp;
5816 TALLOC_CTX *out_mem_ctx;
5817 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5820 static void rpccli_srvsvc_NetNameValidate_done(struct tevent_req *subreq);
5822 struct tevent_req *rpccli_srvsvc_NetNameValidate_send(TALLOC_CTX *mem_ctx,
5823 struct tevent_context *ev,
5824 struct rpc_pipe_client *cli,
5825 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
5826 const char *_name /* [in] [charset(UTF16)] */,
5827 uint32_t _name_type /* [in] */,
5828 uint32_t _flags /* [in] */)
5830 struct tevent_req *req;
5831 struct rpccli_srvsvc_NetNameValidate_state *state;
5832 struct tevent_req *subreq;
5834 req = tevent_req_create(mem_ctx, &state,
5835 struct rpccli_srvsvc_NetNameValidate_state);
5836 if (req == NULL) {
5837 return NULL;
5839 state->out_mem_ctx = NULL;
5840 state->dispatch_recv = cli->dispatch_recv;
5842 /* In parameters */
5843 state->orig.in.server_unc = _server_unc;
5844 state->orig.in.name = _name;
5845 state->orig.in.name_type = _name_type;
5846 state->orig.in.flags = _flags;
5848 /* Out parameters */
5850 /* Result */
5851 ZERO_STRUCT(state->orig.out.result);
5853 if (DEBUGLEVEL >= 10) {
5854 NDR_PRINT_IN_DEBUG(srvsvc_NetNameValidate, &state->orig);
5857 /* make a temporary copy, that we pass to the dispatch function */
5858 state->tmp = state->orig;
5860 subreq = cli->dispatch_send(state, ev, cli,
5861 &ndr_table_srvsvc,
5862 NDR_SRVSVC_NETNAMEVALIDATE,
5863 &state->tmp);
5864 if (tevent_req_nomem(subreq, req)) {
5865 return tevent_req_post(req, ev);
5867 tevent_req_set_callback(subreq, rpccli_srvsvc_NetNameValidate_done, req);
5868 return req;
5871 static void rpccli_srvsvc_NetNameValidate_done(struct tevent_req *subreq)
5873 struct tevent_req *req = tevent_req_callback_data(
5874 subreq, struct tevent_req);
5875 struct rpccli_srvsvc_NetNameValidate_state *state = tevent_req_data(
5876 req, struct rpccli_srvsvc_NetNameValidate_state);
5877 NTSTATUS status;
5878 TALLOC_CTX *mem_ctx;
5880 if (state->out_mem_ctx) {
5881 mem_ctx = state->out_mem_ctx;
5882 } else {
5883 mem_ctx = state;
5886 status = state->dispatch_recv(subreq, mem_ctx);
5887 TALLOC_FREE(subreq);
5888 if (!NT_STATUS_IS_OK(status)) {
5889 tevent_req_nterror(req, status);
5890 return;
5893 /* Copy out parameters */
5895 /* Copy result */
5896 state->orig.out.result = state->tmp.out.result;
5898 /* Reset temporary structure */
5899 ZERO_STRUCT(state->tmp);
5901 if (DEBUGLEVEL >= 10) {
5902 NDR_PRINT_OUT_DEBUG(srvsvc_NetNameValidate, &state->orig);
5905 tevent_req_done(req);
5908 NTSTATUS rpccli_srvsvc_NetNameValidate_recv(struct tevent_req *req,
5909 TALLOC_CTX *mem_ctx,
5910 WERROR *result)
5912 struct rpccli_srvsvc_NetNameValidate_state *state = tevent_req_data(
5913 req, struct rpccli_srvsvc_NetNameValidate_state);
5914 NTSTATUS status;
5916 if (tevent_req_is_nterror(req, &status)) {
5917 tevent_req_received(req);
5918 return status;
5921 /* Steal possbile out parameters to the callers context */
5922 talloc_steal(mem_ctx, state->out_mem_ctx);
5924 /* Return result */
5925 *result = state->orig.out.result;
5927 tevent_req_received(req);
5928 return NT_STATUS_OK;
5931 NTSTATUS rpccli_srvsvc_NetNameValidate(struct rpc_pipe_client *cli,
5932 TALLOC_CTX *mem_ctx,
5933 const char *server_unc /* [in] [unique,charset(UTF16)] */,
5934 const char *name /* [in] [charset(UTF16)] */,
5935 uint32_t name_type /* [in] */,
5936 uint32_t flags /* [in] */,
5937 WERROR *werror)
5939 struct srvsvc_NetNameValidate r;
5940 NTSTATUS status;
5942 /* In parameters */
5943 r.in.server_unc = server_unc;
5944 r.in.name = name;
5945 r.in.name_type = name_type;
5946 r.in.flags = flags;
5948 if (DEBUGLEVEL >= 10) {
5949 NDR_PRINT_IN_DEBUG(srvsvc_NetNameValidate, &r);
5952 status = cli->dispatch(cli,
5953 mem_ctx,
5954 &ndr_table_srvsvc,
5955 NDR_SRVSVC_NETNAMEVALIDATE,
5956 &r);
5958 if (!NT_STATUS_IS_OK(status)) {
5959 return status;
5962 if (DEBUGLEVEL >= 10) {
5963 NDR_PRINT_OUT_DEBUG(srvsvc_NetNameValidate, &r);
5966 if (NT_STATUS_IS_ERR(status)) {
5967 return status;
5970 /* Return variables */
5972 /* Return result */
5973 if (werror) {
5974 *werror = r.out.result;
5977 return werror_to_ntstatus(r.out.result);
5980 struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state {
5981 struct srvsvc_NETRPRNAMECANONICALIZE orig;
5982 struct srvsvc_NETRPRNAMECANONICALIZE tmp;
5983 TALLOC_CTX *out_mem_ctx;
5984 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5987 static void rpccli_srvsvc_NETRPRNAMECANONICALIZE_done(struct tevent_req *subreq);
5989 struct tevent_req *rpccli_srvsvc_NETRPRNAMECANONICALIZE_send(TALLOC_CTX *mem_ctx,
5990 struct tevent_context *ev,
5991 struct rpc_pipe_client *cli)
5993 struct tevent_req *req;
5994 struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state *state;
5995 struct tevent_req *subreq;
5997 req = tevent_req_create(mem_ctx, &state,
5998 struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state);
5999 if (req == NULL) {
6000 return NULL;
6002 state->out_mem_ctx = NULL;
6003 state->dispatch_recv = cli->dispatch_recv;
6005 /* In parameters */
6007 /* Out parameters */
6009 /* Result */
6010 ZERO_STRUCT(state->orig.out.result);
6012 if (DEBUGLEVEL >= 10) {
6013 NDR_PRINT_IN_DEBUG(srvsvc_NETRPRNAMECANONICALIZE, &state->orig);
6016 /* make a temporary copy, that we pass to the dispatch function */
6017 state->tmp = state->orig;
6019 subreq = cli->dispatch_send(state, ev, cli,
6020 &ndr_table_srvsvc,
6021 NDR_SRVSVC_NETRPRNAMECANONICALIZE,
6022 &state->tmp);
6023 if (tevent_req_nomem(subreq, req)) {
6024 return tevent_req_post(req, ev);
6026 tevent_req_set_callback(subreq, rpccli_srvsvc_NETRPRNAMECANONICALIZE_done, req);
6027 return req;
6030 static void rpccli_srvsvc_NETRPRNAMECANONICALIZE_done(struct tevent_req *subreq)
6032 struct tevent_req *req = tevent_req_callback_data(
6033 subreq, struct tevent_req);
6034 struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state *state = tevent_req_data(
6035 req, struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state);
6036 NTSTATUS status;
6037 TALLOC_CTX *mem_ctx;
6039 if (state->out_mem_ctx) {
6040 mem_ctx = state->out_mem_ctx;
6041 } else {
6042 mem_ctx = state;
6045 status = state->dispatch_recv(subreq, mem_ctx);
6046 TALLOC_FREE(subreq);
6047 if (!NT_STATUS_IS_OK(status)) {
6048 tevent_req_nterror(req, status);
6049 return;
6052 /* Copy out parameters */
6054 /* Copy result */
6055 state->orig.out.result = state->tmp.out.result;
6057 /* Reset temporary structure */
6058 ZERO_STRUCT(state->tmp);
6060 if (DEBUGLEVEL >= 10) {
6061 NDR_PRINT_OUT_DEBUG(srvsvc_NETRPRNAMECANONICALIZE, &state->orig);
6064 tevent_req_done(req);
6067 NTSTATUS rpccli_srvsvc_NETRPRNAMECANONICALIZE_recv(struct tevent_req *req,
6068 TALLOC_CTX *mem_ctx,
6069 WERROR *result)
6071 struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state *state = tevent_req_data(
6072 req, struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state);
6073 NTSTATUS status;
6075 if (tevent_req_is_nterror(req, &status)) {
6076 tevent_req_received(req);
6077 return status;
6080 /* Steal possbile out parameters to the callers context */
6081 talloc_steal(mem_ctx, state->out_mem_ctx);
6083 /* Return result */
6084 *result = state->orig.out.result;
6086 tevent_req_received(req);
6087 return NT_STATUS_OK;
6090 NTSTATUS rpccli_srvsvc_NETRPRNAMECANONICALIZE(struct rpc_pipe_client *cli,
6091 TALLOC_CTX *mem_ctx,
6092 WERROR *werror)
6094 struct srvsvc_NETRPRNAMECANONICALIZE r;
6095 NTSTATUS status;
6097 /* In parameters */
6099 if (DEBUGLEVEL >= 10) {
6100 NDR_PRINT_IN_DEBUG(srvsvc_NETRPRNAMECANONICALIZE, &r);
6103 status = cli->dispatch(cli,
6104 mem_ctx,
6105 &ndr_table_srvsvc,
6106 NDR_SRVSVC_NETRPRNAMECANONICALIZE,
6107 &r);
6109 if (!NT_STATUS_IS_OK(status)) {
6110 return status;
6113 if (DEBUGLEVEL >= 10) {
6114 NDR_PRINT_OUT_DEBUG(srvsvc_NETRPRNAMECANONICALIZE, &r);
6117 if (NT_STATUS_IS_ERR(status)) {
6118 return status;
6121 /* Return variables */
6123 /* Return result */
6124 if (werror) {
6125 *werror = r.out.result;
6128 return werror_to_ntstatus(r.out.result);
6131 struct rpccli_srvsvc_NetPRNameCompare_state {
6132 struct srvsvc_NetPRNameCompare orig;
6133 struct srvsvc_NetPRNameCompare tmp;
6134 TALLOC_CTX *out_mem_ctx;
6135 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6138 static void rpccli_srvsvc_NetPRNameCompare_done(struct tevent_req *subreq);
6140 struct tevent_req *rpccli_srvsvc_NetPRNameCompare_send(TALLOC_CTX *mem_ctx,
6141 struct tevent_context *ev,
6142 struct rpc_pipe_client *cli,
6143 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
6144 const char *_name1 /* [in] [charset(UTF16)] */,
6145 const char *_name2 /* [in] [charset(UTF16)] */,
6146 uint32_t _name_type /* [in] */,
6147 uint32_t _flags /* [in] */)
6149 struct tevent_req *req;
6150 struct rpccli_srvsvc_NetPRNameCompare_state *state;
6151 struct tevent_req *subreq;
6153 req = tevent_req_create(mem_ctx, &state,
6154 struct rpccli_srvsvc_NetPRNameCompare_state);
6155 if (req == NULL) {
6156 return NULL;
6158 state->out_mem_ctx = NULL;
6159 state->dispatch_recv = cli->dispatch_recv;
6161 /* In parameters */
6162 state->orig.in.server_unc = _server_unc;
6163 state->orig.in.name1 = _name1;
6164 state->orig.in.name2 = _name2;
6165 state->orig.in.name_type = _name_type;
6166 state->orig.in.flags = _flags;
6168 /* Out parameters */
6170 /* Result */
6171 ZERO_STRUCT(state->orig.out.result);
6173 if (DEBUGLEVEL >= 10) {
6174 NDR_PRINT_IN_DEBUG(srvsvc_NetPRNameCompare, &state->orig);
6177 /* make a temporary copy, that we pass to the dispatch function */
6178 state->tmp = state->orig;
6180 subreq = cli->dispatch_send(state, ev, cli,
6181 &ndr_table_srvsvc,
6182 NDR_SRVSVC_NETPRNAMECOMPARE,
6183 &state->tmp);
6184 if (tevent_req_nomem(subreq, req)) {
6185 return tevent_req_post(req, ev);
6187 tevent_req_set_callback(subreq, rpccli_srvsvc_NetPRNameCompare_done, req);
6188 return req;
6191 static void rpccli_srvsvc_NetPRNameCompare_done(struct tevent_req *subreq)
6193 struct tevent_req *req = tevent_req_callback_data(
6194 subreq, struct tevent_req);
6195 struct rpccli_srvsvc_NetPRNameCompare_state *state = tevent_req_data(
6196 req, struct rpccli_srvsvc_NetPRNameCompare_state);
6197 NTSTATUS status;
6198 TALLOC_CTX *mem_ctx;
6200 if (state->out_mem_ctx) {
6201 mem_ctx = state->out_mem_ctx;
6202 } else {
6203 mem_ctx = state;
6206 status = state->dispatch_recv(subreq, mem_ctx);
6207 TALLOC_FREE(subreq);
6208 if (!NT_STATUS_IS_OK(status)) {
6209 tevent_req_nterror(req, status);
6210 return;
6213 /* Copy out parameters */
6215 /* Copy result */
6216 state->orig.out.result = state->tmp.out.result;
6218 /* Reset temporary structure */
6219 ZERO_STRUCT(state->tmp);
6221 if (DEBUGLEVEL >= 10) {
6222 NDR_PRINT_OUT_DEBUG(srvsvc_NetPRNameCompare, &state->orig);
6225 tevent_req_done(req);
6228 NTSTATUS rpccli_srvsvc_NetPRNameCompare_recv(struct tevent_req *req,
6229 TALLOC_CTX *mem_ctx,
6230 WERROR *result)
6232 struct rpccli_srvsvc_NetPRNameCompare_state *state = tevent_req_data(
6233 req, struct rpccli_srvsvc_NetPRNameCompare_state);
6234 NTSTATUS status;
6236 if (tevent_req_is_nterror(req, &status)) {
6237 tevent_req_received(req);
6238 return status;
6241 /* Steal possbile out parameters to the callers context */
6242 talloc_steal(mem_ctx, state->out_mem_ctx);
6244 /* Return result */
6245 *result = state->orig.out.result;
6247 tevent_req_received(req);
6248 return NT_STATUS_OK;
6251 NTSTATUS rpccli_srvsvc_NetPRNameCompare(struct rpc_pipe_client *cli,
6252 TALLOC_CTX *mem_ctx,
6253 const char *server_unc /* [in] [unique,charset(UTF16)] */,
6254 const char *name1 /* [in] [charset(UTF16)] */,
6255 const char *name2 /* [in] [charset(UTF16)] */,
6256 uint32_t name_type /* [in] */,
6257 uint32_t flags /* [in] */,
6258 WERROR *werror)
6260 struct srvsvc_NetPRNameCompare r;
6261 NTSTATUS status;
6263 /* In parameters */
6264 r.in.server_unc = server_unc;
6265 r.in.name1 = name1;
6266 r.in.name2 = name2;
6267 r.in.name_type = name_type;
6268 r.in.flags = flags;
6270 if (DEBUGLEVEL >= 10) {
6271 NDR_PRINT_IN_DEBUG(srvsvc_NetPRNameCompare, &r);
6274 status = cli->dispatch(cli,
6275 mem_ctx,
6276 &ndr_table_srvsvc,
6277 NDR_SRVSVC_NETPRNAMECOMPARE,
6278 &r);
6280 if (!NT_STATUS_IS_OK(status)) {
6281 return status;
6284 if (DEBUGLEVEL >= 10) {
6285 NDR_PRINT_OUT_DEBUG(srvsvc_NetPRNameCompare, &r);
6288 if (NT_STATUS_IS_ERR(status)) {
6289 return status;
6292 /* Return variables */
6294 /* Return result */
6295 if (werror) {
6296 *werror = r.out.result;
6299 return werror_to_ntstatus(r.out.result);
6302 struct rpccli_srvsvc_NetShareEnum_state {
6303 struct srvsvc_NetShareEnum orig;
6304 struct srvsvc_NetShareEnum tmp;
6305 TALLOC_CTX *out_mem_ctx;
6306 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6309 static void rpccli_srvsvc_NetShareEnum_done(struct tevent_req *subreq);
6311 struct tevent_req *rpccli_srvsvc_NetShareEnum_send(TALLOC_CTX *mem_ctx,
6312 struct tevent_context *ev,
6313 struct rpc_pipe_client *cli,
6314 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
6315 struct srvsvc_NetShareInfoCtr *_info_ctr /* [in,out] [ref] */,
6316 uint32_t _max_buffer /* [in] */,
6317 uint32_t *_totalentries /* [out] [ref] */,
6318 uint32_t *_resume_handle /* [in,out] [unique] */)
6320 struct tevent_req *req;
6321 struct rpccli_srvsvc_NetShareEnum_state *state;
6322 struct tevent_req *subreq;
6324 req = tevent_req_create(mem_ctx, &state,
6325 struct rpccli_srvsvc_NetShareEnum_state);
6326 if (req == NULL) {
6327 return NULL;
6329 state->out_mem_ctx = NULL;
6330 state->dispatch_recv = cli->dispatch_recv;
6332 /* In parameters */
6333 state->orig.in.server_unc = _server_unc;
6334 state->orig.in.info_ctr = _info_ctr;
6335 state->orig.in.max_buffer = _max_buffer;
6336 state->orig.in.resume_handle = _resume_handle;
6338 /* Out parameters */
6339 state->orig.out.info_ctr = _info_ctr;
6340 state->orig.out.totalentries = _totalentries;
6341 state->orig.out.resume_handle = _resume_handle;
6343 /* Result */
6344 ZERO_STRUCT(state->orig.out.result);
6346 if (DEBUGLEVEL >= 10) {
6347 NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnum, &state->orig);
6350 state->out_mem_ctx = talloc_named_const(state, 0,
6351 "rpccli_srvsvc_NetShareEnum_out_memory");
6352 if (tevent_req_nomem(state->out_mem_ctx, req)) {
6353 return tevent_req_post(req, ev);
6356 /* make a temporary copy, that we pass to the dispatch function */
6357 state->tmp = state->orig;
6359 subreq = cli->dispatch_send(state, ev, cli,
6360 &ndr_table_srvsvc,
6361 NDR_SRVSVC_NETSHAREENUM,
6362 &state->tmp);
6363 if (tevent_req_nomem(subreq, req)) {
6364 return tevent_req_post(req, ev);
6366 tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareEnum_done, req);
6367 return req;
6370 static void rpccli_srvsvc_NetShareEnum_done(struct tevent_req *subreq)
6372 struct tevent_req *req = tevent_req_callback_data(
6373 subreq, struct tevent_req);
6374 struct rpccli_srvsvc_NetShareEnum_state *state = tevent_req_data(
6375 req, struct rpccli_srvsvc_NetShareEnum_state);
6376 NTSTATUS status;
6377 TALLOC_CTX *mem_ctx;
6379 if (state->out_mem_ctx) {
6380 mem_ctx = state->out_mem_ctx;
6381 } else {
6382 mem_ctx = state;
6385 status = state->dispatch_recv(subreq, mem_ctx);
6386 TALLOC_FREE(subreq);
6387 if (!NT_STATUS_IS_OK(status)) {
6388 tevent_req_nterror(req, status);
6389 return;
6392 /* Copy out parameters */
6393 *state->orig.out.info_ctr = *state->tmp.out.info_ctr;
6394 *state->orig.out.totalentries = *state->tmp.out.totalentries;
6395 if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
6396 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
6399 /* Copy result */
6400 state->orig.out.result = state->tmp.out.result;
6402 /* Reset temporary structure */
6403 ZERO_STRUCT(state->tmp);
6405 if (DEBUGLEVEL >= 10) {
6406 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnum, &state->orig);
6409 tevent_req_done(req);
6412 NTSTATUS rpccli_srvsvc_NetShareEnum_recv(struct tevent_req *req,
6413 TALLOC_CTX *mem_ctx,
6414 WERROR *result)
6416 struct rpccli_srvsvc_NetShareEnum_state *state = tevent_req_data(
6417 req, struct rpccli_srvsvc_NetShareEnum_state);
6418 NTSTATUS status;
6420 if (tevent_req_is_nterror(req, &status)) {
6421 tevent_req_received(req);
6422 return status;
6425 /* Steal possbile out parameters to the callers context */
6426 talloc_steal(mem_ctx, state->out_mem_ctx);
6428 /* Return result */
6429 *result = state->orig.out.result;
6431 tevent_req_received(req);
6432 return NT_STATUS_OK;
6435 NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli,
6436 TALLOC_CTX *mem_ctx,
6437 const char *server_unc /* [in] [unique,charset(UTF16)] */,
6438 struct srvsvc_NetShareInfoCtr *info_ctr /* [in,out] [ref] */,
6439 uint32_t max_buffer /* [in] */,
6440 uint32_t *totalentries /* [out] [ref] */,
6441 uint32_t *resume_handle /* [in,out] [unique] */,
6442 WERROR *werror)
6444 struct srvsvc_NetShareEnum r;
6445 NTSTATUS status;
6447 /* In parameters */
6448 r.in.server_unc = server_unc;
6449 r.in.info_ctr = info_ctr;
6450 r.in.max_buffer = max_buffer;
6451 r.in.resume_handle = resume_handle;
6453 if (DEBUGLEVEL >= 10) {
6454 NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnum, &r);
6457 status = cli->dispatch(cli,
6458 mem_ctx,
6459 &ndr_table_srvsvc,
6460 NDR_SRVSVC_NETSHAREENUM,
6461 &r);
6463 if (!NT_STATUS_IS_OK(status)) {
6464 return status;
6467 if (DEBUGLEVEL >= 10) {
6468 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnum, &r);
6471 if (NT_STATUS_IS_ERR(status)) {
6472 return status;
6475 /* Return variables */
6476 *info_ctr = *r.out.info_ctr;
6477 *totalentries = *r.out.totalentries;
6478 if (resume_handle && r.out.resume_handle) {
6479 *resume_handle = *r.out.resume_handle;
6482 /* Return result */
6483 if (werror) {
6484 *werror = r.out.result;
6487 return werror_to_ntstatus(r.out.result);
6490 struct rpccli_srvsvc_NetShareDelStart_state {
6491 struct srvsvc_NetShareDelStart orig;
6492 struct srvsvc_NetShareDelStart tmp;
6493 TALLOC_CTX *out_mem_ctx;
6494 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6497 static void rpccli_srvsvc_NetShareDelStart_done(struct tevent_req *subreq);
6499 struct tevent_req *rpccli_srvsvc_NetShareDelStart_send(TALLOC_CTX *mem_ctx,
6500 struct tevent_context *ev,
6501 struct rpc_pipe_client *cli,
6502 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
6503 const char *_share /* [in] [charset(UTF16)] */,
6504 uint32_t _reserved /* [in] */,
6505 struct policy_handle *_hnd /* [out] [unique] */)
6507 struct tevent_req *req;
6508 struct rpccli_srvsvc_NetShareDelStart_state *state;
6509 struct tevent_req *subreq;
6511 req = tevent_req_create(mem_ctx, &state,
6512 struct rpccli_srvsvc_NetShareDelStart_state);
6513 if (req == NULL) {
6514 return NULL;
6516 state->out_mem_ctx = NULL;
6517 state->dispatch_recv = cli->dispatch_recv;
6519 /* In parameters */
6520 state->orig.in.server_unc = _server_unc;
6521 state->orig.in.share = _share;
6522 state->orig.in.reserved = _reserved;
6524 /* Out parameters */
6525 state->orig.out.hnd = _hnd;
6527 /* Result */
6528 ZERO_STRUCT(state->orig.out.result);
6530 if (DEBUGLEVEL >= 10) {
6531 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelStart, &state->orig);
6534 state->out_mem_ctx = talloc_named_const(state, 0,
6535 "rpccli_srvsvc_NetShareDelStart_out_memory");
6536 if (tevent_req_nomem(state->out_mem_ctx, req)) {
6537 return tevent_req_post(req, ev);
6540 /* make a temporary copy, that we pass to the dispatch function */
6541 state->tmp = state->orig;
6543 subreq = cli->dispatch_send(state, ev, cli,
6544 &ndr_table_srvsvc,
6545 NDR_SRVSVC_NETSHAREDELSTART,
6546 &state->tmp);
6547 if (tevent_req_nomem(subreq, req)) {
6548 return tevent_req_post(req, ev);
6550 tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareDelStart_done, req);
6551 return req;
6554 static void rpccli_srvsvc_NetShareDelStart_done(struct tevent_req *subreq)
6556 struct tevent_req *req = tevent_req_callback_data(
6557 subreq, struct tevent_req);
6558 struct rpccli_srvsvc_NetShareDelStart_state *state = tevent_req_data(
6559 req, struct rpccli_srvsvc_NetShareDelStart_state);
6560 NTSTATUS status;
6561 TALLOC_CTX *mem_ctx;
6563 if (state->out_mem_ctx) {
6564 mem_ctx = state->out_mem_ctx;
6565 } else {
6566 mem_ctx = state;
6569 status = state->dispatch_recv(subreq, mem_ctx);
6570 TALLOC_FREE(subreq);
6571 if (!NT_STATUS_IS_OK(status)) {
6572 tevent_req_nterror(req, status);
6573 return;
6576 /* Copy out parameters */
6577 if (state->orig.out.hnd && state->tmp.out.hnd) {
6578 *state->orig.out.hnd = *state->tmp.out.hnd;
6581 /* Copy result */
6582 state->orig.out.result = state->tmp.out.result;
6584 /* Reset temporary structure */
6585 ZERO_STRUCT(state->tmp);
6587 if (DEBUGLEVEL >= 10) {
6588 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelStart, &state->orig);
6591 tevent_req_done(req);
6594 NTSTATUS rpccli_srvsvc_NetShareDelStart_recv(struct tevent_req *req,
6595 TALLOC_CTX *mem_ctx,
6596 WERROR *result)
6598 struct rpccli_srvsvc_NetShareDelStart_state *state = tevent_req_data(
6599 req, struct rpccli_srvsvc_NetShareDelStart_state);
6600 NTSTATUS status;
6602 if (tevent_req_is_nterror(req, &status)) {
6603 tevent_req_received(req);
6604 return status;
6607 /* Steal possbile out parameters to the callers context */
6608 talloc_steal(mem_ctx, state->out_mem_ctx);
6610 /* Return result */
6611 *result = state->orig.out.result;
6613 tevent_req_received(req);
6614 return NT_STATUS_OK;
6617 NTSTATUS rpccli_srvsvc_NetShareDelStart(struct rpc_pipe_client *cli,
6618 TALLOC_CTX *mem_ctx,
6619 const char *server_unc /* [in] [unique,charset(UTF16)] */,
6620 const char *share /* [in] [charset(UTF16)] */,
6621 uint32_t reserved /* [in] */,
6622 struct policy_handle *hnd /* [out] [unique] */,
6623 WERROR *werror)
6625 struct srvsvc_NetShareDelStart r;
6626 NTSTATUS status;
6628 /* In parameters */
6629 r.in.server_unc = server_unc;
6630 r.in.share = share;
6631 r.in.reserved = reserved;
6633 if (DEBUGLEVEL >= 10) {
6634 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelStart, &r);
6637 status = cli->dispatch(cli,
6638 mem_ctx,
6639 &ndr_table_srvsvc,
6640 NDR_SRVSVC_NETSHAREDELSTART,
6641 &r);
6643 if (!NT_STATUS_IS_OK(status)) {
6644 return status;
6647 if (DEBUGLEVEL >= 10) {
6648 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelStart, &r);
6651 if (NT_STATUS_IS_ERR(status)) {
6652 return status;
6655 /* Return variables */
6656 if (hnd && r.out.hnd) {
6657 *hnd = *r.out.hnd;
6660 /* Return result */
6661 if (werror) {
6662 *werror = r.out.result;
6665 return werror_to_ntstatus(r.out.result);
6668 struct rpccli_srvsvc_NetShareDelCommit_state {
6669 struct srvsvc_NetShareDelCommit orig;
6670 struct srvsvc_NetShareDelCommit tmp;
6671 TALLOC_CTX *out_mem_ctx;
6672 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6675 static void rpccli_srvsvc_NetShareDelCommit_done(struct tevent_req *subreq);
6677 struct tevent_req *rpccli_srvsvc_NetShareDelCommit_send(TALLOC_CTX *mem_ctx,
6678 struct tevent_context *ev,
6679 struct rpc_pipe_client *cli,
6680 struct policy_handle *_hnd /* [in,out] [unique] */)
6682 struct tevent_req *req;
6683 struct rpccli_srvsvc_NetShareDelCommit_state *state;
6684 struct tevent_req *subreq;
6686 req = tevent_req_create(mem_ctx, &state,
6687 struct rpccli_srvsvc_NetShareDelCommit_state);
6688 if (req == NULL) {
6689 return NULL;
6691 state->out_mem_ctx = NULL;
6692 state->dispatch_recv = cli->dispatch_recv;
6694 /* In parameters */
6695 state->orig.in.hnd = _hnd;
6697 /* Out parameters */
6698 state->orig.out.hnd = _hnd;
6700 /* Result */
6701 ZERO_STRUCT(state->orig.out.result);
6703 if (DEBUGLEVEL >= 10) {
6704 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelCommit, &state->orig);
6707 state->out_mem_ctx = talloc_named_const(state, 0,
6708 "rpccli_srvsvc_NetShareDelCommit_out_memory");
6709 if (tevent_req_nomem(state->out_mem_ctx, req)) {
6710 return tevent_req_post(req, ev);
6713 /* make a temporary copy, that we pass to the dispatch function */
6714 state->tmp = state->orig;
6716 subreq = cli->dispatch_send(state, ev, cli,
6717 &ndr_table_srvsvc,
6718 NDR_SRVSVC_NETSHAREDELCOMMIT,
6719 &state->tmp);
6720 if (tevent_req_nomem(subreq, req)) {
6721 return tevent_req_post(req, ev);
6723 tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareDelCommit_done, req);
6724 return req;
6727 static void rpccli_srvsvc_NetShareDelCommit_done(struct tevent_req *subreq)
6729 struct tevent_req *req = tevent_req_callback_data(
6730 subreq, struct tevent_req);
6731 struct rpccli_srvsvc_NetShareDelCommit_state *state = tevent_req_data(
6732 req, struct rpccli_srvsvc_NetShareDelCommit_state);
6733 NTSTATUS status;
6734 TALLOC_CTX *mem_ctx;
6736 if (state->out_mem_ctx) {
6737 mem_ctx = state->out_mem_ctx;
6738 } else {
6739 mem_ctx = state;
6742 status = state->dispatch_recv(subreq, mem_ctx);
6743 TALLOC_FREE(subreq);
6744 if (!NT_STATUS_IS_OK(status)) {
6745 tevent_req_nterror(req, status);
6746 return;
6749 /* Copy out parameters */
6750 if (state->orig.out.hnd && state->tmp.out.hnd) {
6751 *state->orig.out.hnd = *state->tmp.out.hnd;
6754 /* Copy result */
6755 state->orig.out.result = state->tmp.out.result;
6757 /* Reset temporary structure */
6758 ZERO_STRUCT(state->tmp);
6760 if (DEBUGLEVEL >= 10) {
6761 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelCommit, &state->orig);
6764 tevent_req_done(req);
6767 NTSTATUS rpccli_srvsvc_NetShareDelCommit_recv(struct tevent_req *req,
6768 TALLOC_CTX *mem_ctx,
6769 WERROR *result)
6771 struct rpccli_srvsvc_NetShareDelCommit_state *state = tevent_req_data(
6772 req, struct rpccli_srvsvc_NetShareDelCommit_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_NetShareDelCommit(struct rpc_pipe_client *cli,
6791 TALLOC_CTX *mem_ctx,
6792 struct policy_handle *hnd /* [in,out] [unique] */,
6793 WERROR *werror)
6795 struct srvsvc_NetShareDelCommit r;
6796 NTSTATUS status;
6798 /* In parameters */
6799 r.in.hnd = hnd;
6801 if (DEBUGLEVEL >= 10) {
6802 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelCommit, &r);
6805 status = cli->dispatch(cli,
6806 mem_ctx,
6807 &ndr_table_srvsvc,
6808 NDR_SRVSVC_NETSHAREDELCOMMIT,
6809 &r);
6811 if (!NT_STATUS_IS_OK(status)) {
6812 return status;
6815 if (DEBUGLEVEL >= 10) {
6816 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelCommit, &r);
6819 if (NT_STATUS_IS_ERR(status)) {
6820 return status;
6823 /* Return variables */
6824 if (hnd && r.out.hnd) {
6825 *hnd = *r.out.hnd;
6828 /* Return result */
6829 if (werror) {
6830 *werror = r.out.result;
6833 return werror_to_ntstatus(r.out.result);
6836 struct rpccli_srvsvc_NetGetFileSecurity_state {
6837 struct srvsvc_NetGetFileSecurity orig;
6838 struct srvsvc_NetGetFileSecurity tmp;
6839 TALLOC_CTX *out_mem_ctx;
6840 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6843 static void rpccli_srvsvc_NetGetFileSecurity_done(struct tevent_req *subreq);
6845 struct tevent_req *rpccli_srvsvc_NetGetFileSecurity_send(TALLOC_CTX *mem_ctx,
6846 struct tevent_context *ev,
6847 struct rpc_pipe_client *cli,
6848 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
6849 const char *_share /* [in] [unique,charset(UTF16)] */,
6850 const char *_file /* [in] [charset(UTF16)] */,
6851 uint32_t _securityinformation /* [in] */,
6852 struct sec_desc_buf **_sd_buf /* [out] [ref] */)
6854 struct tevent_req *req;
6855 struct rpccli_srvsvc_NetGetFileSecurity_state *state;
6856 struct tevent_req *subreq;
6858 req = tevent_req_create(mem_ctx, &state,
6859 struct rpccli_srvsvc_NetGetFileSecurity_state);
6860 if (req == NULL) {
6861 return NULL;
6863 state->out_mem_ctx = NULL;
6864 state->dispatch_recv = cli->dispatch_recv;
6866 /* In parameters */
6867 state->orig.in.server_unc = _server_unc;
6868 state->orig.in.share = _share;
6869 state->orig.in.file = _file;
6870 state->orig.in.securityinformation = _securityinformation;
6872 /* Out parameters */
6873 state->orig.out.sd_buf = _sd_buf;
6875 /* Result */
6876 ZERO_STRUCT(state->orig.out.result);
6878 if (DEBUGLEVEL >= 10) {
6879 NDR_PRINT_IN_DEBUG(srvsvc_NetGetFileSecurity, &state->orig);
6882 state->out_mem_ctx = talloc_named_const(state, 0,
6883 "rpccli_srvsvc_NetGetFileSecurity_out_memory");
6884 if (tevent_req_nomem(state->out_mem_ctx, req)) {
6885 return tevent_req_post(req, ev);
6888 /* make a temporary copy, that we pass to the dispatch function */
6889 state->tmp = state->orig;
6891 subreq = cli->dispatch_send(state, ev, cli,
6892 &ndr_table_srvsvc,
6893 NDR_SRVSVC_NETGETFILESECURITY,
6894 &state->tmp);
6895 if (tevent_req_nomem(subreq, req)) {
6896 return tevent_req_post(req, ev);
6898 tevent_req_set_callback(subreq, rpccli_srvsvc_NetGetFileSecurity_done, req);
6899 return req;
6902 static void rpccli_srvsvc_NetGetFileSecurity_done(struct tevent_req *subreq)
6904 struct tevent_req *req = tevent_req_callback_data(
6905 subreq, struct tevent_req);
6906 struct rpccli_srvsvc_NetGetFileSecurity_state *state = tevent_req_data(
6907 req, struct rpccli_srvsvc_NetGetFileSecurity_state);
6908 NTSTATUS status;
6909 TALLOC_CTX *mem_ctx;
6911 if (state->out_mem_ctx) {
6912 mem_ctx = state->out_mem_ctx;
6913 } else {
6914 mem_ctx = state;
6917 status = state->dispatch_recv(subreq, mem_ctx);
6918 TALLOC_FREE(subreq);
6919 if (!NT_STATUS_IS_OK(status)) {
6920 tevent_req_nterror(req, status);
6921 return;
6924 /* Copy out parameters */
6925 *state->orig.out.sd_buf = *state->tmp.out.sd_buf;
6927 /* Copy result */
6928 state->orig.out.result = state->tmp.out.result;
6930 /* Reset temporary structure */
6931 ZERO_STRUCT(state->tmp);
6933 if (DEBUGLEVEL >= 10) {
6934 NDR_PRINT_OUT_DEBUG(srvsvc_NetGetFileSecurity, &state->orig);
6937 tevent_req_done(req);
6940 NTSTATUS rpccli_srvsvc_NetGetFileSecurity_recv(struct tevent_req *req,
6941 TALLOC_CTX *mem_ctx,
6942 WERROR *result)
6944 struct rpccli_srvsvc_NetGetFileSecurity_state *state = tevent_req_data(
6945 req, struct rpccli_srvsvc_NetGetFileSecurity_state);
6946 NTSTATUS status;
6948 if (tevent_req_is_nterror(req, &status)) {
6949 tevent_req_received(req);
6950 return status;
6953 /* Steal possbile out parameters to the callers context */
6954 talloc_steal(mem_ctx, state->out_mem_ctx);
6956 /* Return result */
6957 *result = state->orig.out.result;
6959 tevent_req_received(req);
6960 return NT_STATUS_OK;
6963 NTSTATUS rpccli_srvsvc_NetGetFileSecurity(struct rpc_pipe_client *cli,
6964 TALLOC_CTX *mem_ctx,
6965 const char *server_unc /* [in] [unique,charset(UTF16)] */,
6966 const char *share /* [in] [unique,charset(UTF16)] */,
6967 const char *file /* [in] [charset(UTF16)] */,
6968 uint32_t securityinformation /* [in] */,
6969 struct sec_desc_buf **sd_buf /* [out] [ref] */,
6970 WERROR *werror)
6972 struct srvsvc_NetGetFileSecurity r;
6973 NTSTATUS status;
6975 /* In parameters */
6976 r.in.server_unc = server_unc;
6977 r.in.share = share;
6978 r.in.file = file;
6979 r.in.securityinformation = securityinformation;
6981 if (DEBUGLEVEL >= 10) {
6982 NDR_PRINT_IN_DEBUG(srvsvc_NetGetFileSecurity, &r);
6985 status = cli->dispatch(cli,
6986 mem_ctx,
6987 &ndr_table_srvsvc,
6988 NDR_SRVSVC_NETGETFILESECURITY,
6989 &r);
6991 if (!NT_STATUS_IS_OK(status)) {
6992 return status;
6995 if (DEBUGLEVEL >= 10) {
6996 NDR_PRINT_OUT_DEBUG(srvsvc_NetGetFileSecurity, &r);
6999 if (NT_STATUS_IS_ERR(status)) {
7000 return status;
7003 /* Return variables */
7004 *sd_buf = *r.out.sd_buf;
7006 /* Return result */
7007 if (werror) {
7008 *werror = r.out.result;
7011 return werror_to_ntstatus(r.out.result);
7014 struct rpccli_srvsvc_NetSetFileSecurity_state {
7015 struct srvsvc_NetSetFileSecurity orig;
7016 struct srvsvc_NetSetFileSecurity tmp;
7017 TALLOC_CTX *out_mem_ctx;
7018 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7021 static void rpccli_srvsvc_NetSetFileSecurity_done(struct tevent_req *subreq);
7023 struct tevent_req *rpccli_srvsvc_NetSetFileSecurity_send(TALLOC_CTX *mem_ctx,
7024 struct tevent_context *ev,
7025 struct rpc_pipe_client *cli,
7026 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
7027 const char *_share /* [in] [unique,charset(UTF16)] */,
7028 const char *_file /* [in] [charset(UTF16)] */,
7029 uint32_t _securityinformation /* [in] */,
7030 struct sec_desc_buf *_sd_buf /* [in] [ref] */)
7032 struct tevent_req *req;
7033 struct rpccli_srvsvc_NetSetFileSecurity_state *state;
7034 struct tevent_req *subreq;
7036 req = tevent_req_create(mem_ctx, &state,
7037 struct rpccli_srvsvc_NetSetFileSecurity_state);
7038 if (req == NULL) {
7039 return NULL;
7041 state->out_mem_ctx = NULL;
7042 state->dispatch_recv = cli->dispatch_recv;
7044 /* In parameters */
7045 state->orig.in.server_unc = _server_unc;
7046 state->orig.in.share = _share;
7047 state->orig.in.file = _file;
7048 state->orig.in.securityinformation = _securityinformation;
7049 state->orig.in.sd_buf = _sd_buf;
7051 /* Out parameters */
7053 /* Result */
7054 ZERO_STRUCT(state->orig.out.result);
7056 if (DEBUGLEVEL >= 10) {
7057 NDR_PRINT_IN_DEBUG(srvsvc_NetSetFileSecurity, &state->orig);
7060 /* make a temporary copy, that we pass to the dispatch function */
7061 state->tmp = state->orig;
7063 subreq = cli->dispatch_send(state, ev, cli,
7064 &ndr_table_srvsvc,
7065 NDR_SRVSVC_NETSETFILESECURITY,
7066 &state->tmp);
7067 if (tevent_req_nomem(subreq, req)) {
7068 return tevent_req_post(req, ev);
7070 tevent_req_set_callback(subreq, rpccli_srvsvc_NetSetFileSecurity_done, req);
7071 return req;
7074 static void rpccli_srvsvc_NetSetFileSecurity_done(struct tevent_req *subreq)
7076 struct tevent_req *req = tevent_req_callback_data(
7077 subreq, struct tevent_req);
7078 struct rpccli_srvsvc_NetSetFileSecurity_state *state = tevent_req_data(
7079 req, struct rpccli_srvsvc_NetSetFileSecurity_state);
7080 NTSTATUS status;
7081 TALLOC_CTX *mem_ctx;
7083 if (state->out_mem_ctx) {
7084 mem_ctx = state->out_mem_ctx;
7085 } else {
7086 mem_ctx = state;
7089 status = state->dispatch_recv(subreq, mem_ctx);
7090 TALLOC_FREE(subreq);
7091 if (!NT_STATUS_IS_OK(status)) {
7092 tevent_req_nterror(req, status);
7093 return;
7096 /* Copy out parameters */
7098 /* Copy result */
7099 state->orig.out.result = state->tmp.out.result;
7101 /* Reset temporary structure */
7102 ZERO_STRUCT(state->tmp);
7104 if (DEBUGLEVEL >= 10) {
7105 NDR_PRINT_OUT_DEBUG(srvsvc_NetSetFileSecurity, &state->orig);
7108 tevent_req_done(req);
7111 NTSTATUS rpccli_srvsvc_NetSetFileSecurity_recv(struct tevent_req *req,
7112 TALLOC_CTX *mem_ctx,
7113 WERROR *result)
7115 struct rpccli_srvsvc_NetSetFileSecurity_state *state = tevent_req_data(
7116 req, struct rpccli_srvsvc_NetSetFileSecurity_state);
7117 NTSTATUS status;
7119 if (tevent_req_is_nterror(req, &status)) {
7120 tevent_req_received(req);
7121 return status;
7124 /* Steal possbile out parameters to the callers context */
7125 talloc_steal(mem_ctx, state->out_mem_ctx);
7127 /* Return result */
7128 *result = state->orig.out.result;
7130 tevent_req_received(req);
7131 return NT_STATUS_OK;
7134 NTSTATUS rpccli_srvsvc_NetSetFileSecurity(struct rpc_pipe_client *cli,
7135 TALLOC_CTX *mem_ctx,
7136 const char *server_unc /* [in] [unique,charset(UTF16)] */,
7137 const char *share /* [in] [unique,charset(UTF16)] */,
7138 const char *file /* [in] [charset(UTF16)] */,
7139 uint32_t securityinformation /* [in] */,
7140 struct sec_desc_buf *sd_buf /* [in] [ref] */,
7141 WERROR *werror)
7143 struct srvsvc_NetSetFileSecurity r;
7144 NTSTATUS status;
7146 /* In parameters */
7147 r.in.server_unc = server_unc;
7148 r.in.share = share;
7149 r.in.file = file;
7150 r.in.securityinformation = securityinformation;
7151 r.in.sd_buf = sd_buf;
7153 if (DEBUGLEVEL >= 10) {
7154 NDR_PRINT_IN_DEBUG(srvsvc_NetSetFileSecurity, &r);
7157 status = cli->dispatch(cli,
7158 mem_ctx,
7159 &ndr_table_srvsvc,
7160 NDR_SRVSVC_NETSETFILESECURITY,
7161 &r);
7163 if (!NT_STATUS_IS_OK(status)) {
7164 return status;
7167 if (DEBUGLEVEL >= 10) {
7168 NDR_PRINT_OUT_DEBUG(srvsvc_NetSetFileSecurity, &r);
7171 if (NT_STATUS_IS_ERR(status)) {
7172 return status;
7175 /* Return variables */
7177 /* Return result */
7178 if (werror) {
7179 *werror = r.out.result;
7182 return werror_to_ntstatus(r.out.result);
7185 struct rpccli_srvsvc_NetServerTransportAddEx_state {
7186 struct srvsvc_NetServerTransportAddEx orig;
7187 struct srvsvc_NetServerTransportAddEx tmp;
7188 TALLOC_CTX *out_mem_ctx;
7189 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7192 static void rpccli_srvsvc_NetServerTransportAddEx_done(struct tevent_req *subreq);
7194 struct tevent_req *rpccli_srvsvc_NetServerTransportAddEx_send(TALLOC_CTX *mem_ctx,
7195 struct tevent_context *ev,
7196 struct rpc_pipe_client *cli,
7197 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
7198 uint32_t _level /* [in] */,
7199 union srvsvc_NetTransportInfo _info /* [in] [switch_is(level)] */)
7201 struct tevent_req *req;
7202 struct rpccli_srvsvc_NetServerTransportAddEx_state *state;
7203 struct tevent_req *subreq;
7205 req = tevent_req_create(mem_ctx, &state,
7206 struct rpccli_srvsvc_NetServerTransportAddEx_state);
7207 if (req == NULL) {
7208 return NULL;
7210 state->out_mem_ctx = NULL;
7211 state->dispatch_recv = cli->dispatch_recv;
7213 /* In parameters */
7214 state->orig.in.server_unc = _server_unc;
7215 state->orig.in.level = _level;
7216 state->orig.in.info = _info;
7218 /* Out parameters */
7220 /* Result */
7221 ZERO_STRUCT(state->orig.out.result);
7223 if (DEBUGLEVEL >= 10) {
7224 NDR_PRINT_IN_DEBUG(srvsvc_NetServerTransportAddEx, &state->orig);
7227 /* make a temporary copy, that we pass to the dispatch function */
7228 state->tmp = state->orig;
7230 subreq = cli->dispatch_send(state, ev, cli,
7231 &ndr_table_srvsvc,
7232 NDR_SRVSVC_NETSERVERTRANSPORTADDEX,
7233 &state->tmp);
7234 if (tevent_req_nomem(subreq, req)) {
7235 return tevent_req_post(req, ev);
7237 tevent_req_set_callback(subreq, rpccli_srvsvc_NetServerTransportAddEx_done, req);
7238 return req;
7241 static void rpccli_srvsvc_NetServerTransportAddEx_done(struct tevent_req *subreq)
7243 struct tevent_req *req = tevent_req_callback_data(
7244 subreq, struct tevent_req);
7245 struct rpccli_srvsvc_NetServerTransportAddEx_state *state = tevent_req_data(
7246 req, struct rpccli_srvsvc_NetServerTransportAddEx_state);
7247 NTSTATUS status;
7248 TALLOC_CTX *mem_ctx;
7250 if (state->out_mem_ctx) {
7251 mem_ctx = state->out_mem_ctx;
7252 } else {
7253 mem_ctx = state;
7256 status = state->dispatch_recv(subreq, mem_ctx);
7257 TALLOC_FREE(subreq);
7258 if (!NT_STATUS_IS_OK(status)) {
7259 tevent_req_nterror(req, status);
7260 return;
7263 /* Copy out parameters */
7265 /* Copy result */
7266 state->orig.out.result = state->tmp.out.result;
7268 /* Reset temporary structure */
7269 ZERO_STRUCT(state->tmp);
7271 if (DEBUGLEVEL >= 10) {
7272 NDR_PRINT_OUT_DEBUG(srvsvc_NetServerTransportAddEx, &state->orig);
7275 tevent_req_done(req);
7278 NTSTATUS rpccli_srvsvc_NetServerTransportAddEx_recv(struct tevent_req *req,
7279 TALLOC_CTX *mem_ctx,
7280 WERROR *result)
7282 struct rpccli_srvsvc_NetServerTransportAddEx_state *state = tevent_req_data(
7283 req, struct rpccli_srvsvc_NetServerTransportAddEx_state);
7284 NTSTATUS status;
7286 if (tevent_req_is_nterror(req, &status)) {
7287 tevent_req_received(req);
7288 return status;
7291 /* Steal possbile out parameters to the callers context */
7292 talloc_steal(mem_ctx, state->out_mem_ctx);
7294 /* Return result */
7295 *result = state->orig.out.result;
7297 tevent_req_received(req);
7298 return NT_STATUS_OK;
7301 NTSTATUS rpccli_srvsvc_NetServerTransportAddEx(struct rpc_pipe_client *cli,
7302 TALLOC_CTX *mem_ctx,
7303 const char *server_unc /* [in] [unique,charset(UTF16)] */,
7304 uint32_t level /* [in] */,
7305 union srvsvc_NetTransportInfo info /* [in] [switch_is(level)] */,
7306 WERROR *werror)
7308 struct srvsvc_NetServerTransportAddEx r;
7309 NTSTATUS status;
7311 /* In parameters */
7312 r.in.server_unc = server_unc;
7313 r.in.level = level;
7314 r.in.info = info;
7316 if (DEBUGLEVEL >= 10) {
7317 NDR_PRINT_IN_DEBUG(srvsvc_NetServerTransportAddEx, &r);
7320 status = cli->dispatch(cli,
7321 mem_ctx,
7322 &ndr_table_srvsvc,
7323 NDR_SRVSVC_NETSERVERTRANSPORTADDEX,
7324 &r);
7326 if (!NT_STATUS_IS_OK(status)) {
7327 return status;
7330 if (DEBUGLEVEL >= 10) {
7331 NDR_PRINT_OUT_DEBUG(srvsvc_NetServerTransportAddEx, &r);
7334 if (NT_STATUS_IS_ERR(status)) {
7335 return status;
7338 /* Return variables */
7340 /* Return result */
7341 if (werror) {
7342 *werror = r.out.result;
7345 return werror_to_ntstatus(r.out.result);
7348 struct rpccli_srvsvc_NetServerSetServiceBitsEx_state {
7349 struct srvsvc_NetServerSetServiceBitsEx orig;
7350 struct srvsvc_NetServerSetServiceBitsEx tmp;
7351 TALLOC_CTX *out_mem_ctx;
7352 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7355 static void rpccli_srvsvc_NetServerSetServiceBitsEx_done(struct tevent_req *subreq);
7357 struct tevent_req *rpccli_srvsvc_NetServerSetServiceBitsEx_send(TALLOC_CTX *mem_ctx,
7358 struct tevent_context *ev,
7359 struct rpc_pipe_client *cli,
7360 const char *_server_unc /* [in] [unique,charset(UTF16)] */,
7361 const char *_emulated_server_unc /* [in] [unique,charset(UTF16)] */,
7362 const char *_transport /* [in] [unique,charset(UTF16)] */,
7363 uint32_t _servicebitsofinterest /* [in] */,
7364 uint32_t _servicebits /* [in] */,
7365 uint32_t _updateimmediately /* [in] */)
7367 struct tevent_req *req;
7368 struct rpccli_srvsvc_NetServerSetServiceBitsEx_state *state;
7369 struct tevent_req *subreq;
7371 req = tevent_req_create(mem_ctx, &state,
7372 struct rpccli_srvsvc_NetServerSetServiceBitsEx_state);
7373 if (req == NULL) {
7374 return NULL;
7376 state->out_mem_ctx = NULL;
7377 state->dispatch_recv = cli->dispatch_recv;
7379 /* In parameters */
7380 state->orig.in.server_unc = _server_unc;
7381 state->orig.in.emulated_server_unc = _emulated_server_unc;
7382 state->orig.in.transport = _transport;
7383 state->orig.in.servicebitsofinterest = _servicebitsofinterest;
7384 state->orig.in.servicebits = _servicebits;
7385 state->orig.in.updateimmediately = _updateimmediately;
7387 /* Out parameters */
7389 /* Result */
7390 ZERO_STRUCT(state->orig.out.result);
7392 if (DEBUGLEVEL >= 10) {
7393 NDR_PRINT_IN_DEBUG(srvsvc_NetServerSetServiceBitsEx, &state->orig);
7396 /* make a temporary copy, that we pass to the dispatch function */
7397 state->tmp = state->orig;
7399 subreq = cli->dispatch_send(state, ev, cli,
7400 &ndr_table_srvsvc,
7401 NDR_SRVSVC_NETSERVERSETSERVICEBITSEX,
7402 &state->tmp);
7403 if (tevent_req_nomem(subreq, req)) {
7404 return tevent_req_post(req, ev);
7406 tevent_req_set_callback(subreq, rpccli_srvsvc_NetServerSetServiceBitsEx_done, req);
7407 return req;
7410 static void rpccli_srvsvc_NetServerSetServiceBitsEx_done(struct tevent_req *subreq)
7412 struct tevent_req *req = tevent_req_callback_data(
7413 subreq, struct tevent_req);
7414 struct rpccli_srvsvc_NetServerSetServiceBitsEx_state *state = tevent_req_data(
7415 req, struct rpccli_srvsvc_NetServerSetServiceBitsEx_state);
7416 NTSTATUS status;
7417 TALLOC_CTX *mem_ctx;
7419 if (state->out_mem_ctx) {
7420 mem_ctx = state->out_mem_ctx;
7421 } else {
7422 mem_ctx = state;
7425 status = state->dispatch_recv(subreq, mem_ctx);
7426 TALLOC_FREE(subreq);
7427 if (!NT_STATUS_IS_OK(status)) {
7428 tevent_req_nterror(req, status);
7429 return;
7432 /* Copy out parameters */
7434 /* Copy result */
7435 state->orig.out.result = state->tmp.out.result;
7437 /* Reset temporary structure */
7438 ZERO_STRUCT(state->tmp);
7440 if (DEBUGLEVEL >= 10) {
7441 NDR_PRINT_OUT_DEBUG(srvsvc_NetServerSetServiceBitsEx, &state->orig);
7444 tevent_req_done(req);
7447 NTSTATUS rpccli_srvsvc_NetServerSetServiceBitsEx_recv(struct tevent_req *req,
7448 TALLOC_CTX *mem_ctx,
7449 WERROR *result)
7451 struct rpccli_srvsvc_NetServerSetServiceBitsEx_state *state = tevent_req_data(
7452 req, struct rpccli_srvsvc_NetServerSetServiceBitsEx_state);
7453 NTSTATUS status;
7455 if (tevent_req_is_nterror(req, &status)) {
7456 tevent_req_received(req);
7457 return status;
7460 /* Steal possbile out parameters to the callers context */
7461 talloc_steal(mem_ctx, state->out_mem_ctx);
7463 /* Return result */
7464 *result = state->orig.out.result;
7466 tevent_req_received(req);
7467 return NT_STATUS_OK;
7470 NTSTATUS rpccli_srvsvc_NetServerSetServiceBitsEx(struct rpc_pipe_client *cli,
7471 TALLOC_CTX *mem_ctx,
7472 const char *server_unc /* [in] [unique,charset(UTF16)] */,
7473 const char *emulated_server_unc /* [in] [unique,charset(UTF16)] */,
7474 const char *transport /* [in] [unique,charset(UTF16)] */,
7475 uint32_t servicebitsofinterest /* [in] */,
7476 uint32_t servicebits /* [in] */,
7477 uint32_t updateimmediately /* [in] */,
7478 WERROR *werror)
7480 struct srvsvc_NetServerSetServiceBitsEx r;
7481 NTSTATUS status;
7483 /* In parameters */
7484 r.in.server_unc = server_unc;
7485 r.in.emulated_server_unc = emulated_server_unc;
7486 r.in.transport = transport;
7487 r.in.servicebitsofinterest = servicebitsofinterest;
7488 r.in.servicebits = servicebits;
7489 r.in.updateimmediately = updateimmediately;
7491 if (DEBUGLEVEL >= 10) {
7492 NDR_PRINT_IN_DEBUG(srvsvc_NetServerSetServiceBitsEx, &r);
7495 status = cli->dispatch(cli,
7496 mem_ctx,
7497 &ndr_table_srvsvc,
7498 NDR_SRVSVC_NETSERVERSETSERVICEBITSEX,
7499 &r);
7501 if (!NT_STATUS_IS_OK(status)) {
7502 return status;
7505 if (DEBUGLEVEL >= 10) {
7506 NDR_PRINT_OUT_DEBUG(srvsvc_NetServerSetServiceBitsEx, &r);
7509 if (NT_STATUS_IS_ERR(status)) {
7510 return status;
7513 /* Return variables */
7515 /* Return result */
7516 if (werror) {
7517 *werror = r.out.result;
7520 return werror_to_ntstatus(r.out.result);
7523 struct rpccli_srvsvc_NETRDFSGETVERSION_state {
7524 struct srvsvc_NETRDFSGETVERSION orig;
7525 struct srvsvc_NETRDFSGETVERSION tmp;
7526 TALLOC_CTX *out_mem_ctx;
7527 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7530 static void rpccli_srvsvc_NETRDFSGETVERSION_done(struct tevent_req *subreq);
7532 struct tevent_req *rpccli_srvsvc_NETRDFSGETVERSION_send(TALLOC_CTX *mem_ctx,
7533 struct tevent_context *ev,
7534 struct rpc_pipe_client *cli)
7536 struct tevent_req *req;
7537 struct rpccli_srvsvc_NETRDFSGETVERSION_state *state;
7538 struct tevent_req *subreq;
7540 req = tevent_req_create(mem_ctx, &state,
7541 struct rpccli_srvsvc_NETRDFSGETVERSION_state);
7542 if (req == NULL) {
7543 return NULL;
7545 state->out_mem_ctx = NULL;
7546 state->dispatch_recv = cli->dispatch_recv;
7548 /* In parameters */
7550 /* Out parameters */
7552 /* Result */
7553 ZERO_STRUCT(state->orig.out.result);
7555 if (DEBUGLEVEL >= 10) {
7556 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSGETVERSION, &state->orig);
7559 /* make a temporary copy, that we pass to the dispatch function */
7560 state->tmp = state->orig;
7562 subreq = cli->dispatch_send(state, ev, cli,
7563 &ndr_table_srvsvc,
7564 NDR_SRVSVC_NETRDFSGETVERSION,
7565 &state->tmp);
7566 if (tevent_req_nomem(subreq, req)) {
7567 return tevent_req_post(req, ev);
7569 tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSGETVERSION_done, req);
7570 return req;
7573 static void rpccli_srvsvc_NETRDFSGETVERSION_done(struct tevent_req *subreq)
7575 struct tevent_req *req = tevent_req_callback_data(
7576 subreq, struct tevent_req);
7577 struct rpccli_srvsvc_NETRDFSGETVERSION_state *state = tevent_req_data(
7578 req, struct rpccli_srvsvc_NETRDFSGETVERSION_state);
7579 NTSTATUS status;
7580 TALLOC_CTX *mem_ctx;
7582 if (state->out_mem_ctx) {
7583 mem_ctx = state->out_mem_ctx;
7584 } else {
7585 mem_ctx = state;
7588 status = state->dispatch_recv(subreq, mem_ctx);
7589 TALLOC_FREE(subreq);
7590 if (!NT_STATUS_IS_OK(status)) {
7591 tevent_req_nterror(req, status);
7592 return;
7595 /* Copy out parameters */
7597 /* Copy result */
7598 state->orig.out.result = state->tmp.out.result;
7600 /* Reset temporary structure */
7601 ZERO_STRUCT(state->tmp);
7603 if (DEBUGLEVEL >= 10) {
7604 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSGETVERSION, &state->orig);
7607 tevent_req_done(req);
7610 NTSTATUS rpccli_srvsvc_NETRDFSGETVERSION_recv(struct tevent_req *req,
7611 TALLOC_CTX *mem_ctx,
7612 WERROR *result)
7614 struct rpccli_srvsvc_NETRDFSGETVERSION_state *state = tevent_req_data(
7615 req, struct rpccli_srvsvc_NETRDFSGETVERSION_state);
7616 NTSTATUS status;
7618 if (tevent_req_is_nterror(req, &status)) {
7619 tevent_req_received(req);
7620 return status;
7623 /* Steal possbile out parameters to the callers context */
7624 talloc_steal(mem_ctx, state->out_mem_ctx);
7626 /* Return result */
7627 *result = state->orig.out.result;
7629 tevent_req_received(req);
7630 return NT_STATUS_OK;
7633 NTSTATUS rpccli_srvsvc_NETRDFSGETVERSION(struct rpc_pipe_client *cli,
7634 TALLOC_CTX *mem_ctx,
7635 WERROR *werror)
7637 struct srvsvc_NETRDFSGETVERSION r;
7638 NTSTATUS status;
7640 /* In parameters */
7642 if (DEBUGLEVEL >= 10) {
7643 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSGETVERSION, &r);
7646 status = cli->dispatch(cli,
7647 mem_ctx,
7648 &ndr_table_srvsvc,
7649 NDR_SRVSVC_NETRDFSGETVERSION,
7650 &r);
7652 if (!NT_STATUS_IS_OK(status)) {
7653 return status;
7656 if (DEBUGLEVEL >= 10) {
7657 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSGETVERSION, &r);
7660 if (NT_STATUS_IS_ERR(status)) {
7661 return status;
7664 /* Return variables */
7666 /* Return result */
7667 if (werror) {
7668 *werror = r.out.result;
7671 return werror_to_ntstatus(r.out.result);
7674 struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state {
7675 struct srvsvc_NETRDFSCREATELOCALPARTITION orig;
7676 struct srvsvc_NETRDFSCREATELOCALPARTITION tmp;
7677 TALLOC_CTX *out_mem_ctx;
7678 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7681 static void rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_done(struct tevent_req *subreq);
7683 struct tevent_req *rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_send(TALLOC_CTX *mem_ctx,
7684 struct tevent_context *ev,
7685 struct rpc_pipe_client *cli)
7687 struct tevent_req *req;
7688 struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state *state;
7689 struct tevent_req *subreq;
7691 req = tevent_req_create(mem_ctx, &state,
7692 struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state);
7693 if (req == NULL) {
7694 return NULL;
7696 state->out_mem_ctx = NULL;
7697 state->dispatch_recv = cli->dispatch_recv;
7699 /* In parameters */
7701 /* Out parameters */
7703 /* Result */
7704 ZERO_STRUCT(state->orig.out.result);
7706 if (DEBUGLEVEL >= 10) {
7707 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION, &state->orig);
7710 /* make a temporary copy, that we pass to the dispatch function */
7711 state->tmp = state->orig;
7713 subreq = cli->dispatch_send(state, ev, cli,
7714 &ndr_table_srvsvc,
7715 NDR_SRVSVC_NETRDFSCREATELOCALPARTITION,
7716 &state->tmp);
7717 if (tevent_req_nomem(subreq, req)) {
7718 return tevent_req_post(req, ev);
7720 tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_done, req);
7721 return req;
7724 static void rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_done(struct tevent_req *subreq)
7726 struct tevent_req *req = tevent_req_callback_data(
7727 subreq, struct tevent_req);
7728 struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state *state = tevent_req_data(
7729 req, struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state);
7730 NTSTATUS status;
7731 TALLOC_CTX *mem_ctx;
7733 if (state->out_mem_ctx) {
7734 mem_ctx = state->out_mem_ctx;
7735 } else {
7736 mem_ctx = state;
7739 status = state->dispatch_recv(subreq, mem_ctx);
7740 TALLOC_FREE(subreq);
7741 if (!NT_STATUS_IS_OK(status)) {
7742 tevent_req_nterror(req, status);
7743 return;
7746 /* Copy out parameters */
7748 /* Copy result */
7749 state->orig.out.result = state->tmp.out.result;
7751 /* Reset temporary structure */
7752 ZERO_STRUCT(state->tmp);
7754 if (DEBUGLEVEL >= 10) {
7755 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION, &state->orig);
7758 tevent_req_done(req);
7761 NTSTATUS rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_recv(struct tevent_req *req,
7762 TALLOC_CTX *mem_ctx,
7763 WERROR *result)
7765 struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state *state = tevent_req_data(
7766 req, struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state);
7767 NTSTATUS status;
7769 if (tevent_req_is_nterror(req, &status)) {
7770 tevent_req_received(req);
7771 return status;
7774 /* Steal possbile out parameters to the callers context */
7775 talloc_steal(mem_ctx, state->out_mem_ctx);
7777 /* Return result */
7778 *result = state->orig.out.result;
7780 tevent_req_received(req);
7781 return NT_STATUS_OK;
7784 NTSTATUS rpccli_srvsvc_NETRDFSCREATELOCALPARTITION(struct rpc_pipe_client *cli,
7785 TALLOC_CTX *mem_ctx,
7786 WERROR *werror)
7788 struct srvsvc_NETRDFSCREATELOCALPARTITION r;
7789 NTSTATUS status;
7791 /* In parameters */
7793 if (DEBUGLEVEL >= 10) {
7794 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION, &r);
7797 status = cli->dispatch(cli,
7798 mem_ctx,
7799 &ndr_table_srvsvc,
7800 NDR_SRVSVC_NETRDFSCREATELOCALPARTITION,
7801 &r);
7803 if (!NT_STATUS_IS_OK(status)) {
7804 return status;
7807 if (DEBUGLEVEL >= 10) {
7808 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION, &r);
7811 if (NT_STATUS_IS_ERR(status)) {
7812 return status;
7815 /* Return variables */
7817 /* Return result */
7818 if (werror) {
7819 *werror = r.out.result;
7822 return werror_to_ntstatus(r.out.result);
7825 struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state {
7826 struct srvsvc_NETRDFSDELETELOCALPARTITION orig;
7827 struct srvsvc_NETRDFSDELETELOCALPARTITION tmp;
7828 TALLOC_CTX *out_mem_ctx;
7829 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7832 static void rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_done(struct tevent_req *subreq);
7834 struct tevent_req *rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_send(TALLOC_CTX *mem_ctx,
7835 struct tevent_context *ev,
7836 struct rpc_pipe_client *cli)
7838 struct tevent_req *req;
7839 struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state *state;
7840 struct tevent_req *subreq;
7842 req = tevent_req_create(mem_ctx, &state,
7843 struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state);
7844 if (req == NULL) {
7845 return NULL;
7847 state->out_mem_ctx = NULL;
7848 state->dispatch_recv = cli->dispatch_recv;
7850 /* In parameters */
7852 /* Out parameters */
7854 /* Result */
7855 ZERO_STRUCT(state->orig.out.result);
7857 if (DEBUGLEVEL >= 10) {
7858 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION, &state->orig);
7861 /* make a temporary copy, that we pass to the dispatch function */
7862 state->tmp = state->orig;
7864 subreq = cli->dispatch_send(state, ev, cli,
7865 &ndr_table_srvsvc,
7866 NDR_SRVSVC_NETRDFSDELETELOCALPARTITION,
7867 &state->tmp);
7868 if (tevent_req_nomem(subreq, req)) {
7869 return tevent_req_post(req, ev);
7871 tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_done, req);
7872 return req;
7875 static void rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_done(struct tevent_req *subreq)
7877 struct tevent_req *req = tevent_req_callback_data(
7878 subreq, struct tevent_req);
7879 struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state *state = tevent_req_data(
7880 req, struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state);
7881 NTSTATUS status;
7882 TALLOC_CTX *mem_ctx;
7884 if (state->out_mem_ctx) {
7885 mem_ctx = state->out_mem_ctx;
7886 } else {
7887 mem_ctx = state;
7890 status = state->dispatch_recv(subreq, mem_ctx);
7891 TALLOC_FREE(subreq);
7892 if (!NT_STATUS_IS_OK(status)) {
7893 tevent_req_nterror(req, status);
7894 return;
7897 /* Copy out parameters */
7899 /* Copy result */
7900 state->orig.out.result = state->tmp.out.result;
7902 /* Reset temporary structure */
7903 ZERO_STRUCT(state->tmp);
7905 if (DEBUGLEVEL >= 10) {
7906 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION, &state->orig);
7909 tevent_req_done(req);
7912 NTSTATUS rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_recv(struct tevent_req *req,
7913 TALLOC_CTX *mem_ctx,
7914 WERROR *result)
7916 struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state *state = tevent_req_data(
7917 req, struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state);
7918 NTSTATUS status;
7920 if (tevent_req_is_nterror(req, &status)) {
7921 tevent_req_received(req);
7922 return status;
7925 /* Steal possbile out parameters to the callers context */
7926 talloc_steal(mem_ctx, state->out_mem_ctx);
7928 /* Return result */
7929 *result = state->orig.out.result;
7931 tevent_req_received(req);
7932 return NT_STATUS_OK;
7935 NTSTATUS rpccli_srvsvc_NETRDFSDELETELOCALPARTITION(struct rpc_pipe_client *cli,
7936 TALLOC_CTX *mem_ctx,
7937 WERROR *werror)
7939 struct srvsvc_NETRDFSDELETELOCALPARTITION r;
7940 NTSTATUS status;
7942 /* In parameters */
7944 if (DEBUGLEVEL >= 10) {
7945 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION, &r);
7948 status = cli->dispatch(cli,
7949 mem_ctx,
7950 &ndr_table_srvsvc,
7951 NDR_SRVSVC_NETRDFSDELETELOCALPARTITION,
7952 &r);
7954 if (!NT_STATUS_IS_OK(status)) {
7955 return status;
7958 if (DEBUGLEVEL >= 10) {
7959 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION, &r);
7962 if (NT_STATUS_IS_ERR(status)) {
7963 return status;
7966 /* Return variables */
7968 /* Return result */
7969 if (werror) {
7970 *werror = r.out.result;
7973 return werror_to_ntstatus(r.out.result);
7976 struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state {
7977 struct srvsvc_NETRDFSSETLOCALVOLUMESTATE orig;
7978 struct srvsvc_NETRDFSSETLOCALVOLUMESTATE tmp;
7979 TALLOC_CTX *out_mem_ctx;
7980 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7983 static void rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_done(struct tevent_req *subreq);
7985 struct tevent_req *rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_send(TALLOC_CTX *mem_ctx,
7986 struct tevent_context *ev,
7987 struct rpc_pipe_client *cli)
7989 struct tevent_req *req;
7990 struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state *state;
7991 struct tevent_req *subreq;
7993 req = tevent_req_create(mem_ctx, &state,
7994 struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state);
7995 if (req == NULL) {
7996 return NULL;
7998 state->out_mem_ctx = NULL;
7999 state->dispatch_recv = cli->dispatch_recv;
8001 /* In parameters */
8003 /* Out parameters */
8005 /* Result */
8006 ZERO_STRUCT(state->orig.out.result);
8008 if (DEBUGLEVEL >= 10) {
8009 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE, &state->orig);
8012 /* make a temporary copy, that we pass to the dispatch function */
8013 state->tmp = state->orig;
8015 subreq = cli->dispatch_send(state, ev, cli,
8016 &ndr_table_srvsvc,
8017 NDR_SRVSVC_NETRDFSSETLOCALVOLUMESTATE,
8018 &state->tmp);
8019 if (tevent_req_nomem(subreq, req)) {
8020 return tevent_req_post(req, ev);
8022 tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_done, req);
8023 return req;
8026 static void rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_done(struct tevent_req *subreq)
8028 struct tevent_req *req = tevent_req_callback_data(
8029 subreq, struct tevent_req);
8030 struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state *state = tevent_req_data(
8031 req, struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state);
8032 NTSTATUS status;
8033 TALLOC_CTX *mem_ctx;
8035 if (state->out_mem_ctx) {
8036 mem_ctx = state->out_mem_ctx;
8037 } else {
8038 mem_ctx = state;
8041 status = state->dispatch_recv(subreq, mem_ctx);
8042 TALLOC_FREE(subreq);
8043 if (!NT_STATUS_IS_OK(status)) {
8044 tevent_req_nterror(req, status);
8045 return;
8048 /* Copy out parameters */
8050 /* Copy result */
8051 state->orig.out.result = state->tmp.out.result;
8053 /* Reset temporary structure */
8054 ZERO_STRUCT(state->tmp);
8056 if (DEBUGLEVEL >= 10) {
8057 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE, &state->orig);
8060 tevent_req_done(req);
8063 NTSTATUS rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_recv(struct tevent_req *req,
8064 TALLOC_CTX *mem_ctx,
8065 WERROR *result)
8067 struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state *state = tevent_req_data(
8068 req, struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state);
8069 NTSTATUS status;
8071 if (tevent_req_is_nterror(req, &status)) {
8072 tevent_req_received(req);
8073 return status;
8076 /* Steal possbile out parameters to the callers context */
8077 talloc_steal(mem_ctx, state->out_mem_ctx);
8079 /* Return result */
8080 *result = state->orig.out.result;
8082 tevent_req_received(req);
8083 return NT_STATUS_OK;
8086 NTSTATUS rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct rpc_pipe_client *cli,
8087 TALLOC_CTX *mem_ctx,
8088 WERROR *werror)
8090 struct srvsvc_NETRDFSSETLOCALVOLUMESTATE r;
8091 NTSTATUS status;
8093 /* In parameters */
8095 if (DEBUGLEVEL >= 10) {
8096 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE, &r);
8099 status = cli->dispatch(cli,
8100 mem_ctx,
8101 &ndr_table_srvsvc,
8102 NDR_SRVSVC_NETRDFSSETLOCALVOLUMESTATE,
8103 &r);
8105 if (!NT_STATUS_IS_OK(status)) {
8106 return status;
8109 if (DEBUGLEVEL >= 10) {
8110 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE, &r);
8113 if (NT_STATUS_IS_ERR(status)) {
8114 return status;
8117 /* Return variables */
8119 /* Return result */
8120 if (werror) {
8121 *werror = r.out.result;
8124 return werror_to_ntstatus(r.out.result);
8127 struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state {
8128 struct srvsvc_NETRDFSSETSERVERINFO orig;
8129 struct srvsvc_NETRDFSSETSERVERINFO tmp;
8130 TALLOC_CTX *out_mem_ctx;
8131 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8134 static void rpccli_srvsvc_NETRDFSSETSERVERINFO_done(struct tevent_req *subreq);
8136 struct tevent_req *rpccli_srvsvc_NETRDFSSETSERVERINFO_send(TALLOC_CTX *mem_ctx,
8137 struct tevent_context *ev,
8138 struct rpc_pipe_client *cli)
8140 struct tevent_req *req;
8141 struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state *state;
8142 struct tevent_req *subreq;
8144 req = tevent_req_create(mem_ctx, &state,
8145 struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state);
8146 if (req == NULL) {
8147 return NULL;
8149 state->out_mem_ctx = NULL;
8150 state->dispatch_recv = cli->dispatch_recv;
8152 /* In parameters */
8154 /* Out parameters */
8156 /* Result */
8157 ZERO_STRUCT(state->orig.out.result);
8159 if (DEBUGLEVEL >= 10) {
8160 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSSETSERVERINFO, &state->orig);
8163 /* make a temporary copy, that we pass to the dispatch function */
8164 state->tmp = state->orig;
8166 subreq = cli->dispatch_send(state, ev, cli,
8167 &ndr_table_srvsvc,
8168 NDR_SRVSVC_NETRDFSSETSERVERINFO,
8169 &state->tmp);
8170 if (tevent_req_nomem(subreq, req)) {
8171 return tevent_req_post(req, ev);
8173 tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSSETSERVERINFO_done, req);
8174 return req;
8177 static void rpccli_srvsvc_NETRDFSSETSERVERINFO_done(struct tevent_req *subreq)
8179 struct tevent_req *req = tevent_req_callback_data(
8180 subreq, struct tevent_req);
8181 struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state *state = tevent_req_data(
8182 req, struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state);
8183 NTSTATUS status;
8184 TALLOC_CTX *mem_ctx;
8186 if (state->out_mem_ctx) {
8187 mem_ctx = state->out_mem_ctx;
8188 } else {
8189 mem_ctx = state;
8192 status = state->dispatch_recv(subreq, mem_ctx);
8193 TALLOC_FREE(subreq);
8194 if (!NT_STATUS_IS_OK(status)) {
8195 tevent_req_nterror(req, status);
8196 return;
8199 /* Copy out parameters */
8201 /* Copy result */
8202 state->orig.out.result = state->tmp.out.result;
8204 /* Reset temporary structure */
8205 ZERO_STRUCT(state->tmp);
8207 if (DEBUGLEVEL >= 10) {
8208 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETSERVERINFO, &state->orig);
8211 tevent_req_done(req);
8214 NTSTATUS rpccli_srvsvc_NETRDFSSETSERVERINFO_recv(struct tevent_req *req,
8215 TALLOC_CTX *mem_ctx,
8216 WERROR *result)
8218 struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state *state = tevent_req_data(
8219 req, struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state);
8220 NTSTATUS status;
8222 if (tevent_req_is_nterror(req, &status)) {
8223 tevent_req_received(req);
8224 return status;
8227 /* Steal possbile out parameters to the callers context */
8228 talloc_steal(mem_ctx, state->out_mem_ctx);
8230 /* Return result */
8231 *result = state->orig.out.result;
8233 tevent_req_received(req);
8234 return NT_STATUS_OK;
8237 NTSTATUS rpccli_srvsvc_NETRDFSSETSERVERINFO(struct rpc_pipe_client *cli,
8238 TALLOC_CTX *mem_ctx,
8239 WERROR *werror)
8241 struct srvsvc_NETRDFSSETSERVERINFO r;
8242 NTSTATUS status;
8244 /* In parameters */
8246 if (DEBUGLEVEL >= 10) {
8247 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSSETSERVERINFO, &r);
8250 status = cli->dispatch(cli,
8251 mem_ctx,
8252 &ndr_table_srvsvc,
8253 NDR_SRVSVC_NETRDFSSETSERVERINFO,
8254 &r);
8256 if (!NT_STATUS_IS_OK(status)) {
8257 return status;
8260 if (DEBUGLEVEL >= 10) {
8261 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETSERVERINFO, &r);
8264 if (NT_STATUS_IS_ERR(status)) {
8265 return status;
8268 /* Return variables */
8270 /* Return result */
8271 if (werror) {
8272 *werror = r.out.result;
8275 return werror_to_ntstatus(r.out.result);
8278 struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state {
8279 struct srvsvc_NETRDFSCREATEEXITPOINT orig;
8280 struct srvsvc_NETRDFSCREATEEXITPOINT tmp;
8281 TALLOC_CTX *out_mem_ctx;
8282 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8285 static void rpccli_srvsvc_NETRDFSCREATEEXITPOINT_done(struct tevent_req *subreq);
8287 struct tevent_req *rpccli_srvsvc_NETRDFSCREATEEXITPOINT_send(TALLOC_CTX *mem_ctx,
8288 struct tevent_context *ev,
8289 struct rpc_pipe_client *cli)
8291 struct tevent_req *req;
8292 struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state *state;
8293 struct tevent_req *subreq;
8295 req = tevent_req_create(mem_ctx, &state,
8296 struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state);
8297 if (req == NULL) {
8298 return NULL;
8300 state->out_mem_ctx = NULL;
8301 state->dispatch_recv = cli->dispatch_recv;
8303 /* In parameters */
8305 /* Out parameters */
8307 /* Result */
8308 ZERO_STRUCT(state->orig.out.result);
8310 if (DEBUGLEVEL >= 10) {
8311 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT, &state->orig);
8314 /* make a temporary copy, that we pass to the dispatch function */
8315 state->tmp = state->orig;
8317 subreq = cli->dispatch_send(state, ev, cli,
8318 &ndr_table_srvsvc,
8319 NDR_SRVSVC_NETRDFSCREATEEXITPOINT,
8320 &state->tmp);
8321 if (tevent_req_nomem(subreq, req)) {
8322 return tevent_req_post(req, ev);
8324 tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSCREATEEXITPOINT_done, req);
8325 return req;
8328 static void rpccli_srvsvc_NETRDFSCREATEEXITPOINT_done(struct tevent_req *subreq)
8330 struct tevent_req *req = tevent_req_callback_data(
8331 subreq, struct tevent_req);
8332 struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state *state = tevent_req_data(
8333 req, struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state);
8334 NTSTATUS status;
8335 TALLOC_CTX *mem_ctx;
8337 if (state->out_mem_ctx) {
8338 mem_ctx = state->out_mem_ctx;
8339 } else {
8340 mem_ctx = state;
8343 status = state->dispatch_recv(subreq, mem_ctx);
8344 TALLOC_FREE(subreq);
8345 if (!NT_STATUS_IS_OK(status)) {
8346 tevent_req_nterror(req, status);
8347 return;
8350 /* Copy out parameters */
8352 /* Copy result */
8353 state->orig.out.result = state->tmp.out.result;
8355 /* Reset temporary structure */
8356 ZERO_STRUCT(state->tmp);
8358 if (DEBUGLEVEL >= 10) {
8359 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT, &state->orig);
8362 tevent_req_done(req);
8365 NTSTATUS rpccli_srvsvc_NETRDFSCREATEEXITPOINT_recv(struct tevent_req *req,
8366 TALLOC_CTX *mem_ctx,
8367 WERROR *result)
8369 struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state *state = tevent_req_data(
8370 req, struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state);
8371 NTSTATUS status;
8373 if (tevent_req_is_nterror(req, &status)) {
8374 tevent_req_received(req);
8375 return status;
8378 /* Steal possbile out parameters to the callers context */
8379 talloc_steal(mem_ctx, state->out_mem_ctx);
8381 /* Return result */
8382 *result = state->orig.out.result;
8384 tevent_req_received(req);
8385 return NT_STATUS_OK;
8388 NTSTATUS rpccli_srvsvc_NETRDFSCREATEEXITPOINT(struct rpc_pipe_client *cli,
8389 TALLOC_CTX *mem_ctx,
8390 WERROR *werror)
8392 struct srvsvc_NETRDFSCREATEEXITPOINT r;
8393 NTSTATUS status;
8395 /* In parameters */
8397 if (DEBUGLEVEL >= 10) {
8398 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT, &r);
8401 status = cli->dispatch(cli,
8402 mem_ctx,
8403 &ndr_table_srvsvc,
8404 NDR_SRVSVC_NETRDFSCREATEEXITPOINT,
8405 &r);
8407 if (!NT_STATUS_IS_OK(status)) {
8408 return status;
8411 if (DEBUGLEVEL >= 10) {
8412 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT, &r);
8415 if (NT_STATUS_IS_ERR(status)) {
8416 return status;
8419 /* Return variables */
8421 /* Return result */
8422 if (werror) {
8423 *werror = r.out.result;
8426 return werror_to_ntstatus(r.out.result);
8429 struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state {
8430 struct srvsvc_NETRDFSDELETEEXITPOINT orig;
8431 struct srvsvc_NETRDFSDELETEEXITPOINT tmp;
8432 TALLOC_CTX *out_mem_ctx;
8433 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8436 static void rpccli_srvsvc_NETRDFSDELETEEXITPOINT_done(struct tevent_req *subreq);
8438 struct tevent_req *rpccli_srvsvc_NETRDFSDELETEEXITPOINT_send(TALLOC_CTX *mem_ctx,
8439 struct tevent_context *ev,
8440 struct rpc_pipe_client *cli)
8442 struct tevent_req *req;
8443 struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state *state;
8444 struct tevent_req *subreq;
8446 req = tevent_req_create(mem_ctx, &state,
8447 struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state);
8448 if (req == NULL) {
8449 return NULL;
8451 state->out_mem_ctx = NULL;
8452 state->dispatch_recv = cli->dispatch_recv;
8454 /* In parameters */
8456 /* Out parameters */
8458 /* Result */
8459 ZERO_STRUCT(state->orig.out.result);
8461 if (DEBUGLEVEL >= 10) {
8462 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT, &state->orig);
8465 /* make a temporary copy, that we pass to the dispatch function */
8466 state->tmp = state->orig;
8468 subreq = cli->dispatch_send(state, ev, cli,
8469 &ndr_table_srvsvc,
8470 NDR_SRVSVC_NETRDFSDELETEEXITPOINT,
8471 &state->tmp);
8472 if (tevent_req_nomem(subreq, req)) {
8473 return tevent_req_post(req, ev);
8475 tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSDELETEEXITPOINT_done, req);
8476 return req;
8479 static void rpccli_srvsvc_NETRDFSDELETEEXITPOINT_done(struct tevent_req *subreq)
8481 struct tevent_req *req = tevent_req_callback_data(
8482 subreq, struct tevent_req);
8483 struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state *state = tevent_req_data(
8484 req, struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state);
8485 NTSTATUS status;
8486 TALLOC_CTX *mem_ctx;
8488 if (state->out_mem_ctx) {
8489 mem_ctx = state->out_mem_ctx;
8490 } else {
8491 mem_ctx = state;
8494 status = state->dispatch_recv(subreq, mem_ctx);
8495 TALLOC_FREE(subreq);
8496 if (!NT_STATUS_IS_OK(status)) {
8497 tevent_req_nterror(req, status);
8498 return;
8501 /* Copy out parameters */
8503 /* Copy result */
8504 state->orig.out.result = state->tmp.out.result;
8506 /* Reset temporary structure */
8507 ZERO_STRUCT(state->tmp);
8509 if (DEBUGLEVEL >= 10) {
8510 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT, &state->orig);
8513 tevent_req_done(req);
8516 NTSTATUS rpccli_srvsvc_NETRDFSDELETEEXITPOINT_recv(struct tevent_req *req,
8517 TALLOC_CTX *mem_ctx,
8518 WERROR *result)
8520 struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state *state = tevent_req_data(
8521 req, struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state);
8522 NTSTATUS status;
8524 if (tevent_req_is_nterror(req, &status)) {
8525 tevent_req_received(req);
8526 return status;
8529 /* Steal possbile out parameters to the callers context */
8530 talloc_steal(mem_ctx, state->out_mem_ctx);
8532 /* Return result */
8533 *result = state->orig.out.result;
8535 tevent_req_received(req);
8536 return NT_STATUS_OK;
8539 NTSTATUS rpccli_srvsvc_NETRDFSDELETEEXITPOINT(struct rpc_pipe_client *cli,
8540 TALLOC_CTX *mem_ctx,
8541 WERROR *werror)
8543 struct srvsvc_NETRDFSDELETEEXITPOINT r;
8544 NTSTATUS status;
8546 /* In parameters */
8548 if (DEBUGLEVEL >= 10) {
8549 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT, &r);
8552 status = cli->dispatch(cli,
8553 mem_ctx,
8554 &ndr_table_srvsvc,
8555 NDR_SRVSVC_NETRDFSDELETEEXITPOINT,
8556 &r);
8558 if (!NT_STATUS_IS_OK(status)) {
8559 return status;
8562 if (DEBUGLEVEL >= 10) {
8563 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT, &r);
8566 if (NT_STATUS_IS_ERR(status)) {
8567 return status;
8570 /* Return variables */
8572 /* Return result */
8573 if (werror) {
8574 *werror = r.out.result;
8577 return werror_to_ntstatus(r.out.result);
8580 struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state {
8581 struct srvsvc_NETRDFSMODIFYPREFIX orig;
8582 struct srvsvc_NETRDFSMODIFYPREFIX tmp;
8583 TALLOC_CTX *out_mem_ctx;
8584 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8587 static void rpccli_srvsvc_NETRDFSMODIFYPREFIX_done(struct tevent_req *subreq);
8589 struct tevent_req *rpccli_srvsvc_NETRDFSMODIFYPREFIX_send(TALLOC_CTX *mem_ctx,
8590 struct tevent_context *ev,
8591 struct rpc_pipe_client *cli)
8593 struct tevent_req *req;
8594 struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state *state;
8595 struct tevent_req *subreq;
8597 req = tevent_req_create(mem_ctx, &state,
8598 struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state);
8599 if (req == NULL) {
8600 return NULL;
8602 state->out_mem_ctx = NULL;
8603 state->dispatch_recv = cli->dispatch_recv;
8605 /* In parameters */
8607 /* Out parameters */
8609 /* Result */
8610 ZERO_STRUCT(state->orig.out.result);
8612 if (DEBUGLEVEL >= 10) {
8613 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSMODIFYPREFIX, &state->orig);
8616 /* make a temporary copy, that we pass to the dispatch function */
8617 state->tmp = state->orig;
8619 subreq = cli->dispatch_send(state, ev, cli,
8620 &ndr_table_srvsvc,
8621 NDR_SRVSVC_NETRDFSMODIFYPREFIX,
8622 &state->tmp);
8623 if (tevent_req_nomem(subreq, req)) {
8624 return tevent_req_post(req, ev);
8626 tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSMODIFYPREFIX_done, req);
8627 return req;
8630 static void rpccli_srvsvc_NETRDFSMODIFYPREFIX_done(struct tevent_req *subreq)
8632 struct tevent_req *req = tevent_req_callback_data(
8633 subreq, struct tevent_req);
8634 struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state *state = tevent_req_data(
8635 req, struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state);
8636 NTSTATUS status;
8637 TALLOC_CTX *mem_ctx;
8639 if (state->out_mem_ctx) {
8640 mem_ctx = state->out_mem_ctx;
8641 } else {
8642 mem_ctx = state;
8645 status = state->dispatch_recv(subreq, mem_ctx);
8646 TALLOC_FREE(subreq);
8647 if (!NT_STATUS_IS_OK(status)) {
8648 tevent_req_nterror(req, status);
8649 return;
8652 /* Copy out parameters */
8654 /* Copy result */
8655 state->orig.out.result = state->tmp.out.result;
8657 /* Reset temporary structure */
8658 ZERO_STRUCT(state->tmp);
8660 if (DEBUGLEVEL >= 10) {
8661 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMODIFYPREFIX, &state->orig);
8664 tevent_req_done(req);
8667 NTSTATUS rpccli_srvsvc_NETRDFSMODIFYPREFIX_recv(struct tevent_req *req,
8668 TALLOC_CTX *mem_ctx,
8669 WERROR *result)
8671 struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state *state = tevent_req_data(
8672 req, struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state);
8673 NTSTATUS status;
8675 if (tevent_req_is_nterror(req, &status)) {
8676 tevent_req_received(req);
8677 return status;
8680 /* Steal possbile out parameters to the callers context */
8681 talloc_steal(mem_ctx, state->out_mem_ctx);
8683 /* Return result */
8684 *result = state->orig.out.result;
8686 tevent_req_received(req);
8687 return NT_STATUS_OK;
8690 NTSTATUS rpccli_srvsvc_NETRDFSMODIFYPREFIX(struct rpc_pipe_client *cli,
8691 TALLOC_CTX *mem_ctx,
8692 WERROR *werror)
8694 struct srvsvc_NETRDFSMODIFYPREFIX r;
8695 NTSTATUS status;
8697 /* In parameters */
8699 if (DEBUGLEVEL >= 10) {
8700 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSMODIFYPREFIX, &r);
8703 status = cli->dispatch(cli,
8704 mem_ctx,
8705 &ndr_table_srvsvc,
8706 NDR_SRVSVC_NETRDFSMODIFYPREFIX,
8707 &r);
8709 if (!NT_STATUS_IS_OK(status)) {
8710 return status;
8713 if (DEBUGLEVEL >= 10) {
8714 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMODIFYPREFIX, &r);
8717 if (NT_STATUS_IS_ERR(status)) {
8718 return status;
8721 /* Return variables */
8723 /* Return result */
8724 if (werror) {
8725 *werror = r.out.result;
8728 return werror_to_ntstatus(r.out.result);
8731 struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state {
8732 struct srvsvc_NETRDFSFIXLOCALVOLUME orig;
8733 struct srvsvc_NETRDFSFIXLOCALVOLUME tmp;
8734 TALLOC_CTX *out_mem_ctx;
8735 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8738 static void rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_done(struct tevent_req *subreq);
8740 struct tevent_req *rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_send(TALLOC_CTX *mem_ctx,
8741 struct tevent_context *ev,
8742 struct rpc_pipe_client *cli)
8744 struct tevent_req *req;
8745 struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state *state;
8746 struct tevent_req *subreq;
8748 req = tevent_req_create(mem_ctx, &state,
8749 struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state);
8750 if (req == NULL) {
8751 return NULL;
8753 state->out_mem_ctx = NULL;
8754 state->dispatch_recv = cli->dispatch_recv;
8756 /* In parameters */
8758 /* Out parameters */
8760 /* Result */
8761 ZERO_STRUCT(state->orig.out.result);
8763 if (DEBUGLEVEL >= 10) {
8764 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME, &state->orig);
8767 /* make a temporary copy, that we pass to the dispatch function */
8768 state->tmp = state->orig;
8770 subreq = cli->dispatch_send(state, ev, cli,
8771 &ndr_table_srvsvc,
8772 NDR_SRVSVC_NETRDFSFIXLOCALVOLUME,
8773 &state->tmp);
8774 if (tevent_req_nomem(subreq, req)) {
8775 return tevent_req_post(req, ev);
8777 tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_done, req);
8778 return req;
8781 static void rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_done(struct tevent_req *subreq)
8783 struct tevent_req *req = tevent_req_callback_data(
8784 subreq, struct tevent_req);
8785 struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state *state = tevent_req_data(
8786 req, struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state);
8787 NTSTATUS status;
8788 TALLOC_CTX *mem_ctx;
8790 if (state->out_mem_ctx) {
8791 mem_ctx = state->out_mem_ctx;
8792 } else {
8793 mem_ctx = state;
8796 status = state->dispatch_recv(subreq, mem_ctx);
8797 TALLOC_FREE(subreq);
8798 if (!NT_STATUS_IS_OK(status)) {
8799 tevent_req_nterror(req, status);
8800 return;
8803 /* Copy out parameters */
8805 /* Copy result */
8806 state->orig.out.result = state->tmp.out.result;
8808 /* Reset temporary structure */
8809 ZERO_STRUCT(state->tmp);
8811 if (DEBUGLEVEL >= 10) {
8812 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME, &state->orig);
8815 tevent_req_done(req);
8818 NTSTATUS rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_recv(struct tevent_req *req,
8819 TALLOC_CTX *mem_ctx,
8820 WERROR *result)
8822 struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state *state = tevent_req_data(
8823 req, struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state);
8824 NTSTATUS status;
8826 if (tevent_req_is_nterror(req, &status)) {
8827 tevent_req_received(req);
8828 return status;
8831 /* Steal possbile out parameters to the callers context */
8832 talloc_steal(mem_ctx, state->out_mem_ctx);
8834 /* Return result */
8835 *result = state->orig.out.result;
8837 tevent_req_received(req);
8838 return NT_STATUS_OK;
8841 NTSTATUS rpccli_srvsvc_NETRDFSFIXLOCALVOLUME(struct rpc_pipe_client *cli,
8842 TALLOC_CTX *mem_ctx,
8843 WERROR *werror)
8845 struct srvsvc_NETRDFSFIXLOCALVOLUME r;
8846 NTSTATUS status;
8848 /* In parameters */
8850 if (DEBUGLEVEL >= 10) {
8851 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME, &r);
8854 status = cli->dispatch(cli,
8855 mem_ctx,
8856 &ndr_table_srvsvc,
8857 NDR_SRVSVC_NETRDFSFIXLOCALVOLUME,
8858 &r);
8860 if (!NT_STATUS_IS_OK(status)) {
8861 return status;
8864 if (DEBUGLEVEL >= 10) {
8865 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME, &r);
8868 if (NT_STATUS_IS_ERR(status)) {
8869 return status;
8872 /* Return variables */
8874 /* Return result */
8875 if (werror) {
8876 *werror = r.out.result;
8879 return werror_to_ntstatus(r.out.result);
8882 struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state {
8883 struct srvsvc_NETRDFSMANAGERREPORTSITEINFO orig;
8884 struct srvsvc_NETRDFSMANAGERREPORTSITEINFO tmp;
8885 TALLOC_CTX *out_mem_ctx;
8886 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8889 static void rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_done(struct tevent_req *subreq);
8891 struct tevent_req *rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_send(TALLOC_CTX *mem_ctx,
8892 struct tevent_context *ev,
8893 struct rpc_pipe_client *cli)
8895 struct tevent_req *req;
8896 struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state *state;
8897 struct tevent_req *subreq;
8899 req = tevent_req_create(mem_ctx, &state,
8900 struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state);
8901 if (req == NULL) {
8902 return NULL;
8904 state->out_mem_ctx = NULL;
8905 state->dispatch_recv = cli->dispatch_recv;
8907 /* In parameters */
8909 /* Out parameters */
8911 /* Result */
8912 ZERO_STRUCT(state->orig.out.result);
8914 if (DEBUGLEVEL >= 10) {
8915 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO, &state->orig);
8918 /* make a temporary copy, that we pass to the dispatch function */
8919 state->tmp = state->orig;
8921 subreq = cli->dispatch_send(state, ev, cli,
8922 &ndr_table_srvsvc,
8923 NDR_SRVSVC_NETRDFSMANAGERREPORTSITEINFO,
8924 &state->tmp);
8925 if (tevent_req_nomem(subreq, req)) {
8926 return tevent_req_post(req, ev);
8928 tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_done, req);
8929 return req;
8932 static void rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_done(struct tevent_req *subreq)
8934 struct tevent_req *req = tevent_req_callback_data(
8935 subreq, struct tevent_req);
8936 struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state *state = tevent_req_data(
8937 req, struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state);
8938 NTSTATUS status;
8939 TALLOC_CTX *mem_ctx;
8941 if (state->out_mem_ctx) {
8942 mem_ctx = state->out_mem_ctx;
8943 } else {
8944 mem_ctx = state;
8947 status = state->dispatch_recv(subreq, mem_ctx);
8948 TALLOC_FREE(subreq);
8949 if (!NT_STATUS_IS_OK(status)) {
8950 tevent_req_nterror(req, status);
8951 return;
8954 /* Copy out parameters */
8956 /* Copy result */
8957 state->orig.out.result = state->tmp.out.result;
8959 /* Reset temporary structure */
8960 ZERO_STRUCT(state->tmp);
8962 if (DEBUGLEVEL >= 10) {
8963 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO, &state->orig);
8966 tevent_req_done(req);
8969 NTSTATUS rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_recv(struct tevent_req *req,
8970 TALLOC_CTX *mem_ctx,
8971 WERROR *result)
8973 struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state *state = tevent_req_data(
8974 req, struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state);
8975 NTSTATUS status;
8977 if (tevent_req_is_nterror(req, &status)) {
8978 tevent_req_received(req);
8979 return status;
8982 /* Steal possbile out parameters to the callers context */
8983 talloc_steal(mem_ctx, state->out_mem_ctx);
8985 /* Return result */
8986 *result = state->orig.out.result;
8988 tevent_req_received(req);
8989 return NT_STATUS_OK;
8992 NTSTATUS rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct rpc_pipe_client *cli,
8993 TALLOC_CTX *mem_ctx,
8994 WERROR *werror)
8996 struct srvsvc_NETRDFSMANAGERREPORTSITEINFO r;
8997 NTSTATUS status;
8999 /* In parameters */
9001 if (DEBUGLEVEL >= 10) {
9002 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO, &r);
9005 status = cli->dispatch(cli,
9006 mem_ctx,
9007 &ndr_table_srvsvc,
9008 NDR_SRVSVC_NETRDFSMANAGERREPORTSITEINFO,
9009 &r);
9011 if (!NT_STATUS_IS_OK(status)) {
9012 return status;
9015 if (DEBUGLEVEL >= 10) {
9016 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO, &r);
9019 if (NT_STATUS_IS_ERR(status)) {
9020 return status;
9023 /* Return variables */
9025 /* Return result */
9026 if (werror) {
9027 *werror = r.out.result;
9030 return werror_to_ntstatus(r.out.result);
9033 struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state {
9034 struct srvsvc_NETRSERVERTRANSPORTDELEX orig;
9035 struct srvsvc_NETRSERVERTRANSPORTDELEX tmp;
9036 TALLOC_CTX *out_mem_ctx;
9037 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
9040 static void rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_done(struct tevent_req *subreq);
9042 struct tevent_req *rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_send(TALLOC_CTX *mem_ctx,
9043 struct tevent_context *ev,
9044 struct rpc_pipe_client *cli)
9046 struct tevent_req *req;
9047 struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state *state;
9048 struct tevent_req *subreq;
9050 req = tevent_req_create(mem_ctx, &state,
9051 struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state);
9052 if (req == NULL) {
9053 return NULL;
9055 state->out_mem_ctx = NULL;
9056 state->dispatch_recv = cli->dispatch_recv;
9058 /* In parameters */
9060 /* Out parameters */
9062 /* Result */
9063 ZERO_STRUCT(state->orig.out.result);
9065 if (DEBUGLEVEL >= 10) {
9066 NDR_PRINT_IN_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX, &state->orig);
9069 /* make a temporary copy, that we pass to the dispatch function */
9070 state->tmp = state->orig;
9072 subreq = cli->dispatch_send(state, ev, cli,
9073 &ndr_table_srvsvc,
9074 NDR_SRVSVC_NETRSERVERTRANSPORTDELEX,
9075 &state->tmp);
9076 if (tevent_req_nomem(subreq, req)) {
9077 return tevent_req_post(req, ev);
9079 tevent_req_set_callback(subreq, rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_done, req);
9080 return req;
9083 static void rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_done(struct tevent_req *subreq)
9085 struct tevent_req *req = tevent_req_callback_data(
9086 subreq, struct tevent_req);
9087 struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state *state = tevent_req_data(
9088 req, struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state);
9089 NTSTATUS status;
9090 TALLOC_CTX *mem_ctx;
9092 if (state->out_mem_ctx) {
9093 mem_ctx = state->out_mem_ctx;
9094 } else {
9095 mem_ctx = state;
9098 status = state->dispatch_recv(subreq, mem_ctx);
9099 TALLOC_FREE(subreq);
9100 if (!NT_STATUS_IS_OK(status)) {
9101 tevent_req_nterror(req, status);
9102 return;
9105 /* Copy out parameters */
9107 /* Copy result */
9108 state->orig.out.result = state->tmp.out.result;
9110 /* Reset temporary structure */
9111 ZERO_STRUCT(state->tmp);
9113 if (DEBUGLEVEL >= 10) {
9114 NDR_PRINT_OUT_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX, &state->orig);
9117 tevent_req_done(req);
9120 NTSTATUS rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_recv(struct tevent_req *req,
9121 TALLOC_CTX *mem_ctx,
9122 WERROR *result)
9124 struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state *state = tevent_req_data(
9125 req, struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state);
9126 NTSTATUS status;
9128 if (tevent_req_is_nterror(req, &status)) {
9129 tevent_req_received(req);
9130 return status;
9133 /* Steal possbile out parameters to the callers context */
9134 talloc_steal(mem_ctx, state->out_mem_ctx);
9136 /* Return result */
9137 *result = state->orig.out.result;
9139 tevent_req_received(req);
9140 return NT_STATUS_OK;
9143 NTSTATUS rpccli_srvsvc_NETRSERVERTRANSPORTDELEX(struct rpc_pipe_client *cli,
9144 TALLOC_CTX *mem_ctx,
9145 WERROR *werror)
9147 struct srvsvc_NETRSERVERTRANSPORTDELEX r;
9148 NTSTATUS status;
9150 /* In parameters */
9152 if (DEBUGLEVEL >= 10) {
9153 NDR_PRINT_IN_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX, &r);
9156 status = cli->dispatch(cli,
9157 mem_ctx,
9158 &ndr_table_srvsvc,
9159 NDR_SRVSVC_NETRSERVERTRANSPORTDELEX,
9160 &r);
9162 if (!NT_STATUS_IS_OK(status)) {
9163 return status;
9166 if (DEBUGLEVEL >= 10) {
9167 NDR_PRINT_OUT_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX, &r);
9170 if (NT_STATUS_IS_ERR(status)) {
9171 return status;
9174 /* Return variables */
9176 /* Return result */
9177 if (werror) {
9178 *werror = r.out.result;
9181 return werror_to_ntstatus(r.out.result);