2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/cli_wkssvc.h"
9 NTSTATUS
rpccli_wkssvc_NetWkstaGetInfo(struct rpc_pipe_client
*cli
,
11 const char *server_name
/* [in] [unique,charset(UTF16)] */,
12 uint32_t level
/* [in] */,
13 union wkssvc_NetWkstaInfo
*info
/* [out] [ref,switch_is(level)] */,
16 struct wkssvc_NetWkstaGetInfo r
;
20 r
.in
.server_name
= server_name
;
23 if (DEBUGLEVEL
>= 10) {
24 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaGetInfo
, &r
);
27 status
= cli
->dispatch(cli
,
30 NDR_WKSSVC_NETWKSTAGETINFO
,
33 if (!NT_STATUS_IS_OK(status
)) {
37 if (DEBUGLEVEL
>= 10) {
38 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaGetInfo
, &r
);
41 if (NT_STATUS_IS_ERR(status
)) {
45 /* Return variables */
50 *werror
= r
.out
.result
;
53 return werror_to_ntstatus(r
.out
.result
);
56 NTSTATUS
rpccli_wkssvc_NetWkstaSetInfo(struct rpc_pipe_client
*cli
,
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] */,
64 struct wkssvc_NetWkstaSetInfo r
;
68 r
.in
.server_name
= server_name
;
71 r
.in
.parm_error
= parm_error
;
73 if (DEBUGLEVEL
>= 10) {
74 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaSetInfo
, &r
);
77 status
= cli
->dispatch(cli
,
80 NDR_WKSSVC_NETWKSTASETINFO
,
83 if (!NT_STATUS_IS_OK(status
)) {
87 if (DEBUGLEVEL
>= 10) {
88 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaSetInfo
, &r
);
91 if (NT_STATUS_IS_ERR(status
)) {
95 /* Return variables */
96 *parm_error
= *r
.out
.parm_error
;
100 *werror
= r
.out
.result
;
103 return werror_to_ntstatus(r
.out
.result
);
106 NTSTATUS
rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client
*cli
,
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] */,
115 struct wkssvc_NetWkstaEnumUsers r
;
119 r
.in
.server_name
= server_name
;
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
,
131 NDR_WKSSVC_NETWKSTAENUMUSERS
,
134 if (!NT_STATUS_IS_OK(status
)) {
138 if (DEBUGLEVEL
>= 10) {
139 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaEnumUsers
, &r
);
142 if (NT_STATUS_IS_ERR(status
)) {
146 /* Return variables */
148 *entries_read
= *r
.out
.entries_read
;
149 if (resume_handle
&& r
.out
.resume_handle
) {
150 *resume_handle
= *r
.out
.resume_handle
;
155 *werror
= r
.out
.result
;
158 return werror_to_ntstatus(r
.out
.result
);
161 NTSTATUS
rpccli_wkssvc_NetrWkstaUserGetInfo(struct rpc_pipe_client
*cli
,
163 const char *unknown
/* [in] [unique,charset(UTF16)] */,
164 uint32_t level
/* [in] */,
165 union wkssvc_NetrWkstaUserInfo
*info
/* [out] [ref,switch_is(level)] */,
168 struct wkssvc_NetrWkstaUserGetInfo r
;
172 r
.in
.unknown
= unknown
;
175 if (DEBUGLEVEL
>= 10) {
176 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaUserGetInfo
, &r
);
179 status
= cli
->dispatch(cli
,
182 NDR_WKSSVC_NETRWKSTAUSERGETINFO
,
185 if (!NT_STATUS_IS_OK(status
)) {
189 if (DEBUGLEVEL
>= 10) {
190 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaUserGetInfo
, &r
);
193 if (NT_STATUS_IS_ERR(status
)) {
197 /* Return variables */
202 *werror
= r
.out
.result
;
205 return werror_to_ntstatus(r
.out
.result
);
208 NTSTATUS
rpccli_wkssvc_NetrWkstaUserSetInfo(struct rpc_pipe_client
*cli
,
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] */,
216 struct wkssvc_NetrWkstaUserSetInfo r
;
220 r
.in
.unknown
= unknown
;
223 r
.in
.parm_err
= parm_err
;
225 if (DEBUGLEVEL
>= 10) {
226 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaUserSetInfo
, &r
);
229 status
= cli
->dispatch(cli
,
232 NDR_WKSSVC_NETRWKSTAUSERSETINFO
,
235 if (!NT_STATUS_IS_OK(status
)) {
239 if (DEBUGLEVEL
>= 10) {
240 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaUserSetInfo
, &r
);
243 if (NT_STATUS_IS_ERR(status
)) {
247 /* Return variables */
248 if (parm_err
&& r
.out
.parm_err
) {
249 *parm_err
= *r
.out
.parm_err
;
254 *werror
= r
.out
.result
;
257 return werror_to_ntstatus(r
.out
.result
);
260 NTSTATUS
rpccli_wkssvc_NetWkstaTransportEnum(struct rpc_pipe_client
*cli
,
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] */,
269 struct wkssvc_NetWkstaTransportEnum r
;
273 r
.in
.server_name
= server_name
;
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
,
285 NDR_WKSSVC_NETWKSTATRANSPORTENUM
,
288 if (!NT_STATUS_IS_OK(status
)) {
292 if (DEBUGLEVEL
>= 10) {
293 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaTransportEnum
, &r
);
296 if (NT_STATUS_IS_ERR(status
)) {
300 /* Return variables */
302 *total_entries
= *r
.out
.total_entries
;
303 if (resume_handle
&& r
.out
.resume_handle
) {
304 *resume_handle
= *r
.out
.resume_handle
;
309 *werror
= r
.out
.result
;
312 return werror_to_ntstatus(r
.out
.result
);
315 NTSTATUS
rpccli_wkssvc_NetrWkstaTransportAdd(struct rpc_pipe_client
*cli
,
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] */,
323 struct wkssvc_NetrWkstaTransportAdd r
;
327 r
.in
.server_name
= server_name
;
330 r
.in
.parm_err
= parm_err
;
332 if (DEBUGLEVEL
>= 10) {
333 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaTransportAdd
, &r
);
336 status
= cli
->dispatch(cli
,
339 NDR_WKSSVC_NETRWKSTATRANSPORTADD
,
342 if (!NT_STATUS_IS_OK(status
)) {
346 if (DEBUGLEVEL
>= 10) {
347 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaTransportAdd
, &r
);
350 if (NT_STATUS_IS_ERR(status
)) {
354 /* Return variables */
355 if (parm_err
&& r
.out
.parm_err
) {
356 *parm_err
= *r
.out
.parm_err
;
361 *werror
= r
.out
.result
;
364 return werror_to_ntstatus(r
.out
.result
);
367 NTSTATUS
rpccli_wkssvc_NetrWkstaTransportDel(struct rpc_pipe_client
*cli
,
369 const char *server_name
/* [in] [unique,charset(UTF16)] */,
370 const char *transport_name
/* [in] [unique,charset(UTF16)] */,
371 uint32_t unknown3
/* [in] */,
374 struct wkssvc_NetrWkstaTransportDel r
;
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
,
389 NDR_WKSSVC_NETRWKSTATRANSPORTDEL
,
392 if (!NT_STATUS_IS_OK(status
)) {
396 if (DEBUGLEVEL
>= 10) {
397 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaTransportDel
, &r
);
400 if (NT_STATUS_IS_ERR(status
)) {
404 /* Return variables */
408 *werror
= r
.out
.result
;
411 return werror_to_ntstatus(r
.out
.result
);
414 NTSTATUS
rpccli_wkssvc_NetrUseAdd(struct rpc_pipe_client
*cli
,
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] */,
422 struct wkssvc_NetrUseAdd r
;
426 r
.in
.server_name
= server_name
;
429 r
.in
.parm_err
= parm_err
;
431 if (DEBUGLEVEL
>= 10) {
432 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseAdd
, &r
);
435 status
= cli
->dispatch(cli
,
438 NDR_WKSSVC_NETRUSEADD
,
441 if (!NT_STATUS_IS_OK(status
)) {
445 if (DEBUGLEVEL
>= 10) {
446 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseAdd
, &r
);
449 if (NT_STATUS_IS_ERR(status
)) {
453 /* Return variables */
454 if (parm_err
&& r
.out
.parm_err
) {
455 *parm_err
= *r
.out
.parm_err
;
460 *werror
= r
.out
.result
;
463 return werror_to_ntstatus(r
.out
.result
);
466 NTSTATUS
rpccli_wkssvc_NetrUseGetInfo(struct rpc_pipe_client
*cli
,
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)] */,
474 struct wkssvc_NetrUseGetInfo r
;
478 r
.in
.server_name
= server_name
;
479 r
.in
.use_name
= use_name
;
482 if (DEBUGLEVEL
>= 10) {
483 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseGetInfo
, &r
);
486 status
= cli
->dispatch(cli
,
489 NDR_WKSSVC_NETRUSEGETINFO
,
492 if (!NT_STATUS_IS_OK(status
)) {
496 if (DEBUGLEVEL
>= 10) {
497 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseGetInfo
, &r
);
500 if (NT_STATUS_IS_ERR(status
)) {
504 /* Return variables */
509 *werror
= r
.out
.result
;
512 return werror_to_ntstatus(r
.out
.result
);
515 NTSTATUS
rpccli_wkssvc_NetrUseDel(struct rpc_pipe_client
*cli
,
517 const char *server_name
/* [in] [unique,charset(UTF16)] */,
518 const char *use_name
/* [in] [ref,charset(UTF16)] */,
519 uint32_t force_cond
/* [in] */,
522 struct wkssvc_NetrUseDel r
;
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
,
537 NDR_WKSSVC_NETRUSEDEL
,
540 if (!NT_STATUS_IS_OK(status
)) {
544 if (DEBUGLEVEL
>= 10) {
545 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseDel
, &r
);
548 if (NT_STATUS_IS_ERR(status
)) {
552 /* Return variables */
556 *werror
= r
.out
.result
;
559 return werror_to_ntstatus(r
.out
.result
);
562 NTSTATUS
rpccli_wkssvc_NetrUseEnum(struct rpc_pipe_client
*cli
,
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] */,
571 struct wkssvc_NetrUseEnum r
;
575 r
.in
.server_name
= server_name
;
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
,
587 NDR_WKSSVC_NETRUSEENUM
,
590 if (!NT_STATUS_IS_OK(status
)) {
594 if (DEBUGLEVEL
>= 10) {
595 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseEnum
, &r
);
598 if (NT_STATUS_IS_ERR(status
)) {
602 /* Return variables */
604 *entries_read
= *r
.out
.entries_read
;
605 if (resume_handle
&& r
.out
.resume_handle
) {
606 *resume_handle
= *r
.out
.resume_handle
;
611 *werror
= r
.out
.result
;
614 return werror_to_ntstatus(r
.out
.result
);
617 NTSTATUS
rpccli_wkssvc_NetrMessageBufferSend(struct rpc_pipe_client
*cli
,
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] */,
626 struct wkssvc_NetrMessageBufferSend r
;
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
,
643 NDR_WKSSVC_NETRMESSAGEBUFFERSEND
,
646 if (!NT_STATUS_IS_OK(status
)) {
650 if (DEBUGLEVEL
>= 10) {
651 NDR_PRINT_OUT_DEBUG(wkssvc_NetrMessageBufferSend
, &r
);
654 if (NT_STATUS_IS_ERR(status
)) {
658 /* Return variables */
662 *werror
= r
.out
.result
;
665 return werror_to_ntstatus(r
.out
.result
);
668 NTSTATUS
rpccli_wkssvc_NetrWorkstationStatisticsGet(struct rpc_pipe_client
*cli
,
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] */,
677 struct wkssvc_NetrWorkstationStatisticsGet r
;
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
,
693 NDR_WKSSVC_NETRWORKSTATIONSTATISTICSGET
,
696 if (!NT_STATUS_IS_OK(status
)) {
700 if (DEBUGLEVEL
>= 10) {
701 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWorkstationStatisticsGet
, &r
);
704 if (NT_STATUS_IS_ERR(status
)) {
708 /* Return variables */
713 *werror
= r
.out
.result
;
716 return werror_to_ntstatus(r
.out
.result
);
719 NTSTATUS
rpccli_wkssvc_NetrLogonDomainNameAdd(struct rpc_pipe_client
*cli
,
721 const char *domain_name
/* [in] [ref,charset(UTF16)] */,
724 struct wkssvc_NetrLogonDomainNameAdd r
;
728 r
.in
.domain_name
= domain_name
;
730 if (DEBUGLEVEL
>= 10) {
731 NDR_PRINT_IN_DEBUG(wkssvc_NetrLogonDomainNameAdd
, &r
);
734 status
= cli
->dispatch(cli
,
737 NDR_WKSSVC_NETRLOGONDOMAINNAMEADD
,
740 if (!NT_STATUS_IS_OK(status
)) {
744 if (DEBUGLEVEL
>= 10) {
745 NDR_PRINT_OUT_DEBUG(wkssvc_NetrLogonDomainNameAdd
, &r
);
748 if (NT_STATUS_IS_ERR(status
)) {
752 /* Return variables */
756 *werror
= r
.out
.result
;
759 return werror_to_ntstatus(r
.out
.result
);
762 NTSTATUS
rpccli_wkssvc_NetrLogonDomainNameDel(struct rpc_pipe_client
*cli
,
764 const char *domain_name
/* [in] [ref,charset(UTF16)] */,
767 struct wkssvc_NetrLogonDomainNameDel r
;
771 r
.in
.domain_name
= domain_name
;
773 if (DEBUGLEVEL
>= 10) {
774 NDR_PRINT_IN_DEBUG(wkssvc_NetrLogonDomainNameDel
, &r
);
777 status
= cli
->dispatch(cli
,
780 NDR_WKSSVC_NETRLOGONDOMAINNAMEDEL
,
783 if (!NT_STATUS_IS_OK(status
)) {
787 if (DEBUGLEVEL
>= 10) {
788 NDR_PRINT_OUT_DEBUG(wkssvc_NetrLogonDomainNameDel
, &r
);
791 if (NT_STATUS_IS_ERR(status
)) {
795 /* Return variables */
799 *werror
= r
.out
.result
;
802 return werror_to_ntstatus(r
.out
.result
);
805 NTSTATUS
rpccli_wkssvc_NetrJoinDomain(struct rpc_pipe_client
*cli
,
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] */,
815 struct wkssvc_NetrJoinDomain r
;
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
,
833 NDR_WKSSVC_NETRJOINDOMAIN
,
836 if (!NT_STATUS_IS_OK(status
)) {
840 if (DEBUGLEVEL
>= 10) {
841 NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain
, &r
);
844 if (NT_STATUS_IS_ERR(status
)) {
848 /* Return variables */
852 *werror
= r
.out
.result
;
855 return werror_to_ntstatus(r
.out
.result
);
858 NTSTATUS
rpccli_wkssvc_NetrUnjoinDomain(struct rpc_pipe_client
*cli
,
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] */,
866 struct wkssvc_NetrUnjoinDomain r
;
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
,
882 NDR_WKSSVC_NETRUNJOINDOMAIN
,
885 if (!NT_STATUS_IS_OK(status
)) {
889 if (DEBUGLEVEL
>= 10) {
890 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain
, &r
);
893 if (NT_STATUS_IS_ERR(status
)) {
897 /* Return variables */
901 *werror
= r
.out
.result
;
904 return werror_to_ntstatus(r
.out
.result
);
907 NTSTATUS
rpccli_wkssvc_NetrRenameMachineInDomain(struct rpc_pipe_client
*cli
,
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] */,
916 struct wkssvc_NetrRenameMachineInDomain r
;
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
,
933 NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN
,
936 if (!NT_STATUS_IS_OK(status
)) {
940 if (DEBUGLEVEL
>= 10) {
941 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain
, &r
);
944 if (NT_STATUS_IS_ERR(status
)) {
948 /* Return variables */
952 *werror
= r
.out
.result
;
955 return werror_to_ntstatus(r
.out
.result
);
958 NTSTATUS
rpccli_wkssvc_NetrValidateName(struct rpc_pipe_client
*cli
,
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] */,
967 struct wkssvc_NetrValidateName r
;
971 r
.in
.server_name
= server_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
,
984 NDR_WKSSVC_NETRVALIDATENAME
,
987 if (!NT_STATUS_IS_OK(status
)) {
991 if (DEBUGLEVEL
>= 10) {
992 NDR_PRINT_OUT_DEBUG(wkssvc_NetrValidateName
, &r
);
995 if (NT_STATUS_IS_ERR(status
)) {
999 /* Return variables */
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] */,
1016 struct wkssvc_NetrGetJoinInformation r
;
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
,
1030 NDR_WKSSVC_NETRGETJOININFORMATION
,
1033 if (!NT_STATUS_IS_OK(status
)) {
1037 if (DEBUGLEVEL
>= 10) {
1038 NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinInformation
, &r
);
1041 if (NT_STATUS_IS_ERR(status
)) {
1045 /* Return variables */
1046 *name_buffer
= *r
.out
.name_buffer
;
1047 *name_type
= *r
.out
.name_type
;
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)] */,
1067 struct wkssvc_NetrGetJoinableOus r
;
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
,
1084 NDR_WKSSVC_NETRGETJOINABLEOUS
,
1087 if (!NT_STATUS_IS_OK(status
)) {
1091 if (DEBUGLEVEL
>= 10) {
1092 NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinableOus
, &r
);
1095 if (NT_STATUS_IS_ERR(status
)) {
1099 /* Return variables */
1100 *num_ous
= *r
.out
.num_ous
;
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] */,
1121 struct wkssvc_NetrJoinDomain2 r
;
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
,
1139 NDR_WKSSVC_NETRJOINDOMAIN2
,
1142 if (!NT_STATUS_IS_OK(status
)) {
1146 if (DEBUGLEVEL
>= 10) {
1147 NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain2
, &r
);
1150 if (NT_STATUS_IS_ERR(status
)) {
1154 /* Return variables */
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] */,
1172 struct wkssvc_NetrUnjoinDomain2 r
;
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
,
1188 NDR_WKSSVC_NETRUNJOINDOMAIN2
,
1191 if (!NT_STATUS_IS_OK(status
)) {
1195 if (DEBUGLEVEL
>= 10) {
1196 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain2
, &r
);
1199 if (NT_STATUS_IS_ERR(status
)) {
1203 /* Return variables */
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] */,
1222 struct wkssvc_NetrRenameMachineInDomain2 r
;
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
,
1239 NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2
,
1242 if (!NT_STATUS_IS_OK(status
)) {
1246 if (DEBUGLEVEL
>= 10) {
1247 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain2
, &r
);
1250 if (NT_STATUS_IS_ERR(status
)) {
1254 /* Return variables */
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] */,
1273 struct wkssvc_NetrValidateName2 r
;
1277 r
.in
.server_name
= server_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
,
1290 NDR_WKSSVC_NETRVALIDATENAME2
,
1293 if (!NT_STATUS_IS_OK(status
)) {
1297 if (DEBUGLEVEL
>= 10) {
1298 NDR_PRINT_OUT_DEBUG(wkssvc_NetrValidateName2
, &r
);
1301 if (NT_STATUS_IS_ERR(status
)) {
1305 /* Return variables */
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)] */,
1325 struct wkssvc_NetrGetJoinableOus2 r
;
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
,
1342 NDR_WKSSVC_NETRGETJOINABLEOUS2
,
1345 if (!NT_STATUS_IS_OK(status
)) {
1349 if (DEBUGLEVEL
>= 10) {
1350 NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinableOus2
, &r
);
1353 if (NT_STATUS_IS_ERR(status
)) {
1357 /* Return variables */
1358 *num_ous
= *r
.out
.num_ous
;
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] */,
1378 struct wkssvc_NetrAddAlternateComputerName r
;
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
,
1395 NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME
,
1398 if (!NT_STATUS_IS_OK(status
)) {
1402 if (DEBUGLEVEL
>= 10) {
1403 NDR_PRINT_OUT_DEBUG(wkssvc_NetrAddAlternateComputerName
, &r
);
1406 if (NT_STATUS_IS_ERR(status
)) {
1410 /* Return variables */
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] */,
1429 struct wkssvc_NetrRemoveAlternateComputerName r
;
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
,
1446 NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME
,
1449 if (!NT_STATUS_IS_OK(status
)) {
1453 if (DEBUGLEVEL
>= 10) {
1454 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRemoveAlternateComputerName
, &r
);
1457 if (NT_STATUS_IS_ERR(status
)) {
1461 /* Return variables */
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] */,
1480 struct wkssvc_NetrSetPrimaryComputername r
;
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
,
1497 NDR_WKSSVC_NETRSETPRIMARYCOMPUTERNAME
,
1500 if (!NT_STATUS_IS_OK(status
)) {
1504 if (DEBUGLEVEL
>= 10) {
1505 NDR_PRINT_OUT_DEBUG(wkssvc_NetrSetPrimaryComputername
, &r
);
1508 if (NT_STATUS_IS_ERR(status
)) {
1512 /* Return variables */
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] */,
1530 struct wkssvc_NetrEnumerateComputerNames r
;
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
,
1545 NDR_WKSSVC_NETRENUMERATECOMPUTERNAMES
,
1548 if (!NT_STATUS_IS_OK(status
)) {
1552 if (DEBUGLEVEL
>= 10) {
1553 NDR_PRINT_OUT_DEBUG(wkssvc_NetrEnumerateComputerNames
, &r
);
1556 if (NT_STATUS_IS_ERR(status
)) {
1560 /* Return variables */
1565 *werror
= r
.out
.result
;
1568 return werror_to_ntstatus(r
.out
.result
);