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 struct ndr_pull
*pull
;
12 struct ndr_push
*push
;
15 struct wkssvc_NetWkstaGetInfo r
;
16 TALLOC_CTX
*mem_ctx
= talloc_init("api_wkssvc_NetWkstaGetInfo");
18 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
23 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
27 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
28 status
= ndr_pull_wkssvc_NetWkstaGetInfo(pull
, NDR_IN
, &r
);
29 if (NT_STATUS_IS_ERR(status
)) {
35 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaGetInfo
, &r
);
38 r
.out
.info
= talloc_size(mem_ctx
, sizeof(*r
.out
.info
));
39 if (r
.out
.info
== NULL
) {
44 r
.out
.result
= _wkssvc_NetWkstaGetInfo(p
, r
.in
.server_name
, r
.in
.level
, r
.out
.info
);
47 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaGetInfo
, &r
);
49 push
= ndr_push_init_ctx(mem_ctx
);
55 status
= ndr_push_wkssvc_NetWkstaGetInfo(push
, NDR_OUT
, &r
);
56 if (NT_STATUS_IS_ERR(status
)) {
61 blob
= ndr_push_blob(push
);
62 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
72 static BOOL
api_wkssvc_NetWkstaSetInfo(pipes_struct
*p
)
74 struct ndr_pull
*pull
;
75 struct ndr_push
*push
;
78 struct wkssvc_NetWkstaSetInfo r
;
79 TALLOC_CTX
*mem_ctx
= talloc_init("api_wkssvc_NetWkstaSetInfo");
81 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
86 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
90 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
91 status
= ndr_pull_wkssvc_NetWkstaSetInfo(pull
, NDR_IN
, &r
);
92 if (NT_STATUS_IS_ERR(status
)) {
98 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaSetInfo
, &r
);
101 r
.out
.parm_error
= r
.in
.parm_error
;
102 r
.out
.result
= _wkssvc_NetWkstaSetInfo(p
, r
.in
.server_name
, r
.in
.level
, r
.in
.info
, r
.in
.parm_error
);
104 if (DEBUGLEVEL
>= 10)
105 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaSetInfo
, &r
);
107 push
= ndr_push_init_ctx(mem_ctx
);
109 talloc_free(mem_ctx
);
113 status
= ndr_push_wkssvc_NetWkstaSetInfo(push
, NDR_OUT
, &r
);
114 if (NT_STATUS_IS_ERR(status
)) {
115 talloc_free(mem_ctx
);
119 blob
= ndr_push_blob(push
);
120 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
121 talloc_free(mem_ctx
);
125 talloc_free(mem_ctx
);
130 static BOOL
api_wkssvc_NetWkstaEnumUsers(pipes_struct
*p
)
132 struct ndr_pull
*pull
;
133 struct ndr_push
*push
;
136 struct wkssvc_NetWkstaEnumUsers r
;
137 TALLOC_CTX
*mem_ctx
= talloc_init("api_wkssvc_NetWkstaEnumUsers");
139 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
140 talloc_free(mem_ctx
);
144 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
148 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
149 status
= ndr_pull_wkssvc_NetWkstaEnumUsers(pull
, NDR_IN
, &r
);
150 if (NT_STATUS_IS_ERR(status
)) {
151 talloc_free(mem_ctx
);
155 if (DEBUGLEVEL
>= 10)
156 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaEnumUsers
, &r
);
159 r
.out
.users
= r
.in
.users
;
160 r
.out
.entriesread
= talloc_size(mem_ctx
, sizeof(*r
.out
.entriesread
));
161 if (r
.out
.entriesread
== NULL
) {
162 talloc_free(mem_ctx
);
166 r
.out
.totalentries
= talloc_size(mem_ctx
, sizeof(*r
.out
.totalentries
));
167 if (r
.out
.totalentries
== NULL
) {
168 talloc_free(mem_ctx
);
172 r
.out
.resumehandle
= r
.in
.resumehandle
;
173 r
.out
.result
= _wkssvc_NetWkstaEnumUsers(p
, r
.in
.server_name
, r
.in
.level
, r
.in
.users
, r
.in
.prefmaxlen
, r
.out
.entriesread
, r
.out
.totalentries
, r
.in
.resumehandle
);
175 if (DEBUGLEVEL
>= 10)
176 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaEnumUsers
, &r
);
178 push
= ndr_push_init_ctx(mem_ctx
);
180 talloc_free(mem_ctx
);
184 status
= ndr_push_wkssvc_NetWkstaEnumUsers(push
, NDR_OUT
, &r
);
185 if (NT_STATUS_IS_ERR(status
)) {
186 talloc_free(mem_ctx
);
190 blob
= ndr_push_blob(push
);
191 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
192 talloc_free(mem_ctx
);
196 talloc_free(mem_ctx
);
201 static BOOL
api_WKSSVC_NETRWKSTAUSERGETINFO(pipes_struct
*p
)
203 struct ndr_pull
*pull
;
204 struct ndr_push
*push
;
207 struct WKSSVC_NETRWKSTAUSERGETINFO r
;
208 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRWKSTAUSERGETINFO");
210 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
211 talloc_free(mem_ctx
);
215 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
219 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
220 status
= ndr_pull_WKSSVC_NETRWKSTAUSERGETINFO(pull
, NDR_IN
, &r
);
221 if (NT_STATUS_IS_ERR(status
)) {
222 talloc_free(mem_ctx
);
226 if (DEBUGLEVEL
>= 10)
227 NDR_PRINT_IN_DEBUG(WKSSVC_NETRWKSTAUSERGETINFO
, &r
);
229 r
.out
.result
= _WKSSVC_NETRWKSTAUSERGETINFO(p
);
231 if (DEBUGLEVEL
>= 10)
232 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRWKSTAUSERGETINFO
, &r
);
234 push
= ndr_push_init_ctx(mem_ctx
);
236 talloc_free(mem_ctx
);
240 status
= ndr_push_WKSSVC_NETRWKSTAUSERGETINFO(push
, NDR_OUT
, &r
);
241 if (NT_STATUS_IS_ERR(status
)) {
242 talloc_free(mem_ctx
);
246 blob
= ndr_push_blob(push
);
247 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
248 talloc_free(mem_ctx
);
252 talloc_free(mem_ctx
);
257 static BOOL
api_WKSSVC_NETRWKSTAUSERSETINFO(pipes_struct
*p
)
259 struct ndr_pull
*pull
;
260 struct ndr_push
*push
;
263 struct WKSSVC_NETRWKSTAUSERSETINFO r
;
264 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRWKSTAUSERSETINFO");
266 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
267 talloc_free(mem_ctx
);
271 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
275 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
276 status
= ndr_pull_WKSSVC_NETRWKSTAUSERSETINFO(pull
, NDR_IN
, &r
);
277 if (NT_STATUS_IS_ERR(status
)) {
278 talloc_free(mem_ctx
);
282 if (DEBUGLEVEL
>= 10)
283 NDR_PRINT_IN_DEBUG(WKSSVC_NETRWKSTAUSERSETINFO
, &r
);
285 r
.out
.result
= _WKSSVC_NETRWKSTAUSERSETINFO(p
);
287 if (DEBUGLEVEL
>= 10)
288 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRWKSTAUSERSETINFO
, &r
);
290 push
= ndr_push_init_ctx(mem_ctx
);
292 talloc_free(mem_ctx
);
296 status
= ndr_push_WKSSVC_NETRWKSTAUSERSETINFO(push
, NDR_OUT
, &r
);
297 if (NT_STATUS_IS_ERR(status
)) {
298 talloc_free(mem_ctx
);
302 blob
= ndr_push_blob(push
);
303 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
304 talloc_free(mem_ctx
);
308 talloc_free(mem_ctx
);
313 static BOOL
api_wkssvc_NetWkstaTransportEnum(pipes_struct
*p
)
315 struct ndr_pull
*pull
;
316 struct ndr_push
*push
;
319 struct wkssvc_NetWkstaTransportEnum r
;
320 TALLOC_CTX
*mem_ctx
= talloc_init("api_wkssvc_NetWkstaTransportEnum");
322 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
323 talloc_free(mem_ctx
);
327 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
331 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
332 status
= ndr_pull_wkssvc_NetWkstaTransportEnum(pull
, NDR_IN
, &r
);
333 if (NT_STATUS_IS_ERR(status
)) {
334 talloc_free(mem_ctx
);
338 if (DEBUGLEVEL
>= 10)
339 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaTransportEnum
, &r
);
342 r
.out
.level
= r
.in
.level
;
343 r
.out
.ctr
= r
.in
.ctr
;
344 r
.out
.totalentries
= talloc_size(mem_ctx
, sizeof(*r
.out
.totalentries
));
345 if (r
.out
.totalentries
== NULL
) {
346 talloc_free(mem_ctx
);
350 r
.out
.resume_handle
= r
.in
.resume_handle
;
351 r
.out
.result
= _wkssvc_NetWkstaTransportEnum(p
, r
.in
.server_name
, r
.in
.level
, r
.in
.ctr
, r
.in
.max_buffer
, r
.out
.totalentries
, r
.in
.resume_handle
);
353 if (DEBUGLEVEL
>= 10)
354 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaTransportEnum
, &r
);
356 push
= ndr_push_init_ctx(mem_ctx
);
358 talloc_free(mem_ctx
);
362 status
= ndr_push_wkssvc_NetWkstaTransportEnum(push
, NDR_OUT
, &r
);
363 if (NT_STATUS_IS_ERR(status
)) {
364 talloc_free(mem_ctx
);
368 blob
= ndr_push_blob(push
);
369 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
370 talloc_free(mem_ctx
);
374 talloc_free(mem_ctx
);
379 static BOOL
api_WKSSVC_NETRWKSTATRANSPORTADD(pipes_struct
*p
)
381 struct ndr_pull
*pull
;
382 struct ndr_push
*push
;
385 struct WKSSVC_NETRWKSTATRANSPORTADD r
;
386 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRWKSTATRANSPORTADD");
388 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
389 talloc_free(mem_ctx
);
393 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
397 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
398 status
= ndr_pull_WKSSVC_NETRWKSTATRANSPORTADD(pull
, NDR_IN
, &r
);
399 if (NT_STATUS_IS_ERR(status
)) {
400 talloc_free(mem_ctx
);
404 if (DEBUGLEVEL
>= 10)
405 NDR_PRINT_IN_DEBUG(WKSSVC_NETRWKSTATRANSPORTADD
, &r
);
407 r
.out
.result
= _WKSSVC_NETRWKSTATRANSPORTADD(p
);
409 if (DEBUGLEVEL
>= 10)
410 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRWKSTATRANSPORTADD
, &r
);
412 push
= ndr_push_init_ctx(mem_ctx
);
414 talloc_free(mem_ctx
);
418 status
= ndr_push_WKSSVC_NETRWKSTATRANSPORTADD(push
, NDR_OUT
, &r
);
419 if (NT_STATUS_IS_ERR(status
)) {
420 talloc_free(mem_ctx
);
424 blob
= ndr_push_blob(push
);
425 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
426 talloc_free(mem_ctx
);
430 talloc_free(mem_ctx
);
435 static BOOL
api_WKSSVC_NETRWKSTATRANSPORTDEL(pipes_struct
*p
)
437 struct ndr_pull
*pull
;
438 struct ndr_push
*push
;
441 struct WKSSVC_NETRWKSTATRANSPORTDEL r
;
442 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRWKSTATRANSPORTDEL");
444 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
445 talloc_free(mem_ctx
);
449 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
453 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
454 status
= ndr_pull_WKSSVC_NETRWKSTATRANSPORTDEL(pull
, NDR_IN
, &r
);
455 if (NT_STATUS_IS_ERR(status
)) {
456 talloc_free(mem_ctx
);
460 if (DEBUGLEVEL
>= 10)
461 NDR_PRINT_IN_DEBUG(WKSSVC_NETRWKSTATRANSPORTDEL
, &r
);
463 r
.out
.result
= _WKSSVC_NETRWKSTATRANSPORTDEL(p
);
465 if (DEBUGLEVEL
>= 10)
466 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRWKSTATRANSPORTDEL
, &r
);
468 push
= ndr_push_init_ctx(mem_ctx
);
470 talloc_free(mem_ctx
);
474 status
= ndr_push_WKSSVC_NETRWKSTATRANSPORTDEL(push
, NDR_OUT
, &r
);
475 if (NT_STATUS_IS_ERR(status
)) {
476 talloc_free(mem_ctx
);
480 blob
= ndr_push_blob(push
);
481 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
482 talloc_free(mem_ctx
);
486 talloc_free(mem_ctx
);
491 static BOOL
api_WKSSVC_NETRUSEADD(pipes_struct
*p
)
493 struct ndr_pull
*pull
;
494 struct ndr_push
*push
;
497 struct WKSSVC_NETRUSEADD r
;
498 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRUSEADD");
500 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
501 talloc_free(mem_ctx
);
505 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
509 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
510 status
= ndr_pull_WKSSVC_NETRUSEADD(pull
, NDR_IN
, &r
);
511 if (NT_STATUS_IS_ERR(status
)) {
512 talloc_free(mem_ctx
);
516 if (DEBUGLEVEL
>= 10)
517 NDR_PRINT_IN_DEBUG(WKSSVC_NETRUSEADD
, &r
);
519 r
.out
.result
= _WKSSVC_NETRUSEADD(p
);
521 if (DEBUGLEVEL
>= 10)
522 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRUSEADD
, &r
);
524 push
= ndr_push_init_ctx(mem_ctx
);
526 talloc_free(mem_ctx
);
530 status
= ndr_push_WKSSVC_NETRUSEADD(push
, NDR_OUT
, &r
);
531 if (NT_STATUS_IS_ERR(status
)) {
532 talloc_free(mem_ctx
);
536 blob
= ndr_push_blob(push
);
537 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
538 talloc_free(mem_ctx
);
542 talloc_free(mem_ctx
);
547 static BOOL
api_WKSSVC_NETRUSEGETINFO(pipes_struct
*p
)
549 struct ndr_pull
*pull
;
550 struct ndr_push
*push
;
553 struct WKSSVC_NETRUSEGETINFO r
;
554 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRUSEGETINFO");
556 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
557 talloc_free(mem_ctx
);
561 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
565 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
566 status
= ndr_pull_WKSSVC_NETRUSEGETINFO(pull
, NDR_IN
, &r
);
567 if (NT_STATUS_IS_ERR(status
)) {
568 talloc_free(mem_ctx
);
572 if (DEBUGLEVEL
>= 10)
573 NDR_PRINT_IN_DEBUG(WKSSVC_NETRUSEGETINFO
, &r
);
575 r
.out
.result
= _WKSSVC_NETRUSEGETINFO(p
);
577 if (DEBUGLEVEL
>= 10)
578 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRUSEGETINFO
, &r
);
580 push
= ndr_push_init_ctx(mem_ctx
);
582 talloc_free(mem_ctx
);
586 status
= ndr_push_WKSSVC_NETRUSEGETINFO(push
, NDR_OUT
, &r
);
587 if (NT_STATUS_IS_ERR(status
)) {
588 talloc_free(mem_ctx
);
592 blob
= ndr_push_blob(push
);
593 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
594 talloc_free(mem_ctx
);
598 talloc_free(mem_ctx
);
603 static BOOL
api_WKSSVC_NETRUSEDEL(pipes_struct
*p
)
605 struct ndr_pull
*pull
;
606 struct ndr_push
*push
;
609 struct WKSSVC_NETRUSEDEL r
;
610 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRUSEDEL");
612 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
613 talloc_free(mem_ctx
);
617 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
621 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
622 status
= ndr_pull_WKSSVC_NETRUSEDEL(pull
, NDR_IN
, &r
);
623 if (NT_STATUS_IS_ERR(status
)) {
624 talloc_free(mem_ctx
);
628 if (DEBUGLEVEL
>= 10)
629 NDR_PRINT_IN_DEBUG(WKSSVC_NETRUSEDEL
, &r
);
631 r
.out
.result
= _WKSSVC_NETRUSEDEL(p
);
633 if (DEBUGLEVEL
>= 10)
634 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRUSEDEL
, &r
);
636 push
= ndr_push_init_ctx(mem_ctx
);
638 talloc_free(mem_ctx
);
642 status
= ndr_push_WKSSVC_NETRUSEDEL(push
, NDR_OUT
, &r
);
643 if (NT_STATUS_IS_ERR(status
)) {
644 talloc_free(mem_ctx
);
648 blob
= ndr_push_blob(push
);
649 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
650 talloc_free(mem_ctx
);
654 talloc_free(mem_ctx
);
659 static BOOL
api_WKSSVC_NETRUSEENUM(pipes_struct
*p
)
661 struct ndr_pull
*pull
;
662 struct ndr_push
*push
;
665 struct WKSSVC_NETRUSEENUM r
;
666 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRUSEENUM");
668 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
669 talloc_free(mem_ctx
);
673 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
677 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
678 status
= ndr_pull_WKSSVC_NETRUSEENUM(pull
, NDR_IN
, &r
);
679 if (NT_STATUS_IS_ERR(status
)) {
680 talloc_free(mem_ctx
);
684 if (DEBUGLEVEL
>= 10)
685 NDR_PRINT_IN_DEBUG(WKSSVC_NETRUSEENUM
, &r
);
687 r
.out
.result
= _WKSSVC_NETRUSEENUM(p
);
689 if (DEBUGLEVEL
>= 10)
690 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRUSEENUM
, &r
);
692 push
= ndr_push_init_ctx(mem_ctx
);
694 talloc_free(mem_ctx
);
698 status
= ndr_push_WKSSVC_NETRUSEENUM(push
, NDR_OUT
, &r
);
699 if (NT_STATUS_IS_ERR(status
)) {
700 talloc_free(mem_ctx
);
704 blob
= ndr_push_blob(push
);
705 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
706 talloc_free(mem_ctx
);
710 talloc_free(mem_ctx
);
715 static BOOL
api_WKSSVC_NETRMESSAGEBUFFERSEND(pipes_struct
*p
)
717 struct ndr_pull
*pull
;
718 struct ndr_push
*push
;
721 struct WKSSVC_NETRMESSAGEBUFFERSEND r
;
722 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRMESSAGEBUFFERSEND");
724 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
725 talloc_free(mem_ctx
);
729 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
733 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
734 status
= ndr_pull_WKSSVC_NETRMESSAGEBUFFERSEND(pull
, NDR_IN
, &r
);
735 if (NT_STATUS_IS_ERR(status
)) {
736 talloc_free(mem_ctx
);
740 if (DEBUGLEVEL
>= 10)
741 NDR_PRINT_IN_DEBUG(WKSSVC_NETRMESSAGEBUFFERSEND
, &r
);
743 r
.out
.result
= _WKSSVC_NETRMESSAGEBUFFERSEND(p
);
745 if (DEBUGLEVEL
>= 10)
746 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRMESSAGEBUFFERSEND
, &r
);
748 push
= ndr_push_init_ctx(mem_ctx
);
750 talloc_free(mem_ctx
);
754 status
= ndr_push_WKSSVC_NETRMESSAGEBUFFERSEND(push
, NDR_OUT
, &r
);
755 if (NT_STATUS_IS_ERR(status
)) {
756 talloc_free(mem_ctx
);
760 blob
= ndr_push_blob(push
);
761 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
762 talloc_free(mem_ctx
);
766 talloc_free(mem_ctx
);
771 static BOOL
api_WKSSVC_NETRWORKSTATIONSTATISTICSGET(pipes_struct
*p
)
773 struct ndr_pull
*pull
;
774 struct ndr_push
*push
;
777 struct WKSSVC_NETRWORKSTATIONSTATISTICSGET r
;
778 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRWORKSTATIONSTATISTICSGET");
780 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
781 talloc_free(mem_ctx
);
785 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
789 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
790 status
= ndr_pull_WKSSVC_NETRWORKSTATIONSTATISTICSGET(pull
, NDR_IN
, &r
);
791 if (NT_STATUS_IS_ERR(status
)) {
792 talloc_free(mem_ctx
);
796 if (DEBUGLEVEL
>= 10)
797 NDR_PRINT_IN_DEBUG(WKSSVC_NETRWORKSTATIONSTATISTICSGET
, &r
);
799 r
.out
.result
= _WKSSVC_NETRWORKSTATIONSTATISTICSGET(p
);
801 if (DEBUGLEVEL
>= 10)
802 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRWORKSTATIONSTATISTICSGET
, &r
);
804 push
= ndr_push_init_ctx(mem_ctx
);
806 talloc_free(mem_ctx
);
810 status
= ndr_push_WKSSVC_NETRWORKSTATIONSTATISTICSGET(push
, NDR_OUT
, &r
);
811 if (NT_STATUS_IS_ERR(status
)) {
812 talloc_free(mem_ctx
);
816 blob
= ndr_push_blob(push
);
817 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
818 talloc_free(mem_ctx
);
822 talloc_free(mem_ctx
);
827 static BOOL
api_WKSSVC_NETRLOGONDOMAINNAMEADD(pipes_struct
*p
)
829 struct ndr_pull
*pull
;
830 struct ndr_push
*push
;
833 struct WKSSVC_NETRLOGONDOMAINNAMEADD r
;
834 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRLOGONDOMAINNAMEADD");
836 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
837 talloc_free(mem_ctx
);
841 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
845 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
846 status
= ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEADD(pull
, NDR_IN
, &r
);
847 if (NT_STATUS_IS_ERR(status
)) {
848 talloc_free(mem_ctx
);
852 if (DEBUGLEVEL
>= 10)
853 NDR_PRINT_IN_DEBUG(WKSSVC_NETRLOGONDOMAINNAMEADD
, &r
);
855 r
.out
.result
= _WKSSVC_NETRLOGONDOMAINNAMEADD(p
);
857 if (DEBUGLEVEL
>= 10)
858 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRLOGONDOMAINNAMEADD
, &r
);
860 push
= ndr_push_init_ctx(mem_ctx
);
862 talloc_free(mem_ctx
);
866 status
= ndr_push_WKSSVC_NETRLOGONDOMAINNAMEADD(push
, NDR_OUT
, &r
);
867 if (NT_STATUS_IS_ERR(status
)) {
868 talloc_free(mem_ctx
);
872 blob
= ndr_push_blob(push
);
873 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
874 talloc_free(mem_ctx
);
878 talloc_free(mem_ctx
);
883 static BOOL
api_WKSSVC_NETRLOGONDOMAINNAMEDEL(pipes_struct
*p
)
885 struct ndr_pull
*pull
;
886 struct ndr_push
*push
;
889 struct WKSSVC_NETRLOGONDOMAINNAMEDEL r
;
890 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRLOGONDOMAINNAMEDEL");
892 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
893 talloc_free(mem_ctx
);
897 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
901 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
902 status
= ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEDEL(pull
, NDR_IN
, &r
);
903 if (NT_STATUS_IS_ERR(status
)) {
904 talloc_free(mem_ctx
);
908 if (DEBUGLEVEL
>= 10)
909 NDR_PRINT_IN_DEBUG(WKSSVC_NETRLOGONDOMAINNAMEDEL
, &r
);
911 r
.out
.result
= _WKSSVC_NETRLOGONDOMAINNAMEDEL(p
);
913 if (DEBUGLEVEL
>= 10)
914 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRLOGONDOMAINNAMEDEL
, &r
);
916 push
= ndr_push_init_ctx(mem_ctx
);
918 talloc_free(mem_ctx
);
922 status
= ndr_push_WKSSVC_NETRLOGONDOMAINNAMEDEL(push
, NDR_OUT
, &r
);
923 if (NT_STATUS_IS_ERR(status
)) {
924 talloc_free(mem_ctx
);
928 blob
= ndr_push_blob(push
);
929 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
930 talloc_free(mem_ctx
);
934 talloc_free(mem_ctx
);
939 static BOOL
api_WKSSVC_NETRJOINDOMAIN(pipes_struct
*p
)
941 struct ndr_pull
*pull
;
942 struct ndr_push
*push
;
945 struct WKSSVC_NETRJOINDOMAIN r
;
946 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRJOINDOMAIN");
948 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
949 talloc_free(mem_ctx
);
953 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
957 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
958 status
= ndr_pull_WKSSVC_NETRJOINDOMAIN(pull
, NDR_IN
, &r
);
959 if (NT_STATUS_IS_ERR(status
)) {
960 talloc_free(mem_ctx
);
964 if (DEBUGLEVEL
>= 10)
965 NDR_PRINT_IN_DEBUG(WKSSVC_NETRJOINDOMAIN
, &r
);
967 r
.out
.result
= _WKSSVC_NETRJOINDOMAIN(p
);
969 if (DEBUGLEVEL
>= 10)
970 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRJOINDOMAIN
, &r
);
972 push
= ndr_push_init_ctx(mem_ctx
);
974 talloc_free(mem_ctx
);
978 status
= ndr_push_WKSSVC_NETRJOINDOMAIN(push
, NDR_OUT
, &r
);
979 if (NT_STATUS_IS_ERR(status
)) {
980 talloc_free(mem_ctx
);
984 blob
= ndr_push_blob(push
);
985 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
986 talloc_free(mem_ctx
);
990 talloc_free(mem_ctx
);
995 static BOOL
api_WKSSVC_NETRUNJOINDOMAIN(pipes_struct
*p
)
997 struct ndr_pull
*pull
;
998 struct ndr_push
*push
;
1001 struct WKSSVC_NETRUNJOINDOMAIN r
;
1002 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRUNJOINDOMAIN");
1004 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1005 talloc_free(mem_ctx
);
1009 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1013 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1014 status
= ndr_pull_WKSSVC_NETRUNJOINDOMAIN(pull
, NDR_IN
, &r
);
1015 if (NT_STATUS_IS_ERR(status
)) {
1016 talloc_free(mem_ctx
);
1020 if (DEBUGLEVEL
>= 10)
1021 NDR_PRINT_IN_DEBUG(WKSSVC_NETRUNJOINDOMAIN
, &r
);
1023 r
.out
.result
= _WKSSVC_NETRUNJOINDOMAIN(p
);
1025 if (DEBUGLEVEL
>= 10)
1026 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRUNJOINDOMAIN
, &r
);
1028 push
= ndr_push_init_ctx(mem_ctx
);
1030 talloc_free(mem_ctx
);
1034 status
= ndr_push_WKSSVC_NETRUNJOINDOMAIN(push
, NDR_OUT
, &r
);
1035 if (NT_STATUS_IS_ERR(status
)) {
1036 talloc_free(mem_ctx
);
1040 blob
= ndr_push_blob(push
);
1041 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
1042 talloc_free(mem_ctx
);
1046 talloc_free(mem_ctx
);
1051 static BOOL
api_WKSSVC_NETRRENAMEMACHINEINDOMAIN(pipes_struct
*p
)
1053 struct ndr_pull
*pull
;
1054 struct ndr_push
*push
;
1057 struct WKSSVC_NETRRENAMEMACHINEINDOMAIN r
;
1058 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRRENAMEMACHINEINDOMAIN");
1060 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1061 talloc_free(mem_ctx
);
1065 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1069 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1070 status
= ndr_pull_WKSSVC_NETRRENAMEMACHINEINDOMAIN(pull
, NDR_IN
, &r
);
1071 if (NT_STATUS_IS_ERR(status
)) {
1072 talloc_free(mem_ctx
);
1076 if (DEBUGLEVEL
>= 10)
1077 NDR_PRINT_IN_DEBUG(WKSSVC_NETRRENAMEMACHINEINDOMAIN
, &r
);
1079 r
.out
.result
= _WKSSVC_NETRRENAMEMACHINEINDOMAIN(p
);
1081 if (DEBUGLEVEL
>= 10)
1082 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRRENAMEMACHINEINDOMAIN
, &r
);
1084 push
= ndr_push_init_ctx(mem_ctx
);
1086 talloc_free(mem_ctx
);
1090 status
= ndr_push_WKSSVC_NETRRENAMEMACHINEINDOMAIN(push
, NDR_OUT
, &r
);
1091 if (NT_STATUS_IS_ERR(status
)) {
1092 talloc_free(mem_ctx
);
1096 blob
= ndr_push_blob(push
);
1097 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
1098 talloc_free(mem_ctx
);
1102 talloc_free(mem_ctx
);
1107 static BOOL
api_WKSSVC_NETRVALIDATENAME(pipes_struct
*p
)
1109 struct ndr_pull
*pull
;
1110 struct ndr_push
*push
;
1113 struct WKSSVC_NETRVALIDATENAME r
;
1114 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRVALIDATENAME");
1116 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1117 talloc_free(mem_ctx
);
1121 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1125 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1126 status
= ndr_pull_WKSSVC_NETRVALIDATENAME(pull
, NDR_IN
, &r
);
1127 if (NT_STATUS_IS_ERR(status
)) {
1128 talloc_free(mem_ctx
);
1132 if (DEBUGLEVEL
>= 10)
1133 NDR_PRINT_IN_DEBUG(WKSSVC_NETRVALIDATENAME
, &r
);
1135 r
.out
.result
= _WKSSVC_NETRVALIDATENAME(p
);
1137 if (DEBUGLEVEL
>= 10)
1138 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRVALIDATENAME
, &r
);
1140 push
= ndr_push_init_ctx(mem_ctx
);
1142 talloc_free(mem_ctx
);
1146 status
= ndr_push_WKSSVC_NETRVALIDATENAME(push
, NDR_OUT
, &r
);
1147 if (NT_STATUS_IS_ERR(status
)) {
1148 talloc_free(mem_ctx
);
1152 blob
= ndr_push_blob(push
);
1153 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
1154 talloc_free(mem_ctx
);
1158 talloc_free(mem_ctx
);
1163 static BOOL
api_WKSSVC_NETRGETJOININFORMATION(pipes_struct
*p
)
1165 struct ndr_pull
*pull
;
1166 struct ndr_push
*push
;
1169 struct WKSSVC_NETRGETJOININFORMATION r
;
1170 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRGETJOININFORMATION");
1172 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1173 talloc_free(mem_ctx
);
1177 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1181 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1182 status
= ndr_pull_WKSSVC_NETRGETJOININFORMATION(pull
, NDR_IN
, &r
);
1183 if (NT_STATUS_IS_ERR(status
)) {
1184 talloc_free(mem_ctx
);
1188 if (DEBUGLEVEL
>= 10)
1189 NDR_PRINT_IN_DEBUG(WKSSVC_NETRGETJOININFORMATION
, &r
);
1191 r
.out
.result
= _WKSSVC_NETRGETJOININFORMATION(p
);
1193 if (DEBUGLEVEL
>= 10)
1194 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRGETJOININFORMATION
, &r
);
1196 push
= ndr_push_init_ctx(mem_ctx
);
1198 talloc_free(mem_ctx
);
1202 status
= ndr_push_WKSSVC_NETRGETJOININFORMATION(push
, NDR_OUT
, &r
);
1203 if (NT_STATUS_IS_ERR(status
)) {
1204 talloc_free(mem_ctx
);
1208 blob
= ndr_push_blob(push
);
1209 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
1210 talloc_free(mem_ctx
);
1214 talloc_free(mem_ctx
);
1219 static BOOL
api_WKSSVC_NETRGETJOINABLEOUS(pipes_struct
*p
)
1221 struct ndr_pull
*pull
;
1222 struct ndr_push
*push
;
1225 struct WKSSVC_NETRGETJOINABLEOUS r
;
1226 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRGETJOINABLEOUS");
1228 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1229 talloc_free(mem_ctx
);
1233 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1237 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1238 status
= ndr_pull_WKSSVC_NETRGETJOINABLEOUS(pull
, NDR_IN
, &r
);
1239 if (NT_STATUS_IS_ERR(status
)) {
1240 talloc_free(mem_ctx
);
1244 if (DEBUGLEVEL
>= 10)
1245 NDR_PRINT_IN_DEBUG(WKSSVC_NETRGETJOINABLEOUS
, &r
);
1247 r
.out
.result
= _WKSSVC_NETRGETJOINABLEOUS(p
);
1249 if (DEBUGLEVEL
>= 10)
1250 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRGETJOINABLEOUS
, &r
);
1252 push
= ndr_push_init_ctx(mem_ctx
);
1254 talloc_free(mem_ctx
);
1258 status
= ndr_push_WKSSVC_NETRGETJOINABLEOUS(push
, NDR_OUT
, &r
);
1259 if (NT_STATUS_IS_ERR(status
)) {
1260 talloc_free(mem_ctx
);
1264 blob
= ndr_push_blob(push
);
1265 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
1266 talloc_free(mem_ctx
);
1270 talloc_free(mem_ctx
);
1275 static BOOL
api_wkssvc_NetrJoinDomain2(pipes_struct
*p
)
1277 struct ndr_pull
*pull
;
1278 struct ndr_push
*push
;
1281 struct wkssvc_NetrJoinDomain2 r
;
1282 TALLOC_CTX
*mem_ctx
= talloc_init("api_wkssvc_NetrJoinDomain2");
1284 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1285 talloc_free(mem_ctx
);
1289 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1293 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1294 status
= ndr_pull_wkssvc_NetrJoinDomain2(pull
, NDR_IN
, &r
);
1295 if (NT_STATUS_IS_ERR(status
)) {
1296 talloc_free(mem_ctx
);
1300 if (DEBUGLEVEL
>= 10)
1301 NDR_PRINT_IN_DEBUG(wkssvc_NetrJoinDomain2
, &r
);
1303 r
.out
.result
= _wkssvc_NetrJoinDomain2(p
, r
.in
.server_name
, r
.in
.domain_name
, r
.in
.account_name
, r
.in
.admin_account
, r
.in
.encrypted_password
, r
.in
.join_flags
);
1305 if (DEBUGLEVEL
>= 10)
1306 NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain2
, &r
);
1308 push
= ndr_push_init_ctx(mem_ctx
);
1310 talloc_free(mem_ctx
);
1314 status
= ndr_push_wkssvc_NetrJoinDomain2(push
, NDR_OUT
, &r
);
1315 if (NT_STATUS_IS_ERR(status
)) {
1316 talloc_free(mem_ctx
);
1320 blob
= ndr_push_blob(push
);
1321 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
1322 talloc_free(mem_ctx
);
1326 talloc_free(mem_ctx
);
1331 static BOOL
api_wkssvc_NetrUnjoinDomain2(pipes_struct
*p
)
1333 struct ndr_pull
*pull
;
1334 struct ndr_push
*push
;
1337 struct wkssvc_NetrUnjoinDomain2 r
;
1338 TALLOC_CTX
*mem_ctx
= talloc_init("api_wkssvc_NetrUnjoinDomain2");
1340 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1341 talloc_free(mem_ctx
);
1345 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1349 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1350 status
= ndr_pull_wkssvc_NetrUnjoinDomain2(pull
, NDR_IN
, &r
);
1351 if (NT_STATUS_IS_ERR(status
)) {
1352 talloc_free(mem_ctx
);
1356 if (DEBUGLEVEL
>= 10)
1357 NDR_PRINT_IN_DEBUG(wkssvc_NetrUnjoinDomain2
, &r
);
1359 r
.out
.result
= _wkssvc_NetrUnjoinDomain2(p
, r
.in
.server_name
, r
.in
.account
, r
.in
.encrypted_password
, r
.in
.unjoin_flags
);
1361 if (DEBUGLEVEL
>= 10)
1362 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain2
, &r
);
1364 push
= ndr_push_init_ctx(mem_ctx
);
1366 talloc_free(mem_ctx
);
1370 status
= ndr_push_wkssvc_NetrUnjoinDomain2(push
, NDR_OUT
, &r
);
1371 if (NT_STATUS_IS_ERR(status
)) {
1372 talloc_free(mem_ctx
);
1376 blob
= ndr_push_blob(push
);
1377 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
1378 talloc_free(mem_ctx
);
1382 talloc_free(mem_ctx
);
1387 static BOOL
api_wkssvc_NetrRenameMachineInDomain2(pipes_struct
*p
)
1389 struct ndr_pull
*pull
;
1390 struct ndr_push
*push
;
1393 struct wkssvc_NetrRenameMachineInDomain2 r
;
1394 TALLOC_CTX
*mem_ctx
= talloc_init("api_wkssvc_NetrRenameMachineInDomain2");
1396 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1397 talloc_free(mem_ctx
);
1401 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1405 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1406 status
= ndr_pull_wkssvc_NetrRenameMachineInDomain2(pull
, NDR_IN
, &r
);
1407 if (NT_STATUS_IS_ERR(status
)) {
1408 talloc_free(mem_ctx
);
1412 if (DEBUGLEVEL
>= 10)
1413 NDR_PRINT_IN_DEBUG(wkssvc_NetrRenameMachineInDomain2
, &r
);
1415 r
.out
.result
= _wkssvc_NetrRenameMachineInDomain2(p
, r
.in
.server_name
, r
.in
.NewMachineName
, r
.in
.Account
, r
.in
.EncryptedPassword
, r
.in
.RenameOptions
);
1417 if (DEBUGLEVEL
>= 10)
1418 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain2
, &r
);
1420 push
= ndr_push_init_ctx(mem_ctx
);
1422 talloc_free(mem_ctx
);
1426 status
= ndr_push_wkssvc_NetrRenameMachineInDomain2(push
, NDR_OUT
, &r
);
1427 if (NT_STATUS_IS_ERR(status
)) {
1428 talloc_free(mem_ctx
);
1432 blob
= ndr_push_blob(push
);
1433 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
1434 talloc_free(mem_ctx
);
1438 talloc_free(mem_ctx
);
1443 static BOOL
api_WKSSVC_NETRVALIDATENAME2(pipes_struct
*p
)
1445 struct ndr_pull
*pull
;
1446 struct ndr_push
*push
;
1449 struct WKSSVC_NETRVALIDATENAME2 r
;
1450 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRVALIDATENAME2");
1452 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1453 talloc_free(mem_ctx
);
1457 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1461 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1462 status
= ndr_pull_WKSSVC_NETRVALIDATENAME2(pull
, NDR_IN
, &r
);
1463 if (NT_STATUS_IS_ERR(status
)) {
1464 talloc_free(mem_ctx
);
1468 if (DEBUGLEVEL
>= 10)
1469 NDR_PRINT_IN_DEBUG(WKSSVC_NETRVALIDATENAME2
, &r
);
1471 r
.out
.result
= _WKSSVC_NETRVALIDATENAME2(p
);
1473 if (DEBUGLEVEL
>= 10)
1474 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRVALIDATENAME2
, &r
);
1476 push
= ndr_push_init_ctx(mem_ctx
);
1478 talloc_free(mem_ctx
);
1482 status
= ndr_push_WKSSVC_NETRVALIDATENAME2(push
, NDR_OUT
, &r
);
1483 if (NT_STATUS_IS_ERR(status
)) {
1484 talloc_free(mem_ctx
);
1488 blob
= ndr_push_blob(push
);
1489 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
1490 talloc_free(mem_ctx
);
1494 talloc_free(mem_ctx
);
1499 static BOOL
api_WKSSVC_NETRGETJOINABLEOUS2(pipes_struct
*p
)
1501 struct ndr_pull
*pull
;
1502 struct ndr_push
*push
;
1505 struct WKSSVC_NETRGETJOINABLEOUS2 r
;
1506 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRGETJOINABLEOUS2");
1508 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1509 talloc_free(mem_ctx
);
1513 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1517 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1518 status
= ndr_pull_WKSSVC_NETRGETJOINABLEOUS2(pull
, NDR_IN
, &r
);
1519 if (NT_STATUS_IS_ERR(status
)) {
1520 talloc_free(mem_ctx
);
1524 if (DEBUGLEVEL
>= 10)
1525 NDR_PRINT_IN_DEBUG(WKSSVC_NETRGETJOINABLEOUS2
, &r
);
1527 r
.out
.result
= _WKSSVC_NETRGETJOINABLEOUS2(p
);
1529 if (DEBUGLEVEL
>= 10)
1530 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRGETJOINABLEOUS2
, &r
);
1532 push
= ndr_push_init_ctx(mem_ctx
);
1534 talloc_free(mem_ctx
);
1538 status
= ndr_push_WKSSVC_NETRGETJOINABLEOUS2(push
, NDR_OUT
, &r
);
1539 if (NT_STATUS_IS_ERR(status
)) {
1540 talloc_free(mem_ctx
);
1544 blob
= ndr_push_blob(push
);
1545 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
1546 talloc_free(mem_ctx
);
1550 talloc_free(mem_ctx
);
1555 static BOOL
api_wkssvc_NetrAddAlternateComputerName(pipes_struct
*p
)
1557 struct ndr_pull
*pull
;
1558 struct ndr_push
*push
;
1561 struct wkssvc_NetrAddAlternateComputerName r
;
1562 TALLOC_CTX
*mem_ctx
= talloc_init("api_wkssvc_NetrAddAlternateComputerName");
1564 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1565 talloc_free(mem_ctx
);
1569 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1573 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1574 status
= ndr_pull_wkssvc_NetrAddAlternateComputerName(pull
, NDR_IN
, &r
);
1575 if (NT_STATUS_IS_ERR(status
)) {
1576 talloc_free(mem_ctx
);
1580 if (DEBUGLEVEL
>= 10)
1581 NDR_PRINT_IN_DEBUG(wkssvc_NetrAddAlternateComputerName
, &r
);
1583 r
.out
.result
= _wkssvc_NetrAddAlternateComputerName(p
, r
.in
.server_name
, r
.in
.NewAlternateMachineName
, r
.in
.Account
, r
.in
.EncryptedPassword
, r
.in
.Reserved
);
1585 if (DEBUGLEVEL
>= 10)
1586 NDR_PRINT_OUT_DEBUG(wkssvc_NetrAddAlternateComputerName
, &r
);
1588 push
= ndr_push_init_ctx(mem_ctx
);
1590 talloc_free(mem_ctx
);
1594 status
= ndr_push_wkssvc_NetrAddAlternateComputerName(push
, NDR_OUT
, &r
);
1595 if (NT_STATUS_IS_ERR(status
)) {
1596 talloc_free(mem_ctx
);
1600 blob
= ndr_push_blob(push
);
1601 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
1602 talloc_free(mem_ctx
);
1606 talloc_free(mem_ctx
);
1611 static BOOL
api_wkssvc_NetrRemoveAlternateComputerName(pipes_struct
*p
)
1613 struct ndr_pull
*pull
;
1614 struct ndr_push
*push
;
1617 struct wkssvc_NetrRemoveAlternateComputerName r
;
1618 TALLOC_CTX
*mem_ctx
= talloc_init("api_wkssvc_NetrRemoveAlternateComputerName");
1620 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1621 talloc_free(mem_ctx
);
1625 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1629 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1630 status
= ndr_pull_wkssvc_NetrRemoveAlternateComputerName(pull
, NDR_IN
, &r
);
1631 if (NT_STATUS_IS_ERR(status
)) {
1632 talloc_free(mem_ctx
);
1636 if (DEBUGLEVEL
>= 10)
1637 NDR_PRINT_IN_DEBUG(wkssvc_NetrRemoveAlternateComputerName
, &r
);
1639 r
.out
.result
= _wkssvc_NetrRemoveAlternateComputerName(p
, r
.in
.server_name
, r
.in
.AlternateMachineNameToRemove
, r
.in
.Account
, r
.in
.EncryptedPassword
, r
.in
.Reserved
);
1641 if (DEBUGLEVEL
>= 10)
1642 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRemoveAlternateComputerName
, &r
);
1644 push
= ndr_push_init_ctx(mem_ctx
);
1646 talloc_free(mem_ctx
);
1650 status
= ndr_push_wkssvc_NetrRemoveAlternateComputerName(push
, NDR_OUT
, &r
);
1651 if (NT_STATUS_IS_ERR(status
)) {
1652 talloc_free(mem_ctx
);
1656 blob
= ndr_push_blob(push
);
1657 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
1658 talloc_free(mem_ctx
);
1662 talloc_free(mem_ctx
);
1667 static BOOL
api_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(pipes_struct
*p
)
1669 struct ndr_pull
*pull
;
1670 struct ndr_push
*push
;
1673 struct WKSSVC_NETRSETPRIMARYCOMPUTERNAME r
;
1674 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRSETPRIMARYCOMPUTERNAME");
1676 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1677 talloc_free(mem_ctx
);
1681 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1685 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1686 status
= ndr_pull_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(pull
, NDR_IN
, &r
);
1687 if (NT_STATUS_IS_ERR(status
)) {
1688 talloc_free(mem_ctx
);
1692 if (DEBUGLEVEL
>= 10)
1693 NDR_PRINT_IN_DEBUG(WKSSVC_NETRSETPRIMARYCOMPUTERNAME
, &r
);
1695 r
.out
.result
= _WKSSVC_NETRSETPRIMARYCOMPUTERNAME(p
);
1697 if (DEBUGLEVEL
>= 10)
1698 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRSETPRIMARYCOMPUTERNAME
, &r
);
1700 push
= ndr_push_init_ctx(mem_ctx
);
1702 talloc_free(mem_ctx
);
1706 status
= ndr_push_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(push
, NDR_OUT
, &r
);
1707 if (NT_STATUS_IS_ERR(status
)) {
1708 talloc_free(mem_ctx
);
1712 blob
= ndr_push_blob(push
);
1713 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
1714 talloc_free(mem_ctx
);
1718 talloc_free(mem_ctx
);
1723 static BOOL
api_WKSSVC_NETRENUMERATECOMPUTERNAMES(pipes_struct
*p
)
1725 struct ndr_pull
*pull
;
1726 struct ndr_push
*push
;
1729 struct WKSSVC_NETRENUMERATECOMPUTERNAMES r
;
1730 TALLOC_CTX
*mem_ctx
= talloc_init("api_WKSSVC_NETRENUMERATECOMPUTERNAMES");
1732 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1733 talloc_free(mem_ctx
);
1737 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1741 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1742 status
= ndr_pull_WKSSVC_NETRENUMERATECOMPUTERNAMES(pull
, NDR_IN
, &r
);
1743 if (NT_STATUS_IS_ERR(status
)) {
1744 talloc_free(mem_ctx
);
1748 if (DEBUGLEVEL
>= 10)
1749 NDR_PRINT_IN_DEBUG(WKSSVC_NETRENUMERATECOMPUTERNAMES
, &r
);
1751 r
.out
.result
= _WKSSVC_NETRENUMERATECOMPUTERNAMES(p
);
1753 if (DEBUGLEVEL
>= 10)
1754 NDR_PRINT_OUT_DEBUG(WKSSVC_NETRENUMERATECOMPUTERNAMES
, &r
);
1756 push
= ndr_push_init_ctx(mem_ctx
);
1758 talloc_free(mem_ctx
);
1762 status
= ndr_push_WKSSVC_NETRENUMERATECOMPUTERNAMES(push
, NDR_OUT
, &r
);
1763 if (NT_STATUS_IS_ERR(status
)) {
1764 talloc_free(mem_ctx
);
1768 blob
= ndr_push_blob(push
);
1769 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
1770 talloc_free(mem_ctx
);
1774 talloc_free(mem_ctx
);
1781 static struct api_struct api_wkssvc_cmds
[] =
1783 {"WKSSVC_NETWKSTAGETINFO", DCERPC_WKSSVC_NETWKSTAGETINFO
, api_wkssvc_NetWkstaGetInfo
},
1784 {"WKSSVC_NETWKSTASETINFO", DCERPC_WKSSVC_NETWKSTASETINFO
, api_wkssvc_NetWkstaSetInfo
},
1785 {"WKSSVC_NETWKSTAENUMUSERS", DCERPC_WKSSVC_NETWKSTAENUMUSERS
, api_wkssvc_NetWkstaEnumUsers
},
1786 {"WKSSVC_NETRWKSTAUSERGETINFO", DCERPC_WKSSVC_NETRWKSTAUSERGETINFO
, api_WKSSVC_NETRWKSTAUSERGETINFO
},
1787 {"WKSSVC_NETRWKSTAUSERSETINFO", DCERPC_WKSSVC_NETRWKSTAUSERSETINFO
, api_WKSSVC_NETRWKSTAUSERSETINFO
},
1788 {"WKSSVC_NETWKSTATRANSPORTENUM", DCERPC_WKSSVC_NETWKSTATRANSPORTENUM
, api_wkssvc_NetWkstaTransportEnum
},
1789 {"WKSSVC_NETRWKSTATRANSPORTADD", DCERPC_WKSSVC_NETRWKSTATRANSPORTADD
, api_WKSSVC_NETRWKSTATRANSPORTADD
},
1790 {"WKSSVC_NETRWKSTATRANSPORTDEL", DCERPC_WKSSVC_NETRWKSTATRANSPORTDEL
, api_WKSSVC_NETRWKSTATRANSPORTDEL
},
1791 {"WKSSVC_NETRUSEADD", DCERPC_WKSSVC_NETRUSEADD
, api_WKSSVC_NETRUSEADD
},
1792 {"WKSSVC_NETRUSEGETINFO", DCERPC_WKSSVC_NETRUSEGETINFO
, api_WKSSVC_NETRUSEGETINFO
},
1793 {"WKSSVC_NETRUSEDEL", DCERPC_WKSSVC_NETRUSEDEL
, api_WKSSVC_NETRUSEDEL
},
1794 {"WKSSVC_NETRUSEENUM", DCERPC_WKSSVC_NETRUSEENUM
, api_WKSSVC_NETRUSEENUM
},
1795 {"WKSSVC_NETRMESSAGEBUFFERSEND", DCERPC_WKSSVC_NETRMESSAGEBUFFERSEND
, api_WKSSVC_NETRMESSAGEBUFFERSEND
},
1796 {"WKSSVC_NETRWORKSTATIONSTATISTICSGET", DCERPC_WKSSVC_NETRWORKSTATIONSTATISTICSGET
, api_WKSSVC_NETRWORKSTATIONSTATISTICSGET
},
1797 {"WKSSVC_NETRLOGONDOMAINNAMEADD", DCERPC_WKSSVC_NETRLOGONDOMAINNAMEADD
, api_WKSSVC_NETRLOGONDOMAINNAMEADD
},
1798 {"WKSSVC_NETRLOGONDOMAINNAMEDEL", DCERPC_WKSSVC_NETRLOGONDOMAINNAMEDEL
, api_WKSSVC_NETRLOGONDOMAINNAMEDEL
},
1799 {"WKSSVC_NETRJOINDOMAIN", DCERPC_WKSSVC_NETRJOINDOMAIN
, api_WKSSVC_NETRJOINDOMAIN
},
1800 {"WKSSVC_NETRUNJOINDOMAIN", DCERPC_WKSSVC_NETRUNJOINDOMAIN
, api_WKSSVC_NETRUNJOINDOMAIN
},
1801 {"WKSSVC_NETRRENAMEMACHINEINDOMAIN", DCERPC_WKSSVC_NETRRENAMEMACHINEINDOMAIN
, api_WKSSVC_NETRRENAMEMACHINEINDOMAIN
},
1802 {"WKSSVC_NETRVALIDATENAME", DCERPC_WKSSVC_NETRVALIDATENAME
, api_WKSSVC_NETRVALIDATENAME
},
1803 {"WKSSVC_NETRGETJOININFORMATION", DCERPC_WKSSVC_NETRGETJOININFORMATION
, api_WKSSVC_NETRGETJOININFORMATION
},
1804 {"WKSSVC_NETRGETJOINABLEOUS", DCERPC_WKSSVC_NETRGETJOINABLEOUS
, api_WKSSVC_NETRGETJOINABLEOUS
},
1805 {"WKSSVC_NETRJOINDOMAIN2", DCERPC_WKSSVC_NETRJOINDOMAIN2
, api_wkssvc_NetrJoinDomain2
},
1806 {"WKSSVC_NETRUNJOINDOMAIN2", DCERPC_WKSSVC_NETRUNJOINDOMAIN2
, api_wkssvc_NetrUnjoinDomain2
},
1807 {"WKSSVC_NETRRENAMEMACHINEINDOMAIN2", DCERPC_WKSSVC_NETRRENAMEMACHINEINDOMAIN2
, api_wkssvc_NetrRenameMachineInDomain2
},
1808 {"WKSSVC_NETRVALIDATENAME2", DCERPC_WKSSVC_NETRVALIDATENAME2
, api_WKSSVC_NETRVALIDATENAME2
},
1809 {"WKSSVC_NETRGETJOINABLEOUS2", DCERPC_WKSSVC_NETRGETJOINABLEOUS2
, api_WKSSVC_NETRGETJOINABLEOUS2
},
1810 {"WKSSVC_NETRADDALTERNATECOMPUTERNAME", DCERPC_WKSSVC_NETRADDALTERNATECOMPUTERNAME
, api_wkssvc_NetrAddAlternateComputerName
},
1811 {"WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME", DCERPC_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME
, api_wkssvc_NetrRemoveAlternateComputerName
},
1812 {"WKSSVC_NETRSETPRIMARYCOMPUTERNAME", DCERPC_WKSSVC_NETRSETPRIMARYCOMPUTERNAME
, api_WKSSVC_NETRSETPRIMARYCOMPUTERNAME
},
1813 {"WKSSVC_NETRENUMERATECOMPUTERNAMES", DCERPC_WKSSVC_NETRENUMERATECOMPUTERNAMES
, api_WKSSVC_NETRENUMERATECOMPUTERNAMES
},
1816 void wkssvc_get_pipe_fns(struct api_struct
**fns
, int *n_fns
)
1818 *fns
= api_wkssvc_cmds
;
1819 *n_fns
= sizeof(api_wkssvc_cmds
) / sizeof(struct api_struct
);
1822 NTSTATUS
rpc_wkssvc_init(void)
1824 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION
, "wkssvc", "wkssvc", api_wkssvc_cmds
, sizeof(api_wkssvc_cmds
) / sizeof(struct api_struct
));