libreplace: also use AC_LIBREPLACE_NETWORK_CHECKS for the standalone build
[Samba.git] / source / librpc / gen_ndr / srv_ntsvcs.c
blob523b4d8c91e4c71ec4fa6bc85c2aab3fa1758d2c
1 /*
2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
7 #include "librpc/gen_ndr/srv_ntsvcs.h"
9 static bool api_PNP_Disconnect(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;
15 DATA_BLOB blob;
16 struct PNP_Disconnect *r;
18 call = &ndr_table_ntsvcs.calls[NDR_PNP_DISCONNECT];
20 r = talloc(talloc_tos(), struct PNP_Disconnect);
21 if (r == NULL) {
22 return false;
25 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
26 talloc_free(r);
27 return false;
30 pull = ndr_pull_init_blob(&blob, r);
31 if (pull == NULL) {
32 talloc_free(r);
33 return false;
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)) {
39 talloc_free(r);
40 return false;
43 if (DEBUGLEVEL >= 10) {
44 NDR_PRINT_IN_DEBUG(PNP_Disconnect, r);
47 r->out.result = _PNP_Disconnect(p, r);
49 if (p->rng_fault_state) {
50 talloc_free(r);
51 /* Return true here, srv_pipe_hnd.c will take care */
52 return true;
55 if (DEBUGLEVEL >= 10) {
56 NDR_PRINT_OUT_DEBUG(PNP_Disconnect, r);
59 push = ndr_push_init_ctx(r);
60 if (push == NULL) {
61 talloc_free(r);
62 return false;
65 ndr_err = call->ndr_push(push, NDR_OUT, r);
66 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
67 talloc_free(r);
68 return false;
71 blob = ndr_push_blob(push);
72 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
73 talloc_free(r);
74 return false;
77 talloc_free(r);
79 return true;
82 static bool api_PNP_Connect(pipes_struct *p)
84 const struct ndr_interface_call *call;
85 struct ndr_pull *pull;
86 struct ndr_push *push;
87 enum ndr_err_code ndr_err;
88 DATA_BLOB blob;
89 struct PNP_Connect *r;
91 call = &ndr_table_ntsvcs.calls[NDR_PNP_CONNECT];
93 r = talloc(talloc_tos(), struct PNP_Connect);
94 if (r == NULL) {
95 return false;
98 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
99 talloc_free(r);
100 return false;
103 pull = ndr_pull_init_blob(&blob, r);
104 if (pull == NULL) {
105 talloc_free(r);
106 return false;
109 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
110 ndr_err = call->ndr_pull(pull, NDR_IN, r);
111 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
112 talloc_free(r);
113 return false;
116 if (DEBUGLEVEL >= 10) {
117 NDR_PRINT_IN_DEBUG(PNP_Connect, r);
120 r->out.result = _PNP_Connect(p, r);
122 if (p->rng_fault_state) {
123 talloc_free(r);
124 /* Return true here, srv_pipe_hnd.c will take care */
125 return true;
128 if (DEBUGLEVEL >= 10) {
129 NDR_PRINT_OUT_DEBUG(PNP_Connect, r);
132 push = ndr_push_init_ctx(r);
133 if (push == NULL) {
134 talloc_free(r);
135 return false;
138 ndr_err = call->ndr_push(push, NDR_OUT, r);
139 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
140 talloc_free(r);
141 return false;
144 blob = ndr_push_blob(push);
145 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
146 talloc_free(r);
147 return false;
150 talloc_free(r);
152 return true;
155 static bool api_PNP_GetVersion(pipes_struct *p)
157 const struct ndr_interface_call *call;
158 struct ndr_pull *pull;
159 struct ndr_push *push;
160 enum ndr_err_code ndr_err;
161 DATA_BLOB blob;
162 struct PNP_GetVersion *r;
164 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETVERSION];
166 r = talloc(talloc_tos(), struct PNP_GetVersion);
167 if (r == NULL) {
168 return false;
171 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
172 talloc_free(r);
173 return false;
176 pull = ndr_pull_init_blob(&blob, r);
177 if (pull == NULL) {
178 talloc_free(r);
179 return false;
182 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
183 ndr_err = call->ndr_pull(pull, NDR_IN, r);
184 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
185 talloc_free(r);
186 return false;
189 if (DEBUGLEVEL >= 10) {
190 NDR_PRINT_IN_DEBUG(PNP_GetVersion, r);
193 ZERO_STRUCT(r->out);
194 r->out.version = talloc_zero(r, uint16_t);
195 if (r->out.version == NULL) {
196 talloc_free(r);
197 return false;
200 r->out.result = _PNP_GetVersion(p, r);
202 if (p->rng_fault_state) {
203 talloc_free(r);
204 /* Return true here, srv_pipe_hnd.c will take care */
205 return true;
208 if (DEBUGLEVEL >= 10) {
209 NDR_PRINT_OUT_DEBUG(PNP_GetVersion, r);
212 push = ndr_push_init_ctx(r);
213 if (push == NULL) {
214 talloc_free(r);
215 return false;
218 ndr_err = call->ndr_push(push, NDR_OUT, r);
219 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
220 talloc_free(r);
221 return false;
224 blob = ndr_push_blob(push);
225 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
226 talloc_free(r);
227 return false;
230 talloc_free(r);
232 return true;
235 static bool api_PNP_GetGlobalState(pipes_struct *p)
237 const struct ndr_interface_call *call;
238 struct ndr_pull *pull;
239 struct ndr_push *push;
240 enum ndr_err_code ndr_err;
241 DATA_BLOB blob;
242 struct PNP_GetGlobalState *r;
244 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETGLOBALSTATE];
246 r = talloc(talloc_tos(), struct PNP_GetGlobalState);
247 if (r == NULL) {
248 return false;
251 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
252 talloc_free(r);
253 return false;
256 pull = ndr_pull_init_blob(&blob, r);
257 if (pull == NULL) {
258 talloc_free(r);
259 return false;
262 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
263 ndr_err = call->ndr_pull(pull, NDR_IN, r);
264 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
265 talloc_free(r);
266 return false;
269 if (DEBUGLEVEL >= 10) {
270 NDR_PRINT_IN_DEBUG(PNP_GetGlobalState, r);
273 r->out.result = _PNP_GetGlobalState(p, r);
275 if (p->rng_fault_state) {
276 talloc_free(r);
277 /* Return true here, srv_pipe_hnd.c will take care */
278 return true;
281 if (DEBUGLEVEL >= 10) {
282 NDR_PRINT_OUT_DEBUG(PNP_GetGlobalState, r);
285 push = ndr_push_init_ctx(r);
286 if (push == NULL) {
287 talloc_free(r);
288 return false;
291 ndr_err = call->ndr_push(push, NDR_OUT, r);
292 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
293 talloc_free(r);
294 return false;
297 blob = ndr_push_blob(push);
298 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
299 talloc_free(r);
300 return false;
303 talloc_free(r);
305 return true;
308 static bool api_PNP_InitDetection(pipes_struct *p)
310 const struct ndr_interface_call *call;
311 struct ndr_pull *pull;
312 struct ndr_push *push;
313 enum ndr_err_code ndr_err;
314 DATA_BLOB blob;
315 struct PNP_InitDetection *r;
317 call = &ndr_table_ntsvcs.calls[NDR_PNP_INITDETECTION];
319 r = talloc(talloc_tos(), struct PNP_InitDetection);
320 if (r == NULL) {
321 return false;
324 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
325 talloc_free(r);
326 return false;
329 pull = ndr_pull_init_blob(&blob, r);
330 if (pull == NULL) {
331 talloc_free(r);
332 return false;
335 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
336 ndr_err = call->ndr_pull(pull, NDR_IN, r);
337 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
338 talloc_free(r);
339 return false;
342 if (DEBUGLEVEL >= 10) {
343 NDR_PRINT_IN_DEBUG(PNP_InitDetection, r);
346 r->out.result = _PNP_InitDetection(p, r);
348 if (p->rng_fault_state) {
349 talloc_free(r);
350 /* Return true here, srv_pipe_hnd.c will take care */
351 return true;
354 if (DEBUGLEVEL >= 10) {
355 NDR_PRINT_OUT_DEBUG(PNP_InitDetection, r);
358 push = ndr_push_init_ctx(r);
359 if (push == NULL) {
360 talloc_free(r);
361 return false;
364 ndr_err = call->ndr_push(push, NDR_OUT, r);
365 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
366 talloc_free(r);
367 return false;
370 blob = ndr_push_blob(push);
371 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
372 talloc_free(r);
373 return false;
376 talloc_free(r);
378 return true;
381 static bool api_PNP_ReportLogOn(pipes_struct *p)
383 const struct ndr_interface_call *call;
384 struct ndr_pull *pull;
385 struct ndr_push *push;
386 enum ndr_err_code ndr_err;
387 DATA_BLOB blob;
388 struct PNP_ReportLogOn *r;
390 call = &ndr_table_ntsvcs.calls[NDR_PNP_REPORTLOGON];
392 r = talloc(talloc_tos(), struct PNP_ReportLogOn);
393 if (r == NULL) {
394 return false;
397 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
398 talloc_free(r);
399 return false;
402 pull = ndr_pull_init_blob(&blob, r);
403 if (pull == NULL) {
404 talloc_free(r);
405 return false;
408 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
409 ndr_err = call->ndr_pull(pull, NDR_IN, r);
410 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
411 talloc_free(r);
412 return false;
415 if (DEBUGLEVEL >= 10) {
416 NDR_PRINT_IN_DEBUG(PNP_ReportLogOn, r);
419 r->out.result = _PNP_ReportLogOn(p, r);
421 if (p->rng_fault_state) {
422 talloc_free(r);
423 /* Return true here, srv_pipe_hnd.c will take care */
424 return true;
427 if (DEBUGLEVEL >= 10) {
428 NDR_PRINT_OUT_DEBUG(PNP_ReportLogOn, r);
431 push = ndr_push_init_ctx(r);
432 if (push == NULL) {
433 talloc_free(r);
434 return false;
437 ndr_err = call->ndr_push(push, NDR_OUT, r);
438 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
439 talloc_free(r);
440 return false;
443 blob = ndr_push_blob(push);
444 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
445 talloc_free(r);
446 return false;
449 talloc_free(r);
451 return true;
454 static bool api_PNP_ValidateDeviceInstance(pipes_struct *p)
456 const struct ndr_interface_call *call;
457 struct ndr_pull *pull;
458 struct ndr_push *push;
459 enum ndr_err_code ndr_err;
460 DATA_BLOB blob;
461 struct PNP_ValidateDeviceInstance *r;
463 call = &ndr_table_ntsvcs.calls[NDR_PNP_VALIDATEDEVICEINSTANCE];
465 r = talloc(talloc_tos(), struct PNP_ValidateDeviceInstance);
466 if (r == NULL) {
467 return false;
470 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
471 talloc_free(r);
472 return false;
475 pull = ndr_pull_init_blob(&blob, r);
476 if (pull == NULL) {
477 talloc_free(r);
478 return false;
481 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
482 ndr_err = call->ndr_pull(pull, NDR_IN, r);
483 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
484 talloc_free(r);
485 return false;
488 if (DEBUGLEVEL >= 10) {
489 NDR_PRINT_IN_DEBUG(PNP_ValidateDeviceInstance, r);
492 r->out.result = _PNP_ValidateDeviceInstance(p, r);
494 if (p->rng_fault_state) {
495 talloc_free(r);
496 /* Return true here, srv_pipe_hnd.c will take care */
497 return true;
500 if (DEBUGLEVEL >= 10) {
501 NDR_PRINT_OUT_DEBUG(PNP_ValidateDeviceInstance, r);
504 push = ndr_push_init_ctx(r);
505 if (push == NULL) {
506 talloc_free(r);
507 return false;
510 ndr_err = call->ndr_push(push, NDR_OUT, r);
511 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
512 talloc_free(r);
513 return false;
516 blob = ndr_push_blob(push);
517 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
518 talloc_free(r);
519 return false;
522 talloc_free(r);
524 return true;
527 static bool api_PNP_GetRootDeviceInstance(pipes_struct *p)
529 const struct ndr_interface_call *call;
530 struct ndr_pull *pull;
531 struct ndr_push *push;
532 enum ndr_err_code ndr_err;
533 DATA_BLOB blob;
534 struct PNP_GetRootDeviceInstance *r;
536 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETROOTDEVICEINSTANCE];
538 r = talloc(talloc_tos(), struct PNP_GetRootDeviceInstance);
539 if (r == NULL) {
540 return false;
543 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
544 talloc_free(r);
545 return false;
548 pull = ndr_pull_init_blob(&blob, r);
549 if (pull == NULL) {
550 talloc_free(r);
551 return false;
554 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
555 ndr_err = call->ndr_pull(pull, NDR_IN, r);
556 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
557 talloc_free(r);
558 return false;
561 if (DEBUGLEVEL >= 10) {
562 NDR_PRINT_IN_DEBUG(PNP_GetRootDeviceInstance, r);
565 r->out.result = _PNP_GetRootDeviceInstance(p, r);
567 if (p->rng_fault_state) {
568 talloc_free(r);
569 /* Return true here, srv_pipe_hnd.c will take care */
570 return true;
573 if (DEBUGLEVEL >= 10) {
574 NDR_PRINT_OUT_DEBUG(PNP_GetRootDeviceInstance, r);
577 push = ndr_push_init_ctx(r);
578 if (push == NULL) {
579 talloc_free(r);
580 return false;
583 ndr_err = call->ndr_push(push, NDR_OUT, r);
584 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
585 talloc_free(r);
586 return false;
589 blob = ndr_push_blob(push);
590 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
591 talloc_free(r);
592 return false;
595 talloc_free(r);
597 return true;
600 static bool api_PNP_GetRelatedDeviceInstance(pipes_struct *p)
602 const struct ndr_interface_call *call;
603 struct ndr_pull *pull;
604 struct ndr_push *push;
605 enum ndr_err_code ndr_err;
606 DATA_BLOB blob;
607 struct PNP_GetRelatedDeviceInstance *r;
609 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETRELATEDDEVICEINSTANCE];
611 r = talloc(talloc_tos(), struct PNP_GetRelatedDeviceInstance);
612 if (r == NULL) {
613 return false;
616 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
617 talloc_free(r);
618 return false;
621 pull = ndr_pull_init_blob(&blob, r);
622 if (pull == NULL) {
623 talloc_free(r);
624 return false;
627 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
628 ndr_err = call->ndr_pull(pull, NDR_IN, r);
629 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
630 talloc_free(r);
631 return false;
634 if (DEBUGLEVEL >= 10) {
635 NDR_PRINT_IN_DEBUG(PNP_GetRelatedDeviceInstance, r);
638 r->out.result = _PNP_GetRelatedDeviceInstance(p, r);
640 if (p->rng_fault_state) {
641 talloc_free(r);
642 /* Return true here, srv_pipe_hnd.c will take care */
643 return true;
646 if (DEBUGLEVEL >= 10) {
647 NDR_PRINT_OUT_DEBUG(PNP_GetRelatedDeviceInstance, r);
650 push = ndr_push_init_ctx(r);
651 if (push == NULL) {
652 talloc_free(r);
653 return false;
656 ndr_err = call->ndr_push(push, NDR_OUT, r);
657 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
658 talloc_free(r);
659 return false;
662 blob = ndr_push_blob(push);
663 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
664 talloc_free(r);
665 return false;
668 talloc_free(r);
670 return true;
673 static bool api_PNP_EnumerateSubKeys(pipes_struct *p)
675 const struct ndr_interface_call *call;
676 struct ndr_pull *pull;
677 struct ndr_push *push;
678 enum ndr_err_code ndr_err;
679 DATA_BLOB blob;
680 struct PNP_EnumerateSubKeys *r;
682 call = &ndr_table_ntsvcs.calls[NDR_PNP_ENUMERATESUBKEYS];
684 r = talloc(talloc_tos(), struct PNP_EnumerateSubKeys);
685 if (r == NULL) {
686 return false;
689 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
690 talloc_free(r);
691 return false;
694 pull = ndr_pull_init_blob(&blob, r);
695 if (pull == NULL) {
696 talloc_free(r);
697 return false;
700 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
701 ndr_err = call->ndr_pull(pull, NDR_IN, r);
702 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
703 talloc_free(r);
704 return false;
707 if (DEBUGLEVEL >= 10) {
708 NDR_PRINT_IN_DEBUG(PNP_EnumerateSubKeys, r);
711 r->out.result = _PNP_EnumerateSubKeys(p, r);
713 if (p->rng_fault_state) {
714 talloc_free(r);
715 /* Return true here, srv_pipe_hnd.c will take care */
716 return true;
719 if (DEBUGLEVEL >= 10) {
720 NDR_PRINT_OUT_DEBUG(PNP_EnumerateSubKeys, r);
723 push = ndr_push_init_ctx(r);
724 if (push == NULL) {
725 talloc_free(r);
726 return false;
729 ndr_err = call->ndr_push(push, NDR_OUT, r);
730 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
731 talloc_free(r);
732 return false;
735 blob = ndr_push_blob(push);
736 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
737 talloc_free(r);
738 return false;
741 talloc_free(r);
743 return true;
746 static bool api_PNP_GetDeviceList(pipes_struct *p)
748 const struct ndr_interface_call *call;
749 struct ndr_pull *pull;
750 struct ndr_push *push;
751 enum ndr_err_code ndr_err;
752 DATA_BLOB blob;
753 struct PNP_GetDeviceList *r;
755 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEVICELIST];
757 r = talloc(talloc_tos(), struct PNP_GetDeviceList);
758 if (r == NULL) {
759 return false;
762 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
763 talloc_free(r);
764 return false;
767 pull = ndr_pull_init_blob(&blob, r);
768 if (pull == NULL) {
769 talloc_free(r);
770 return false;
773 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
774 ndr_err = call->ndr_pull(pull, NDR_IN, r);
775 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
776 talloc_free(r);
777 return false;
780 if (DEBUGLEVEL >= 10) {
781 NDR_PRINT_IN_DEBUG(PNP_GetDeviceList, r);
784 r->out.result = _PNP_GetDeviceList(p, r);
786 if (p->rng_fault_state) {
787 talloc_free(r);
788 /* Return true here, srv_pipe_hnd.c will take care */
789 return true;
792 if (DEBUGLEVEL >= 10) {
793 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceList, r);
796 push = ndr_push_init_ctx(r);
797 if (push == NULL) {
798 talloc_free(r);
799 return false;
802 ndr_err = call->ndr_push(push, NDR_OUT, r);
803 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
804 talloc_free(r);
805 return false;
808 blob = ndr_push_blob(push);
809 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
810 talloc_free(r);
811 return false;
814 talloc_free(r);
816 return true;
819 static bool api_PNP_GetDeviceListSize(pipes_struct *p)
821 const struct ndr_interface_call *call;
822 struct ndr_pull *pull;
823 struct ndr_push *push;
824 enum ndr_err_code ndr_err;
825 DATA_BLOB blob;
826 struct PNP_GetDeviceListSize *r;
828 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEVICELISTSIZE];
830 r = talloc(talloc_tos(), struct PNP_GetDeviceListSize);
831 if (r == NULL) {
832 return false;
835 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
836 talloc_free(r);
837 return false;
840 pull = ndr_pull_init_blob(&blob, r);
841 if (pull == NULL) {
842 talloc_free(r);
843 return false;
846 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
847 ndr_err = call->ndr_pull(pull, NDR_IN, r);
848 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
849 talloc_free(r);
850 return false;
853 if (DEBUGLEVEL >= 10) {
854 NDR_PRINT_IN_DEBUG(PNP_GetDeviceListSize, r);
857 ZERO_STRUCT(r->out);
858 r->out.size = talloc_zero(r, uint32_t);
859 if (r->out.size == NULL) {
860 talloc_free(r);
861 return false;
864 r->out.result = _PNP_GetDeviceListSize(p, r);
866 if (p->rng_fault_state) {
867 talloc_free(r);
868 /* Return true here, srv_pipe_hnd.c will take care */
869 return true;
872 if (DEBUGLEVEL >= 10) {
873 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceListSize, r);
876 push = ndr_push_init_ctx(r);
877 if (push == NULL) {
878 talloc_free(r);
879 return false;
882 ndr_err = call->ndr_push(push, NDR_OUT, r);
883 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
884 talloc_free(r);
885 return false;
888 blob = ndr_push_blob(push);
889 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
890 talloc_free(r);
891 return false;
894 talloc_free(r);
896 return true;
899 static bool api_PNP_GetDepth(pipes_struct *p)
901 const struct ndr_interface_call *call;
902 struct ndr_pull *pull;
903 struct ndr_push *push;
904 enum ndr_err_code ndr_err;
905 DATA_BLOB blob;
906 struct PNP_GetDepth *r;
908 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEPTH];
910 r = talloc(talloc_tos(), struct PNP_GetDepth);
911 if (r == NULL) {
912 return false;
915 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
916 talloc_free(r);
917 return false;
920 pull = ndr_pull_init_blob(&blob, r);
921 if (pull == NULL) {
922 talloc_free(r);
923 return false;
926 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
927 ndr_err = call->ndr_pull(pull, NDR_IN, r);
928 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
929 talloc_free(r);
930 return false;
933 if (DEBUGLEVEL >= 10) {
934 NDR_PRINT_IN_DEBUG(PNP_GetDepth, r);
937 r->out.result = _PNP_GetDepth(p, r);
939 if (p->rng_fault_state) {
940 talloc_free(r);
941 /* Return true here, srv_pipe_hnd.c will take care */
942 return true;
945 if (DEBUGLEVEL >= 10) {
946 NDR_PRINT_OUT_DEBUG(PNP_GetDepth, r);
949 push = ndr_push_init_ctx(r);
950 if (push == NULL) {
951 talloc_free(r);
952 return false;
955 ndr_err = call->ndr_push(push, NDR_OUT, r);
956 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
957 talloc_free(r);
958 return false;
961 blob = ndr_push_blob(push);
962 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
963 talloc_free(r);
964 return false;
967 talloc_free(r);
969 return true;
972 static bool api_PNP_GetDeviceRegProp(pipes_struct *p)
974 const struct ndr_interface_call *call;
975 struct ndr_pull *pull;
976 struct ndr_push *push;
977 enum ndr_err_code ndr_err;
978 DATA_BLOB blob;
979 struct PNP_GetDeviceRegProp *r;
981 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEVICEREGPROP];
983 r = talloc(talloc_tos(), struct PNP_GetDeviceRegProp);
984 if (r == NULL) {
985 return false;
988 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
989 talloc_free(r);
990 return false;
993 pull = ndr_pull_init_blob(&blob, r);
994 if (pull == NULL) {
995 talloc_free(r);
996 return false;
999 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1000 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1001 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1002 talloc_free(r);
1003 return false;
1006 if (DEBUGLEVEL >= 10) {
1007 NDR_PRINT_IN_DEBUG(PNP_GetDeviceRegProp, r);
1010 ZERO_STRUCT(r->out);
1011 r->out.unknown1 = r->in.unknown1;
1012 r->out.buffer = talloc_zero_array(r, uint8_t, *r->out.buffer_size);
1013 if (r->out.buffer == NULL) {
1014 talloc_free(r);
1015 return false;
1018 r->out.buffer_size = r->in.buffer_size;
1019 r->out.needed = r->in.needed;
1020 r->out.result = _PNP_GetDeviceRegProp(p, r);
1022 if (p->rng_fault_state) {
1023 talloc_free(r);
1024 /* Return true here, srv_pipe_hnd.c will take care */
1025 return true;
1028 if (DEBUGLEVEL >= 10) {
1029 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceRegProp, r);
1032 push = ndr_push_init_ctx(r);
1033 if (push == NULL) {
1034 talloc_free(r);
1035 return false;
1038 ndr_err = call->ndr_push(push, NDR_OUT, r);
1039 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1040 talloc_free(r);
1041 return false;
1044 blob = ndr_push_blob(push);
1045 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1046 talloc_free(r);
1047 return false;
1050 talloc_free(r);
1052 return true;
1055 static bool api_PNP_SetDeviceRegProp(pipes_struct *p)
1057 const struct ndr_interface_call *call;
1058 struct ndr_pull *pull;
1059 struct ndr_push *push;
1060 enum ndr_err_code ndr_err;
1061 DATA_BLOB blob;
1062 struct PNP_SetDeviceRegProp *r;
1064 call = &ndr_table_ntsvcs.calls[NDR_PNP_SETDEVICEREGPROP];
1066 r = talloc(talloc_tos(), struct PNP_SetDeviceRegProp);
1067 if (r == NULL) {
1068 return false;
1071 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1072 talloc_free(r);
1073 return false;
1076 pull = ndr_pull_init_blob(&blob, r);
1077 if (pull == NULL) {
1078 talloc_free(r);
1079 return false;
1082 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1083 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1084 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1085 talloc_free(r);
1086 return false;
1089 if (DEBUGLEVEL >= 10) {
1090 NDR_PRINT_IN_DEBUG(PNP_SetDeviceRegProp, r);
1093 r->out.result = _PNP_SetDeviceRegProp(p, r);
1095 if (p->rng_fault_state) {
1096 talloc_free(r);
1097 /* Return true here, srv_pipe_hnd.c will take care */
1098 return true;
1101 if (DEBUGLEVEL >= 10) {
1102 NDR_PRINT_OUT_DEBUG(PNP_SetDeviceRegProp, r);
1105 push = ndr_push_init_ctx(r);
1106 if (push == NULL) {
1107 talloc_free(r);
1108 return false;
1111 ndr_err = call->ndr_push(push, NDR_OUT, r);
1112 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1113 talloc_free(r);
1114 return false;
1117 blob = ndr_push_blob(push);
1118 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1119 talloc_free(r);
1120 return false;
1123 talloc_free(r);
1125 return true;
1128 static bool api_PNP_GetClassInstance(pipes_struct *p)
1130 const struct ndr_interface_call *call;
1131 struct ndr_pull *pull;
1132 struct ndr_push *push;
1133 enum ndr_err_code ndr_err;
1134 DATA_BLOB blob;
1135 struct PNP_GetClassInstance *r;
1137 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSINSTANCE];
1139 r = talloc(talloc_tos(), struct PNP_GetClassInstance);
1140 if (r == NULL) {
1141 return false;
1144 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1145 talloc_free(r);
1146 return false;
1149 pull = ndr_pull_init_blob(&blob, r);
1150 if (pull == NULL) {
1151 talloc_free(r);
1152 return false;
1155 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1156 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1157 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1158 talloc_free(r);
1159 return false;
1162 if (DEBUGLEVEL >= 10) {
1163 NDR_PRINT_IN_DEBUG(PNP_GetClassInstance, r);
1166 r->out.result = _PNP_GetClassInstance(p, r);
1168 if (p->rng_fault_state) {
1169 talloc_free(r);
1170 /* Return true here, srv_pipe_hnd.c will take care */
1171 return true;
1174 if (DEBUGLEVEL >= 10) {
1175 NDR_PRINT_OUT_DEBUG(PNP_GetClassInstance, r);
1178 push = ndr_push_init_ctx(r);
1179 if (push == NULL) {
1180 talloc_free(r);
1181 return false;
1184 ndr_err = call->ndr_push(push, NDR_OUT, r);
1185 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1186 talloc_free(r);
1187 return false;
1190 blob = ndr_push_blob(push);
1191 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1192 talloc_free(r);
1193 return false;
1196 talloc_free(r);
1198 return true;
1201 static bool api_PNP_CreateKey(pipes_struct *p)
1203 const struct ndr_interface_call *call;
1204 struct ndr_pull *pull;
1205 struct ndr_push *push;
1206 enum ndr_err_code ndr_err;
1207 DATA_BLOB blob;
1208 struct PNP_CreateKey *r;
1210 call = &ndr_table_ntsvcs.calls[NDR_PNP_CREATEKEY];
1212 r = talloc(talloc_tos(), struct PNP_CreateKey);
1213 if (r == NULL) {
1214 return false;
1217 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1218 talloc_free(r);
1219 return false;
1222 pull = ndr_pull_init_blob(&blob, r);
1223 if (pull == NULL) {
1224 talloc_free(r);
1225 return false;
1228 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1229 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1230 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1231 talloc_free(r);
1232 return false;
1235 if (DEBUGLEVEL >= 10) {
1236 NDR_PRINT_IN_DEBUG(PNP_CreateKey, r);
1239 r->out.result = _PNP_CreateKey(p, r);
1241 if (p->rng_fault_state) {
1242 talloc_free(r);
1243 /* Return true here, srv_pipe_hnd.c will take care */
1244 return true;
1247 if (DEBUGLEVEL >= 10) {
1248 NDR_PRINT_OUT_DEBUG(PNP_CreateKey, r);
1251 push = ndr_push_init_ctx(r);
1252 if (push == NULL) {
1253 talloc_free(r);
1254 return false;
1257 ndr_err = call->ndr_push(push, NDR_OUT, r);
1258 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1259 talloc_free(r);
1260 return false;
1263 blob = ndr_push_blob(push);
1264 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1265 talloc_free(r);
1266 return false;
1269 talloc_free(r);
1271 return true;
1274 static bool api_PNP_DeleteRegistryKey(pipes_struct *p)
1276 const struct ndr_interface_call *call;
1277 struct ndr_pull *pull;
1278 struct ndr_push *push;
1279 enum ndr_err_code ndr_err;
1280 DATA_BLOB blob;
1281 struct PNP_DeleteRegistryKey *r;
1283 call = &ndr_table_ntsvcs.calls[NDR_PNP_DELETEREGISTRYKEY];
1285 r = talloc(talloc_tos(), struct PNP_DeleteRegistryKey);
1286 if (r == NULL) {
1287 return false;
1290 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1291 talloc_free(r);
1292 return false;
1295 pull = ndr_pull_init_blob(&blob, r);
1296 if (pull == NULL) {
1297 talloc_free(r);
1298 return false;
1301 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1302 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1303 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1304 talloc_free(r);
1305 return false;
1308 if (DEBUGLEVEL >= 10) {
1309 NDR_PRINT_IN_DEBUG(PNP_DeleteRegistryKey, r);
1312 r->out.result = _PNP_DeleteRegistryKey(p, r);
1314 if (p->rng_fault_state) {
1315 talloc_free(r);
1316 /* Return true here, srv_pipe_hnd.c will take care */
1317 return true;
1320 if (DEBUGLEVEL >= 10) {
1321 NDR_PRINT_OUT_DEBUG(PNP_DeleteRegistryKey, r);
1324 push = ndr_push_init_ctx(r);
1325 if (push == NULL) {
1326 talloc_free(r);
1327 return false;
1330 ndr_err = call->ndr_push(push, NDR_OUT, r);
1331 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1332 talloc_free(r);
1333 return false;
1336 blob = ndr_push_blob(push);
1337 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1338 talloc_free(r);
1339 return false;
1342 talloc_free(r);
1344 return true;
1347 static bool api_PNP_GetClassCount(pipes_struct *p)
1349 const struct ndr_interface_call *call;
1350 struct ndr_pull *pull;
1351 struct ndr_push *push;
1352 enum ndr_err_code ndr_err;
1353 DATA_BLOB blob;
1354 struct PNP_GetClassCount *r;
1356 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSCOUNT];
1358 r = talloc(talloc_tos(), struct PNP_GetClassCount);
1359 if (r == NULL) {
1360 return false;
1363 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1364 talloc_free(r);
1365 return false;
1368 pull = ndr_pull_init_blob(&blob, r);
1369 if (pull == NULL) {
1370 talloc_free(r);
1371 return false;
1374 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1375 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1376 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1377 talloc_free(r);
1378 return false;
1381 if (DEBUGLEVEL >= 10) {
1382 NDR_PRINT_IN_DEBUG(PNP_GetClassCount, r);
1385 r->out.result = _PNP_GetClassCount(p, r);
1387 if (p->rng_fault_state) {
1388 talloc_free(r);
1389 /* Return true here, srv_pipe_hnd.c will take care */
1390 return true;
1393 if (DEBUGLEVEL >= 10) {
1394 NDR_PRINT_OUT_DEBUG(PNP_GetClassCount, r);
1397 push = ndr_push_init_ctx(r);
1398 if (push == NULL) {
1399 talloc_free(r);
1400 return false;
1403 ndr_err = call->ndr_push(push, NDR_OUT, r);
1404 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1405 talloc_free(r);
1406 return false;
1409 blob = ndr_push_blob(push);
1410 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1411 talloc_free(r);
1412 return false;
1415 talloc_free(r);
1417 return true;
1420 static bool api_PNP_GetClassName(pipes_struct *p)
1422 const struct ndr_interface_call *call;
1423 struct ndr_pull *pull;
1424 struct ndr_push *push;
1425 enum ndr_err_code ndr_err;
1426 DATA_BLOB blob;
1427 struct PNP_GetClassName *r;
1429 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSNAME];
1431 r = talloc(talloc_tos(), struct PNP_GetClassName);
1432 if (r == NULL) {
1433 return false;
1436 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1437 talloc_free(r);
1438 return false;
1441 pull = ndr_pull_init_blob(&blob, r);
1442 if (pull == NULL) {
1443 talloc_free(r);
1444 return false;
1447 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1448 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1449 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1450 talloc_free(r);
1451 return false;
1454 if (DEBUGLEVEL >= 10) {
1455 NDR_PRINT_IN_DEBUG(PNP_GetClassName, r);
1458 r->out.result = _PNP_GetClassName(p, r);
1460 if (p->rng_fault_state) {
1461 talloc_free(r);
1462 /* Return true here, srv_pipe_hnd.c will take care */
1463 return true;
1466 if (DEBUGLEVEL >= 10) {
1467 NDR_PRINT_OUT_DEBUG(PNP_GetClassName, r);
1470 push = ndr_push_init_ctx(r);
1471 if (push == NULL) {
1472 talloc_free(r);
1473 return false;
1476 ndr_err = call->ndr_push(push, NDR_OUT, r);
1477 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1478 talloc_free(r);
1479 return false;
1482 blob = ndr_push_blob(push);
1483 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1484 talloc_free(r);
1485 return false;
1488 talloc_free(r);
1490 return true;
1493 static bool api_PNP_DeleteClassKey(pipes_struct *p)
1495 const struct ndr_interface_call *call;
1496 struct ndr_pull *pull;
1497 struct ndr_push *push;
1498 enum ndr_err_code ndr_err;
1499 DATA_BLOB blob;
1500 struct PNP_DeleteClassKey *r;
1502 call = &ndr_table_ntsvcs.calls[NDR_PNP_DELETECLASSKEY];
1504 r = talloc(talloc_tos(), struct PNP_DeleteClassKey);
1505 if (r == NULL) {
1506 return false;
1509 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1510 talloc_free(r);
1511 return false;
1514 pull = ndr_pull_init_blob(&blob, r);
1515 if (pull == NULL) {
1516 talloc_free(r);
1517 return false;
1520 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1521 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1522 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1523 talloc_free(r);
1524 return false;
1527 if (DEBUGLEVEL >= 10) {
1528 NDR_PRINT_IN_DEBUG(PNP_DeleteClassKey, r);
1531 r->out.result = _PNP_DeleteClassKey(p, r);
1533 if (p->rng_fault_state) {
1534 talloc_free(r);
1535 /* Return true here, srv_pipe_hnd.c will take care */
1536 return true;
1539 if (DEBUGLEVEL >= 10) {
1540 NDR_PRINT_OUT_DEBUG(PNP_DeleteClassKey, r);
1543 push = ndr_push_init_ctx(r);
1544 if (push == NULL) {
1545 talloc_free(r);
1546 return false;
1549 ndr_err = call->ndr_push(push, NDR_OUT, r);
1550 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1551 talloc_free(r);
1552 return false;
1555 blob = ndr_push_blob(push);
1556 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1557 talloc_free(r);
1558 return false;
1561 talloc_free(r);
1563 return true;
1566 static bool api_PNP_GetInterfaceDeviceAlias(pipes_struct *p)
1568 const struct ndr_interface_call *call;
1569 struct ndr_pull *pull;
1570 struct ndr_push *push;
1571 enum ndr_err_code ndr_err;
1572 DATA_BLOB blob;
1573 struct PNP_GetInterfaceDeviceAlias *r;
1575 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETINTERFACEDEVICEALIAS];
1577 r = talloc(talloc_tos(), struct PNP_GetInterfaceDeviceAlias);
1578 if (r == NULL) {
1579 return false;
1582 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1583 talloc_free(r);
1584 return false;
1587 pull = ndr_pull_init_blob(&blob, r);
1588 if (pull == NULL) {
1589 talloc_free(r);
1590 return false;
1593 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1594 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1595 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1596 talloc_free(r);
1597 return false;
1600 if (DEBUGLEVEL >= 10) {
1601 NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceAlias, r);
1604 r->out.result = _PNP_GetInterfaceDeviceAlias(p, r);
1606 if (p->rng_fault_state) {
1607 talloc_free(r);
1608 /* Return true here, srv_pipe_hnd.c will take care */
1609 return true;
1612 if (DEBUGLEVEL >= 10) {
1613 NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceAlias, r);
1616 push = ndr_push_init_ctx(r);
1617 if (push == NULL) {
1618 talloc_free(r);
1619 return false;
1622 ndr_err = call->ndr_push(push, NDR_OUT, r);
1623 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1624 talloc_free(r);
1625 return false;
1628 blob = ndr_push_blob(push);
1629 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1630 talloc_free(r);
1631 return false;
1634 talloc_free(r);
1636 return true;
1639 static bool api_PNP_GetInterfaceDeviceList(pipes_struct *p)
1641 const struct ndr_interface_call *call;
1642 struct ndr_pull *pull;
1643 struct ndr_push *push;
1644 enum ndr_err_code ndr_err;
1645 DATA_BLOB blob;
1646 struct PNP_GetInterfaceDeviceList *r;
1648 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETINTERFACEDEVICELIST];
1650 r = talloc(talloc_tos(), struct PNP_GetInterfaceDeviceList);
1651 if (r == NULL) {
1652 return false;
1655 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1656 talloc_free(r);
1657 return false;
1660 pull = ndr_pull_init_blob(&blob, r);
1661 if (pull == NULL) {
1662 talloc_free(r);
1663 return false;
1666 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1667 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1668 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1669 talloc_free(r);
1670 return false;
1673 if (DEBUGLEVEL >= 10) {
1674 NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceList, r);
1677 r->out.result = _PNP_GetInterfaceDeviceList(p, r);
1679 if (p->rng_fault_state) {
1680 talloc_free(r);
1681 /* Return true here, srv_pipe_hnd.c will take care */
1682 return true;
1685 if (DEBUGLEVEL >= 10) {
1686 NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceList, r);
1689 push = ndr_push_init_ctx(r);
1690 if (push == NULL) {
1691 talloc_free(r);
1692 return false;
1695 ndr_err = call->ndr_push(push, NDR_OUT, r);
1696 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1697 talloc_free(r);
1698 return false;
1701 blob = ndr_push_blob(push);
1702 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1703 talloc_free(r);
1704 return false;
1707 talloc_free(r);
1709 return true;
1712 static bool api_PNP_GetInterfaceDeviceListSize(pipes_struct *p)
1714 const struct ndr_interface_call *call;
1715 struct ndr_pull *pull;
1716 struct ndr_push *push;
1717 enum ndr_err_code ndr_err;
1718 DATA_BLOB blob;
1719 struct PNP_GetInterfaceDeviceListSize *r;
1721 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETINTERFACEDEVICELISTSIZE];
1723 r = talloc(talloc_tos(), struct PNP_GetInterfaceDeviceListSize);
1724 if (r == NULL) {
1725 return false;
1728 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1729 talloc_free(r);
1730 return false;
1733 pull = ndr_pull_init_blob(&blob, r);
1734 if (pull == NULL) {
1735 talloc_free(r);
1736 return false;
1739 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1740 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1741 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1742 talloc_free(r);
1743 return false;
1746 if (DEBUGLEVEL >= 10) {
1747 NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceListSize, r);
1750 r->out.result = _PNP_GetInterfaceDeviceListSize(p, r);
1752 if (p->rng_fault_state) {
1753 talloc_free(r);
1754 /* Return true here, srv_pipe_hnd.c will take care */
1755 return true;
1758 if (DEBUGLEVEL >= 10) {
1759 NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceListSize, r);
1762 push = ndr_push_init_ctx(r);
1763 if (push == NULL) {
1764 talloc_free(r);
1765 return false;
1768 ndr_err = call->ndr_push(push, NDR_OUT, r);
1769 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1770 talloc_free(r);
1771 return false;
1774 blob = ndr_push_blob(push);
1775 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1776 talloc_free(r);
1777 return false;
1780 talloc_free(r);
1782 return true;
1785 static bool api_PNP_RegisterDeviceClassAssociation(pipes_struct *p)
1787 const struct ndr_interface_call *call;
1788 struct ndr_pull *pull;
1789 struct ndr_push *push;
1790 enum ndr_err_code ndr_err;
1791 DATA_BLOB blob;
1792 struct PNP_RegisterDeviceClassAssociation *r;
1794 call = &ndr_table_ntsvcs.calls[NDR_PNP_REGISTERDEVICECLASSASSOCIATION];
1796 r = talloc(talloc_tos(), struct PNP_RegisterDeviceClassAssociation);
1797 if (r == NULL) {
1798 return false;
1801 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1802 talloc_free(r);
1803 return false;
1806 pull = ndr_pull_init_blob(&blob, r);
1807 if (pull == NULL) {
1808 talloc_free(r);
1809 return false;
1812 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1813 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1814 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1815 talloc_free(r);
1816 return false;
1819 if (DEBUGLEVEL >= 10) {
1820 NDR_PRINT_IN_DEBUG(PNP_RegisterDeviceClassAssociation, r);
1823 r->out.result = _PNP_RegisterDeviceClassAssociation(p, r);
1825 if (p->rng_fault_state) {
1826 talloc_free(r);
1827 /* Return true here, srv_pipe_hnd.c will take care */
1828 return true;
1831 if (DEBUGLEVEL >= 10) {
1832 NDR_PRINT_OUT_DEBUG(PNP_RegisterDeviceClassAssociation, r);
1835 push = ndr_push_init_ctx(r);
1836 if (push == NULL) {
1837 talloc_free(r);
1838 return false;
1841 ndr_err = call->ndr_push(push, NDR_OUT, r);
1842 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1843 talloc_free(r);
1844 return false;
1847 blob = ndr_push_blob(push);
1848 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1849 talloc_free(r);
1850 return false;
1853 talloc_free(r);
1855 return true;
1858 static bool api_PNP_UnregisterDeviceClassAssociation(pipes_struct *p)
1860 const struct ndr_interface_call *call;
1861 struct ndr_pull *pull;
1862 struct ndr_push *push;
1863 enum ndr_err_code ndr_err;
1864 DATA_BLOB blob;
1865 struct PNP_UnregisterDeviceClassAssociation *r;
1867 call = &ndr_table_ntsvcs.calls[NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION];
1869 r = talloc(talloc_tos(), struct PNP_UnregisterDeviceClassAssociation);
1870 if (r == NULL) {
1871 return false;
1874 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1875 talloc_free(r);
1876 return false;
1879 pull = ndr_pull_init_blob(&blob, r);
1880 if (pull == NULL) {
1881 talloc_free(r);
1882 return false;
1885 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1886 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1887 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1888 talloc_free(r);
1889 return false;
1892 if (DEBUGLEVEL >= 10) {
1893 NDR_PRINT_IN_DEBUG(PNP_UnregisterDeviceClassAssociation, r);
1896 r->out.result = _PNP_UnregisterDeviceClassAssociation(p, r);
1898 if (p->rng_fault_state) {
1899 talloc_free(r);
1900 /* Return true here, srv_pipe_hnd.c will take care */
1901 return true;
1904 if (DEBUGLEVEL >= 10) {
1905 NDR_PRINT_OUT_DEBUG(PNP_UnregisterDeviceClassAssociation, r);
1908 push = ndr_push_init_ctx(r);
1909 if (push == NULL) {
1910 talloc_free(r);
1911 return false;
1914 ndr_err = call->ndr_push(push, NDR_OUT, r);
1915 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1916 talloc_free(r);
1917 return false;
1920 blob = ndr_push_blob(push);
1921 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1922 talloc_free(r);
1923 return false;
1926 talloc_free(r);
1928 return true;
1931 static bool api_PNP_GetClassRegProp(pipes_struct *p)
1933 const struct ndr_interface_call *call;
1934 struct ndr_pull *pull;
1935 struct ndr_push *push;
1936 enum ndr_err_code ndr_err;
1937 DATA_BLOB blob;
1938 struct PNP_GetClassRegProp *r;
1940 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSREGPROP];
1942 r = talloc(talloc_tos(), struct PNP_GetClassRegProp);
1943 if (r == NULL) {
1944 return false;
1947 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1948 talloc_free(r);
1949 return false;
1952 pull = ndr_pull_init_blob(&blob, r);
1953 if (pull == NULL) {
1954 talloc_free(r);
1955 return false;
1958 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1959 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1960 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1961 talloc_free(r);
1962 return false;
1965 if (DEBUGLEVEL >= 10) {
1966 NDR_PRINT_IN_DEBUG(PNP_GetClassRegProp, r);
1969 r->out.result = _PNP_GetClassRegProp(p, r);
1971 if (p->rng_fault_state) {
1972 talloc_free(r);
1973 /* Return true here, srv_pipe_hnd.c will take care */
1974 return true;
1977 if (DEBUGLEVEL >= 10) {
1978 NDR_PRINT_OUT_DEBUG(PNP_GetClassRegProp, r);
1981 push = ndr_push_init_ctx(r);
1982 if (push == NULL) {
1983 talloc_free(r);
1984 return false;
1987 ndr_err = call->ndr_push(push, NDR_OUT, r);
1988 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1989 talloc_free(r);
1990 return false;
1993 blob = ndr_push_blob(push);
1994 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1995 talloc_free(r);
1996 return false;
1999 talloc_free(r);
2001 return true;
2004 static bool api_PNP_SetClassRegProp(pipes_struct *p)
2006 const struct ndr_interface_call *call;
2007 struct ndr_pull *pull;
2008 struct ndr_push *push;
2009 enum ndr_err_code ndr_err;
2010 DATA_BLOB blob;
2011 struct PNP_SetClassRegProp *r;
2013 call = &ndr_table_ntsvcs.calls[NDR_PNP_SETCLASSREGPROP];
2015 r = talloc(talloc_tos(), struct PNP_SetClassRegProp);
2016 if (r == NULL) {
2017 return false;
2020 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2021 talloc_free(r);
2022 return false;
2025 pull = ndr_pull_init_blob(&blob, r);
2026 if (pull == NULL) {
2027 talloc_free(r);
2028 return false;
2031 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2032 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2033 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2034 talloc_free(r);
2035 return false;
2038 if (DEBUGLEVEL >= 10) {
2039 NDR_PRINT_IN_DEBUG(PNP_SetClassRegProp, r);
2042 r->out.result = _PNP_SetClassRegProp(p, r);
2044 if (p->rng_fault_state) {
2045 talloc_free(r);
2046 /* Return true here, srv_pipe_hnd.c will take care */
2047 return true;
2050 if (DEBUGLEVEL >= 10) {
2051 NDR_PRINT_OUT_DEBUG(PNP_SetClassRegProp, r);
2054 push = ndr_push_init_ctx(r);
2055 if (push == NULL) {
2056 talloc_free(r);
2057 return false;
2060 ndr_err = call->ndr_push(push, NDR_OUT, r);
2061 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2062 talloc_free(r);
2063 return false;
2066 blob = ndr_push_blob(push);
2067 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2068 talloc_free(r);
2069 return false;
2072 talloc_free(r);
2074 return true;
2077 static bool api_PNP_CreateDevInst(pipes_struct *p)
2079 const struct ndr_interface_call *call;
2080 struct ndr_pull *pull;
2081 struct ndr_push *push;
2082 enum ndr_err_code ndr_err;
2083 DATA_BLOB blob;
2084 struct PNP_CreateDevInst *r;
2086 call = &ndr_table_ntsvcs.calls[NDR_PNP_CREATEDEVINST];
2088 r = talloc(talloc_tos(), struct PNP_CreateDevInst);
2089 if (r == NULL) {
2090 return false;
2093 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2094 talloc_free(r);
2095 return false;
2098 pull = ndr_pull_init_blob(&blob, r);
2099 if (pull == NULL) {
2100 talloc_free(r);
2101 return false;
2104 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2105 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2106 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2107 talloc_free(r);
2108 return false;
2111 if (DEBUGLEVEL >= 10) {
2112 NDR_PRINT_IN_DEBUG(PNP_CreateDevInst, r);
2115 r->out.result = _PNP_CreateDevInst(p, r);
2117 if (p->rng_fault_state) {
2118 talloc_free(r);
2119 /* Return true here, srv_pipe_hnd.c will take care */
2120 return true;
2123 if (DEBUGLEVEL >= 10) {
2124 NDR_PRINT_OUT_DEBUG(PNP_CreateDevInst, r);
2127 push = ndr_push_init_ctx(r);
2128 if (push == NULL) {
2129 talloc_free(r);
2130 return false;
2133 ndr_err = call->ndr_push(push, NDR_OUT, r);
2134 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2135 talloc_free(r);
2136 return false;
2139 blob = ndr_push_blob(push);
2140 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2141 talloc_free(r);
2142 return false;
2145 talloc_free(r);
2147 return true;
2150 static bool api_PNP_DeviceInstanceAction(pipes_struct *p)
2152 const struct ndr_interface_call *call;
2153 struct ndr_pull *pull;
2154 struct ndr_push *push;
2155 enum ndr_err_code ndr_err;
2156 DATA_BLOB blob;
2157 struct PNP_DeviceInstanceAction *r;
2159 call = &ndr_table_ntsvcs.calls[NDR_PNP_DEVICEINSTANCEACTION];
2161 r = talloc(talloc_tos(), struct PNP_DeviceInstanceAction);
2162 if (r == NULL) {
2163 return false;
2166 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2167 talloc_free(r);
2168 return false;
2171 pull = ndr_pull_init_blob(&blob, r);
2172 if (pull == NULL) {
2173 talloc_free(r);
2174 return false;
2177 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2178 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2179 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2180 talloc_free(r);
2181 return false;
2184 if (DEBUGLEVEL >= 10) {
2185 NDR_PRINT_IN_DEBUG(PNP_DeviceInstanceAction, r);
2188 r->out.result = _PNP_DeviceInstanceAction(p, r);
2190 if (p->rng_fault_state) {
2191 talloc_free(r);
2192 /* Return true here, srv_pipe_hnd.c will take care */
2193 return true;
2196 if (DEBUGLEVEL >= 10) {
2197 NDR_PRINT_OUT_DEBUG(PNP_DeviceInstanceAction, r);
2200 push = ndr_push_init_ctx(r);
2201 if (push == NULL) {
2202 talloc_free(r);
2203 return false;
2206 ndr_err = call->ndr_push(push, NDR_OUT, r);
2207 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2208 talloc_free(r);
2209 return false;
2212 blob = ndr_push_blob(push);
2213 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2214 talloc_free(r);
2215 return false;
2218 talloc_free(r);
2220 return true;
2223 static bool api_PNP_GetDeviceStatus(pipes_struct *p)
2225 const struct ndr_interface_call *call;
2226 struct ndr_pull *pull;
2227 struct ndr_push *push;
2228 enum ndr_err_code ndr_err;
2229 DATA_BLOB blob;
2230 struct PNP_GetDeviceStatus *r;
2232 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEVICESTATUS];
2234 r = talloc(talloc_tos(), struct PNP_GetDeviceStatus);
2235 if (r == NULL) {
2236 return false;
2239 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2240 talloc_free(r);
2241 return false;
2244 pull = ndr_pull_init_blob(&blob, r);
2245 if (pull == NULL) {
2246 talloc_free(r);
2247 return false;
2250 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2251 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2252 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2253 talloc_free(r);
2254 return false;
2257 if (DEBUGLEVEL >= 10) {
2258 NDR_PRINT_IN_DEBUG(PNP_GetDeviceStatus, r);
2261 r->out.result = _PNP_GetDeviceStatus(p, r);
2263 if (p->rng_fault_state) {
2264 talloc_free(r);
2265 /* Return true here, srv_pipe_hnd.c will take care */
2266 return true;
2269 if (DEBUGLEVEL >= 10) {
2270 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceStatus, r);
2273 push = ndr_push_init_ctx(r);
2274 if (push == NULL) {
2275 talloc_free(r);
2276 return false;
2279 ndr_err = call->ndr_push(push, NDR_OUT, r);
2280 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2281 talloc_free(r);
2282 return false;
2285 blob = ndr_push_blob(push);
2286 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2287 talloc_free(r);
2288 return false;
2291 talloc_free(r);
2293 return true;
2296 static bool api_PNP_SetDeviceProblem(pipes_struct *p)
2298 const struct ndr_interface_call *call;
2299 struct ndr_pull *pull;
2300 struct ndr_push *push;
2301 enum ndr_err_code ndr_err;
2302 DATA_BLOB blob;
2303 struct PNP_SetDeviceProblem *r;
2305 call = &ndr_table_ntsvcs.calls[NDR_PNP_SETDEVICEPROBLEM];
2307 r = talloc(talloc_tos(), struct PNP_SetDeviceProblem);
2308 if (r == NULL) {
2309 return false;
2312 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2313 talloc_free(r);
2314 return false;
2317 pull = ndr_pull_init_blob(&blob, r);
2318 if (pull == NULL) {
2319 talloc_free(r);
2320 return false;
2323 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2324 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2325 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2326 talloc_free(r);
2327 return false;
2330 if (DEBUGLEVEL >= 10) {
2331 NDR_PRINT_IN_DEBUG(PNP_SetDeviceProblem, r);
2334 r->out.result = _PNP_SetDeviceProblem(p, r);
2336 if (p->rng_fault_state) {
2337 talloc_free(r);
2338 /* Return true here, srv_pipe_hnd.c will take care */
2339 return true;
2342 if (DEBUGLEVEL >= 10) {
2343 NDR_PRINT_OUT_DEBUG(PNP_SetDeviceProblem, r);
2346 push = ndr_push_init_ctx(r);
2347 if (push == NULL) {
2348 talloc_free(r);
2349 return false;
2352 ndr_err = call->ndr_push(push, NDR_OUT, r);
2353 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2354 talloc_free(r);
2355 return false;
2358 blob = ndr_push_blob(push);
2359 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2360 talloc_free(r);
2361 return false;
2364 talloc_free(r);
2366 return true;
2369 static bool api_PNP_DisableDevInst(pipes_struct *p)
2371 const struct ndr_interface_call *call;
2372 struct ndr_pull *pull;
2373 struct ndr_push *push;
2374 enum ndr_err_code ndr_err;
2375 DATA_BLOB blob;
2376 struct PNP_DisableDevInst *r;
2378 call = &ndr_table_ntsvcs.calls[NDR_PNP_DISABLEDEVINST];
2380 r = talloc(talloc_tos(), struct PNP_DisableDevInst);
2381 if (r == NULL) {
2382 return false;
2385 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2386 talloc_free(r);
2387 return false;
2390 pull = ndr_pull_init_blob(&blob, r);
2391 if (pull == NULL) {
2392 talloc_free(r);
2393 return false;
2396 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2397 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2398 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2399 talloc_free(r);
2400 return false;
2403 if (DEBUGLEVEL >= 10) {
2404 NDR_PRINT_IN_DEBUG(PNP_DisableDevInst, r);
2407 r->out.result = _PNP_DisableDevInst(p, r);
2409 if (p->rng_fault_state) {
2410 talloc_free(r);
2411 /* Return true here, srv_pipe_hnd.c will take care */
2412 return true;
2415 if (DEBUGLEVEL >= 10) {
2416 NDR_PRINT_OUT_DEBUG(PNP_DisableDevInst, r);
2419 push = ndr_push_init_ctx(r);
2420 if (push == NULL) {
2421 talloc_free(r);
2422 return false;
2425 ndr_err = call->ndr_push(push, NDR_OUT, r);
2426 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2427 talloc_free(r);
2428 return false;
2431 blob = ndr_push_blob(push);
2432 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2433 talloc_free(r);
2434 return false;
2437 talloc_free(r);
2439 return true;
2442 static bool api_PNP_UninstallDevInst(pipes_struct *p)
2444 const struct ndr_interface_call *call;
2445 struct ndr_pull *pull;
2446 struct ndr_push *push;
2447 enum ndr_err_code ndr_err;
2448 DATA_BLOB blob;
2449 struct PNP_UninstallDevInst *r;
2451 call = &ndr_table_ntsvcs.calls[NDR_PNP_UNINSTALLDEVINST];
2453 r = talloc(talloc_tos(), struct PNP_UninstallDevInst);
2454 if (r == NULL) {
2455 return false;
2458 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2459 talloc_free(r);
2460 return false;
2463 pull = ndr_pull_init_blob(&blob, r);
2464 if (pull == NULL) {
2465 talloc_free(r);
2466 return false;
2469 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2470 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2471 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2472 talloc_free(r);
2473 return false;
2476 if (DEBUGLEVEL >= 10) {
2477 NDR_PRINT_IN_DEBUG(PNP_UninstallDevInst, r);
2480 r->out.result = _PNP_UninstallDevInst(p, r);
2482 if (p->rng_fault_state) {
2483 talloc_free(r);
2484 /* Return true here, srv_pipe_hnd.c will take care */
2485 return true;
2488 if (DEBUGLEVEL >= 10) {
2489 NDR_PRINT_OUT_DEBUG(PNP_UninstallDevInst, r);
2492 push = ndr_push_init_ctx(r);
2493 if (push == NULL) {
2494 talloc_free(r);
2495 return false;
2498 ndr_err = call->ndr_push(push, NDR_OUT, r);
2499 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2500 talloc_free(r);
2501 return false;
2504 blob = ndr_push_blob(push);
2505 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2506 talloc_free(r);
2507 return false;
2510 talloc_free(r);
2512 return true;
2515 static bool api_PNP_AddID(pipes_struct *p)
2517 const struct ndr_interface_call *call;
2518 struct ndr_pull *pull;
2519 struct ndr_push *push;
2520 enum ndr_err_code ndr_err;
2521 DATA_BLOB blob;
2522 struct PNP_AddID *r;
2524 call = &ndr_table_ntsvcs.calls[NDR_PNP_ADDID];
2526 r = talloc(talloc_tos(), struct PNP_AddID);
2527 if (r == NULL) {
2528 return false;
2531 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2532 talloc_free(r);
2533 return false;
2536 pull = ndr_pull_init_blob(&blob, r);
2537 if (pull == NULL) {
2538 talloc_free(r);
2539 return false;
2542 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2543 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2544 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2545 talloc_free(r);
2546 return false;
2549 if (DEBUGLEVEL >= 10) {
2550 NDR_PRINT_IN_DEBUG(PNP_AddID, r);
2553 r->out.result = _PNP_AddID(p, r);
2555 if (p->rng_fault_state) {
2556 talloc_free(r);
2557 /* Return true here, srv_pipe_hnd.c will take care */
2558 return true;
2561 if (DEBUGLEVEL >= 10) {
2562 NDR_PRINT_OUT_DEBUG(PNP_AddID, r);
2565 push = ndr_push_init_ctx(r);
2566 if (push == NULL) {
2567 talloc_free(r);
2568 return false;
2571 ndr_err = call->ndr_push(push, NDR_OUT, r);
2572 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2573 talloc_free(r);
2574 return false;
2577 blob = ndr_push_blob(push);
2578 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2579 talloc_free(r);
2580 return false;
2583 talloc_free(r);
2585 return true;
2588 static bool api_PNP_RegisterDriver(pipes_struct *p)
2590 const struct ndr_interface_call *call;
2591 struct ndr_pull *pull;
2592 struct ndr_push *push;
2593 enum ndr_err_code ndr_err;
2594 DATA_BLOB blob;
2595 struct PNP_RegisterDriver *r;
2597 call = &ndr_table_ntsvcs.calls[NDR_PNP_REGISTERDRIVER];
2599 r = talloc(talloc_tos(), struct PNP_RegisterDriver);
2600 if (r == NULL) {
2601 return false;
2604 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2605 talloc_free(r);
2606 return false;
2609 pull = ndr_pull_init_blob(&blob, r);
2610 if (pull == NULL) {
2611 talloc_free(r);
2612 return false;
2615 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2616 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2617 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2618 talloc_free(r);
2619 return false;
2622 if (DEBUGLEVEL >= 10) {
2623 NDR_PRINT_IN_DEBUG(PNP_RegisterDriver, r);
2626 r->out.result = _PNP_RegisterDriver(p, r);
2628 if (p->rng_fault_state) {
2629 talloc_free(r);
2630 /* Return true here, srv_pipe_hnd.c will take care */
2631 return true;
2634 if (DEBUGLEVEL >= 10) {
2635 NDR_PRINT_OUT_DEBUG(PNP_RegisterDriver, r);
2638 push = ndr_push_init_ctx(r);
2639 if (push == NULL) {
2640 talloc_free(r);
2641 return false;
2644 ndr_err = call->ndr_push(push, NDR_OUT, r);
2645 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2646 talloc_free(r);
2647 return false;
2650 blob = ndr_push_blob(push);
2651 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2652 talloc_free(r);
2653 return false;
2656 talloc_free(r);
2658 return true;
2661 static bool api_PNP_QueryRemove(pipes_struct *p)
2663 const struct ndr_interface_call *call;
2664 struct ndr_pull *pull;
2665 struct ndr_push *push;
2666 enum ndr_err_code ndr_err;
2667 DATA_BLOB blob;
2668 struct PNP_QueryRemove *r;
2670 call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYREMOVE];
2672 r = talloc(talloc_tos(), struct PNP_QueryRemove);
2673 if (r == NULL) {
2674 return false;
2677 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2678 talloc_free(r);
2679 return false;
2682 pull = ndr_pull_init_blob(&blob, r);
2683 if (pull == NULL) {
2684 talloc_free(r);
2685 return false;
2688 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2689 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2690 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2691 talloc_free(r);
2692 return false;
2695 if (DEBUGLEVEL >= 10) {
2696 NDR_PRINT_IN_DEBUG(PNP_QueryRemove, r);
2699 r->out.result = _PNP_QueryRemove(p, r);
2701 if (p->rng_fault_state) {
2702 talloc_free(r);
2703 /* Return true here, srv_pipe_hnd.c will take care */
2704 return true;
2707 if (DEBUGLEVEL >= 10) {
2708 NDR_PRINT_OUT_DEBUG(PNP_QueryRemove, r);
2711 push = ndr_push_init_ctx(r);
2712 if (push == NULL) {
2713 talloc_free(r);
2714 return false;
2717 ndr_err = call->ndr_push(push, NDR_OUT, r);
2718 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2719 talloc_free(r);
2720 return false;
2723 blob = ndr_push_blob(push);
2724 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2725 talloc_free(r);
2726 return false;
2729 talloc_free(r);
2731 return true;
2734 static bool api_PNP_RequestDeviceEject(pipes_struct *p)
2736 const struct ndr_interface_call *call;
2737 struct ndr_pull *pull;
2738 struct ndr_push *push;
2739 enum ndr_err_code ndr_err;
2740 DATA_BLOB blob;
2741 struct PNP_RequestDeviceEject *r;
2743 call = &ndr_table_ntsvcs.calls[NDR_PNP_REQUESTDEVICEEJECT];
2745 r = talloc(talloc_tos(), struct PNP_RequestDeviceEject);
2746 if (r == NULL) {
2747 return false;
2750 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2751 talloc_free(r);
2752 return false;
2755 pull = ndr_pull_init_blob(&blob, r);
2756 if (pull == NULL) {
2757 talloc_free(r);
2758 return false;
2761 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2762 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2763 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2764 talloc_free(r);
2765 return false;
2768 if (DEBUGLEVEL >= 10) {
2769 NDR_PRINT_IN_DEBUG(PNP_RequestDeviceEject, r);
2772 r->out.result = _PNP_RequestDeviceEject(p, r);
2774 if (p->rng_fault_state) {
2775 talloc_free(r);
2776 /* Return true here, srv_pipe_hnd.c will take care */
2777 return true;
2780 if (DEBUGLEVEL >= 10) {
2781 NDR_PRINT_OUT_DEBUG(PNP_RequestDeviceEject, r);
2784 push = ndr_push_init_ctx(r);
2785 if (push == NULL) {
2786 talloc_free(r);
2787 return false;
2790 ndr_err = call->ndr_push(push, NDR_OUT, r);
2791 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2792 talloc_free(r);
2793 return false;
2796 blob = ndr_push_blob(push);
2797 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2798 talloc_free(r);
2799 return false;
2802 talloc_free(r);
2804 return true;
2807 static bool api_PNP_IsDockStationPresent(pipes_struct *p)
2809 const struct ndr_interface_call *call;
2810 struct ndr_pull *pull;
2811 struct ndr_push *push;
2812 enum ndr_err_code ndr_err;
2813 DATA_BLOB blob;
2814 struct PNP_IsDockStationPresent *r;
2816 call = &ndr_table_ntsvcs.calls[NDR_PNP_ISDOCKSTATIONPRESENT];
2818 r = talloc(talloc_tos(), struct PNP_IsDockStationPresent);
2819 if (r == NULL) {
2820 return false;
2823 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2824 talloc_free(r);
2825 return false;
2828 pull = ndr_pull_init_blob(&blob, r);
2829 if (pull == NULL) {
2830 talloc_free(r);
2831 return false;
2834 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2835 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2836 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2837 talloc_free(r);
2838 return false;
2841 if (DEBUGLEVEL >= 10) {
2842 NDR_PRINT_IN_DEBUG(PNP_IsDockStationPresent, r);
2845 r->out.result = _PNP_IsDockStationPresent(p, r);
2847 if (p->rng_fault_state) {
2848 talloc_free(r);
2849 /* Return true here, srv_pipe_hnd.c will take care */
2850 return true;
2853 if (DEBUGLEVEL >= 10) {
2854 NDR_PRINT_OUT_DEBUG(PNP_IsDockStationPresent, r);
2857 push = ndr_push_init_ctx(r);
2858 if (push == NULL) {
2859 talloc_free(r);
2860 return false;
2863 ndr_err = call->ndr_push(push, NDR_OUT, r);
2864 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2865 talloc_free(r);
2866 return false;
2869 blob = ndr_push_blob(push);
2870 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2871 talloc_free(r);
2872 return false;
2875 talloc_free(r);
2877 return true;
2880 static bool api_PNP_RequestEjectPC(pipes_struct *p)
2882 const struct ndr_interface_call *call;
2883 struct ndr_pull *pull;
2884 struct ndr_push *push;
2885 enum ndr_err_code ndr_err;
2886 DATA_BLOB blob;
2887 struct PNP_RequestEjectPC *r;
2889 call = &ndr_table_ntsvcs.calls[NDR_PNP_REQUESTEJECTPC];
2891 r = talloc(talloc_tos(), struct PNP_RequestEjectPC);
2892 if (r == NULL) {
2893 return false;
2896 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2897 talloc_free(r);
2898 return false;
2901 pull = ndr_pull_init_blob(&blob, r);
2902 if (pull == NULL) {
2903 talloc_free(r);
2904 return false;
2907 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2908 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2909 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2910 talloc_free(r);
2911 return false;
2914 if (DEBUGLEVEL >= 10) {
2915 NDR_PRINT_IN_DEBUG(PNP_RequestEjectPC, r);
2918 r->out.result = _PNP_RequestEjectPC(p, r);
2920 if (p->rng_fault_state) {
2921 talloc_free(r);
2922 /* Return true here, srv_pipe_hnd.c will take care */
2923 return true;
2926 if (DEBUGLEVEL >= 10) {
2927 NDR_PRINT_OUT_DEBUG(PNP_RequestEjectPC, r);
2930 push = ndr_push_init_ctx(r);
2931 if (push == NULL) {
2932 talloc_free(r);
2933 return false;
2936 ndr_err = call->ndr_push(push, NDR_OUT, r);
2937 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2938 talloc_free(r);
2939 return false;
2942 blob = ndr_push_blob(push);
2943 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2944 talloc_free(r);
2945 return false;
2948 talloc_free(r);
2950 return true;
2953 static bool api_PNP_HwProfFlags(pipes_struct *p)
2955 const struct ndr_interface_call *call;
2956 struct ndr_pull *pull;
2957 struct ndr_push *push;
2958 enum ndr_err_code ndr_err;
2959 DATA_BLOB blob;
2960 struct PNP_HwProfFlags *r;
2962 call = &ndr_table_ntsvcs.calls[NDR_PNP_HWPROFFLAGS];
2964 r = talloc(talloc_tos(), struct PNP_HwProfFlags);
2965 if (r == NULL) {
2966 return false;
2969 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2970 talloc_free(r);
2971 return false;
2974 pull = ndr_pull_init_blob(&blob, r);
2975 if (pull == NULL) {
2976 talloc_free(r);
2977 return false;
2980 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2981 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2982 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2983 talloc_free(r);
2984 return false;
2987 if (DEBUGLEVEL >= 10) {
2988 NDR_PRINT_IN_DEBUG(PNP_HwProfFlags, r);
2991 ZERO_STRUCT(r->out);
2992 r->out.unknown3 = r->in.unknown3;
2993 r->out.unknown4 = r->in.unknown4;
2994 r->out.unknown5a = talloc_zero(r, const char *);
2995 if (r->out.unknown5a == NULL) {
2996 talloc_free(r);
2997 return false;
3000 r->out.result = _PNP_HwProfFlags(p, r);
3002 if (p->rng_fault_state) {
3003 talloc_free(r);
3004 /* Return true here, srv_pipe_hnd.c will take care */
3005 return true;
3008 if (DEBUGLEVEL >= 10) {
3009 NDR_PRINT_OUT_DEBUG(PNP_HwProfFlags, r);
3012 push = ndr_push_init_ctx(r);
3013 if (push == NULL) {
3014 talloc_free(r);
3015 return false;
3018 ndr_err = call->ndr_push(push, NDR_OUT, r);
3019 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3020 talloc_free(r);
3021 return false;
3024 blob = ndr_push_blob(push);
3025 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3026 talloc_free(r);
3027 return false;
3030 talloc_free(r);
3032 return true;
3035 static bool api_PNP_GetHwProfInfo(pipes_struct *p)
3037 const struct ndr_interface_call *call;
3038 struct ndr_pull *pull;
3039 struct ndr_push *push;
3040 enum ndr_err_code ndr_err;
3041 DATA_BLOB blob;
3042 struct PNP_GetHwProfInfo *r;
3044 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETHWPROFINFO];
3046 r = talloc(talloc_tos(), struct PNP_GetHwProfInfo);
3047 if (r == NULL) {
3048 return false;
3051 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3052 talloc_free(r);
3053 return false;
3056 pull = ndr_pull_init_blob(&blob, r);
3057 if (pull == NULL) {
3058 talloc_free(r);
3059 return false;
3062 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3063 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3064 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3065 talloc_free(r);
3066 return false;
3069 if (DEBUGLEVEL >= 10) {
3070 NDR_PRINT_IN_DEBUG(PNP_GetHwProfInfo, r);
3073 ZERO_STRUCT(r->out);
3074 r->out.info = r->in.info;
3075 r->out.result = _PNP_GetHwProfInfo(p, r);
3077 if (p->rng_fault_state) {
3078 talloc_free(r);
3079 /* Return true here, srv_pipe_hnd.c will take care */
3080 return true;
3083 if (DEBUGLEVEL >= 10) {
3084 NDR_PRINT_OUT_DEBUG(PNP_GetHwProfInfo, r);
3087 push = ndr_push_init_ctx(r);
3088 if (push == NULL) {
3089 talloc_free(r);
3090 return false;
3093 ndr_err = call->ndr_push(push, NDR_OUT, r);
3094 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3095 talloc_free(r);
3096 return false;
3099 blob = ndr_push_blob(push);
3100 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3101 talloc_free(r);
3102 return false;
3105 talloc_free(r);
3107 return true;
3110 static bool api_PNP_AddEmptyLogConf(pipes_struct *p)
3112 const struct ndr_interface_call *call;
3113 struct ndr_pull *pull;
3114 struct ndr_push *push;
3115 enum ndr_err_code ndr_err;
3116 DATA_BLOB blob;
3117 struct PNP_AddEmptyLogConf *r;
3119 call = &ndr_table_ntsvcs.calls[NDR_PNP_ADDEMPTYLOGCONF];
3121 r = talloc(talloc_tos(), struct PNP_AddEmptyLogConf);
3122 if (r == NULL) {
3123 return false;
3126 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3127 talloc_free(r);
3128 return false;
3131 pull = ndr_pull_init_blob(&blob, r);
3132 if (pull == NULL) {
3133 talloc_free(r);
3134 return false;
3137 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3138 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3139 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3140 talloc_free(r);
3141 return false;
3144 if (DEBUGLEVEL >= 10) {
3145 NDR_PRINT_IN_DEBUG(PNP_AddEmptyLogConf, r);
3148 r->out.result = _PNP_AddEmptyLogConf(p, r);
3150 if (p->rng_fault_state) {
3151 talloc_free(r);
3152 /* Return true here, srv_pipe_hnd.c will take care */
3153 return true;
3156 if (DEBUGLEVEL >= 10) {
3157 NDR_PRINT_OUT_DEBUG(PNP_AddEmptyLogConf, r);
3160 push = ndr_push_init_ctx(r);
3161 if (push == NULL) {
3162 talloc_free(r);
3163 return false;
3166 ndr_err = call->ndr_push(push, NDR_OUT, r);
3167 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3168 talloc_free(r);
3169 return false;
3172 blob = ndr_push_blob(push);
3173 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3174 talloc_free(r);
3175 return false;
3178 talloc_free(r);
3180 return true;
3183 static bool api_PNP_FreeLogConf(pipes_struct *p)
3185 const struct ndr_interface_call *call;
3186 struct ndr_pull *pull;
3187 struct ndr_push *push;
3188 enum ndr_err_code ndr_err;
3189 DATA_BLOB blob;
3190 struct PNP_FreeLogConf *r;
3192 call = &ndr_table_ntsvcs.calls[NDR_PNP_FREELOGCONF];
3194 r = talloc(talloc_tos(), struct PNP_FreeLogConf);
3195 if (r == NULL) {
3196 return false;
3199 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3200 talloc_free(r);
3201 return false;
3204 pull = ndr_pull_init_blob(&blob, r);
3205 if (pull == NULL) {
3206 talloc_free(r);
3207 return false;
3210 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3211 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3212 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3213 talloc_free(r);
3214 return false;
3217 if (DEBUGLEVEL >= 10) {
3218 NDR_PRINT_IN_DEBUG(PNP_FreeLogConf, r);
3221 r->out.result = _PNP_FreeLogConf(p, r);
3223 if (p->rng_fault_state) {
3224 talloc_free(r);
3225 /* Return true here, srv_pipe_hnd.c will take care */
3226 return true;
3229 if (DEBUGLEVEL >= 10) {
3230 NDR_PRINT_OUT_DEBUG(PNP_FreeLogConf, r);
3233 push = ndr_push_init_ctx(r);
3234 if (push == NULL) {
3235 talloc_free(r);
3236 return false;
3239 ndr_err = call->ndr_push(push, NDR_OUT, r);
3240 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3241 talloc_free(r);
3242 return false;
3245 blob = ndr_push_blob(push);
3246 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3247 talloc_free(r);
3248 return false;
3251 talloc_free(r);
3253 return true;
3256 static bool api_PNP_GetFirstLogConf(pipes_struct *p)
3258 const struct ndr_interface_call *call;
3259 struct ndr_pull *pull;
3260 struct ndr_push *push;
3261 enum ndr_err_code ndr_err;
3262 DATA_BLOB blob;
3263 struct PNP_GetFirstLogConf *r;
3265 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETFIRSTLOGCONF];
3267 r = talloc(talloc_tos(), struct PNP_GetFirstLogConf);
3268 if (r == NULL) {
3269 return false;
3272 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3273 talloc_free(r);
3274 return false;
3277 pull = ndr_pull_init_blob(&blob, r);
3278 if (pull == NULL) {
3279 talloc_free(r);
3280 return false;
3283 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3284 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3285 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3286 talloc_free(r);
3287 return false;
3290 if (DEBUGLEVEL >= 10) {
3291 NDR_PRINT_IN_DEBUG(PNP_GetFirstLogConf, r);
3294 r->out.result = _PNP_GetFirstLogConf(p, r);
3296 if (p->rng_fault_state) {
3297 talloc_free(r);
3298 /* Return true here, srv_pipe_hnd.c will take care */
3299 return true;
3302 if (DEBUGLEVEL >= 10) {
3303 NDR_PRINT_OUT_DEBUG(PNP_GetFirstLogConf, r);
3306 push = ndr_push_init_ctx(r);
3307 if (push == NULL) {
3308 talloc_free(r);
3309 return false;
3312 ndr_err = call->ndr_push(push, NDR_OUT, r);
3313 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3314 talloc_free(r);
3315 return false;
3318 blob = ndr_push_blob(push);
3319 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3320 talloc_free(r);
3321 return false;
3324 talloc_free(r);
3326 return true;
3329 static bool api_PNP_GetNextLogConf(pipes_struct *p)
3331 const struct ndr_interface_call *call;
3332 struct ndr_pull *pull;
3333 struct ndr_push *push;
3334 enum ndr_err_code ndr_err;
3335 DATA_BLOB blob;
3336 struct PNP_GetNextLogConf *r;
3338 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETNEXTLOGCONF];
3340 r = talloc(talloc_tos(), struct PNP_GetNextLogConf);
3341 if (r == NULL) {
3342 return false;
3345 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3346 talloc_free(r);
3347 return false;
3350 pull = ndr_pull_init_blob(&blob, r);
3351 if (pull == NULL) {
3352 talloc_free(r);
3353 return false;
3356 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3357 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3358 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3359 talloc_free(r);
3360 return false;
3363 if (DEBUGLEVEL >= 10) {
3364 NDR_PRINT_IN_DEBUG(PNP_GetNextLogConf, r);
3367 r->out.result = _PNP_GetNextLogConf(p, r);
3369 if (p->rng_fault_state) {
3370 talloc_free(r);
3371 /* Return true here, srv_pipe_hnd.c will take care */
3372 return true;
3375 if (DEBUGLEVEL >= 10) {
3376 NDR_PRINT_OUT_DEBUG(PNP_GetNextLogConf, r);
3379 push = ndr_push_init_ctx(r);
3380 if (push == NULL) {
3381 talloc_free(r);
3382 return false;
3385 ndr_err = call->ndr_push(push, NDR_OUT, r);
3386 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3387 talloc_free(r);
3388 return false;
3391 blob = ndr_push_blob(push);
3392 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3393 talloc_free(r);
3394 return false;
3397 talloc_free(r);
3399 return true;
3402 static bool api_PNP_GetLogConfPriority(pipes_struct *p)
3404 const struct ndr_interface_call *call;
3405 struct ndr_pull *pull;
3406 struct ndr_push *push;
3407 enum ndr_err_code ndr_err;
3408 DATA_BLOB blob;
3409 struct PNP_GetLogConfPriority *r;
3411 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETLOGCONFPRIORITY];
3413 r = talloc(talloc_tos(), struct PNP_GetLogConfPriority);
3414 if (r == NULL) {
3415 return false;
3418 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3419 talloc_free(r);
3420 return false;
3423 pull = ndr_pull_init_blob(&blob, r);
3424 if (pull == NULL) {
3425 talloc_free(r);
3426 return false;
3429 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3430 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3431 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3432 talloc_free(r);
3433 return false;
3436 if (DEBUGLEVEL >= 10) {
3437 NDR_PRINT_IN_DEBUG(PNP_GetLogConfPriority, r);
3440 r->out.result = _PNP_GetLogConfPriority(p, r);
3442 if (p->rng_fault_state) {
3443 talloc_free(r);
3444 /* Return true here, srv_pipe_hnd.c will take care */
3445 return true;
3448 if (DEBUGLEVEL >= 10) {
3449 NDR_PRINT_OUT_DEBUG(PNP_GetLogConfPriority, r);
3452 push = ndr_push_init_ctx(r);
3453 if (push == NULL) {
3454 talloc_free(r);
3455 return false;
3458 ndr_err = call->ndr_push(push, NDR_OUT, r);
3459 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3460 talloc_free(r);
3461 return false;
3464 blob = ndr_push_blob(push);
3465 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3466 talloc_free(r);
3467 return false;
3470 talloc_free(r);
3472 return true;
3475 static bool api_PNP_AddResDes(pipes_struct *p)
3477 const struct ndr_interface_call *call;
3478 struct ndr_pull *pull;
3479 struct ndr_push *push;
3480 enum ndr_err_code ndr_err;
3481 DATA_BLOB blob;
3482 struct PNP_AddResDes *r;
3484 call = &ndr_table_ntsvcs.calls[NDR_PNP_ADDRESDES];
3486 r = talloc(talloc_tos(), struct PNP_AddResDes);
3487 if (r == NULL) {
3488 return false;
3491 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3492 talloc_free(r);
3493 return false;
3496 pull = ndr_pull_init_blob(&blob, r);
3497 if (pull == NULL) {
3498 talloc_free(r);
3499 return false;
3502 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3503 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3504 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3505 talloc_free(r);
3506 return false;
3509 if (DEBUGLEVEL >= 10) {
3510 NDR_PRINT_IN_DEBUG(PNP_AddResDes, r);
3513 r->out.result = _PNP_AddResDes(p, r);
3515 if (p->rng_fault_state) {
3516 talloc_free(r);
3517 /* Return true here, srv_pipe_hnd.c will take care */
3518 return true;
3521 if (DEBUGLEVEL >= 10) {
3522 NDR_PRINT_OUT_DEBUG(PNP_AddResDes, r);
3525 push = ndr_push_init_ctx(r);
3526 if (push == NULL) {
3527 talloc_free(r);
3528 return false;
3531 ndr_err = call->ndr_push(push, NDR_OUT, r);
3532 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3533 talloc_free(r);
3534 return false;
3537 blob = ndr_push_blob(push);
3538 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3539 talloc_free(r);
3540 return false;
3543 talloc_free(r);
3545 return true;
3548 static bool api_PNP_FreeResDes(pipes_struct *p)
3550 const struct ndr_interface_call *call;
3551 struct ndr_pull *pull;
3552 struct ndr_push *push;
3553 enum ndr_err_code ndr_err;
3554 DATA_BLOB blob;
3555 struct PNP_FreeResDes *r;
3557 call = &ndr_table_ntsvcs.calls[NDR_PNP_FREERESDES];
3559 r = talloc(talloc_tos(), struct PNP_FreeResDes);
3560 if (r == NULL) {
3561 return false;
3564 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3565 talloc_free(r);
3566 return false;
3569 pull = ndr_pull_init_blob(&blob, r);
3570 if (pull == NULL) {
3571 talloc_free(r);
3572 return false;
3575 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3576 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3577 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3578 talloc_free(r);
3579 return false;
3582 if (DEBUGLEVEL >= 10) {
3583 NDR_PRINT_IN_DEBUG(PNP_FreeResDes, r);
3586 r->out.result = _PNP_FreeResDes(p, r);
3588 if (p->rng_fault_state) {
3589 talloc_free(r);
3590 /* Return true here, srv_pipe_hnd.c will take care */
3591 return true;
3594 if (DEBUGLEVEL >= 10) {
3595 NDR_PRINT_OUT_DEBUG(PNP_FreeResDes, r);
3598 push = ndr_push_init_ctx(r);
3599 if (push == NULL) {
3600 talloc_free(r);
3601 return false;
3604 ndr_err = call->ndr_push(push, NDR_OUT, r);
3605 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3606 talloc_free(r);
3607 return false;
3610 blob = ndr_push_blob(push);
3611 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3612 talloc_free(r);
3613 return false;
3616 talloc_free(r);
3618 return true;
3621 static bool api_PNP_GetNextResDes(pipes_struct *p)
3623 const struct ndr_interface_call *call;
3624 struct ndr_pull *pull;
3625 struct ndr_push *push;
3626 enum ndr_err_code ndr_err;
3627 DATA_BLOB blob;
3628 struct PNP_GetNextResDes *r;
3630 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETNEXTRESDES];
3632 r = talloc(talloc_tos(), struct PNP_GetNextResDes);
3633 if (r == NULL) {
3634 return false;
3637 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3638 talloc_free(r);
3639 return false;
3642 pull = ndr_pull_init_blob(&blob, r);
3643 if (pull == NULL) {
3644 talloc_free(r);
3645 return false;
3648 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3649 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3650 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3651 talloc_free(r);
3652 return false;
3655 if (DEBUGLEVEL >= 10) {
3656 NDR_PRINT_IN_DEBUG(PNP_GetNextResDes, r);
3659 r->out.result = _PNP_GetNextResDes(p, r);
3661 if (p->rng_fault_state) {
3662 talloc_free(r);
3663 /* Return true here, srv_pipe_hnd.c will take care */
3664 return true;
3667 if (DEBUGLEVEL >= 10) {
3668 NDR_PRINT_OUT_DEBUG(PNP_GetNextResDes, r);
3671 push = ndr_push_init_ctx(r);
3672 if (push == NULL) {
3673 talloc_free(r);
3674 return false;
3677 ndr_err = call->ndr_push(push, NDR_OUT, r);
3678 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3679 talloc_free(r);
3680 return false;
3683 blob = ndr_push_blob(push);
3684 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3685 talloc_free(r);
3686 return false;
3689 talloc_free(r);
3691 return true;
3694 static bool api_PNP_GetResDesData(pipes_struct *p)
3696 const struct ndr_interface_call *call;
3697 struct ndr_pull *pull;
3698 struct ndr_push *push;
3699 enum ndr_err_code ndr_err;
3700 DATA_BLOB blob;
3701 struct PNP_GetResDesData *r;
3703 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETRESDESDATA];
3705 r = talloc(talloc_tos(), struct PNP_GetResDesData);
3706 if (r == NULL) {
3707 return false;
3710 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3711 talloc_free(r);
3712 return false;
3715 pull = ndr_pull_init_blob(&blob, r);
3716 if (pull == NULL) {
3717 talloc_free(r);
3718 return false;
3721 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3722 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3723 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3724 talloc_free(r);
3725 return false;
3728 if (DEBUGLEVEL >= 10) {
3729 NDR_PRINT_IN_DEBUG(PNP_GetResDesData, r);
3732 r->out.result = _PNP_GetResDesData(p, r);
3734 if (p->rng_fault_state) {
3735 talloc_free(r);
3736 /* Return true here, srv_pipe_hnd.c will take care */
3737 return true;
3740 if (DEBUGLEVEL >= 10) {
3741 NDR_PRINT_OUT_DEBUG(PNP_GetResDesData, r);
3744 push = ndr_push_init_ctx(r);
3745 if (push == NULL) {
3746 talloc_free(r);
3747 return false;
3750 ndr_err = call->ndr_push(push, NDR_OUT, r);
3751 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3752 talloc_free(r);
3753 return false;
3756 blob = ndr_push_blob(push);
3757 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3758 talloc_free(r);
3759 return false;
3762 talloc_free(r);
3764 return true;
3767 static bool api_PNP_GetResDesDataSize(pipes_struct *p)
3769 const struct ndr_interface_call *call;
3770 struct ndr_pull *pull;
3771 struct ndr_push *push;
3772 enum ndr_err_code ndr_err;
3773 DATA_BLOB blob;
3774 struct PNP_GetResDesDataSize *r;
3776 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETRESDESDATASIZE];
3778 r = talloc(talloc_tos(), struct PNP_GetResDesDataSize);
3779 if (r == NULL) {
3780 return false;
3783 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3784 talloc_free(r);
3785 return false;
3788 pull = ndr_pull_init_blob(&blob, r);
3789 if (pull == NULL) {
3790 talloc_free(r);
3791 return false;
3794 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3795 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3796 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3797 talloc_free(r);
3798 return false;
3801 if (DEBUGLEVEL >= 10) {
3802 NDR_PRINT_IN_DEBUG(PNP_GetResDesDataSize, r);
3805 r->out.result = _PNP_GetResDesDataSize(p, r);
3807 if (p->rng_fault_state) {
3808 talloc_free(r);
3809 /* Return true here, srv_pipe_hnd.c will take care */
3810 return true;
3813 if (DEBUGLEVEL >= 10) {
3814 NDR_PRINT_OUT_DEBUG(PNP_GetResDesDataSize, r);
3817 push = ndr_push_init_ctx(r);
3818 if (push == NULL) {
3819 talloc_free(r);
3820 return false;
3823 ndr_err = call->ndr_push(push, NDR_OUT, r);
3824 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3825 talloc_free(r);
3826 return false;
3829 blob = ndr_push_blob(push);
3830 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3831 talloc_free(r);
3832 return false;
3835 talloc_free(r);
3837 return true;
3840 static bool api_PNP_ModifyResDes(pipes_struct *p)
3842 const struct ndr_interface_call *call;
3843 struct ndr_pull *pull;
3844 struct ndr_push *push;
3845 enum ndr_err_code ndr_err;
3846 DATA_BLOB blob;
3847 struct PNP_ModifyResDes *r;
3849 call = &ndr_table_ntsvcs.calls[NDR_PNP_MODIFYRESDES];
3851 r = talloc(talloc_tos(), struct PNP_ModifyResDes);
3852 if (r == NULL) {
3853 return false;
3856 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3857 talloc_free(r);
3858 return false;
3861 pull = ndr_pull_init_blob(&blob, r);
3862 if (pull == NULL) {
3863 talloc_free(r);
3864 return false;
3867 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3868 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3869 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3870 talloc_free(r);
3871 return false;
3874 if (DEBUGLEVEL >= 10) {
3875 NDR_PRINT_IN_DEBUG(PNP_ModifyResDes, r);
3878 r->out.result = _PNP_ModifyResDes(p, r);
3880 if (p->rng_fault_state) {
3881 talloc_free(r);
3882 /* Return true here, srv_pipe_hnd.c will take care */
3883 return true;
3886 if (DEBUGLEVEL >= 10) {
3887 NDR_PRINT_OUT_DEBUG(PNP_ModifyResDes, r);
3890 push = ndr_push_init_ctx(r);
3891 if (push == NULL) {
3892 talloc_free(r);
3893 return false;
3896 ndr_err = call->ndr_push(push, NDR_OUT, r);
3897 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3898 talloc_free(r);
3899 return false;
3902 blob = ndr_push_blob(push);
3903 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3904 talloc_free(r);
3905 return false;
3908 talloc_free(r);
3910 return true;
3913 static bool api_PNP_DetectResourceLimit(pipes_struct *p)
3915 const struct ndr_interface_call *call;
3916 struct ndr_pull *pull;
3917 struct ndr_push *push;
3918 enum ndr_err_code ndr_err;
3919 DATA_BLOB blob;
3920 struct PNP_DetectResourceLimit *r;
3922 call = &ndr_table_ntsvcs.calls[NDR_PNP_DETECTRESOURCELIMIT];
3924 r = talloc(talloc_tos(), struct PNP_DetectResourceLimit);
3925 if (r == NULL) {
3926 return false;
3929 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3930 talloc_free(r);
3931 return false;
3934 pull = ndr_pull_init_blob(&blob, r);
3935 if (pull == NULL) {
3936 talloc_free(r);
3937 return false;
3940 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3941 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3942 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3943 talloc_free(r);
3944 return false;
3947 if (DEBUGLEVEL >= 10) {
3948 NDR_PRINT_IN_DEBUG(PNP_DetectResourceLimit, r);
3951 r->out.result = _PNP_DetectResourceLimit(p, r);
3953 if (p->rng_fault_state) {
3954 talloc_free(r);
3955 /* Return true here, srv_pipe_hnd.c will take care */
3956 return true;
3959 if (DEBUGLEVEL >= 10) {
3960 NDR_PRINT_OUT_DEBUG(PNP_DetectResourceLimit, r);
3963 push = ndr_push_init_ctx(r);
3964 if (push == NULL) {
3965 talloc_free(r);
3966 return false;
3969 ndr_err = call->ndr_push(push, NDR_OUT, r);
3970 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3971 talloc_free(r);
3972 return false;
3975 blob = ndr_push_blob(push);
3976 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3977 talloc_free(r);
3978 return false;
3981 talloc_free(r);
3983 return true;
3986 static bool api_PNP_QueryResConfList(pipes_struct *p)
3988 const struct ndr_interface_call *call;
3989 struct ndr_pull *pull;
3990 struct ndr_push *push;
3991 enum ndr_err_code ndr_err;
3992 DATA_BLOB blob;
3993 struct PNP_QueryResConfList *r;
3995 call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYRESCONFLIST];
3997 r = talloc(talloc_tos(), struct PNP_QueryResConfList);
3998 if (r == NULL) {
3999 return false;
4002 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4003 talloc_free(r);
4004 return false;
4007 pull = ndr_pull_init_blob(&blob, r);
4008 if (pull == NULL) {
4009 talloc_free(r);
4010 return false;
4013 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4014 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4015 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4016 talloc_free(r);
4017 return false;
4020 if (DEBUGLEVEL >= 10) {
4021 NDR_PRINT_IN_DEBUG(PNP_QueryResConfList, r);
4024 r->out.result = _PNP_QueryResConfList(p, r);
4026 if (p->rng_fault_state) {
4027 talloc_free(r);
4028 /* Return true here, srv_pipe_hnd.c will take care */
4029 return true;
4032 if (DEBUGLEVEL >= 10) {
4033 NDR_PRINT_OUT_DEBUG(PNP_QueryResConfList, r);
4036 push = ndr_push_init_ctx(r);
4037 if (push == NULL) {
4038 talloc_free(r);
4039 return false;
4042 ndr_err = call->ndr_push(push, NDR_OUT, r);
4043 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4044 talloc_free(r);
4045 return false;
4048 blob = ndr_push_blob(push);
4049 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4050 talloc_free(r);
4051 return false;
4054 talloc_free(r);
4056 return true;
4059 static bool api_PNP_SetHwProf(pipes_struct *p)
4061 const struct ndr_interface_call *call;
4062 struct ndr_pull *pull;
4063 struct ndr_push *push;
4064 enum ndr_err_code ndr_err;
4065 DATA_BLOB blob;
4066 struct PNP_SetHwProf *r;
4068 call = &ndr_table_ntsvcs.calls[NDR_PNP_SETHWPROF];
4070 r = talloc(talloc_tos(), struct PNP_SetHwProf);
4071 if (r == NULL) {
4072 return false;
4075 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4076 talloc_free(r);
4077 return false;
4080 pull = ndr_pull_init_blob(&blob, r);
4081 if (pull == NULL) {
4082 talloc_free(r);
4083 return false;
4086 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4087 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4088 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4089 talloc_free(r);
4090 return false;
4093 if (DEBUGLEVEL >= 10) {
4094 NDR_PRINT_IN_DEBUG(PNP_SetHwProf, r);
4097 r->out.result = _PNP_SetHwProf(p, r);
4099 if (p->rng_fault_state) {
4100 talloc_free(r);
4101 /* Return true here, srv_pipe_hnd.c will take care */
4102 return true;
4105 if (DEBUGLEVEL >= 10) {
4106 NDR_PRINT_OUT_DEBUG(PNP_SetHwProf, r);
4109 push = ndr_push_init_ctx(r);
4110 if (push == NULL) {
4111 talloc_free(r);
4112 return false;
4115 ndr_err = call->ndr_push(push, NDR_OUT, r);
4116 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4117 talloc_free(r);
4118 return false;
4121 blob = ndr_push_blob(push);
4122 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4123 talloc_free(r);
4124 return false;
4127 talloc_free(r);
4129 return true;
4132 static bool api_PNP_QueryArbitratorFreeData(pipes_struct *p)
4134 const struct ndr_interface_call *call;
4135 struct ndr_pull *pull;
4136 struct ndr_push *push;
4137 enum ndr_err_code ndr_err;
4138 DATA_BLOB blob;
4139 struct PNP_QueryArbitratorFreeData *r;
4141 call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYARBITRATORFREEDATA];
4143 r = talloc(talloc_tos(), struct PNP_QueryArbitratorFreeData);
4144 if (r == NULL) {
4145 return false;
4148 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4149 talloc_free(r);
4150 return false;
4153 pull = ndr_pull_init_blob(&blob, r);
4154 if (pull == NULL) {
4155 talloc_free(r);
4156 return false;
4159 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4160 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4161 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4162 talloc_free(r);
4163 return false;
4166 if (DEBUGLEVEL >= 10) {
4167 NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeData, r);
4170 r->out.result = _PNP_QueryArbitratorFreeData(p, r);
4172 if (p->rng_fault_state) {
4173 talloc_free(r);
4174 /* Return true here, srv_pipe_hnd.c will take care */
4175 return true;
4178 if (DEBUGLEVEL >= 10) {
4179 NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeData, r);
4182 push = ndr_push_init_ctx(r);
4183 if (push == NULL) {
4184 talloc_free(r);
4185 return false;
4188 ndr_err = call->ndr_push(push, NDR_OUT, r);
4189 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4190 talloc_free(r);
4191 return false;
4194 blob = ndr_push_blob(push);
4195 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4196 talloc_free(r);
4197 return false;
4200 talloc_free(r);
4202 return true;
4205 static bool api_PNP_QueryArbitratorFreeSize(pipes_struct *p)
4207 const struct ndr_interface_call *call;
4208 struct ndr_pull *pull;
4209 struct ndr_push *push;
4210 enum ndr_err_code ndr_err;
4211 DATA_BLOB blob;
4212 struct PNP_QueryArbitratorFreeSize *r;
4214 call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYARBITRATORFREESIZE];
4216 r = talloc(talloc_tos(), struct PNP_QueryArbitratorFreeSize);
4217 if (r == NULL) {
4218 return false;
4221 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4222 talloc_free(r);
4223 return false;
4226 pull = ndr_pull_init_blob(&blob, r);
4227 if (pull == NULL) {
4228 talloc_free(r);
4229 return false;
4232 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4233 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4234 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4235 talloc_free(r);
4236 return false;
4239 if (DEBUGLEVEL >= 10) {
4240 NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeSize, r);
4243 r->out.result = _PNP_QueryArbitratorFreeSize(p, r);
4245 if (p->rng_fault_state) {
4246 talloc_free(r);
4247 /* Return true here, srv_pipe_hnd.c will take care */
4248 return true;
4251 if (DEBUGLEVEL >= 10) {
4252 NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeSize, r);
4255 push = ndr_push_init_ctx(r);
4256 if (push == NULL) {
4257 talloc_free(r);
4258 return false;
4261 ndr_err = call->ndr_push(push, NDR_OUT, r);
4262 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4263 talloc_free(r);
4264 return false;
4267 blob = ndr_push_blob(push);
4268 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4269 talloc_free(r);
4270 return false;
4273 talloc_free(r);
4275 return true;
4278 static bool api_PNP_RunDetection(pipes_struct *p)
4280 const struct ndr_interface_call *call;
4281 struct ndr_pull *pull;
4282 struct ndr_push *push;
4283 enum ndr_err_code ndr_err;
4284 DATA_BLOB blob;
4285 struct PNP_RunDetection *r;
4287 call = &ndr_table_ntsvcs.calls[NDR_PNP_RUNDETECTION];
4289 r = talloc(talloc_tos(), struct PNP_RunDetection);
4290 if (r == NULL) {
4291 return false;
4294 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4295 talloc_free(r);
4296 return false;
4299 pull = ndr_pull_init_blob(&blob, r);
4300 if (pull == NULL) {
4301 talloc_free(r);
4302 return false;
4305 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4306 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4307 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4308 talloc_free(r);
4309 return false;
4312 if (DEBUGLEVEL >= 10) {
4313 NDR_PRINT_IN_DEBUG(PNP_RunDetection, r);
4316 r->out.result = _PNP_RunDetection(p, r);
4318 if (p->rng_fault_state) {
4319 talloc_free(r);
4320 /* Return true here, srv_pipe_hnd.c will take care */
4321 return true;
4324 if (DEBUGLEVEL >= 10) {
4325 NDR_PRINT_OUT_DEBUG(PNP_RunDetection, r);
4328 push = ndr_push_init_ctx(r);
4329 if (push == NULL) {
4330 talloc_free(r);
4331 return false;
4334 ndr_err = call->ndr_push(push, NDR_OUT, r);
4335 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4336 talloc_free(r);
4337 return false;
4340 blob = ndr_push_blob(push);
4341 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4342 talloc_free(r);
4343 return false;
4346 talloc_free(r);
4348 return true;
4351 static bool api_PNP_RegisterNotification(pipes_struct *p)
4353 const struct ndr_interface_call *call;
4354 struct ndr_pull *pull;
4355 struct ndr_push *push;
4356 enum ndr_err_code ndr_err;
4357 DATA_BLOB blob;
4358 struct PNP_RegisterNotification *r;
4360 call = &ndr_table_ntsvcs.calls[NDR_PNP_REGISTERNOTIFICATION];
4362 r = talloc(talloc_tos(), struct PNP_RegisterNotification);
4363 if (r == NULL) {
4364 return false;
4367 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4368 talloc_free(r);
4369 return false;
4372 pull = ndr_pull_init_blob(&blob, r);
4373 if (pull == NULL) {
4374 talloc_free(r);
4375 return false;
4378 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4379 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4380 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4381 talloc_free(r);
4382 return false;
4385 if (DEBUGLEVEL >= 10) {
4386 NDR_PRINT_IN_DEBUG(PNP_RegisterNotification, r);
4389 r->out.result = _PNP_RegisterNotification(p, r);
4391 if (p->rng_fault_state) {
4392 talloc_free(r);
4393 /* Return true here, srv_pipe_hnd.c will take care */
4394 return true;
4397 if (DEBUGLEVEL >= 10) {
4398 NDR_PRINT_OUT_DEBUG(PNP_RegisterNotification, r);
4401 push = ndr_push_init_ctx(r);
4402 if (push == NULL) {
4403 talloc_free(r);
4404 return false;
4407 ndr_err = call->ndr_push(push, NDR_OUT, r);
4408 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4409 talloc_free(r);
4410 return false;
4413 blob = ndr_push_blob(push);
4414 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4415 talloc_free(r);
4416 return false;
4419 talloc_free(r);
4421 return true;
4424 static bool api_PNP_UnregisterNotification(pipes_struct *p)
4426 const struct ndr_interface_call *call;
4427 struct ndr_pull *pull;
4428 struct ndr_push *push;
4429 enum ndr_err_code ndr_err;
4430 DATA_BLOB blob;
4431 struct PNP_UnregisterNotification *r;
4433 call = &ndr_table_ntsvcs.calls[NDR_PNP_UNREGISTERNOTIFICATION];
4435 r = talloc(talloc_tos(), struct PNP_UnregisterNotification);
4436 if (r == NULL) {
4437 return false;
4440 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4441 talloc_free(r);
4442 return false;
4445 pull = ndr_pull_init_blob(&blob, r);
4446 if (pull == NULL) {
4447 talloc_free(r);
4448 return false;
4451 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4452 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4453 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4454 talloc_free(r);
4455 return false;
4458 if (DEBUGLEVEL >= 10) {
4459 NDR_PRINT_IN_DEBUG(PNP_UnregisterNotification, r);
4462 r->out.result = _PNP_UnregisterNotification(p, r);
4464 if (p->rng_fault_state) {
4465 talloc_free(r);
4466 /* Return true here, srv_pipe_hnd.c will take care */
4467 return true;
4470 if (DEBUGLEVEL >= 10) {
4471 NDR_PRINT_OUT_DEBUG(PNP_UnregisterNotification, r);
4474 push = ndr_push_init_ctx(r);
4475 if (push == NULL) {
4476 talloc_free(r);
4477 return false;
4480 ndr_err = call->ndr_push(push, NDR_OUT, r);
4481 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4482 talloc_free(r);
4483 return false;
4486 blob = ndr_push_blob(push);
4487 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4488 talloc_free(r);
4489 return false;
4492 talloc_free(r);
4494 return true;
4497 static bool api_PNP_GetCustomDevProp(pipes_struct *p)
4499 const struct ndr_interface_call *call;
4500 struct ndr_pull *pull;
4501 struct ndr_push *push;
4502 enum ndr_err_code ndr_err;
4503 DATA_BLOB blob;
4504 struct PNP_GetCustomDevProp *r;
4506 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCUSTOMDEVPROP];
4508 r = talloc(talloc_tos(), struct PNP_GetCustomDevProp);
4509 if (r == NULL) {
4510 return false;
4513 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4514 talloc_free(r);
4515 return false;
4518 pull = ndr_pull_init_blob(&blob, r);
4519 if (pull == NULL) {
4520 talloc_free(r);
4521 return false;
4524 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4525 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4526 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4527 talloc_free(r);
4528 return false;
4531 if (DEBUGLEVEL >= 10) {
4532 NDR_PRINT_IN_DEBUG(PNP_GetCustomDevProp, r);
4535 r->out.result = _PNP_GetCustomDevProp(p, r);
4537 if (p->rng_fault_state) {
4538 talloc_free(r);
4539 /* Return true here, srv_pipe_hnd.c will take care */
4540 return true;
4543 if (DEBUGLEVEL >= 10) {
4544 NDR_PRINT_OUT_DEBUG(PNP_GetCustomDevProp, r);
4547 push = ndr_push_init_ctx(r);
4548 if (push == NULL) {
4549 talloc_free(r);
4550 return false;
4553 ndr_err = call->ndr_push(push, NDR_OUT, r);
4554 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4555 talloc_free(r);
4556 return false;
4559 blob = ndr_push_blob(push);
4560 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4561 talloc_free(r);
4562 return false;
4565 talloc_free(r);
4567 return true;
4570 static bool api_PNP_GetVersionInternal(pipes_struct *p)
4572 const struct ndr_interface_call *call;
4573 struct ndr_pull *pull;
4574 struct ndr_push *push;
4575 enum ndr_err_code ndr_err;
4576 DATA_BLOB blob;
4577 struct PNP_GetVersionInternal *r;
4579 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETVERSIONINTERNAL];
4581 r = talloc(talloc_tos(), struct PNP_GetVersionInternal);
4582 if (r == NULL) {
4583 return false;
4586 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4587 talloc_free(r);
4588 return false;
4591 pull = ndr_pull_init_blob(&blob, r);
4592 if (pull == NULL) {
4593 talloc_free(r);
4594 return false;
4597 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4598 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4599 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4600 talloc_free(r);
4601 return false;
4604 if (DEBUGLEVEL >= 10) {
4605 NDR_PRINT_IN_DEBUG(PNP_GetVersionInternal, r);
4608 r->out.result = _PNP_GetVersionInternal(p, r);
4610 if (p->rng_fault_state) {
4611 talloc_free(r);
4612 /* Return true here, srv_pipe_hnd.c will take care */
4613 return true;
4616 if (DEBUGLEVEL >= 10) {
4617 NDR_PRINT_OUT_DEBUG(PNP_GetVersionInternal, r);
4620 push = ndr_push_init_ctx(r);
4621 if (push == NULL) {
4622 talloc_free(r);
4623 return false;
4626 ndr_err = call->ndr_push(push, NDR_OUT, r);
4627 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4628 talloc_free(r);
4629 return false;
4632 blob = ndr_push_blob(push);
4633 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4634 talloc_free(r);
4635 return false;
4638 talloc_free(r);
4640 return true;
4643 static bool api_PNP_GetBlockedDriverInfo(pipes_struct *p)
4645 const struct ndr_interface_call *call;
4646 struct ndr_pull *pull;
4647 struct ndr_push *push;
4648 enum ndr_err_code ndr_err;
4649 DATA_BLOB blob;
4650 struct PNP_GetBlockedDriverInfo *r;
4652 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETBLOCKEDDRIVERINFO];
4654 r = talloc(talloc_tos(), struct PNP_GetBlockedDriverInfo);
4655 if (r == NULL) {
4656 return false;
4659 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4660 talloc_free(r);
4661 return false;
4664 pull = ndr_pull_init_blob(&blob, r);
4665 if (pull == NULL) {
4666 talloc_free(r);
4667 return false;
4670 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4671 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4672 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4673 talloc_free(r);
4674 return false;
4677 if (DEBUGLEVEL >= 10) {
4678 NDR_PRINT_IN_DEBUG(PNP_GetBlockedDriverInfo, r);
4681 r->out.result = _PNP_GetBlockedDriverInfo(p, r);
4683 if (p->rng_fault_state) {
4684 talloc_free(r);
4685 /* Return true here, srv_pipe_hnd.c will take care */
4686 return true;
4689 if (DEBUGLEVEL >= 10) {
4690 NDR_PRINT_OUT_DEBUG(PNP_GetBlockedDriverInfo, r);
4693 push = ndr_push_init_ctx(r);
4694 if (push == NULL) {
4695 talloc_free(r);
4696 return false;
4699 ndr_err = call->ndr_push(push, NDR_OUT, r);
4700 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4701 talloc_free(r);
4702 return false;
4705 blob = ndr_push_blob(push);
4706 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4707 talloc_free(r);
4708 return false;
4711 talloc_free(r);
4713 return true;
4716 static bool api_PNP_GetServerSideDeviceInstallFlags(pipes_struct *p)
4718 const struct ndr_interface_call *call;
4719 struct ndr_pull *pull;
4720 struct ndr_push *push;
4721 enum ndr_err_code ndr_err;
4722 DATA_BLOB blob;
4723 struct PNP_GetServerSideDeviceInstallFlags *r;
4725 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS];
4727 r = talloc(talloc_tos(), struct PNP_GetServerSideDeviceInstallFlags);
4728 if (r == NULL) {
4729 return false;
4732 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4733 talloc_free(r);
4734 return false;
4737 pull = ndr_pull_init_blob(&blob, r);
4738 if (pull == NULL) {
4739 talloc_free(r);
4740 return false;
4743 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4744 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4745 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4746 talloc_free(r);
4747 return false;
4750 if (DEBUGLEVEL >= 10) {
4751 NDR_PRINT_IN_DEBUG(PNP_GetServerSideDeviceInstallFlags, r);
4754 r->out.result = _PNP_GetServerSideDeviceInstallFlags(p, r);
4756 if (p->rng_fault_state) {
4757 talloc_free(r);
4758 /* Return true here, srv_pipe_hnd.c will take care */
4759 return true;
4762 if (DEBUGLEVEL >= 10) {
4763 NDR_PRINT_OUT_DEBUG(PNP_GetServerSideDeviceInstallFlags, r);
4766 push = ndr_push_init_ctx(r);
4767 if (push == NULL) {
4768 talloc_free(r);
4769 return false;
4772 ndr_err = call->ndr_push(push, NDR_OUT, r);
4773 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4774 talloc_free(r);
4775 return false;
4778 blob = ndr_push_blob(push);
4779 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4780 talloc_free(r);
4781 return false;
4784 talloc_free(r);
4786 return true;
4790 /* Tables */
4791 static struct api_struct api_ntsvcs_cmds[] =
4793 {"PNP_DISCONNECT", NDR_PNP_DISCONNECT, api_PNP_Disconnect},
4794 {"PNP_CONNECT", NDR_PNP_CONNECT, api_PNP_Connect},
4795 {"PNP_GETVERSION", NDR_PNP_GETVERSION, api_PNP_GetVersion},
4796 {"PNP_GETGLOBALSTATE", NDR_PNP_GETGLOBALSTATE, api_PNP_GetGlobalState},
4797 {"PNP_INITDETECTION", NDR_PNP_INITDETECTION, api_PNP_InitDetection},
4798 {"PNP_REPORTLOGON", NDR_PNP_REPORTLOGON, api_PNP_ReportLogOn},
4799 {"PNP_VALIDATEDEVICEINSTANCE", NDR_PNP_VALIDATEDEVICEINSTANCE, api_PNP_ValidateDeviceInstance},
4800 {"PNP_GETROOTDEVICEINSTANCE", NDR_PNP_GETROOTDEVICEINSTANCE, api_PNP_GetRootDeviceInstance},
4801 {"PNP_GETRELATEDDEVICEINSTANCE", NDR_PNP_GETRELATEDDEVICEINSTANCE, api_PNP_GetRelatedDeviceInstance},
4802 {"PNP_ENUMERATESUBKEYS", NDR_PNP_ENUMERATESUBKEYS, api_PNP_EnumerateSubKeys},
4803 {"PNP_GETDEVICELIST", NDR_PNP_GETDEVICELIST, api_PNP_GetDeviceList},
4804 {"PNP_GETDEVICELISTSIZE", NDR_PNP_GETDEVICELISTSIZE, api_PNP_GetDeviceListSize},
4805 {"PNP_GETDEPTH", NDR_PNP_GETDEPTH, api_PNP_GetDepth},
4806 {"PNP_GETDEVICEREGPROP", NDR_PNP_GETDEVICEREGPROP, api_PNP_GetDeviceRegProp},
4807 {"PNP_SETDEVICEREGPROP", NDR_PNP_SETDEVICEREGPROP, api_PNP_SetDeviceRegProp},
4808 {"PNP_GETCLASSINSTANCE", NDR_PNP_GETCLASSINSTANCE, api_PNP_GetClassInstance},
4809 {"PNP_CREATEKEY", NDR_PNP_CREATEKEY, api_PNP_CreateKey},
4810 {"PNP_DELETEREGISTRYKEY", NDR_PNP_DELETEREGISTRYKEY, api_PNP_DeleteRegistryKey},
4811 {"PNP_GETCLASSCOUNT", NDR_PNP_GETCLASSCOUNT, api_PNP_GetClassCount},
4812 {"PNP_GETCLASSNAME", NDR_PNP_GETCLASSNAME, api_PNP_GetClassName},
4813 {"PNP_DELETECLASSKEY", NDR_PNP_DELETECLASSKEY, api_PNP_DeleteClassKey},
4814 {"PNP_GETINTERFACEDEVICEALIAS", NDR_PNP_GETINTERFACEDEVICEALIAS, api_PNP_GetInterfaceDeviceAlias},
4815 {"PNP_GETINTERFACEDEVICELIST", NDR_PNP_GETINTERFACEDEVICELIST, api_PNP_GetInterfaceDeviceList},
4816 {"PNP_GETINTERFACEDEVICELISTSIZE", NDR_PNP_GETINTERFACEDEVICELISTSIZE, api_PNP_GetInterfaceDeviceListSize},
4817 {"PNP_REGISTERDEVICECLASSASSOCIATION", NDR_PNP_REGISTERDEVICECLASSASSOCIATION, api_PNP_RegisterDeviceClassAssociation},
4818 {"PNP_UNREGISTERDEVICECLASSASSOCIATION", NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION, api_PNP_UnregisterDeviceClassAssociation},
4819 {"PNP_GETCLASSREGPROP", NDR_PNP_GETCLASSREGPROP, api_PNP_GetClassRegProp},
4820 {"PNP_SETCLASSREGPROP", NDR_PNP_SETCLASSREGPROP, api_PNP_SetClassRegProp},
4821 {"PNP_CREATEDEVINST", NDR_PNP_CREATEDEVINST, api_PNP_CreateDevInst},
4822 {"PNP_DEVICEINSTANCEACTION", NDR_PNP_DEVICEINSTANCEACTION, api_PNP_DeviceInstanceAction},
4823 {"PNP_GETDEVICESTATUS", NDR_PNP_GETDEVICESTATUS, api_PNP_GetDeviceStatus},
4824 {"PNP_SETDEVICEPROBLEM", NDR_PNP_SETDEVICEPROBLEM, api_PNP_SetDeviceProblem},
4825 {"PNP_DISABLEDEVINST", NDR_PNP_DISABLEDEVINST, api_PNP_DisableDevInst},
4826 {"PNP_UNINSTALLDEVINST", NDR_PNP_UNINSTALLDEVINST, api_PNP_UninstallDevInst},
4827 {"PNP_ADDID", NDR_PNP_ADDID, api_PNP_AddID},
4828 {"PNP_REGISTERDRIVER", NDR_PNP_REGISTERDRIVER, api_PNP_RegisterDriver},
4829 {"PNP_QUERYREMOVE", NDR_PNP_QUERYREMOVE, api_PNP_QueryRemove},
4830 {"PNP_REQUESTDEVICEEJECT", NDR_PNP_REQUESTDEVICEEJECT, api_PNP_RequestDeviceEject},
4831 {"PNP_ISDOCKSTATIONPRESENT", NDR_PNP_ISDOCKSTATIONPRESENT, api_PNP_IsDockStationPresent},
4832 {"PNP_REQUESTEJECTPC", NDR_PNP_REQUESTEJECTPC, api_PNP_RequestEjectPC},
4833 {"PNP_HWPROFFLAGS", NDR_PNP_HWPROFFLAGS, api_PNP_HwProfFlags},
4834 {"PNP_GETHWPROFINFO", NDR_PNP_GETHWPROFINFO, api_PNP_GetHwProfInfo},
4835 {"PNP_ADDEMPTYLOGCONF", NDR_PNP_ADDEMPTYLOGCONF, api_PNP_AddEmptyLogConf},
4836 {"PNP_FREELOGCONF", NDR_PNP_FREELOGCONF, api_PNP_FreeLogConf},
4837 {"PNP_GETFIRSTLOGCONF", NDR_PNP_GETFIRSTLOGCONF, api_PNP_GetFirstLogConf},
4838 {"PNP_GETNEXTLOGCONF", NDR_PNP_GETNEXTLOGCONF, api_PNP_GetNextLogConf},
4839 {"PNP_GETLOGCONFPRIORITY", NDR_PNP_GETLOGCONFPRIORITY, api_PNP_GetLogConfPriority},
4840 {"PNP_ADDRESDES", NDR_PNP_ADDRESDES, api_PNP_AddResDes},
4841 {"PNP_FREERESDES", NDR_PNP_FREERESDES, api_PNP_FreeResDes},
4842 {"PNP_GETNEXTRESDES", NDR_PNP_GETNEXTRESDES, api_PNP_GetNextResDes},
4843 {"PNP_GETRESDESDATA", NDR_PNP_GETRESDESDATA, api_PNP_GetResDesData},
4844 {"PNP_GETRESDESDATASIZE", NDR_PNP_GETRESDESDATASIZE, api_PNP_GetResDesDataSize},
4845 {"PNP_MODIFYRESDES", NDR_PNP_MODIFYRESDES, api_PNP_ModifyResDes},
4846 {"PNP_DETECTRESOURCELIMIT", NDR_PNP_DETECTRESOURCELIMIT, api_PNP_DetectResourceLimit},
4847 {"PNP_QUERYRESCONFLIST", NDR_PNP_QUERYRESCONFLIST, api_PNP_QueryResConfList},
4848 {"PNP_SETHWPROF", NDR_PNP_SETHWPROF, api_PNP_SetHwProf},
4849 {"PNP_QUERYARBITRATORFREEDATA", NDR_PNP_QUERYARBITRATORFREEDATA, api_PNP_QueryArbitratorFreeData},
4850 {"PNP_QUERYARBITRATORFREESIZE", NDR_PNP_QUERYARBITRATORFREESIZE, api_PNP_QueryArbitratorFreeSize},
4851 {"PNP_RUNDETECTION", NDR_PNP_RUNDETECTION, api_PNP_RunDetection},
4852 {"PNP_REGISTERNOTIFICATION", NDR_PNP_REGISTERNOTIFICATION, api_PNP_RegisterNotification},
4853 {"PNP_UNREGISTERNOTIFICATION", NDR_PNP_UNREGISTERNOTIFICATION, api_PNP_UnregisterNotification},
4854 {"PNP_GETCUSTOMDEVPROP", NDR_PNP_GETCUSTOMDEVPROP, api_PNP_GetCustomDevProp},
4855 {"PNP_GETVERSIONINTERNAL", NDR_PNP_GETVERSIONINTERNAL, api_PNP_GetVersionInternal},
4856 {"PNP_GETBLOCKEDDRIVERINFO", NDR_PNP_GETBLOCKEDDRIVERINFO, api_PNP_GetBlockedDriverInfo},
4857 {"PNP_GETSERVERSIDEDEVICEINSTALLFLAGS", NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS, api_PNP_GetServerSideDeviceInstallFlags},
4860 void ntsvcs_get_pipe_fns(struct api_struct **fns, int *n_fns)
4862 *fns = api_ntsvcs_cmds;
4863 *n_fns = sizeof(api_ntsvcs_cmds) / sizeof(struct api_struct);
4866 NTSTATUS rpc_ntsvcs_init(void)
4868 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "ntsvcs", "ntsvcs", api_ntsvcs_cmds, sizeof(api_ntsvcs_cmds) / sizeof(struct api_struct));