2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/srv_wkssvc.h"
9 static bool api_wkssvc_NetWkstaGetInfo(pipes_struct
*p
)
11 const struct ndr_interface_call
*call
;
12 struct ndr_pull
*pull
;
13 struct ndr_push
*push
;
14 enum ndr_err_code ndr_err
;
16 struct wkssvc_NetWkstaGetInfo
*r
;
18 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETWKSTAGETINFO
];
20 r
= talloc(talloc_tos(), struct wkssvc_NetWkstaGetInfo
);
25 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
30 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
36 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
37 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
38 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
43 if (DEBUGLEVEL
>= 10) {
44 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaGetInfo
, r
);
48 r
->out
.info
= talloc_zero(r
, union wkssvc_NetWkstaInfo
);
49 if (r
->out
.info
== NULL
) {
54 r
->out
.result
= _wkssvc_NetWkstaGetInfo(p
, r
);
56 if (p
->rng_fault_state
) {
58 /* Return true here, srv_pipe_hnd.c will take care */
62 if (DEBUGLEVEL
>= 10) {
63 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaGetInfo
, r
);
66 push
= ndr_push_init_ctx(r
, NULL
);
72 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
73 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
78 blob
= ndr_push_blob(push
);
79 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
89 static bool api_wkssvc_NetWkstaSetInfo(pipes_struct
*p
)
91 const struct ndr_interface_call
*call
;
92 struct ndr_pull
*pull
;
93 struct ndr_push
*push
;
94 enum ndr_err_code ndr_err
;
96 struct wkssvc_NetWkstaSetInfo
*r
;
98 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETWKSTASETINFO
];
100 r
= talloc(talloc_tos(), struct wkssvc_NetWkstaSetInfo
);
105 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
110 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
116 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
117 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
118 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
123 if (DEBUGLEVEL
>= 10) {
124 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaSetInfo
, r
);
128 r
->out
.parm_error
= r
->in
.parm_error
;
129 r
->out
.result
= _wkssvc_NetWkstaSetInfo(p
, r
);
131 if (p
->rng_fault_state
) {
133 /* Return true here, srv_pipe_hnd.c will take care */
137 if (DEBUGLEVEL
>= 10) {
138 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaSetInfo
, r
);
141 push
= ndr_push_init_ctx(r
, NULL
);
147 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
148 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
153 blob
= ndr_push_blob(push
);
154 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
164 static bool api_wkssvc_NetWkstaEnumUsers(pipes_struct
*p
)
166 const struct ndr_interface_call
*call
;
167 struct ndr_pull
*pull
;
168 struct ndr_push
*push
;
169 enum ndr_err_code ndr_err
;
171 struct wkssvc_NetWkstaEnumUsers
*r
;
173 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETWKSTAENUMUSERS
];
175 r
= talloc(talloc_tos(), struct wkssvc_NetWkstaEnumUsers
);
180 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
185 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
191 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
192 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
193 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
198 if (DEBUGLEVEL
>= 10) {
199 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaEnumUsers
, r
);
203 r
->out
.info
= r
->in
.info
;
204 r
->out
.resume_handle
= r
->in
.resume_handle
;
205 r
->out
.entries_read
= talloc_zero(r
, uint32_t);
206 if (r
->out
.entries_read
== NULL
) {
211 r
->out
.result
= _wkssvc_NetWkstaEnumUsers(p
, r
);
213 if (p
->rng_fault_state
) {
215 /* Return true here, srv_pipe_hnd.c will take care */
219 if (DEBUGLEVEL
>= 10) {
220 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaEnumUsers
, r
);
223 push
= ndr_push_init_ctx(r
, NULL
);
229 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
230 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
235 blob
= ndr_push_blob(push
);
236 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
246 static bool api_wkssvc_NetrWkstaUserGetInfo(pipes_struct
*p
)
248 const struct ndr_interface_call
*call
;
249 struct ndr_pull
*pull
;
250 struct ndr_push
*push
;
251 enum ndr_err_code ndr_err
;
253 struct wkssvc_NetrWkstaUserGetInfo
*r
;
255 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRWKSTAUSERGETINFO
];
257 r
= talloc(talloc_tos(), struct wkssvc_NetrWkstaUserGetInfo
);
262 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
267 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
273 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
274 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
275 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
280 if (DEBUGLEVEL
>= 10) {
281 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaUserGetInfo
, r
);
285 r
->out
.info
= talloc_zero(r
, union wkssvc_NetrWkstaUserInfo
);
286 if (r
->out
.info
== NULL
) {
291 r
->out
.result
= _wkssvc_NetrWkstaUserGetInfo(p
, r
);
293 if (p
->rng_fault_state
) {
295 /* Return true here, srv_pipe_hnd.c will take care */
299 if (DEBUGLEVEL
>= 10) {
300 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaUserGetInfo
, r
);
303 push
= ndr_push_init_ctx(r
, NULL
);
309 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
310 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
315 blob
= ndr_push_blob(push
);
316 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
326 static bool api_wkssvc_NetrWkstaUserSetInfo(pipes_struct
*p
)
328 const struct ndr_interface_call
*call
;
329 struct ndr_pull
*pull
;
330 struct ndr_push
*push
;
331 enum ndr_err_code ndr_err
;
333 struct wkssvc_NetrWkstaUserSetInfo
*r
;
335 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRWKSTAUSERSETINFO
];
337 r
= talloc(talloc_tos(), struct wkssvc_NetrWkstaUserSetInfo
);
342 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
347 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
353 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
354 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
355 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
360 if (DEBUGLEVEL
>= 10) {
361 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaUserSetInfo
, r
);
365 r
->out
.parm_err
= r
->in
.parm_err
;
366 r
->out
.result
= _wkssvc_NetrWkstaUserSetInfo(p
, r
);
368 if (p
->rng_fault_state
) {
370 /* Return true here, srv_pipe_hnd.c will take care */
374 if (DEBUGLEVEL
>= 10) {
375 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaUserSetInfo
, r
);
378 push
= ndr_push_init_ctx(r
, NULL
);
384 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
385 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
390 blob
= ndr_push_blob(push
);
391 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
401 static bool api_wkssvc_NetWkstaTransportEnum(pipes_struct
*p
)
403 const struct ndr_interface_call
*call
;
404 struct ndr_pull
*pull
;
405 struct ndr_push
*push
;
406 enum ndr_err_code ndr_err
;
408 struct wkssvc_NetWkstaTransportEnum
*r
;
410 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETWKSTATRANSPORTENUM
];
412 r
= talloc(talloc_tos(), struct wkssvc_NetWkstaTransportEnum
);
417 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
422 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
428 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
429 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
430 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
435 if (DEBUGLEVEL
>= 10) {
436 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaTransportEnum
, r
);
440 r
->out
.info
= r
->in
.info
;
441 r
->out
.resume_handle
= r
->in
.resume_handle
;
442 r
->out
.total_entries
= talloc_zero(r
, uint32_t);
443 if (r
->out
.total_entries
== NULL
) {
448 r
->out
.result
= _wkssvc_NetWkstaTransportEnum(p
, r
);
450 if (p
->rng_fault_state
) {
452 /* Return true here, srv_pipe_hnd.c will take care */
456 if (DEBUGLEVEL
>= 10) {
457 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaTransportEnum
, r
);
460 push
= ndr_push_init_ctx(r
, NULL
);
466 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
467 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
472 blob
= ndr_push_blob(push
);
473 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
483 static bool api_wkssvc_NetrWkstaTransportAdd(pipes_struct
*p
)
485 const struct ndr_interface_call
*call
;
486 struct ndr_pull
*pull
;
487 struct ndr_push
*push
;
488 enum ndr_err_code ndr_err
;
490 struct wkssvc_NetrWkstaTransportAdd
*r
;
492 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRWKSTATRANSPORTADD
];
494 r
= talloc(talloc_tos(), struct wkssvc_NetrWkstaTransportAdd
);
499 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
504 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
510 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
511 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
512 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
517 if (DEBUGLEVEL
>= 10) {
518 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaTransportAdd
, r
);
522 r
->out
.parm_err
= r
->in
.parm_err
;
523 r
->out
.result
= _wkssvc_NetrWkstaTransportAdd(p
, r
);
525 if (p
->rng_fault_state
) {
527 /* Return true here, srv_pipe_hnd.c will take care */
531 if (DEBUGLEVEL
>= 10) {
532 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaTransportAdd
, r
);
535 push
= ndr_push_init_ctx(r
, NULL
);
541 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
542 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
547 blob
= ndr_push_blob(push
);
548 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
558 static bool api_wkssvc_NetrWkstaTransportDel(pipes_struct
*p
)
560 const struct ndr_interface_call
*call
;
561 struct ndr_pull
*pull
;
562 struct ndr_push
*push
;
563 enum ndr_err_code ndr_err
;
565 struct wkssvc_NetrWkstaTransportDel
*r
;
567 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRWKSTATRANSPORTDEL
];
569 r
= talloc(talloc_tos(), struct wkssvc_NetrWkstaTransportDel
);
574 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
579 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
585 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
586 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
587 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
592 if (DEBUGLEVEL
>= 10) {
593 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaTransportDel
, r
);
596 r
->out
.result
= _wkssvc_NetrWkstaTransportDel(p
, r
);
598 if (p
->rng_fault_state
) {
600 /* Return true here, srv_pipe_hnd.c will take care */
604 if (DEBUGLEVEL
>= 10) {
605 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaTransportDel
, r
);
608 push
= ndr_push_init_ctx(r
, NULL
);
614 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
615 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
620 blob
= ndr_push_blob(push
);
621 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
631 static bool api_wkssvc_NetrUseAdd(pipes_struct
*p
)
633 const struct ndr_interface_call
*call
;
634 struct ndr_pull
*pull
;
635 struct ndr_push
*push
;
636 enum ndr_err_code ndr_err
;
638 struct wkssvc_NetrUseAdd
*r
;
640 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRUSEADD
];
642 r
= talloc(talloc_tos(), struct wkssvc_NetrUseAdd
);
647 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
652 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
658 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
659 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
660 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
665 if (DEBUGLEVEL
>= 10) {
666 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseAdd
, r
);
670 r
->out
.parm_err
= r
->in
.parm_err
;
671 r
->out
.result
= _wkssvc_NetrUseAdd(p
, r
);
673 if (p
->rng_fault_state
) {
675 /* Return true here, srv_pipe_hnd.c will take care */
679 if (DEBUGLEVEL
>= 10) {
680 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseAdd
, r
);
683 push
= ndr_push_init_ctx(r
, NULL
);
689 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
690 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
695 blob
= ndr_push_blob(push
);
696 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
706 static bool api_wkssvc_NetrUseGetInfo(pipes_struct
*p
)
708 const struct ndr_interface_call
*call
;
709 struct ndr_pull
*pull
;
710 struct ndr_push
*push
;
711 enum ndr_err_code ndr_err
;
713 struct wkssvc_NetrUseGetInfo
*r
;
715 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRUSEGETINFO
];
717 r
= talloc(talloc_tos(), struct wkssvc_NetrUseGetInfo
);
722 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
727 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
733 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
734 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
735 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
740 if (DEBUGLEVEL
>= 10) {
741 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseGetInfo
, r
);
745 r
->out
.ctr
= talloc_zero(r
, union wkssvc_NetrUseGetInfoCtr
);
746 if (r
->out
.ctr
== NULL
) {
751 r
->out
.result
= _wkssvc_NetrUseGetInfo(p
, r
);
753 if (p
->rng_fault_state
) {
755 /* Return true here, srv_pipe_hnd.c will take care */
759 if (DEBUGLEVEL
>= 10) {
760 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseGetInfo
, r
);
763 push
= ndr_push_init_ctx(r
, NULL
);
769 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
770 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
775 blob
= ndr_push_blob(push
);
776 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
786 static bool api_wkssvc_NetrUseDel(pipes_struct
*p
)
788 const struct ndr_interface_call
*call
;
789 struct ndr_pull
*pull
;
790 struct ndr_push
*push
;
791 enum ndr_err_code ndr_err
;
793 struct wkssvc_NetrUseDel
*r
;
795 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRUSEDEL
];
797 r
= talloc(talloc_tos(), struct wkssvc_NetrUseDel
);
802 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
807 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
813 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
814 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
815 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
820 if (DEBUGLEVEL
>= 10) {
821 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseDel
, r
);
824 r
->out
.result
= _wkssvc_NetrUseDel(p
, r
);
826 if (p
->rng_fault_state
) {
828 /* Return true here, srv_pipe_hnd.c will take care */
832 if (DEBUGLEVEL
>= 10) {
833 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseDel
, r
);
836 push
= ndr_push_init_ctx(r
, NULL
);
842 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
843 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
848 blob
= ndr_push_blob(push
);
849 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
859 static bool api_wkssvc_NetrUseEnum(pipes_struct
*p
)
861 const struct ndr_interface_call
*call
;
862 struct ndr_pull
*pull
;
863 struct ndr_push
*push
;
864 enum ndr_err_code ndr_err
;
866 struct wkssvc_NetrUseEnum
*r
;
868 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRUSEENUM
];
870 r
= talloc(talloc_tos(), struct wkssvc_NetrUseEnum
);
875 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
880 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
886 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
887 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
888 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
893 if (DEBUGLEVEL
>= 10) {
894 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseEnum
, r
);
898 r
->out
.info
= r
->in
.info
;
899 r
->out
.resume_handle
= r
->in
.resume_handle
;
900 r
->out
.entries_read
= talloc_zero(r
, uint32_t);
901 if (r
->out
.entries_read
== NULL
) {
906 r
->out
.result
= _wkssvc_NetrUseEnum(p
, r
);
908 if (p
->rng_fault_state
) {
910 /* Return true here, srv_pipe_hnd.c will take care */
914 if (DEBUGLEVEL
>= 10) {
915 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseEnum
, r
);
918 push
= ndr_push_init_ctx(r
, NULL
);
924 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
925 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
930 blob
= ndr_push_blob(push
);
931 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
941 static bool api_wkssvc_NetrMessageBufferSend(pipes_struct
*p
)
943 const struct ndr_interface_call
*call
;
944 struct ndr_pull
*pull
;
945 struct ndr_push
*push
;
946 enum ndr_err_code ndr_err
;
948 struct wkssvc_NetrMessageBufferSend
*r
;
950 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRMESSAGEBUFFERSEND
];
952 r
= talloc(talloc_tos(), struct wkssvc_NetrMessageBufferSend
);
957 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
962 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
968 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
969 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
970 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
975 if (DEBUGLEVEL
>= 10) {
976 NDR_PRINT_IN_DEBUG(wkssvc_NetrMessageBufferSend
, r
);
979 r
->out
.result
= _wkssvc_NetrMessageBufferSend(p
, r
);
981 if (p
->rng_fault_state
) {
983 /* Return true here, srv_pipe_hnd.c will take care */
987 if (DEBUGLEVEL
>= 10) {
988 NDR_PRINT_OUT_DEBUG(wkssvc_NetrMessageBufferSend
, r
);
991 push
= ndr_push_init_ctx(r
, NULL
);
997 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
998 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1003 blob
= ndr_push_blob(push
);
1004 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1014 static bool api_wkssvc_NetrWorkstationStatisticsGet(pipes_struct
*p
)
1016 const struct ndr_interface_call
*call
;
1017 struct ndr_pull
*pull
;
1018 struct ndr_push
*push
;
1019 enum ndr_err_code ndr_err
;
1021 struct wkssvc_NetrWorkstationStatisticsGet
*r
;
1023 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRWORKSTATIONSTATISTICSGET
];
1025 r
= talloc(talloc_tos(), struct wkssvc_NetrWorkstationStatisticsGet
);
1030 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1035 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1041 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1042 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1043 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1048 if (DEBUGLEVEL
>= 10) {
1049 NDR_PRINT_IN_DEBUG(wkssvc_NetrWorkstationStatisticsGet
, r
);
1052 ZERO_STRUCT(r
->out
);
1053 r
->out
.info
= talloc_zero(r
, struct wkssvc_NetrWorkstationStatistics
*);
1054 if (r
->out
.info
== NULL
) {
1059 r
->out
.result
= _wkssvc_NetrWorkstationStatisticsGet(p
, r
);
1061 if (p
->rng_fault_state
) {
1063 /* Return true here, srv_pipe_hnd.c will take care */
1067 if (DEBUGLEVEL
>= 10) {
1068 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWorkstationStatisticsGet
, r
);
1071 push
= ndr_push_init_ctx(r
, NULL
);
1077 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1078 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1083 blob
= ndr_push_blob(push
);
1084 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1094 static bool api_wkssvc_NetrLogonDomainNameAdd(pipes_struct
*p
)
1096 const struct ndr_interface_call
*call
;
1097 struct ndr_pull
*pull
;
1098 struct ndr_push
*push
;
1099 enum ndr_err_code ndr_err
;
1101 struct wkssvc_NetrLogonDomainNameAdd
*r
;
1103 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRLOGONDOMAINNAMEADD
];
1105 r
= talloc(talloc_tos(), struct wkssvc_NetrLogonDomainNameAdd
);
1110 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1115 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1121 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1122 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1123 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1128 if (DEBUGLEVEL
>= 10) {
1129 NDR_PRINT_IN_DEBUG(wkssvc_NetrLogonDomainNameAdd
, r
);
1132 r
->out
.result
= _wkssvc_NetrLogonDomainNameAdd(p
, r
);
1134 if (p
->rng_fault_state
) {
1136 /* Return true here, srv_pipe_hnd.c will take care */
1140 if (DEBUGLEVEL
>= 10) {
1141 NDR_PRINT_OUT_DEBUG(wkssvc_NetrLogonDomainNameAdd
, r
);
1144 push
= ndr_push_init_ctx(r
, NULL
);
1150 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1151 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1156 blob
= ndr_push_blob(push
);
1157 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1167 static bool api_wkssvc_NetrLogonDomainNameDel(pipes_struct
*p
)
1169 const struct ndr_interface_call
*call
;
1170 struct ndr_pull
*pull
;
1171 struct ndr_push
*push
;
1172 enum ndr_err_code ndr_err
;
1174 struct wkssvc_NetrLogonDomainNameDel
*r
;
1176 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRLOGONDOMAINNAMEDEL
];
1178 r
= talloc(talloc_tos(), struct wkssvc_NetrLogonDomainNameDel
);
1183 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1188 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1194 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1195 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1196 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1201 if (DEBUGLEVEL
>= 10) {
1202 NDR_PRINT_IN_DEBUG(wkssvc_NetrLogonDomainNameDel
, r
);
1205 r
->out
.result
= _wkssvc_NetrLogonDomainNameDel(p
, r
);
1207 if (p
->rng_fault_state
) {
1209 /* Return true here, srv_pipe_hnd.c will take care */
1213 if (DEBUGLEVEL
>= 10) {
1214 NDR_PRINT_OUT_DEBUG(wkssvc_NetrLogonDomainNameDel
, r
);
1217 push
= ndr_push_init_ctx(r
, NULL
);
1223 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1224 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1229 blob
= ndr_push_blob(push
);
1230 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1240 static bool api_wkssvc_NetrJoinDomain(pipes_struct
*p
)
1242 const struct ndr_interface_call
*call
;
1243 struct ndr_pull
*pull
;
1244 struct ndr_push
*push
;
1245 enum ndr_err_code ndr_err
;
1247 struct wkssvc_NetrJoinDomain
*r
;
1249 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRJOINDOMAIN
];
1251 r
= talloc(talloc_tos(), struct wkssvc_NetrJoinDomain
);
1256 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1261 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1267 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1268 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1269 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1274 if (DEBUGLEVEL
>= 10) {
1275 NDR_PRINT_IN_DEBUG(wkssvc_NetrJoinDomain
, r
);
1278 r
->out
.result
= _wkssvc_NetrJoinDomain(p
, r
);
1280 if (p
->rng_fault_state
) {
1282 /* Return true here, srv_pipe_hnd.c will take care */
1286 if (DEBUGLEVEL
>= 10) {
1287 NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain
, r
);
1290 push
= ndr_push_init_ctx(r
, NULL
);
1296 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1297 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1302 blob
= ndr_push_blob(push
);
1303 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1313 static bool api_wkssvc_NetrUnjoinDomain(pipes_struct
*p
)
1315 const struct ndr_interface_call
*call
;
1316 struct ndr_pull
*pull
;
1317 struct ndr_push
*push
;
1318 enum ndr_err_code ndr_err
;
1320 struct wkssvc_NetrUnjoinDomain
*r
;
1322 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRUNJOINDOMAIN
];
1324 r
= talloc(talloc_tos(), struct wkssvc_NetrUnjoinDomain
);
1329 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1334 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1340 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1341 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1342 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1347 if (DEBUGLEVEL
>= 10) {
1348 NDR_PRINT_IN_DEBUG(wkssvc_NetrUnjoinDomain
, r
);
1351 r
->out
.result
= _wkssvc_NetrUnjoinDomain(p
, r
);
1353 if (p
->rng_fault_state
) {
1355 /* Return true here, srv_pipe_hnd.c will take care */
1359 if (DEBUGLEVEL
>= 10) {
1360 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain
, r
);
1363 push
= ndr_push_init_ctx(r
, NULL
);
1369 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1370 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1375 blob
= ndr_push_blob(push
);
1376 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1386 static bool api_wkssvc_NetrRenameMachineInDomain(pipes_struct
*p
)
1388 const struct ndr_interface_call
*call
;
1389 struct ndr_pull
*pull
;
1390 struct ndr_push
*push
;
1391 enum ndr_err_code ndr_err
;
1393 struct wkssvc_NetrRenameMachineInDomain
*r
;
1395 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN
];
1397 r
= talloc(talloc_tos(), struct wkssvc_NetrRenameMachineInDomain
);
1402 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1407 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1413 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1414 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1415 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1420 if (DEBUGLEVEL
>= 10) {
1421 NDR_PRINT_IN_DEBUG(wkssvc_NetrRenameMachineInDomain
, r
);
1424 r
->out
.result
= _wkssvc_NetrRenameMachineInDomain(p
, r
);
1426 if (p
->rng_fault_state
) {
1428 /* Return true here, srv_pipe_hnd.c will take care */
1432 if (DEBUGLEVEL
>= 10) {
1433 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain
, r
);
1436 push
= ndr_push_init_ctx(r
, NULL
);
1442 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1443 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1448 blob
= ndr_push_blob(push
);
1449 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1459 static bool api_wkssvc_NetrValidateName(pipes_struct
*p
)
1461 const struct ndr_interface_call
*call
;
1462 struct ndr_pull
*pull
;
1463 struct ndr_push
*push
;
1464 enum ndr_err_code ndr_err
;
1466 struct wkssvc_NetrValidateName
*r
;
1468 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRVALIDATENAME
];
1470 r
= talloc(talloc_tos(), struct wkssvc_NetrValidateName
);
1475 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1480 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1486 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1487 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1488 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1493 if (DEBUGLEVEL
>= 10) {
1494 NDR_PRINT_IN_DEBUG(wkssvc_NetrValidateName
, r
);
1497 r
->out
.result
= _wkssvc_NetrValidateName(p
, r
);
1499 if (p
->rng_fault_state
) {
1501 /* Return true here, srv_pipe_hnd.c will take care */
1505 if (DEBUGLEVEL
>= 10) {
1506 NDR_PRINT_OUT_DEBUG(wkssvc_NetrValidateName
, r
);
1509 push
= ndr_push_init_ctx(r
, NULL
);
1515 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1516 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1521 blob
= ndr_push_blob(push
);
1522 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1532 static bool api_wkssvc_NetrGetJoinInformation(pipes_struct
*p
)
1534 const struct ndr_interface_call
*call
;
1535 struct ndr_pull
*pull
;
1536 struct ndr_push
*push
;
1537 enum ndr_err_code ndr_err
;
1539 struct wkssvc_NetrGetJoinInformation
*r
;
1541 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRGETJOININFORMATION
];
1543 r
= talloc(talloc_tos(), struct wkssvc_NetrGetJoinInformation
);
1548 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1553 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1559 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1560 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1561 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1566 if (DEBUGLEVEL
>= 10) {
1567 NDR_PRINT_IN_DEBUG(wkssvc_NetrGetJoinInformation
, r
);
1570 ZERO_STRUCT(r
->out
);
1571 r
->out
.name_buffer
= r
->in
.name_buffer
;
1572 r
->out
.name_type
= talloc_zero(r
, enum wkssvc_NetJoinStatus
);
1573 if (r
->out
.name_type
== NULL
) {
1578 r
->out
.result
= _wkssvc_NetrGetJoinInformation(p
, r
);
1580 if (p
->rng_fault_state
) {
1582 /* Return true here, srv_pipe_hnd.c will take care */
1586 if (DEBUGLEVEL
>= 10) {
1587 NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinInformation
, r
);
1590 push
= ndr_push_init_ctx(r
, NULL
);
1596 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1597 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1602 blob
= ndr_push_blob(push
);
1603 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1613 static bool api_wkssvc_NetrGetJoinableOus(pipes_struct
*p
)
1615 const struct ndr_interface_call
*call
;
1616 struct ndr_pull
*pull
;
1617 struct ndr_push
*push
;
1618 enum ndr_err_code ndr_err
;
1620 struct wkssvc_NetrGetJoinableOus
*r
;
1622 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRGETJOINABLEOUS
];
1624 r
= talloc(talloc_tos(), struct wkssvc_NetrGetJoinableOus
);
1629 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1634 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1640 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1641 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1642 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1647 if (DEBUGLEVEL
>= 10) {
1648 NDR_PRINT_IN_DEBUG(wkssvc_NetrGetJoinableOus
, r
);
1651 ZERO_STRUCT(r
->out
);
1652 r
->out
.num_ous
= r
->in
.num_ous
;
1653 r
->out
.ous
= talloc_zero(r
, const char **);
1654 if (r
->out
.ous
== NULL
) {
1659 r
->out
.result
= _wkssvc_NetrGetJoinableOus(p
, r
);
1661 if (p
->rng_fault_state
) {
1663 /* Return true here, srv_pipe_hnd.c will take care */
1667 if (DEBUGLEVEL
>= 10) {
1668 NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinableOus
, r
);
1671 push
= ndr_push_init_ctx(r
, NULL
);
1677 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1678 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1683 blob
= ndr_push_blob(push
);
1684 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1694 static bool api_wkssvc_NetrJoinDomain2(pipes_struct
*p
)
1696 const struct ndr_interface_call
*call
;
1697 struct ndr_pull
*pull
;
1698 struct ndr_push
*push
;
1699 enum ndr_err_code ndr_err
;
1701 struct wkssvc_NetrJoinDomain2
*r
;
1703 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRJOINDOMAIN2
];
1705 r
= talloc(talloc_tos(), struct wkssvc_NetrJoinDomain2
);
1710 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1715 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1721 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1722 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1723 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1728 if (DEBUGLEVEL
>= 10) {
1729 NDR_PRINT_IN_DEBUG(wkssvc_NetrJoinDomain2
, r
);
1732 r
->out
.result
= _wkssvc_NetrJoinDomain2(p
, r
);
1734 if (p
->rng_fault_state
) {
1736 /* Return true here, srv_pipe_hnd.c will take care */
1740 if (DEBUGLEVEL
>= 10) {
1741 NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain2
, r
);
1744 push
= ndr_push_init_ctx(r
, NULL
);
1750 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1751 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1756 blob
= ndr_push_blob(push
);
1757 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1767 static bool api_wkssvc_NetrUnjoinDomain2(pipes_struct
*p
)
1769 const struct ndr_interface_call
*call
;
1770 struct ndr_pull
*pull
;
1771 struct ndr_push
*push
;
1772 enum ndr_err_code ndr_err
;
1774 struct wkssvc_NetrUnjoinDomain2
*r
;
1776 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRUNJOINDOMAIN2
];
1778 r
= talloc(talloc_tos(), struct wkssvc_NetrUnjoinDomain2
);
1783 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1788 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1794 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1795 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1796 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1801 if (DEBUGLEVEL
>= 10) {
1802 NDR_PRINT_IN_DEBUG(wkssvc_NetrUnjoinDomain2
, r
);
1805 r
->out
.result
= _wkssvc_NetrUnjoinDomain2(p
, r
);
1807 if (p
->rng_fault_state
) {
1809 /* Return true here, srv_pipe_hnd.c will take care */
1813 if (DEBUGLEVEL
>= 10) {
1814 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain2
, r
);
1817 push
= ndr_push_init_ctx(r
, NULL
);
1823 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1824 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1829 blob
= ndr_push_blob(push
);
1830 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1840 static bool api_wkssvc_NetrRenameMachineInDomain2(pipes_struct
*p
)
1842 const struct ndr_interface_call
*call
;
1843 struct ndr_pull
*pull
;
1844 struct ndr_push
*push
;
1845 enum ndr_err_code ndr_err
;
1847 struct wkssvc_NetrRenameMachineInDomain2
*r
;
1849 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2
];
1851 r
= talloc(talloc_tos(), struct wkssvc_NetrRenameMachineInDomain2
);
1856 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1861 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1867 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1868 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1869 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1874 if (DEBUGLEVEL
>= 10) {
1875 NDR_PRINT_IN_DEBUG(wkssvc_NetrRenameMachineInDomain2
, r
);
1878 r
->out
.result
= _wkssvc_NetrRenameMachineInDomain2(p
, r
);
1880 if (p
->rng_fault_state
) {
1882 /* Return true here, srv_pipe_hnd.c will take care */
1886 if (DEBUGLEVEL
>= 10) {
1887 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain2
, r
);
1890 push
= ndr_push_init_ctx(r
, NULL
);
1896 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1897 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1902 blob
= ndr_push_blob(push
);
1903 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1913 static bool api_wkssvc_NetrValidateName2(pipes_struct
*p
)
1915 const struct ndr_interface_call
*call
;
1916 struct ndr_pull
*pull
;
1917 struct ndr_push
*push
;
1918 enum ndr_err_code ndr_err
;
1920 struct wkssvc_NetrValidateName2
*r
;
1922 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRVALIDATENAME2
];
1924 r
= talloc(talloc_tos(), struct wkssvc_NetrValidateName2
);
1929 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1934 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1940 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1941 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1942 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1947 if (DEBUGLEVEL
>= 10) {
1948 NDR_PRINT_IN_DEBUG(wkssvc_NetrValidateName2
, r
);
1951 r
->out
.result
= _wkssvc_NetrValidateName2(p
, r
);
1953 if (p
->rng_fault_state
) {
1955 /* Return true here, srv_pipe_hnd.c will take care */
1959 if (DEBUGLEVEL
>= 10) {
1960 NDR_PRINT_OUT_DEBUG(wkssvc_NetrValidateName2
, r
);
1963 push
= ndr_push_init_ctx(r
, NULL
);
1969 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1970 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1975 blob
= ndr_push_blob(push
);
1976 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1986 static bool api_wkssvc_NetrGetJoinableOus2(pipes_struct
*p
)
1988 const struct ndr_interface_call
*call
;
1989 struct ndr_pull
*pull
;
1990 struct ndr_push
*push
;
1991 enum ndr_err_code ndr_err
;
1993 struct wkssvc_NetrGetJoinableOus2
*r
;
1995 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRGETJOINABLEOUS2
];
1997 r
= talloc(talloc_tos(), struct wkssvc_NetrGetJoinableOus2
);
2002 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2007 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2013 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2014 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2015 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2020 if (DEBUGLEVEL
>= 10) {
2021 NDR_PRINT_IN_DEBUG(wkssvc_NetrGetJoinableOus2
, r
);
2024 ZERO_STRUCT(r
->out
);
2025 r
->out
.num_ous
= r
->in
.num_ous
;
2026 r
->out
.ous
= talloc_zero(r
, const char **);
2027 if (r
->out
.ous
== NULL
) {
2032 r
->out
.result
= _wkssvc_NetrGetJoinableOus2(p
, r
);
2034 if (p
->rng_fault_state
) {
2036 /* Return true here, srv_pipe_hnd.c will take care */
2040 if (DEBUGLEVEL
>= 10) {
2041 NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinableOus2
, r
);
2044 push
= ndr_push_init_ctx(r
, NULL
);
2050 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2051 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2056 blob
= ndr_push_blob(push
);
2057 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2067 static bool api_wkssvc_NetrAddAlternateComputerName(pipes_struct
*p
)
2069 const struct ndr_interface_call
*call
;
2070 struct ndr_pull
*pull
;
2071 struct ndr_push
*push
;
2072 enum ndr_err_code ndr_err
;
2074 struct wkssvc_NetrAddAlternateComputerName
*r
;
2076 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME
];
2078 r
= talloc(talloc_tos(), struct wkssvc_NetrAddAlternateComputerName
);
2083 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2088 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2094 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2095 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2096 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2101 if (DEBUGLEVEL
>= 10) {
2102 NDR_PRINT_IN_DEBUG(wkssvc_NetrAddAlternateComputerName
, r
);
2105 r
->out
.result
= _wkssvc_NetrAddAlternateComputerName(p
, r
);
2107 if (p
->rng_fault_state
) {
2109 /* Return true here, srv_pipe_hnd.c will take care */
2113 if (DEBUGLEVEL
>= 10) {
2114 NDR_PRINT_OUT_DEBUG(wkssvc_NetrAddAlternateComputerName
, r
);
2117 push
= ndr_push_init_ctx(r
, NULL
);
2123 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2124 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2129 blob
= ndr_push_blob(push
);
2130 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2140 static bool api_wkssvc_NetrRemoveAlternateComputerName(pipes_struct
*p
)
2142 const struct ndr_interface_call
*call
;
2143 struct ndr_pull
*pull
;
2144 struct ndr_push
*push
;
2145 enum ndr_err_code ndr_err
;
2147 struct wkssvc_NetrRemoveAlternateComputerName
*r
;
2149 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME
];
2151 r
= talloc(talloc_tos(), struct wkssvc_NetrRemoveAlternateComputerName
);
2156 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2161 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2167 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2168 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2169 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2174 if (DEBUGLEVEL
>= 10) {
2175 NDR_PRINT_IN_DEBUG(wkssvc_NetrRemoveAlternateComputerName
, r
);
2178 r
->out
.result
= _wkssvc_NetrRemoveAlternateComputerName(p
, r
);
2180 if (p
->rng_fault_state
) {
2182 /* Return true here, srv_pipe_hnd.c will take care */
2186 if (DEBUGLEVEL
>= 10) {
2187 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRemoveAlternateComputerName
, r
);
2190 push
= ndr_push_init_ctx(r
, NULL
);
2196 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2197 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2202 blob
= ndr_push_blob(push
);
2203 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2213 static bool api_wkssvc_NetrSetPrimaryComputername(pipes_struct
*p
)
2215 const struct ndr_interface_call
*call
;
2216 struct ndr_pull
*pull
;
2217 struct ndr_push
*push
;
2218 enum ndr_err_code ndr_err
;
2220 struct wkssvc_NetrSetPrimaryComputername
*r
;
2222 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRSETPRIMARYCOMPUTERNAME
];
2224 r
= talloc(talloc_tos(), struct wkssvc_NetrSetPrimaryComputername
);
2229 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2234 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2240 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2241 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2242 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2247 if (DEBUGLEVEL
>= 10) {
2248 NDR_PRINT_IN_DEBUG(wkssvc_NetrSetPrimaryComputername
, r
);
2251 r
->out
.result
= _wkssvc_NetrSetPrimaryComputername(p
, r
);
2253 if (p
->rng_fault_state
) {
2255 /* Return true here, srv_pipe_hnd.c will take care */
2259 if (DEBUGLEVEL
>= 10) {
2260 NDR_PRINT_OUT_DEBUG(wkssvc_NetrSetPrimaryComputername
, r
);
2263 push
= ndr_push_init_ctx(r
, NULL
);
2269 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2270 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2275 blob
= ndr_push_blob(push
);
2276 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2286 static bool api_wkssvc_NetrEnumerateComputerNames(pipes_struct
*p
)
2288 const struct ndr_interface_call
*call
;
2289 struct ndr_pull
*pull
;
2290 struct ndr_push
*push
;
2291 enum ndr_err_code ndr_err
;
2293 struct wkssvc_NetrEnumerateComputerNames
*r
;
2295 call
= &ndr_table_wkssvc
.calls
[NDR_WKSSVC_NETRENUMERATECOMPUTERNAMES
];
2297 r
= talloc(talloc_tos(), struct wkssvc_NetrEnumerateComputerNames
);
2302 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2307 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2313 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2314 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2315 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2320 if (DEBUGLEVEL
>= 10) {
2321 NDR_PRINT_IN_DEBUG(wkssvc_NetrEnumerateComputerNames
, r
);
2324 ZERO_STRUCT(r
->out
);
2325 r
->out
.ctr
= talloc_zero(r
, struct wkssvc_ComputerNamesCtr
*);
2326 if (r
->out
.ctr
== NULL
) {
2331 r
->out
.result
= _wkssvc_NetrEnumerateComputerNames(p
, r
);
2333 if (p
->rng_fault_state
) {
2335 /* Return true here, srv_pipe_hnd.c will take care */
2339 if (DEBUGLEVEL
>= 10) {
2340 NDR_PRINT_OUT_DEBUG(wkssvc_NetrEnumerateComputerNames
, r
);
2343 push
= ndr_push_init_ctx(r
, NULL
);
2349 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2350 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2355 blob
= ndr_push_blob(push
);
2356 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2368 static struct api_struct api_wkssvc_cmds
[] =
2370 {"WKSSVC_NETWKSTAGETINFO", NDR_WKSSVC_NETWKSTAGETINFO
, api_wkssvc_NetWkstaGetInfo
},
2371 {"WKSSVC_NETWKSTASETINFO", NDR_WKSSVC_NETWKSTASETINFO
, api_wkssvc_NetWkstaSetInfo
},
2372 {"WKSSVC_NETWKSTAENUMUSERS", NDR_WKSSVC_NETWKSTAENUMUSERS
, api_wkssvc_NetWkstaEnumUsers
},
2373 {"WKSSVC_NETRWKSTAUSERGETINFO", NDR_WKSSVC_NETRWKSTAUSERGETINFO
, api_wkssvc_NetrWkstaUserGetInfo
},
2374 {"WKSSVC_NETRWKSTAUSERSETINFO", NDR_WKSSVC_NETRWKSTAUSERSETINFO
, api_wkssvc_NetrWkstaUserSetInfo
},
2375 {"WKSSVC_NETWKSTATRANSPORTENUM", NDR_WKSSVC_NETWKSTATRANSPORTENUM
, api_wkssvc_NetWkstaTransportEnum
},
2376 {"WKSSVC_NETRWKSTATRANSPORTADD", NDR_WKSSVC_NETRWKSTATRANSPORTADD
, api_wkssvc_NetrWkstaTransportAdd
},
2377 {"WKSSVC_NETRWKSTATRANSPORTDEL", NDR_WKSSVC_NETRWKSTATRANSPORTDEL
, api_wkssvc_NetrWkstaTransportDel
},
2378 {"WKSSVC_NETRUSEADD", NDR_WKSSVC_NETRUSEADD
, api_wkssvc_NetrUseAdd
},
2379 {"WKSSVC_NETRUSEGETINFO", NDR_WKSSVC_NETRUSEGETINFO
, api_wkssvc_NetrUseGetInfo
},
2380 {"WKSSVC_NETRUSEDEL", NDR_WKSSVC_NETRUSEDEL
, api_wkssvc_NetrUseDel
},
2381 {"WKSSVC_NETRUSEENUM", NDR_WKSSVC_NETRUSEENUM
, api_wkssvc_NetrUseEnum
},
2382 {"WKSSVC_NETRMESSAGEBUFFERSEND", NDR_WKSSVC_NETRMESSAGEBUFFERSEND
, api_wkssvc_NetrMessageBufferSend
},
2383 {"WKSSVC_NETRWORKSTATIONSTATISTICSGET", NDR_WKSSVC_NETRWORKSTATIONSTATISTICSGET
, api_wkssvc_NetrWorkstationStatisticsGet
},
2384 {"WKSSVC_NETRLOGONDOMAINNAMEADD", NDR_WKSSVC_NETRLOGONDOMAINNAMEADD
, api_wkssvc_NetrLogonDomainNameAdd
},
2385 {"WKSSVC_NETRLOGONDOMAINNAMEDEL", NDR_WKSSVC_NETRLOGONDOMAINNAMEDEL
, api_wkssvc_NetrLogonDomainNameDel
},
2386 {"WKSSVC_NETRJOINDOMAIN", NDR_WKSSVC_NETRJOINDOMAIN
, api_wkssvc_NetrJoinDomain
},
2387 {"WKSSVC_NETRUNJOINDOMAIN", NDR_WKSSVC_NETRUNJOINDOMAIN
, api_wkssvc_NetrUnjoinDomain
},
2388 {"WKSSVC_NETRRENAMEMACHINEINDOMAIN", NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN
, api_wkssvc_NetrRenameMachineInDomain
},
2389 {"WKSSVC_NETRVALIDATENAME", NDR_WKSSVC_NETRVALIDATENAME
, api_wkssvc_NetrValidateName
},
2390 {"WKSSVC_NETRGETJOININFORMATION", NDR_WKSSVC_NETRGETJOININFORMATION
, api_wkssvc_NetrGetJoinInformation
},
2391 {"WKSSVC_NETRGETJOINABLEOUS", NDR_WKSSVC_NETRGETJOINABLEOUS
, api_wkssvc_NetrGetJoinableOus
},
2392 {"WKSSVC_NETRJOINDOMAIN2", NDR_WKSSVC_NETRJOINDOMAIN2
, api_wkssvc_NetrJoinDomain2
},
2393 {"WKSSVC_NETRUNJOINDOMAIN2", NDR_WKSSVC_NETRUNJOINDOMAIN2
, api_wkssvc_NetrUnjoinDomain2
},
2394 {"WKSSVC_NETRRENAMEMACHINEINDOMAIN2", NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2
, api_wkssvc_NetrRenameMachineInDomain2
},
2395 {"WKSSVC_NETRVALIDATENAME2", NDR_WKSSVC_NETRVALIDATENAME2
, api_wkssvc_NetrValidateName2
},
2396 {"WKSSVC_NETRGETJOINABLEOUS2", NDR_WKSSVC_NETRGETJOINABLEOUS2
, api_wkssvc_NetrGetJoinableOus2
},
2397 {"WKSSVC_NETRADDALTERNATECOMPUTERNAME", NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME
, api_wkssvc_NetrAddAlternateComputerName
},
2398 {"WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME", NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME
, api_wkssvc_NetrRemoveAlternateComputerName
},
2399 {"WKSSVC_NETRSETPRIMARYCOMPUTERNAME", NDR_WKSSVC_NETRSETPRIMARYCOMPUTERNAME
, api_wkssvc_NetrSetPrimaryComputername
},
2400 {"WKSSVC_NETRENUMERATECOMPUTERNAMES", NDR_WKSSVC_NETRENUMERATECOMPUTERNAMES
, api_wkssvc_NetrEnumerateComputerNames
},
2403 void wkssvc_get_pipe_fns(struct api_struct
**fns
, int *n_fns
)
2405 *fns
= api_wkssvc_cmds
;
2406 *n_fns
= sizeof(api_wkssvc_cmds
) / sizeof(struct api_struct
);
2409 NTSTATUS
rpc_wkssvc_dispatch(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, const struct ndr_interface_table
*table
, uint32_t opnum
, void *_r
)
2411 if (cli
->pipes_struct
== NULL
) {
2412 return NT_STATUS_INVALID_PARAMETER
;
2417 case NDR_WKSSVC_NETWKSTAGETINFO
: {
2418 struct wkssvc_NetWkstaGetInfo
*r
= (struct wkssvc_NetWkstaGetInfo
*)_r
;
2419 ZERO_STRUCT(r
->out
);
2420 r
->out
.info
= talloc_zero(mem_ctx
, union wkssvc_NetWkstaInfo
);
2421 if (r
->out
.info
== NULL
) {
2422 return NT_STATUS_NO_MEMORY
;
2425 r
->out
.result
= _wkssvc_NetWkstaGetInfo(cli
->pipes_struct
, r
);
2426 return NT_STATUS_OK
;
2429 case NDR_WKSSVC_NETWKSTASETINFO
: {
2430 struct wkssvc_NetWkstaSetInfo
*r
= (struct wkssvc_NetWkstaSetInfo
*)_r
;
2431 ZERO_STRUCT(r
->out
);
2432 r
->out
.parm_error
= r
->in
.parm_error
;
2433 r
->out
.result
= _wkssvc_NetWkstaSetInfo(cli
->pipes_struct
, r
);
2434 return NT_STATUS_OK
;
2437 case NDR_WKSSVC_NETWKSTAENUMUSERS
: {
2438 struct wkssvc_NetWkstaEnumUsers
*r
= (struct wkssvc_NetWkstaEnumUsers
*)_r
;
2439 ZERO_STRUCT(r
->out
);
2440 r
->out
.info
= r
->in
.info
;
2441 r
->out
.resume_handle
= r
->in
.resume_handle
;
2442 r
->out
.entries_read
= talloc_zero(mem_ctx
, uint32_t);
2443 if (r
->out
.entries_read
== NULL
) {
2444 return NT_STATUS_NO_MEMORY
;
2447 r
->out
.result
= _wkssvc_NetWkstaEnumUsers(cli
->pipes_struct
, r
);
2448 return NT_STATUS_OK
;
2451 case NDR_WKSSVC_NETRWKSTAUSERGETINFO
: {
2452 struct wkssvc_NetrWkstaUserGetInfo
*r
= (struct wkssvc_NetrWkstaUserGetInfo
*)_r
;
2453 ZERO_STRUCT(r
->out
);
2454 r
->out
.info
= talloc_zero(mem_ctx
, union wkssvc_NetrWkstaUserInfo
);
2455 if (r
->out
.info
== NULL
) {
2456 return NT_STATUS_NO_MEMORY
;
2459 r
->out
.result
= _wkssvc_NetrWkstaUserGetInfo(cli
->pipes_struct
, r
);
2460 return NT_STATUS_OK
;
2463 case NDR_WKSSVC_NETRWKSTAUSERSETINFO
: {
2464 struct wkssvc_NetrWkstaUserSetInfo
*r
= (struct wkssvc_NetrWkstaUserSetInfo
*)_r
;
2465 ZERO_STRUCT(r
->out
);
2466 r
->out
.parm_err
= r
->in
.parm_err
;
2467 r
->out
.result
= _wkssvc_NetrWkstaUserSetInfo(cli
->pipes_struct
, r
);
2468 return NT_STATUS_OK
;
2471 case NDR_WKSSVC_NETWKSTATRANSPORTENUM
: {
2472 struct wkssvc_NetWkstaTransportEnum
*r
= (struct wkssvc_NetWkstaTransportEnum
*)_r
;
2473 ZERO_STRUCT(r
->out
);
2474 r
->out
.info
= r
->in
.info
;
2475 r
->out
.resume_handle
= r
->in
.resume_handle
;
2476 r
->out
.total_entries
= talloc_zero(mem_ctx
, uint32_t);
2477 if (r
->out
.total_entries
== NULL
) {
2478 return NT_STATUS_NO_MEMORY
;
2481 r
->out
.result
= _wkssvc_NetWkstaTransportEnum(cli
->pipes_struct
, r
);
2482 return NT_STATUS_OK
;
2485 case NDR_WKSSVC_NETRWKSTATRANSPORTADD
: {
2486 struct wkssvc_NetrWkstaTransportAdd
*r
= (struct wkssvc_NetrWkstaTransportAdd
*)_r
;
2487 ZERO_STRUCT(r
->out
);
2488 r
->out
.parm_err
= r
->in
.parm_err
;
2489 r
->out
.result
= _wkssvc_NetrWkstaTransportAdd(cli
->pipes_struct
, r
);
2490 return NT_STATUS_OK
;
2493 case NDR_WKSSVC_NETRWKSTATRANSPORTDEL
: {
2494 struct wkssvc_NetrWkstaTransportDel
*r
= (struct wkssvc_NetrWkstaTransportDel
*)_r
;
2495 r
->out
.result
= _wkssvc_NetrWkstaTransportDel(cli
->pipes_struct
, r
);
2496 return NT_STATUS_OK
;
2499 case NDR_WKSSVC_NETRUSEADD
: {
2500 struct wkssvc_NetrUseAdd
*r
= (struct wkssvc_NetrUseAdd
*)_r
;
2501 ZERO_STRUCT(r
->out
);
2502 r
->out
.parm_err
= r
->in
.parm_err
;
2503 r
->out
.result
= _wkssvc_NetrUseAdd(cli
->pipes_struct
, r
);
2504 return NT_STATUS_OK
;
2507 case NDR_WKSSVC_NETRUSEGETINFO
: {
2508 struct wkssvc_NetrUseGetInfo
*r
= (struct wkssvc_NetrUseGetInfo
*)_r
;
2509 ZERO_STRUCT(r
->out
);
2510 r
->out
.ctr
= talloc_zero(mem_ctx
, union wkssvc_NetrUseGetInfoCtr
);
2511 if (r
->out
.ctr
== NULL
) {
2512 return NT_STATUS_NO_MEMORY
;
2515 r
->out
.result
= _wkssvc_NetrUseGetInfo(cli
->pipes_struct
, r
);
2516 return NT_STATUS_OK
;
2519 case NDR_WKSSVC_NETRUSEDEL
: {
2520 struct wkssvc_NetrUseDel
*r
= (struct wkssvc_NetrUseDel
*)_r
;
2521 r
->out
.result
= _wkssvc_NetrUseDel(cli
->pipes_struct
, r
);
2522 return NT_STATUS_OK
;
2525 case NDR_WKSSVC_NETRUSEENUM
: {
2526 struct wkssvc_NetrUseEnum
*r
= (struct wkssvc_NetrUseEnum
*)_r
;
2527 ZERO_STRUCT(r
->out
);
2528 r
->out
.info
= r
->in
.info
;
2529 r
->out
.resume_handle
= r
->in
.resume_handle
;
2530 r
->out
.entries_read
= talloc_zero(mem_ctx
, uint32_t);
2531 if (r
->out
.entries_read
== NULL
) {
2532 return NT_STATUS_NO_MEMORY
;
2535 r
->out
.result
= _wkssvc_NetrUseEnum(cli
->pipes_struct
, r
);
2536 return NT_STATUS_OK
;
2539 case NDR_WKSSVC_NETRMESSAGEBUFFERSEND
: {
2540 struct wkssvc_NetrMessageBufferSend
*r
= (struct wkssvc_NetrMessageBufferSend
*)_r
;
2541 r
->out
.result
= _wkssvc_NetrMessageBufferSend(cli
->pipes_struct
, r
);
2542 return NT_STATUS_OK
;
2545 case NDR_WKSSVC_NETRWORKSTATIONSTATISTICSGET
: {
2546 struct wkssvc_NetrWorkstationStatisticsGet
*r
= (struct wkssvc_NetrWorkstationStatisticsGet
*)_r
;
2547 ZERO_STRUCT(r
->out
);
2548 r
->out
.info
= talloc_zero(mem_ctx
, struct wkssvc_NetrWorkstationStatistics
*);
2549 if (r
->out
.info
== NULL
) {
2550 return NT_STATUS_NO_MEMORY
;
2553 r
->out
.result
= _wkssvc_NetrWorkstationStatisticsGet(cli
->pipes_struct
, r
);
2554 return NT_STATUS_OK
;
2557 case NDR_WKSSVC_NETRLOGONDOMAINNAMEADD
: {
2558 struct wkssvc_NetrLogonDomainNameAdd
*r
= (struct wkssvc_NetrLogonDomainNameAdd
*)_r
;
2559 r
->out
.result
= _wkssvc_NetrLogonDomainNameAdd(cli
->pipes_struct
, r
);
2560 return NT_STATUS_OK
;
2563 case NDR_WKSSVC_NETRLOGONDOMAINNAMEDEL
: {
2564 struct wkssvc_NetrLogonDomainNameDel
*r
= (struct wkssvc_NetrLogonDomainNameDel
*)_r
;
2565 r
->out
.result
= _wkssvc_NetrLogonDomainNameDel(cli
->pipes_struct
, r
);
2566 return NT_STATUS_OK
;
2569 case NDR_WKSSVC_NETRJOINDOMAIN
: {
2570 struct wkssvc_NetrJoinDomain
*r
= (struct wkssvc_NetrJoinDomain
*)_r
;
2571 r
->out
.result
= _wkssvc_NetrJoinDomain(cli
->pipes_struct
, r
);
2572 return NT_STATUS_OK
;
2575 case NDR_WKSSVC_NETRUNJOINDOMAIN
: {
2576 struct wkssvc_NetrUnjoinDomain
*r
= (struct wkssvc_NetrUnjoinDomain
*)_r
;
2577 r
->out
.result
= _wkssvc_NetrUnjoinDomain(cli
->pipes_struct
, r
);
2578 return NT_STATUS_OK
;
2581 case NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN
: {
2582 struct wkssvc_NetrRenameMachineInDomain
*r
= (struct wkssvc_NetrRenameMachineInDomain
*)_r
;
2583 r
->out
.result
= _wkssvc_NetrRenameMachineInDomain(cli
->pipes_struct
, r
);
2584 return NT_STATUS_OK
;
2587 case NDR_WKSSVC_NETRVALIDATENAME
: {
2588 struct wkssvc_NetrValidateName
*r
= (struct wkssvc_NetrValidateName
*)_r
;
2589 r
->out
.result
= _wkssvc_NetrValidateName(cli
->pipes_struct
, r
);
2590 return NT_STATUS_OK
;
2593 case NDR_WKSSVC_NETRGETJOININFORMATION
: {
2594 struct wkssvc_NetrGetJoinInformation
*r
= (struct wkssvc_NetrGetJoinInformation
*)_r
;
2595 ZERO_STRUCT(r
->out
);
2596 r
->out
.name_buffer
= r
->in
.name_buffer
;
2597 r
->out
.name_type
= talloc_zero(mem_ctx
, enum wkssvc_NetJoinStatus
);
2598 if (r
->out
.name_type
== NULL
) {
2599 return NT_STATUS_NO_MEMORY
;
2602 r
->out
.result
= _wkssvc_NetrGetJoinInformation(cli
->pipes_struct
, r
);
2603 return NT_STATUS_OK
;
2606 case NDR_WKSSVC_NETRGETJOINABLEOUS
: {
2607 struct wkssvc_NetrGetJoinableOus
*r
= (struct wkssvc_NetrGetJoinableOus
*)_r
;
2608 ZERO_STRUCT(r
->out
);
2609 r
->out
.num_ous
= r
->in
.num_ous
;
2610 r
->out
.ous
= talloc_zero(mem_ctx
, const char **);
2611 if (r
->out
.ous
== NULL
) {
2612 return NT_STATUS_NO_MEMORY
;
2615 r
->out
.result
= _wkssvc_NetrGetJoinableOus(cli
->pipes_struct
, r
);
2616 return NT_STATUS_OK
;
2619 case NDR_WKSSVC_NETRJOINDOMAIN2
: {
2620 struct wkssvc_NetrJoinDomain2
*r
= (struct wkssvc_NetrJoinDomain2
*)_r
;
2621 r
->out
.result
= _wkssvc_NetrJoinDomain2(cli
->pipes_struct
, r
);
2622 return NT_STATUS_OK
;
2625 case NDR_WKSSVC_NETRUNJOINDOMAIN2
: {
2626 struct wkssvc_NetrUnjoinDomain2
*r
= (struct wkssvc_NetrUnjoinDomain2
*)_r
;
2627 r
->out
.result
= _wkssvc_NetrUnjoinDomain2(cli
->pipes_struct
, r
);
2628 return NT_STATUS_OK
;
2631 case NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2
: {
2632 struct wkssvc_NetrRenameMachineInDomain2
*r
= (struct wkssvc_NetrRenameMachineInDomain2
*)_r
;
2633 r
->out
.result
= _wkssvc_NetrRenameMachineInDomain2(cli
->pipes_struct
, r
);
2634 return NT_STATUS_OK
;
2637 case NDR_WKSSVC_NETRVALIDATENAME2
: {
2638 struct wkssvc_NetrValidateName2
*r
= (struct wkssvc_NetrValidateName2
*)_r
;
2639 r
->out
.result
= _wkssvc_NetrValidateName2(cli
->pipes_struct
, r
);
2640 return NT_STATUS_OK
;
2643 case NDR_WKSSVC_NETRGETJOINABLEOUS2
: {
2644 struct wkssvc_NetrGetJoinableOus2
*r
= (struct wkssvc_NetrGetJoinableOus2
*)_r
;
2645 ZERO_STRUCT(r
->out
);
2646 r
->out
.num_ous
= r
->in
.num_ous
;
2647 r
->out
.ous
= talloc_zero(mem_ctx
, const char **);
2648 if (r
->out
.ous
== NULL
) {
2649 return NT_STATUS_NO_MEMORY
;
2652 r
->out
.result
= _wkssvc_NetrGetJoinableOus2(cli
->pipes_struct
, r
);
2653 return NT_STATUS_OK
;
2656 case NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME
: {
2657 struct wkssvc_NetrAddAlternateComputerName
*r
= (struct wkssvc_NetrAddAlternateComputerName
*)_r
;
2658 r
->out
.result
= _wkssvc_NetrAddAlternateComputerName(cli
->pipes_struct
, r
);
2659 return NT_STATUS_OK
;
2662 case NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME
: {
2663 struct wkssvc_NetrRemoveAlternateComputerName
*r
= (struct wkssvc_NetrRemoveAlternateComputerName
*)_r
;
2664 r
->out
.result
= _wkssvc_NetrRemoveAlternateComputerName(cli
->pipes_struct
, r
);
2665 return NT_STATUS_OK
;
2668 case NDR_WKSSVC_NETRSETPRIMARYCOMPUTERNAME
: {
2669 struct wkssvc_NetrSetPrimaryComputername
*r
= (struct wkssvc_NetrSetPrimaryComputername
*)_r
;
2670 r
->out
.result
= _wkssvc_NetrSetPrimaryComputername(cli
->pipes_struct
, r
);
2671 return NT_STATUS_OK
;
2674 case NDR_WKSSVC_NETRENUMERATECOMPUTERNAMES
: {
2675 struct wkssvc_NetrEnumerateComputerNames
*r
= (struct wkssvc_NetrEnumerateComputerNames
*)_r
;
2676 ZERO_STRUCT(r
->out
);
2677 r
->out
.ctr
= talloc_zero(mem_ctx
, struct wkssvc_ComputerNamesCtr
*);
2678 if (r
->out
.ctr
== NULL
) {
2679 return NT_STATUS_NO_MEMORY
;
2682 r
->out
.result
= _wkssvc_NetrEnumerateComputerNames(cli
->pipes_struct
, r
);
2683 return NT_STATUS_OK
;
2687 return NT_STATUS_NOT_IMPLEMENTED
;
2691 NTSTATUS
rpc_wkssvc_init(void)
2693 return rpc_srv_register(SMB_RPC_INTERFACE_VERSION
, "wkssvc", "wkssvc", &ndr_table_wkssvc
, api_wkssvc_cmds
, sizeof(api_wkssvc_cmds
) / sizeof(struct api_struct
));