s3-idmap: Fix bug #6286: Call init function for builtin idmap modules before probing...
[Samba.git] / librpc / gen_ndr / cli_wkssvc.c
blobc143058942cfcbc3cd046c1afa83cc94cf256450
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_wkssvc.h"
9 NTSTATUS rpccli_wkssvc_NetWkstaGetInfo(struct rpc_pipe_client *cli,
10 TALLOC_CTX *mem_ctx,
11 const char *server_name /* [in] [unique,charset(UTF16)] */,
12 uint32_t level /* [in] */,
13 union wkssvc_NetWkstaInfo *info /* [out] [ref,switch_is(level)] */,
14 WERROR *werror)
16 struct wkssvc_NetWkstaGetInfo r;
17 NTSTATUS status;
19 /* In parameters */
20 r.in.server_name = server_name;
21 r.in.level = level;
23 if (DEBUGLEVEL >= 10) {
24 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaGetInfo, &r);
27 status = cli->dispatch(cli,
28 mem_ctx,
29 &ndr_table_wkssvc,
30 NDR_WKSSVC_NETWKSTAGETINFO,
31 &r);
33 if (!NT_STATUS_IS_OK(status)) {
34 return status;
37 if (DEBUGLEVEL >= 10) {
38 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaGetInfo, &r);
41 if (NT_STATUS_IS_ERR(status)) {
42 return status;
45 /* Return variables */
46 *info = *r.out.info;
48 /* Return result */
49 if (werror) {
50 *werror = r.out.result;
53 return werror_to_ntstatus(r.out.result);
56 NTSTATUS rpccli_wkssvc_NetWkstaSetInfo(struct rpc_pipe_client *cli,
57 TALLOC_CTX *mem_ctx,
58 const char *server_name /* [in] [unique,charset(UTF16)] */,
59 uint32_t level /* [in] */,
60 union wkssvc_NetWkstaInfo *info /* [in] [ref,switch_is(level)] */,
61 uint32_t *parm_error /* [in,out] [ref] */,
62 WERROR *werror)
64 struct wkssvc_NetWkstaSetInfo r;
65 NTSTATUS status;
67 /* In parameters */
68 r.in.server_name = server_name;
69 r.in.level = level;
70 r.in.info = info;
71 r.in.parm_error = parm_error;
73 if (DEBUGLEVEL >= 10) {
74 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaSetInfo, &r);
77 status = cli->dispatch(cli,
78 mem_ctx,
79 &ndr_table_wkssvc,
80 NDR_WKSSVC_NETWKSTASETINFO,
81 &r);
83 if (!NT_STATUS_IS_OK(status)) {
84 return status;
87 if (DEBUGLEVEL >= 10) {
88 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaSetInfo, &r);
91 if (NT_STATUS_IS_ERR(status)) {
92 return status;
95 /* Return variables */
96 *parm_error = *r.out.parm_error;
98 /* Return result */
99 if (werror) {
100 *werror = r.out.result;
103 return werror_to_ntstatus(r.out.result);
106 NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli,
107 TALLOC_CTX *mem_ctx,
108 const char *server_name /* [in] [unique,charset(UTF16)] */,
109 struct wkssvc_NetWkstaEnumUsersInfo *info /* [in,out] [ref] */,
110 uint32_t prefmaxlen /* [in] */,
111 uint32_t *entries_read /* [out] [ref] */,
112 uint32_t *resume_handle /* [in,out] [unique] */,
113 WERROR *werror)
115 struct wkssvc_NetWkstaEnumUsers r;
116 NTSTATUS status;
118 /* In parameters */
119 r.in.server_name = server_name;
120 r.in.info = info;
121 r.in.prefmaxlen = prefmaxlen;
122 r.in.resume_handle = resume_handle;
124 if (DEBUGLEVEL >= 10) {
125 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaEnumUsers, &r);
128 status = cli->dispatch(cli,
129 mem_ctx,
130 &ndr_table_wkssvc,
131 NDR_WKSSVC_NETWKSTAENUMUSERS,
132 &r);
134 if (!NT_STATUS_IS_OK(status)) {
135 return status;
138 if (DEBUGLEVEL >= 10) {
139 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaEnumUsers, &r);
142 if (NT_STATUS_IS_ERR(status)) {
143 return status;
146 /* Return variables */
147 *info = *r.out.info;
148 *entries_read = *r.out.entries_read;
149 if (resume_handle && r.out.resume_handle) {
150 *resume_handle = *r.out.resume_handle;
153 /* Return result */
154 if (werror) {
155 *werror = r.out.result;
158 return werror_to_ntstatus(r.out.result);
161 NTSTATUS rpccli_wkssvc_NetrWkstaUserGetInfo(struct rpc_pipe_client *cli,
162 TALLOC_CTX *mem_ctx,
163 const char *unknown /* [in] [unique,charset(UTF16)] */,
164 uint32_t level /* [in] */,
165 union wkssvc_NetrWkstaUserInfo *info /* [out] [ref,switch_is(level)] */,
166 WERROR *werror)
168 struct wkssvc_NetrWkstaUserGetInfo r;
169 NTSTATUS status;
171 /* In parameters */
172 r.in.unknown = unknown;
173 r.in.level = level;
175 if (DEBUGLEVEL >= 10) {
176 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaUserGetInfo, &r);
179 status = cli->dispatch(cli,
180 mem_ctx,
181 &ndr_table_wkssvc,
182 NDR_WKSSVC_NETRWKSTAUSERGETINFO,
183 &r);
185 if (!NT_STATUS_IS_OK(status)) {
186 return status;
189 if (DEBUGLEVEL >= 10) {
190 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaUserGetInfo, &r);
193 if (NT_STATUS_IS_ERR(status)) {
194 return status;
197 /* Return variables */
198 *info = *r.out.info;
200 /* Return result */
201 if (werror) {
202 *werror = r.out.result;
205 return werror_to_ntstatus(r.out.result);
208 NTSTATUS rpccli_wkssvc_NetrWkstaUserSetInfo(struct rpc_pipe_client *cli,
209 TALLOC_CTX *mem_ctx,
210 const char *unknown /* [in] [unique,charset(UTF16)] */,
211 uint32_t level /* [in] */,
212 union wkssvc_NetrWkstaUserInfo *info /* [in] [ref,switch_is(level)] */,
213 uint32_t *parm_err /* [in,out] [unique] */,
214 WERROR *werror)
216 struct wkssvc_NetrWkstaUserSetInfo r;
217 NTSTATUS status;
219 /* In parameters */
220 r.in.unknown = unknown;
221 r.in.level = level;
222 r.in.info = info;
223 r.in.parm_err = parm_err;
225 if (DEBUGLEVEL >= 10) {
226 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaUserSetInfo, &r);
229 status = cli->dispatch(cli,
230 mem_ctx,
231 &ndr_table_wkssvc,
232 NDR_WKSSVC_NETRWKSTAUSERSETINFO,
233 &r);
235 if (!NT_STATUS_IS_OK(status)) {
236 return status;
239 if (DEBUGLEVEL >= 10) {
240 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaUserSetInfo, &r);
243 if (NT_STATUS_IS_ERR(status)) {
244 return status;
247 /* Return variables */
248 if (parm_err && r.out.parm_err) {
249 *parm_err = *r.out.parm_err;
252 /* Return result */
253 if (werror) {
254 *werror = r.out.result;
257 return werror_to_ntstatus(r.out.result);
260 NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum(struct rpc_pipe_client *cli,
261 TALLOC_CTX *mem_ctx,
262 const char *server_name /* [in] [unique,charset(UTF16)] */,
263 struct wkssvc_NetWkstaTransportInfo *info /* [in,out] [ref] */,
264 uint32_t max_buffer /* [in] */,
265 uint32_t *total_entries /* [out] [ref] */,
266 uint32_t *resume_handle /* [in,out] [unique] */,
267 WERROR *werror)
269 struct wkssvc_NetWkstaTransportEnum r;
270 NTSTATUS status;
272 /* In parameters */
273 r.in.server_name = server_name;
274 r.in.info = info;
275 r.in.max_buffer = max_buffer;
276 r.in.resume_handle = resume_handle;
278 if (DEBUGLEVEL >= 10) {
279 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaTransportEnum, &r);
282 status = cli->dispatch(cli,
283 mem_ctx,
284 &ndr_table_wkssvc,
285 NDR_WKSSVC_NETWKSTATRANSPORTENUM,
286 &r);
288 if (!NT_STATUS_IS_OK(status)) {
289 return status;
292 if (DEBUGLEVEL >= 10) {
293 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaTransportEnum, &r);
296 if (NT_STATUS_IS_ERR(status)) {
297 return status;
300 /* Return variables */
301 *info = *r.out.info;
302 *total_entries = *r.out.total_entries;
303 if (resume_handle && r.out.resume_handle) {
304 *resume_handle = *r.out.resume_handle;
307 /* Return result */
308 if (werror) {
309 *werror = r.out.result;
312 return werror_to_ntstatus(r.out.result);
315 NTSTATUS rpccli_wkssvc_NetrWkstaTransportAdd(struct rpc_pipe_client *cli,
316 TALLOC_CTX *mem_ctx,
317 const char *server_name /* [in] [unique,charset(UTF16)] */,
318 uint32_t level /* [in] */,
319 struct wkssvc_NetWkstaTransportInfo0 *info0 /* [in] [ref] */,
320 uint32_t *parm_err /* [in,out] [unique] */,
321 WERROR *werror)
323 struct wkssvc_NetrWkstaTransportAdd r;
324 NTSTATUS status;
326 /* In parameters */
327 r.in.server_name = server_name;
328 r.in.level = level;
329 r.in.info0 = info0;
330 r.in.parm_err = parm_err;
332 if (DEBUGLEVEL >= 10) {
333 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaTransportAdd, &r);
336 status = cli->dispatch(cli,
337 mem_ctx,
338 &ndr_table_wkssvc,
339 NDR_WKSSVC_NETRWKSTATRANSPORTADD,
340 &r);
342 if (!NT_STATUS_IS_OK(status)) {
343 return status;
346 if (DEBUGLEVEL >= 10) {
347 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaTransportAdd, &r);
350 if (NT_STATUS_IS_ERR(status)) {
351 return status;
354 /* Return variables */
355 if (parm_err && r.out.parm_err) {
356 *parm_err = *r.out.parm_err;
359 /* Return result */
360 if (werror) {
361 *werror = r.out.result;
364 return werror_to_ntstatus(r.out.result);
367 NTSTATUS rpccli_wkssvc_NetrWkstaTransportDel(struct rpc_pipe_client *cli,
368 TALLOC_CTX *mem_ctx,
369 const char *server_name /* [in] [unique,charset(UTF16)] */,
370 const char *transport_name /* [in] [unique,charset(UTF16)] */,
371 uint32_t unknown3 /* [in] */,
372 WERROR *werror)
374 struct wkssvc_NetrWkstaTransportDel r;
375 NTSTATUS status;
377 /* In parameters */
378 r.in.server_name = server_name;
379 r.in.transport_name = transport_name;
380 r.in.unknown3 = unknown3;
382 if (DEBUGLEVEL >= 10) {
383 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaTransportDel, &r);
386 status = cli->dispatch(cli,
387 mem_ctx,
388 &ndr_table_wkssvc,
389 NDR_WKSSVC_NETRWKSTATRANSPORTDEL,
390 &r);
392 if (!NT_STATUS_IS_OK(status)) {
393 return status;
396 if (DEBUGLEVEL >= 10) {
397 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaTransportDel, &r);
400 if (NT_STATUS_IS_ERR(status)) {
401 return status;
404 /* Return variables */
406 /* Return result */
407 if (werror) {
408 *werror = r.out.result;
411 return werror_to_ntstatus(r.out.result);
414 NTSTATUS rpccli_wkssvc_NetrUseAdd(struct rpc_pipe_client *cli,
415 TALLOC_CTX *mem_ctx,
416 const char *server_name /* [in] [unique,charset(UTF16)] */,
417 uint32_t level /* [in] */,
418 union wkssvc_NetrUseGetInfoCtr *ctr /* [in] [ref,switch_is(level)] */,
419 uint32_t *parm_err /* [in,out] [unique] */,
420 WERROR *werror)
422 struct wkssvc_NetrUseAdd r;
423 NTSTATUS status;
425 /* In parameters */
426 r.in.server_name = server_name;
427 r.in.level = level;
428 r.in.ctr = ctr;
429 r.in.parm_err = parm_err;
431 if (DEBUGLEVEL >= 10) {
432 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseAdd, &r);
435 status = cli->dispatch(cli,
436 mem_ctx,
437 &ndr_table_wkssvc,
438 NDR_WKSSVC_NETRUSEADD,
439 &r);
441 if (!NT_STATUS_IS_OK(status)) {
442 return status;
445 if (DEBUGLEVEL >= 10) {
446 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseAdd, &r);
449 if (NT_STATUS_IS_ERR(status)) {
450 return status;
453 /* Return variables */
454 if (parm_err && r.out.parm_err) {
455 *parm_err = *r.out.parm_err;
458 /* Return result */
459 if (werror) {
460 *werror = r.out.result;
463 return werror_to_ntstatus(r.out.result);
466 NTSTATUS rpccli_wkssvc_NetrUseGetInfo(struct rpc_pipe_client *cli,
467 TALLOC_CTX *mem_ctx,
468 const char *server_name /* [in] [unique,charset(UTF16)] */,
469 const char *use_name /* [in] [ref,charset(UTF16)] */,
470 uint32_t level /* [in] */,
471 union wkssvc_NetrUseGetInfoCtr *ctr /* [out] [ref,switch_is(level)] */,
472 WERROR *werror)
474 struct wkssvc_NetrUseGetInfo r;
475 NTSTATUS status;
477 /* In parameters */
478 r.in.server_name = server_name;
479 r.in.use_name = use_name;
480 r.in.level = level;
482 if (DEBUGLEVEL >= 10) {
483 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseGetInfo, &r);
486 status = cli->dispatch(cli,
487 mem_ctx,
488 &ndr_table_wkssvc,
489 NDR_WKSSVC_NETRUSEGETINFO,
490 &r);
492 if (!NT_STATUS_IS_OK(status)) {
493 return status;
496 if (DEBUGLEVEL >= 10) {
497 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseGetInfo, &r);
500 if (NT_STATUS_IS_ERR(status)) {
501 return status;
504 /* Return variables */
505 *ctr = *r.out.ctr;
507 /* Return result */
508 if (werror) {
509 *werror = r.out.result;
512 return werror_to_ntstatus(r.out.result);
515 NTSTATUS rpccli_wkssvc_NetrUseDel(struct rpc_pipe_client *cli,
516 TALLOC_CTX *mem_ctx,
517 const char *server_name /* [in] [unique,charset(UTF16)] */,
518 const char *use_name /* [in] [ref,charset(UTF16)] */,
519 uint32_t force_cond /* [in] */,
520 WERROR *werror)
522 struct wkssvc_NetrUseDel r;
523 NTSTATUS status;
525 /* In parameters */
526 r.in.server_name = server_name;
527 r.in.use_name = use_name;
528 r.in.force_cond = force_cond;
530 if (DEBUGLEVEL >= 10) {
531 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseDel, &r);
534 status = cli->dispatch(cli,
535 mem_ctx,
536 &ndr_table_wkssvc,
537 NDR_WKSSVC_NETRUSEDEL,
538 &r);
540 if (!NT_STATUS_IS_OK(status)) {
541 return status;
544 if (DEBUGLEVEL >= 10) {
545 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseDel, &r);
548 if (NT_STATUS_IS_ERR(status)) {
549 return status;
552 /* Return variables */
554 /* Return result */
555 if (werror) {
556 *werror = r.out.result;
559 return werror_to_ntstatus(r.out.result);
562 NTSTATUS rpccli_wkssvc_NetrUseEnum(struct rpc_pipe_client *cli,
563 TALLOC_CTX *mem_ctx,
564 const char *server_name /* [in] [unique,charset(UTF16)] */,
565 struct wkssvc_NetrUseEnumInfo *info /* [in,out] [ref] */,
566 uint32_t prefmaxlen /* [in] */,
567 uint32_t *entries_read /* [out] [ref] */,
568 uint32_t *resume_handle /* [in,out] [unique] */,
569 WERROR *werror)
571 struct wkssvc_NetrUseEnum r;
572 NTSTATUS status;
574 /* In parameters */
575 r.in.server_name = server_name;
576 r.in.info = info;
577 r.in.prefmaxlen = prefmaxlen;
578 r.in.resume_handle = resume_handle;
580 if (DEBUGLEVEL >= 10) {
581 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseEnum, &r);
584 status = cli->dispatch(cli,
585 mem_ctx,
586 &ndr_table_wkssvc,
587 NDR_WKSSVC_NETRUSEENUM,
588 &r);
590 if (!NT_STATUS_IS_OK(status)) {
591 return status;
594 if (DEBUGLEVEL >= 10) {
595 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseEnum, &r);
598 if (NT_STATUS_IS_ERR(status)) {
599 return status;
602 /* Return variables */
603 *info = *r.out.info;
604 *entries_read = *r.out.entries_read;
605 if (resume_handle && r.out.resume_handle) {
606 *resume_handle = *r.out.resume_handle;
609 /* Return result */
610 if (werror) {
611 *werror = r.out.result;
614 return werror_to_ntstatus(r.out.result);
617 NTSTATUS rpccli_wkssvc_NetrMessageBufferSend(struct rpc_pipe_client *cli,
618 TALLOC_CTX *mem_ctx,
619 const char *server_name /* [in] [unique,charset(UTF16)] */,
620 const char *message_name /* [in] [ref,charset(UTF16)] */,
621 const char *message_sender_name /* [in] [unique,charset(UTF16)] */,
622 uint8_t *message_buffer /* [in] [ref,size_is(message_size)] */,
623 uint32_t message_size /* [in] */,
624 WERROR *werror)
626 struct wkssvc_NetrMessageBufferSend r;
627 NTSTATUS status;
629 /* In parameters */
630 r.in.server_name = server_name;
631 r.in.message_name = message_name;
632 r.in.message_sender_name = message_sender_name;
633 r.in.message_buffer = message_buffer;
634 r.in.message_size = message_size;
636 if (DEBUGLEVEL >= 10) {
637 NDR_PRINT_IN_DEBUG(wkssvc_NetrMessageBufferSend, &r);
640 status = cli->dispatch(cli,
641 mem_ctx,
642 &ndr_table_wkssvc,
643 NDR_WKSSVC_NETRMESSAGEBUFFERSEND,
644 &r);
646 if (!NT_STATUS_IS_OK(status)) {
647 return status;
650 if (DEBUGLEVEL >= 10) {
651 NDR_PRINT_OUT_DEBUG(wkssvc_NetrMessageBufferSend, &r);
654 if (NT_STATUS_IS_ERR(status)) {
655 return status;
658 /* Return variables */
660 /* Return result */
661 if (werror) {
662 *werror = r.out.result;
665 return werror_to_ntstatus(r.out.result);
668 NTSTATUS rpccli_wkssvc_NetrWorkstationStatisticsGet(struct rpc_pipe_client *cli,
669 TALLOC_CTX *mem_ctx,
670 const char *server_name /* [in] [unique,charset(UTF16)] */,
671 const char *unknown2 /* [in] [unique,charset(UTF16)] */,
672 uint32_t unknown3 /* [in] */,
673 uint32_t unknown4 /* [in] */,
674 struct wkssvc_NetrWorkstationStatistics **info /* [out] [ref] */,
675 WERROR *werror)
677 struct wkssvc_NetrWorkstationStatisticsGet r;
678 NTSTATUS status;
680 /* In parameters */
681 r.in.server_name = server_name;
682 r.in.unknown2 = unknown2;
683 r.in.unknown3 = unknown3;
684 r.in.unknown4 = unknown4;
686 if (DEBUGLEVEL >= 10) {
687 NDR_PRINT_IN_DEBUG(wkssvc_NetrWorkstationStatisticsGet, &r);
690 status = cli->dispatch(cli,
691 mem_ctx,
692 &ndr_table_wkssvc,
693 NDR_WKSSVC_NETRWORKSTATIONSTATISTICSGET,
694 &r);
696 if (!NT_STATUS_IS_OK(status)) {
697 return status;
700 if (DEBUGLEVEL >= 10) {
701 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWorkstationStatisticsGet, &r);
704 if (NT_STATUS_IS_ERR(status)) {
705 return status;
708 /* Return variables */
709 *info = *r.out.info;
711 /* Return result */
712 if (werror) {
713 *werror = r.out.result;
716 return werror_to_ntstatus(r.out.result);
719 NTSTATUS rpccli_wkssvc_NetrLogonDomainNameAdd(struct rpc_pipe_client *cli,
720 TALLOC_CTX *mem_ctx,
721 const char *domain_name /* [in] [ref,charset(UTF16)] */,
722 WERROR *werror)
724 struct wkssvc_NetrLogonDomainNameAdd r;
725 NTSTATUS status;
727 /* In parameters */
728 r.in.domain_name = domain_name;
730 if (DEBUGLEVEL >= 10) {
731 NDR_PRINT_IN_DEBUG(wkssvc_NetrLogonDomainNameAdd, &r);
734 status = cli->dispatch(cli,
735 mem_ctx,
736 &ndr_table_wkssvc,
737 NDR_WKSSVC_NETRLOGONDOMAINNAMEADD,
738 &r);
740 if (!NT_STATUS_IS_OK(status)) {
741 return status;
744 if (DEBUGLEVEL >= 10) {
745 NDR_PRINT_OUT_DEBUG(wkssvc_NetrLogonDomainNameAdd, &r);
748 if (NT_STATUS_IS_ERR(status)) {
749 return status;
752 /* Return variables */
754 /* Return result */
755 if (werror) {
756 *werror = r.out.result;
759 return werror_to_ntstatus(r.out.result);
762 NTSTATUS rpccli_wkssvc_NetrLogonDomainNameDel(struct rpc_pipe_client *cli,
763 TALLOC_CTX *mem_ctx,
764 const char *domain_name /* [in] [ref,charset(UTF16)] */,
765 WERROR *werror)
767 struct wkssvc_NetrLogonDomainNameDel r;
768 NTSTATUS status;
770 /* In parameters */
771 r.in.domain_name = domain_name;
773 if (DEBUGLEVEL >= 10) {
774 NDR_PRINT_IN_DEBUG(wkssvc_NetrLogonDomainNameDel, &r);
777 status = cli->dispatch(cli,
778 mem_ctx,
779 &ndr_table_wkssvc,
780 NDR_WKSSVC_NETRLOGONDOMAINNAMEDEL,
781 &r);
783 if (!NT_STATUS_IS_OK(status)) {
784 return status;
787 if (DEBUGLEVEL >= 10) {
788 NDR_PRINT_OUT_DEBUG(wkssvc_NetrLogonDomainNameDel, &r);
791 if (NT_STATUS_IS_ERR(status)) {
792 return status;
795 /* Return variables */
797 /* Return result */
798 if (werror) {
799 *werror = r.out.result;
802 return werror_to_ntstatus(r.out.result);
805 NTSTATUS rpccli_wkssvc_NetrJoinDomain(struct rpc_pipe_client *cli,
806 TALLOC_CTX *mem_ctx,
807 const char *server_name /* [in] [unique,charset(UTF16)] */,
808 const char *domain_name /* [in] [ref,charset(UTF16)] */,
809 const char *account_ou /* [in] [unique,charset(UTF16)] */,
810 const char *Account /* [in] [unique,charset(UTF16)] */,
811 const char *password /* [in] [unique,charset(UTF16)] */,
812 uint32_t join_flags /* [in] */,
813 WERROR *werror)
815 struct wkssvc_NetrJoinDomain r;
816 NTSTATUS status;
818 /* In parameters */
819 r.in.server_name = server_name;
820 r.in.domain_name = domain_name;
821 r.in.account_ou = account_ou;
822 r.in.Account = Account;
823 r.in.password = password;
824 r.in.join_flags = join_flags;
826 if (DEBUGLEVEL >= 10) {
827 NDR_PRINT_IN_DEBUG(wkssvc_NetrJoinDomain, &r);
830 status = cli->dispatch(cli,
831 mem_ctx,
832 &ndr_table_wkssvc,
833 NDR_WKSSVC_NETRJOINDOMAIN,
834 &r);
836 if (!NT_STATUS_IS_OK(status)) {
837 return status;
840 if (DEBUGLEVEL >= 10) {
841 NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain, &r);
844 if (NT_STATUS_IS_ERR(status)) {
845 return status;
848 /* Return variables */
850 /* Return result */
851 if (werror) {
852 *werror = r.out.result;
855 return werror_to_ntstatus(r.out.result);
858 NTSTATUS rpccli_wkssvc_NetrUnjoinDomain(struct rpc_pipe_client *cli,
859 TALLOC_CTX *mem_ctx,
860 const char *server_name /* [in] [unique,charset(UTF16)] */,
861 const char *Account /* [in] [unique,charset(UTF16)] */,
862 const char *password /* [in] [unique,charset(UTF16)] */,
863 uint32_t unjoin_flags /* [in] */,
864 WERROR *werror)
866 struct wkssvc_NetrUnjoinDomain r;
867 NTSTATUS status;
869 /* In parameters */
870 r.in.server_name = server_name;
871 r.in.Account = Account;
872 r.in.password = password;
873 r.in.unjoin_flags = unjoin_flags;
875 if (DEBUGLEVEL >= 10) {
876 NDR_PRINT_IN_DEBUG(wkssvc_NetrUnjoinDomain, &r);
879 status = cli->dispatch(cli,
880 mem_ctx,
881 &ndr_table_wkssvc,
882 NDR_WKSSVC_NETRUNJOINDOMAIN,
883 &r);
885 if (!NT_STATUS_IS_OK(status)) {
886 return status;
889 if (DEBUGLEVEL >= 10) {
890 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain, &r);
893 if (NT_STATUS_IS_ERR(status)) {
894 return status;
897 /* Return variables */
899 /* Return result */
900 if (werror) {
901 *werror = r.out.result;
904 return werror_to_ntstatus(r.out.result);
907 NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain(struct rpc_pipe_client *cli,
908 TALLOC_CTX *mem_ctx,
909 const char *server_name /* [in] [unique,charset(UTF16)] */,
910 const char *NewMachineName /* [in] [unique,charset(UTF16)] */,
911 const char *Account /* [in] [unique,charset(UTF16)] */,
912 const char *password /* [in] [unique,charset(UTF16)] */,
913 uint32_t RenameOptions /* [in] */,
914 WERROR *werror)
916 struct wkssvc_NetrRenameMachineInDomain r;
917 NTSTATUS status;
919 /* In parameters */
920 r.in.server_name = server_name;
921 r.in.NewMachineName = NewMachineName;
922 r.in.Account = Account;
923 r.in.password = password;
924 r.in.RenameOptions = RenameOptions;
926 if (DEBUGLEVEL >= 10) {
927 NDR_PRINT_IN_DEBUG(wkssvc_NetrRenameMachineInDomain, &r);
930 status = cli->dispatch(cli,
931 mem_ctx,
932 &ndr_table_wkssvc,
933 NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN,
934 &r);
936 if (!NT_STATUS_IS_OK(status)) {
937 return status;
940 if (DEBUGLEVEL >= 10) {
941 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain, &r);
944 if (NT_STATUS_IS_ERR(status)) {
945 return status;
948 /* Return variables */
950 /* Return result */
951 if (werror) {
952 *werror = r.out.result;
955 return werror_to_ntstatus(r.out.result);
958 NTSTATUS rpccli_wkssvc_NetrValidateName(struct rpc_pipe_client *cli,
959 TALLOC_CTX *mem_ctx,
960 const char *server_name /* [in] [unique,charset(UTF16)] */,
961 const char *name /* [in] [ref,charset(UTF16)] */,
962 const char *Account /* [in] [unique,charset(UTF16)] */,
963 const char *Password /* [in] [unique,charset(UTF16)] */,
964 enum wkssvc_NetValidateNameType name_type /* [in] */,
965 WERROR *werror)
967 struct wkssvc_NetrValidateName r;
968 NTSTATUS status;
970 /* In parameters */
971 r.in.server_name = server_name;
972 r.in.name = name;
973 r.in.Account = Account;
974 r.in.Password = Password;
975 r.in.name_type = name_type;
977 if (DEBUGLEVEL >= 10) {
978 NDR_PRINT_IN_DEBUG(wkssvc_NetrValidateName, &r);
981 status = cli->dispatch(cli,
982 mem_ctx,
983 &ndr_table_wkssvc,
984 NDR_WKSSVC_NETRVALIDATENAME,
985 &r);
987 if (!NT_STATUS_IS_OK(status)) {
988 return status;
991 if (DEBUGLEVEL >= 10) {
992 NDR_PRINT_OUT_DEBUG(wkssvc_NetrValidateName, &r);
995 if (NT_STATUS_IS_ERR(status)) {
996 return status;
999 /* Return variables */
1001 /* Return result */
1002 if (werror) {
1003 *werror = r.out.result;
1006 return werror_to_ntstatus(r.out.result);
1009 NTSTATUS rpccli_wkssvc_NetrGetJoinInformation(struct rpc_pipe_client *cli,
1010 TALLOC_CTX *mem_ctx,
1011 const char *server_name /* [in] [unique,charset(UTF16)] */,
1012 const char **name_buffer /* [in,out] [ref,charset(UTF16)] */,
1013 enum wkssvc_NetJoinStatus *name_type /* [out] [ref] */,
1014 WERROR *werror)
1016 struct wkssvc_NetrGetJoinInformation r;
1017 NTSTATUS status;
1019 /* In parameters */
1020 r.in.server_name = server_name;
1021 r.in.name_buffer = name_buffer;
1023 if (DEBUGLEVEL >= 10) {
1024 NDR_PRINT_IN_DEBUG(wkssvc_NetrGetJoinInformation, &r);
1027 status = cli->dispatch(cli,
1028 mem_ctx,
1029 &ndr_table_wkssvc,
1030 NDR_WKSSVC_NETRGETJOININFORMATION,
1031 &r);
1033 if (!NT_STATUS_IS_OK(status)) {
1034 return status;
1037 if (DEBUGLEVEL >= 10) {
1038 NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinInformation, &r);
1041 if (NT_STATUS_IS_ERR(status)) {
1042 return status;
1045 /* Return variables */
1046 *name_buffer = *r.out.name_buffer;
1047 *name_type = *r.out.name_type;
1049 /* Return result */
1050 if (werror) {
1051 *werror = r.out.result;
1054 return werror_to_ntstatus(r.out.result);
1057 NTSTATUS rpccli_wkssvc_NetrGetJoinableOus(struct rpc_pipe_client *cli,
1058 TALLOC_CTX *mem_ctx,
1059 const char *server_name /* [in] [unique,charset(UTF16)] */,
1060 const char *domain_name /* [in] [ref,charset(UTF16)] */,
1061 const char *Account /* [in] [unique,charset(UTF16)] */,
1062 const char *unknown /* [in] [unique,charset(UTF16)] */,
1063 uint32_t *num_ous /* [in,out] [ref] */,
1064 const char ***ous /* [out] [ref,charset(UTF16),size_is(,*num_ous)] */,
1065 WERROR *werror)
1067 struct wkssvc_NetrGetJoinableOus r;
1068 NTSTATUS status;
1070 /* In parameters */
1071 r.in.server_name = server_name;
1072 r.in.domain_name = domain_name;
1073 r.in.Account = Account;
1074 r.in.unknown = unknown;
1075 r.in.num_ous = num_ous;
1077 if (DEBUGLEVEL >= 10) {
1078 NDR_PRINT_IN_DEBUG(wkssvc_NetrGetJoinableOus, &r);
1081 status = cli->dispatch(cli,
1082 mem_ctx,
1083 &ndr_table_wkssvc,
1084 NDR_WKSSVC_NETRGETJOINABLEOUS,
1085 &r);
1087 if (!NT_STATUS_IS_OK(status)) {
1088 return status;
1091 if (DEBUGLEVEL >= 10) {
1092 NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinableOus, &r);
1095 if (NT_STATUS_IS_ERR(status)) {
1096 return status;
1099 /* Return variables */
1100 *num_ous = *r.out.num_ous;
1101 *ous = *r.out.ous;
1103 /* Return result */
1104 if (werror) {
1105 *werror = r.out.result;
1108 return werror_to_ntstatus(r.out.result);
1111 NTSTATUS rpccli_wkssvc_NetrJoinDomain2(struct rpc_pipe_client *cli,
1112 TALLOC_CTX *mem_ctx,
1113 const char *server_name /* [in] [unique,charset(UTF16)] */,
1114 const char *domain_name /* [in] [ref,charset(UTF16)] */,
1115 const char *account_ou /* [in] [unique,charset(UTF16)] */,
1116 const char *admin_account /* [in] [unique,charset(UTF16)] */,
1117 struct wkssvc_PasswordBuffer *encrypted_password /* [in] [unique] */,
1118 uint32_t join_flags /* [in] */,
1119 WERROR *werror)
1121 struct wkssvc_NetrJoinDomain2 r;
1122 NTSTATUS status;
1124 /* In parameters */
1125 r.in.server_name = server_name;
1126 r.in.domain_name = domain_name;
1127 r.in.account_ou = account_ou;
1128 r.in.admin_account = admin_account;
1129 r.in.encrypted_password = encrypted_password;
1130 r.in.join_flags = join_flags;
1132 if (DEBUGLEVEL >= 10) {
1133 NDR_PRINT_IN_DEBUG(wkssvc_NetrJoinDomain2, &r);
1136 status = cli->dispatch(cli,
1137 mem_ctx,
1138 &ndr_table_wkssvc,
1139 NDR_WKSSVC_NETRJOINDOMAIN2,
1140 &r);
1142 if (!NT_STATUS_IS_OK(status)) {
1143 return status;
1146 if (DEBUGLEVEL >= 10) {
1147 NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain2, &r);
1150 if (NT_STATUS_IS_ERR(status)) {
1151 return status;
1154 /* Return variables */
1156 /* Return result */
1157 if (werror) {
1158 *werror = r.out.result;
1161 return werror_to_ntstatus(r.out.result);
1164 NTSTATUS rpccli_wkssvc_NetrUnjoinDomain2(struct rpc_pipe_client *cli,
1165 TALLOC_CTX *mem_ctx,
1166 const char *server_name /* [in] [unique,charset(UTF16)] */,
1167 const char *account /* [in] [unique,charset(UTF16)] */,
1168 struct wkssvc_PasswordBuffer *encrypted_password /* [in] [unique] */,
1169 uint32_t unjoin_flags /* [in] */,
1170 WERROR *werror)
1172 struct wkssvc_NetrUnjoinDomain2 r;
1173 NTSTATUS status;
1175 /* In parameters */
1176 r.in.server_name = server_name;
1177 r.in.account = account;
1178 r.in.encrypted_password = encrypted_password;
1179 r.in.unjoin_flags = unjoin_flags;
1181 if (DEBUGLEVEL >= 10) {
1182 NDR_PRINT_IN_DEBUG(wkssvc_NetrUnjoinDomain2, &r);
1185 status = cli->dispatch(cli,
1186 mem_ctx,
1187 &ndr_table_wkssvc,
1188 NDR_WKSSVC_NETRUNJOINDOMAIN2,
1189 &r);
1191 if (!NT_STATUS_IS_OK(status)) {
1192 return status;
1195 if (DEBUGLEVEL >= 10) {
1196 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain2, &r);
1199 if (NT_STATUS_IS_ERR(status)) {
1200 return status;
1203 /* Return variables */
1205 /* Return result */
1206 if (werror) {
1207 *werror = r.out.result;
1210 return werror_to_ntstatus(r.out.result);
1213 NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain2(struct rpc_pipe_client *cli,
1214 TALLOC_CTX *mem_ctx,
1215 const char *server_name /* [in] [unique,charset(UTF16)] */,
1216 const char *NewMachineName /* [in] [unique,charset(UTF16)] */,
1217 const char *Account /* [in] [unique,charset(UTF16)] */,
1218 struct wkssvc_PasswordBuffer *EncryptedPassword /* [in] [unique] */,
1219 uint32_t RenameOptions /* [in] */,
1220 WERROR *werror)
1222 struct wkssvc_NetrRenameMachineInDomain2 r;
1223 NTSTATUS status;
1225 /* In parameters */
1226 r.in.server_name = server_name;
1227 r.in.NewMachineName = NewMachineName;
1228 r.in.Account = Account;
1229 r.in.EncryptedPassword = EncryptedPassword;
1230 r.in.RenameOptions = RenameOptions;
1232 if (DEBUGLEVEL >= 10) {
1233 NDR_PRINT_IN_DEBUG(wkssvc_NetrRenameMachineInDomain2, &r);
1236 status = cli->dispatch(cli,
1237 mem_ctx,
1238 &ndr_table_wkssvc,
1239 NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2,
1240 &r);
1242 if (!NT_STATUS_IS_OK(status)) {
1243 return status;
1246 if (DEBUGLEVEL >= 10) {
1247 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain2, &r);
1250 if (NT_STATUS_IS_ERR(status)) {
1251 return status;
1254 /* Return variables */
1256 /* Return result */
1257 if (werror) {
1258 *werror = r.out.result;
1261 return werror_to_ntstatus(r.out.result);
1264 NTSTATUS rpccli_wkssvc_NetrValidateName2(struct rpc_pipe_client *cli,
1265 TALLOC_CTX *mem_ctx,
1266 const char *server_name /* [in] [unique,charset(UTF16)] */,
1267 const char *name /* [in] [ref,charset(UTF16)] */,
1268 const char *Account /* [in] [unique,charset(UTF16)] */,
1269 struct wkssvc_PasswordBuffer *EncryptedPassword /* [in] [unique] */,
1270 enum wkssvc_NetValidateNameType name_type /* [in] */,
1271 WERROR *werror)
1273 struct wkssvc_NetrValidateName2 r;
1274 NTSTATUS status;
1276 /* In parameters */
1277 r.in.server_name = server_name;
1278 r.in.name = name;
1279 r.in.Account = Account;
1280 r.in.EncryptedPassword = EncryptedPassword;
1281 r.in.name_type = name_type;
1283 if (DEBUGLEVEL >= 10) {
1284 NDR_PRINT_IN_DEBUG(wkssvc_NetrValidateName2, &r);
1287 status = cli->dispatch(cli,
1288 mem_ctx,
1289 &ndr_table_wkssvc,
1290 NDR_WKSSVC_NETRVALIDATENAME2,
1291 &r);
1293 if (!NT_STATUS_IS_OK(status)) {
1294 return status;
1297 if (DEBUGLEVEL >= 10) {
1298 NDR_PRINT_OUT_DEBUG(wkssvc_NetrValidateName2, &r);
1301 if (NT_STATUS_IS_ERR(status)) {
1302 return status;
1305 /* Return variables */
1307 /* Return result */
1308 if (werror) {
1309 *werror = r.out.result;
1312 return werror_to_ntstatus(r.out.result);
1315 NTSTATUS rpccli_wkssvc_NetrGetJoinableOus2(struct rpc_pipe_client *cli,
1316 TALLOC_CTX *mem_ctx,
1317 const char *server_name /* [in] [unique,charset(UTF16)] */,
1318 const char *domain_name /* [in] [ref,charset(UTF16)] */,
1319 const char *Account /* [in] [unique,charset(UTF16)] */,
1320 struct wkssvc_PasswordBuffer *EncryptedPassword /* [in] [unique] */,
1321 uint32_t *num_ous /* [in,out] [ref] */,
1322 const char ***ous /* [out] [ref,charset(UTF16),size_is(,*num_ous)] */,
1323 WERROR *werror)
1325 struct wkssvc_NetrGetJoinableOus2 r;
1326 NTSTATUS status;
1328 /* In parameters */
1329 r.in.server_name = server_name;
1330 r.in.domain_name = domain_name;
1331 r.in.Account = Account;
1332 r.in.EncryptedPassword = EncryptedPassword;
1333 r.in.num_ous = num_ous;
1335 if (DEBUGLEVEL >= 10) {
1336 NDR_PRINT_IN_DEBUG(wkssvc_NetrGetJoinableOus2, &r);
1339 status = cli->dispatch(cli,
1340 mem_ctx,
1341 &ndr_table_wkssvc,
1342 NDR_WKSSVC_NETRGETJOINABLEOUS2,
1343 &r);
1345 if (!NT_STATUS_IS_OK(status)) {
1346 return status;
1349 if (DEBUGLEVEL >= 10) {
1350 NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinableOus2, &r);
1353 if (NT_STATUS_IS_ERR(status)) {
1354 return status;
1357 /* Return variables */
1358 *num_ous = *r.out.num_ous;
1359 *ous = *r.out.ous;
1361 /* Return result */
1362 if (werror) {
1363 *werror = r.out.result;
1366 return werror_to_ntstatus(r.out.result);
1369 NTSTATUS rpccli_wkssvc_NetrAddAlternateComputerName(struct rpc_pipe_client *cli,
1370 TALLOC_CTX *mem_ctx,
1371 const char *server_name /* [in] [unique,charset(UTF16)] */,
1372 const char *NewAlternateMachineName /* [in] [unique,charset(UTF16)] */,
1373 const char *Account /* [in] [unique,charset(UTF16)] */,
1374 struct wkssvc_PasswordBuffer *EncryptedPassword /* [in] [unique] */,
1375 uint32_t Reserved /* [in] */,
1376 WERROR *werror)
1378 struct wkssvc_NetrAddAlternateComputerName r;
1379 NTSTATUS status;
1381 /* In parameters */
1382 r.in.server_name = server_name;
1383 r.in.NewAlternateMachineName = NewAlternateMachineName;
1384 r.in.Account = Account;
1385 r.in.EncryptedPassword = EncryptedPassword;
1386 r.in.Reserved = Reserved;
1388 if (DEBUGLEVEL >= 10) {
1389 NDR_PRINT_IN_DEBUG(wkssvc_NetrAddAlternateComputerName, &r);
1392 status = cli->dispatch(cli,
1393 mem_ctx,
1394 &ndr_table_wkssvc,
1395 NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME,
1396 &r);
1398 if (!NT_STATUS_IS_OK(status)) {
1399 return status;
1402 if (DEBUGLEVEL >= 10) {
1403 NDR_PRINT_OUT_DEBUG(wkssvc_NetrAddAlternateComputerName, &r);
1406 if (NT_STATUS_IS_ERR(status)) {
1407 return status;
1410 /* Return variables */
1412 /* Return result */
1413 if (werror) {
1414 *werror = r.out.result;
1417 return werror_to_ntstatus(r.out.result);
1420 NTSTATUS rpccli_wkssvc_NetrRemoveAlternateComputerName(struct rpc_pipe_client *cli,
1421 TALLOC_CTX *mem_ctx,
1422 const char *server_name /* [in] [unique,charset(UTF16)] */,
1423 const char *AlternateMachineNameToRemove /* [in] [unique,charset(UTF16)] */,
1424 const char *Account /* [in] [unique,charset(UTF16)] */,
1425 struct wkssvc_PasswordBuffer *EncryptedPassword /* [in] [unique] */,
1426 uint32_t Reserved /* [in] */,
1427 WERROR *werror)
1429 struct wkssvc_NetrRemoveAlternateComputerName r;
1430 NTSTATUS status;
1432 /* In parameters */
1433 r.in.server_name = server_name;
1434 r.in.AlternateMachineNameToRemove = AlternateMachineNameToRemove;
1435 r.in.Account = Account;
1436 r.in.EncryptedPassword = EncryptedPassword;
1437 r.in.Reserved = Reserved;
1439 if (DEBUGLEVEL >= 10) {
1440 NDR_PRINT_IN_DEBUG(wkssvc_NetrRemoveAlternateComputerName, &r);
1443 status = cli->dispatch(cli,
1444 mem_ctx,
1445 &ndr_table_wkssvc,
1446 NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME,
1447 &r);
1449 if (!NT_STATUS_IS_OK(status)) {
1450 return status;
1453 if (DEBUGLEVEL >= 10) {
1454 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRemoveAlternateComputerName, &r);
1457 if (NT_STATUS_IS_ERR(status)) {
1458 return status;
1461 /* Return variables */
1463 /* Return result */
1464 if (werror) {
1465 *werror = r.out.result;
1468 return werror_to_ntstatus(r.out.result);
1471 NTSTATUS rpccli_wkssvc_NetrSetPrimaryComputername(struct rpc_pipe_client *cli,
1472 TALLOC_CTX *mem_ctx,
1473 const char *server_name /* [in] [unique,charset(UTF16)] */,
1474 const char *primary_name /* [in] [unique,charset(UTF16)] */,
1475 const char *Account /* [in] [unique,charset(UTF16)] */,
1476 struct wkssvc_PasswordBuffer *EncryptedPassword /* [in] [unique] */,
1477 uint32_t Reserved /* [in] */,
1478 WERROR *werror)
1480 struct wkssvc_NetrSetPrimaryComputername r;
1481 NTSTATUS status;
1483 /* In parameters */
1484 r.in.server_name = server_name;
1485 r.in.primary_name = primary_name;
1486 r.in.Account = Account;
1487 r.in.EncryptedPassword = EncryptedPassword;
1488 r.in.Reserved = Reserved;
1490 if (DEBUGLEVEL >= 10) {
1491 NDR_PRINT_IN_DEBUG(wkssvc_NetrSetPrimaryComputername, &r);
1494 status = cli->dispatch(cli,
1495 mem_ctx,
1496 &ndr_table_wkssvc,
1497 NDR_WKSSVC_NETRSETPRIMARYCOMPUTERNAME,
1498 &r);
1500 if (!NT_STATUS_IS_OK(status)) {
1501 return status;
1504 if (DEBUGLEVEL >= 10) {
1505 NDR_PRINT_OUT_DEBUG(wkssvc_NetrSetPrimaryComputername, &r);
1508 if (NT_STATUS_IS_ERR(status)) {
1509 return status;
1512 /* Return variables */
1514 /* Return result */
1515 if (werror) {
1516 *werror = r.out.result;
1519 return werror_to_ntstatus(r.out.result);
1522 NTSTATUS rpccli_wkssvc_NetrEnumerateComputerNames(struct rpc_pipe_client *cli,
1523 TALLOC_CTX *mem_ctx,
1524 const char *server_name /* [in] [unique,charset(UTF16)] */,
1525 enum wkssvc_ComputerNameType name_type /* [in] */,
1526 uint32_t Reserved /* [in] */,
1527 struct wkssvc_ComputerNamesCtr **ctr /* [out] [ref] */,
1528 WERROR *werror)
1530 struct wkssvc_NetrEnumerateComputerNames r;
1531 NTSTATUS status;
1533 /* In parameters */
1534 r.in.server_name = server_name;
1535 r.in.name_type = name_type;
1536 r.in.Reserved = Reserved;
1538 if (DEBUGLEVEL >= 10) {
1539 NDR_PRINT_IN_DEBUG(wkssvc_NetrEnumerateComputerNames, &r);
1542 status = cli->dispatch(cli,
1543 mem_ctx,
1544 &ndr_table_wkssvc,
1545 NDR_WKSSVC_NETRENUMERATECOMPUTERNAMES,
1546 &r);
1548 if (!NT_STATUS_IS_OK(status)) {
1549 return status;
1552 if (DEBUGLEVEL >= 10) {
1553 NDR_PRINT_OUT_DEBUG(wkssvc_NetrEnumerateComputerNames, &r);
1556 if (NT_STATUS_IS_ERR(status)) {
1557 return status;
1560 /* Return variables */
1561 *ctr = *r.out.ctr;
1563 /* Return result */
1564 if (werror) {
1565 *werror = r.out.result;
1568 return werror_to_ntstatus(r.out.result);