s3:configure: "test" only takes one "="
[Samba/gebeck_regimport.git] / librpc / gen_ndr / srv_ntsvcs.c
blobde2bb6d4a3e8831ac5fb4e8c5fd3058f3ebddb60
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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 ZERO_STRUCT(r->out);
785 r->out.length = r->in.length;
786 r->out.buffer = talloc_zero_array(r, uint16_t, *r->out.length);
787 if (r->out.buffer == NULL) {
788 talloc_free(r);
789 return false;
792 r->out.result = _PNP_GetDeviceList(p, r);
794 if (p->rng_fault_state) {
795 talloc_free(r);
796 /* Return true here, srv_pipe_hnd.c will take care */
797 return true;
800 if (DEBUGLEVEL >= 10) {
801 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceList, r);
804 push = ndr_push_init_ctx(r, NULL);
805 if (push == NULL) {
806 talloc_free(r);
807 return false;
810 ndr_err = call->ndr_push(push, NDR_OUT, r);
811 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
812 talloc_free(r);
813 return false;
816 blob = ndr_push_blob(push);
817 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
818 talloc_free(r);
819 return false;
822 talloc_free(r);
824 return true;
827 static bool api_PNP_GetDeviceListSize(pipes_struct *p)
829 const struct ndr_interface_call *call;
830 struct ndr_pull *pull;
831 struct ndr_push *push;
832 enum ndr_err_code ndr_err;
833 DATA_BLOB blob;
834 struct PNP_GetDeviceListSize *r;
836 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEVICELISTSIZE];
838 r = talloc(talloc_tos(), struct PNP_GetDeviceListSize);
839 if (r == NULL) {
840 return false;
843 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
844 talloc_free(r);
845 return false;
848 pull = ndr_pull_init_blob(&blob, r, NULL);
849 if (pull == NULL) {
850 talloc_free(r);
851 return false;
854 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
855 ndr_err = call->ndr_pull(pull, NDR_IN, r);
856 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
857 talloc_free(r);
858 return false;
861 if (DEBUGLEVEL >= 10) {
862 NDR_PRINT_IN_DEBUG(PNP_GetDeviceListSize, r);
865 ZERO_STRUCT(r->out);
866 r->out.size = talloc_zero(r, uint32_t);
867 if (r->out.size == NULL) {
868 talloc_free(r);
869 return false;
872 r->out.result = _PNP_GetDeviceListSize(p, r);
874 if (p->rng_fault_state) {
875 talloc_free(r);
876 /* Return true here, srv_pipe_hnd.c will take care */
877 return true;
880 if (DEBUGLEVEL >= 10) {
881 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceListSize, r);
884 push = ndr_push_init_ctx(r, NULL);
885 if (push == NULL) {
886 talloc_free(r);
887 return false;
890 ndr_err = call->ndr_push(push, NDR_OUT, r);
891 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
892 talloc_free(r);
893 return false;
896 blob = ndr_push_blob(push);
897 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
898 talloc_free(r);
899 return false;
902 talloc_free(r);
904 return true;
907 static bool api_PNP_GetDepth(pipes_struct *p)
909 const struct ndr_interface_call *call;
910 struct ndr_pull *pull;
911 struct ndr_push *push;
912 enum ndr_err_code ndr_err;
913 DATA_BLOB blob;
914 struct PNP_GetDepth *r;
916 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEPTH];
918 r = talloc(talloc_tos(), struct PNP_GetDepth);
919 if (r == NULL) {
920 return false;
923 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
924 talloc_free(r);
925 return false;
928 pull = ndr_pull_init_blob(&blob, r, NULL);
929 if (pull == NULL) {
930 talloc_free(r);
931 return false;
934 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
935 ndr_err = call->ndr_pull(pull, NDR_IN, r);
936 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
937 talloc_free(r);
938 return false;
941 if (DEBUGLEVEL >= 10) {
942 NDR_PRINT_IN_DEBUG(PNP_GetDepth, r);
945 r->out.result = _PNP_GetDepth(p, r);
947 if (p->rng_fault_state) {
948 talloc_free(r);
949 /* Return true here, srv_pipe_hnd.c will take care */
950 return true;
953 if (DEBUGLEVEL >= 10) {
954 NDR_PRINT_OUT_DEBUG(PNP_GetDepth, r);
957 push = ndr_push_init_ctx(r, NULL);
958 if (push == NULL) {
959 talloc_free(r);
960 return false;
963 ndr_err = call->ndr_push(push, NDR_OUT, r);
964 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
965 talloc_free(r);
966 return false;
969 blob = ndr_push_blob(push);
970 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
971 talloc_free(r);
972 return false;
975 talloc_free(r);
977 return true;
980 static bool api_PNP_GetDeviceRegProp(pipes_struct *p)
982 const struct ndr_interface_call *call;
983 struct ndr_pull *pull;
984 struct ndr_push *push;
985 enum ndr_err_code ndr_err;
986 DATA_BLOB blob;
987 struct PNP_GetDeviceRegProp *r;
989 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEVICEREGPROP];
991 r = talloc(talloc_tos(), struct PNP_GetDeviceRegProp);
992 if (r == NULL) {
993 return false;
996 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
997 talloc_free(r);
998 return false;
1001 pull = ndr_pull_init_blob(&blob, r, NULL);
1002 if (pull == NULL) {
1003 talloc_free(r);
1004 return false;
1007 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1008 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1009 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1010 talloc_free(r);
1011 return false;
1014 if (DEBUGLEVEL >= 10) {
1015 NDR_PRINT_IN_DEBUG(PNP_GetDeviceRegProp, r);
1018 ZERO_STRUCT(r->out);
1019 r->out.reg_data_type = r->in.reg_data_type;
1020 r->out.buffer_size = r->in.buffer_size;
1021 r->out.needed = r->in.needed;
1022 r->out.buffer = talloc_zero_array(r, uint8_t, *r->out.buffer_size);
1023 if (r->out.buffer == NULL) {
1024 talloc_free(r);
1025 return false;
1028 r->out.result = _PNP_GetDeviceRegProp(p, r);
1030 if (p->rng_fault_state) {
1031 talloc_free(r);
1032 /* Return true here, srv_pipe_hnd.c will take care */
1033 return true;
1036 if (DEBUGLEVEL >= 10) {
1037 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceRegProp, r);
1040 push = ndr_push_init_ctx(r, NULL);
1041 if (push == NULL) {
1042 talloc_free(r);
1043 return false;
1046 ndr_err = call->ndr_push(push, NDR_OUT, r);
1047 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1048 talloc_free(r);
1049 return false;
1052 blob = ndr_push_blob(push);
1053 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1054 talloc_free(r);
1055 return false;
1058 talloc_free(r);
1060 return true;
1063 static bool api_PNP_SetDeviceRegProp(pipes_struct *p)
1065 const struct ndr_interface_call *call;
1066 struct ndr_pull *pull;
1067 struct ndr_push *push;
1068 enum ndr_err_code ndr_err;
1069 DATA_BLOB blob;
1070 struct PNP_SetDeviceRegProp *r;
1072 call = &ndr_table_ntsvcs.calls[NDR_PNP_SETDEVICEREGPROP];
1074 r = talloc(talloc_tos(), struct PNP_SetDeviceRegProp);
1075 if (r == NULL) {
1076 return false;
1079 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1080 talloc_free(r);
1081 return false;
1084 pull = ndr_pull_init_blob(&blob, r, NULL);
1085 if (pull == NULL) {
1086 talloc_free(r);
1087 return false;
1090 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1091 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1092 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1093 talloc_free(r);
1094 return false;
1097 if (DEBUGLEVEL >= 10) {
1098 NDR_PRINT_IN_DEBUG(PNP_SetDeviceRegProp, r);
1101 r->out.result = _PNP_SetDeviceRegProp(p, r);
1103 if (p->rng_fault_state) {
1104 talloc_free(r);
1105 /* Return true here, srv_pipe_hnd.c will take care */
1106 return true;
1109 if (DEBUGLEVEL >= 10) {
1110 NDR_PRINT_OUT_DEBUG(PNP_SetDeviceRegProp, r);
1113 push = ndr_push_init_ctx(r, NULL);
1114 if (push == NULL) {
1115 talloc_free(r);
1116 return false;
1119 ndr_err = call->ndr_push(push, NDR_OUT, r);
1120 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1121 talloc_free(r);
1122 return false;
1125 blob = ndr_push_blob(push);
1126 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1127 talloc_free(r);
1128 return false;
1131 talloc_free(r);
1133 return true;
1136 static bool api_PNP_GetClassInstance(pipes_struct *p)
1138 const struct ndr_interface_call *call;
1139 struct ndr_pull *pull;
1140 struct ndr_push *push;
1141 enum ndr_err_code ndr_err;
1142 DATA_BLOB blob;
1143 struct PNP_GetClassInstance *r;
1145 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSINSTANCE];
1147 r = talloc(talloc_tos(), struct PNP_GetClassInstance);
1148 if (r == NULL) {
1149 return false;
1152 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1153 talloc_free(r);
1154 return false;
1157 pull = ndr_pull_init_blob(&blob, r, NULL);
1158 if (pull == NULL) {
1159 talloc_free(r);
1160 return false;
1163 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1164 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1165 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1166 talloc_free(r);
1167 return false;
1170 if (DEBUGLEVEL >= 10) {
1171 NDR_PRINT_IN_DEBUG(PNP_GetClassInstance, r);
1174 r->out.result = _PNP_GetClassInstance(p, r);
1176 if (p->rng_fault_state) {
1177 talloc_free(r);
1178 /* Return true here, srv_pipe_hnd.c will take care */
1179 return true;
1182 if (DEBUGLEVEL >= 10) {
1183 NDR_PRINT_OUT_DEBUG(PNP_GetClassInstance, r);
1186 push = ndr_push_init_ctx(r, NULL);
1187 if (push == NULL) {
1188 talloc_free(r);
1189 return false;
1192 ndr_err = call->ndr_push(push, NDR_OUT, r);
1193 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1194 talloc_free(r);
1195 return false;
1198 blob = ndr_push_blob(push);
1199 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1200 talloc_free(r);
1201 return false;
1204 talloc_free(r);
1206 return true;
1209 static bool api_PNP_CreateKey(pipes_struct *p)
1211 const struct ndr_interface_call *call;
1212 struct ndr_pull *pull;
1213 struct ndr_push *push;
1214 enum ndr_err_code ndr_err;
1215 DATA_BLOB blob;
1216 struct PNP_CreateKey *r;
1218 call = &ndr_table_ntsvcs.calls[NDR_PNP_CREATEKEY];
1220 r = talloc(talloc_tos(), struct PNP_CreateKey);
1221 if (r == NULL) {
1222 return false;
1225 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1226 talloc_free(r);
1227 return false;
1230 pull = ndr_pull_init_blob(&blob, r, NULL);
1231 if (pull == NULL) {
1232 talloc_free(r);
1233 return false;
1236 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1237 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1238 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1239 talloc_free(r);
1240 return false;
1243 if (DEBUGLEVEL >= 10) {
1244 NDR_PRINT_IN_DEBUG(PNP_CreateKey, r);
1247 r->out.result = _PNP_CreateKey(p, r);
1249 if (p->rng_fault_state) {
1250 talloc_free(r);
1251 /* Return true here, srv_pipe_hnd.c will take care */
1252 return true;
1255 if (DEBUGLEVEL >= 10) {
1256 NDR_PRINT_OUT_DEBUG(PNP_CreateKey, r);
1259 push = ndr_push_init_ctx(r, NULL);
1260 if (push == NULL) {
1261 talloc_free(r);
1262 return false;
1265 ndr_err = call->ndr_push(push, NDR_OUT, r);
1266 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1267 talloc_free(r);
1268 return false;
1271 blob = ndr_push_blob(push);
1272 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1273 talloc_free(r);
1274 return false;
1277 talloc_free(r);
1279 return true;
1282 static bool api_PNP_DeleteRegistryKey(pipes_struct *p)
1284 const struct ndr_interface_call *call;
1285 struct ndr_pull *pull;
1286 struct ndr_push *push;
1287 enum ndr_err_code ndr_err;
1288 DATA_BLOB blob;
1289 struct PNP_DeleteRegistryKey *r;
1291 call = &ndr_table_ntsvcs.calls[NDR_PNP_DELETEREGISTRYKEY];
1293 r = talloc(talloc_tos(), struct PNP_DeleteRegistryKey);
1294 if (r == NULL) {
1295 return false;
1298 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1299 talloc_free(r);
1300 return false;
1303 pull = ndr_pull_init_blob(&blob, r, NULL);
1304 if (pull == NULL) {
1305 talloc_free(r);
1306 return false;
1309 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1310 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1311 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1312 talloc_free(r);
1313 return false;
1316 if (DEBUGLEVEL >= 10) {
1317 NDR_PRINT_IN_DEBUG(PNP_DeleteRegistryKey, r);
1320 r->out.result = _PNP_DeleteRegistryKey(p, r);
1322 if (p->rng_fault_state) {
1323 talloc_free(r);
1324 /* Return true here, srv_pipe_hnd.c will take care */
1325 return true;
1328 if (DEBUGLEVEL >= 10) {
1329 NDR_PRINT_OUT_DEBUG(PNP_DeleteRegistryKey, r);
1332 push = ndr_push_init_ctx(r, NULL);
1333 if (push == NULL) {
1334 talloc_free(r);
1335 return false;
1338 ndr_err = call->ndr_push(push, NDR_OUT, r);
1339 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1340 talloc_free(r);
1341 return false;
1344 blob = ndr_push_blob(push);
1345 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1346 talloc_free(r);
1347 return false;
1350 talloc_free(r);
1352 return true;
1355 static bool api_PNP_GetClassCount(pipes_struct *p)
1357 const struct ndr_interface_call *call;
1358 struct ndr_pull *pull;
1359 struct ndr_push *push;
1360 enum ndr_err_code ndr_err;
1361 DATA_BLOB blob;
1362 struct PNP_GetClassCount *r;
1364 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSCOUNT];
1366 r = talloc(talloc_tos(), struct PNP_GetClassCount);
1367 if (r == NULL) {
1368 return false;
1371 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1372 talloc_free(r);
1373 return false;
1376 pull = ndr_pull_init_blob(&blob, r, NULL);
1377 if (pull == NULL) {
1378 talloc_free(r);
1379 return false;
1382 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1383 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1384 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1385 talloc_free(r);
1386 return false;
1389 if (DEBUGLEVEL >= 10) {
1390 NDR_PRINT_IN_DEBUG(PNP_GetClassCount, r);
1393 r->out.result = _PNP_GetClassCount(p, r);
1395 if (p->rng_fault_state) {
1396 talloc_free(r);
1397 /* Return true here, srv_pipe_hnd.c will take care */
1398 return true;
1401 if (DEBUGLEVEL >= 10) {
1402 NDR_PRINT_OUT_DEBUG(PNP_GetClassCount, r);
1405 push = ndr_push_init_ctx(r, NULL);
1406 if (push == NULL) {
1407 talloc_free(r);
1408 return false;
1411 ndr_err = call->ndr_push(push, NDR_OUT, r);
1412 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1413 talloc_free(r);
1414 return false;
1417 blob = ndr_push_blob(push);
1418 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1419 talloc_free(r);
1420 return false;
1423 talloc_free(r);
1425 return true;
1428 static bool api_PNP_GetClassName(pipes_struct *p)
1430 const struct ndr_interface_call *call;
1431 struct ndr_pull *pull;
1432 struct ndr_push *push;
1433 enum ndr_err_code ndr_err;
1434 DATA_BLOB blob;
1435 struct PNP_GetClassName *r;
1437 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSNAME];
1439 r = talloc(talloc_tos(), struct PNP_GetClassName);
1440 if (r == NULL) {
1441 return false;
1444 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1445 talloc_free(r);
1446 return false;
1449 pull = ndr_pull_init_blob(&blob, r, NULL);
1450 if (pull == NULL) {
1451 talloc_free(r);
1452 return false;
1455 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1456 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1457 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1458 talloc_free(r);
1459 return false;
1462 if (DEBUGLEVEL >= 10) {
1463 NDR_PRINT_IN_DEBUG(PNP_GetClassName, r);
1466 r->out.result = _PNP_GetClassName(p, r);
1468 if (p->rng_fault_state) {
1469 talloc_free(r);
1470 /* Return true here, srv_pipe_hnd.c will take care */
1471 return true;
1474 if (DEBUGLEVEL >= 10) {
1475 NDR_PRINT_OUT_DEBUG(PNP_GetClassName, r);
1478 push = ndr_push_init_ctx(r, NULL);
1479 if (push == NULL) {
1480 talloc_free(r);
1481 return false;
1484 ndr_err = call->ndr_push(push, NDR_OUT, r);
1485 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1486 talloc_free(r);
1487 return false;
1490 blob = ndr_push_blob(push);
1491 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1492 talloc_free(r);
1493 return false;
1496 talloc_free(r);
1498 return true;
1501 static bool api_PNP_DeleteClassKey(pipes_struct *p)
1503 const struct ndr_interface_call *call;
1504 struct ndr_pull *pull;
1505 struct ndr_push *push;
1506 enum ndr_err_code ndr_err;
1507 DATA_BLOB blob;
1508 struct PNP_DeleteClassKey *r;
1510 call = &ndr_table_ntsvcs.calls[NDR_PNP_DELETECLASSKEY];
1512 r = talloc(talloc_tos(), struct PNP_DeleteClassKey);
1513 if (r == NULL) {
1514 return false;
1517 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1518 talloc_free(r);
1519 return false;
1522 pull = ndr_pull_init_blob(&blob, r, NULL);
1523 if (pull == NULL) {
1524 talloc_free(r);
1525 return false;
1528 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1529 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1530 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1531 talloc_free(r);
1532 return false;
1535 if (DEBUGLEVEL >= 10) {
1536 NDR_PRINT_IN_DEBUG(PNP_DeleteClassKey, r);
1539 r->out.result = _PNP_DeleteClassKey(p, r);
1541 if (p->rng_fault_state) {
1542 talloc_free(r);
1543 /* Return true here, srv_pipe_hnd.c will take care */
1544 return true;
1547 if (DEBUGLEVEL >= 10) {
1548 NDR_PRINT_OUT_DEBUG(PNP_DeleteClassKey, r);
1551 push = ndr_push_init_ctx(r, NULL);
1552 if (push == NULL) {
1553 talloc_free(r);
1554 return false;
1557 ndr_err = call->ndr_push(push, NDR_OUT, r);
1558 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1559 talloc_free(r);
1560 return false;
1563 blob = ndr_push_blob(push);
1564 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1565 talloc_free(r);
1566 return false;
1569 talloc_free(r);
1571 return true;
1574 static bool api_PNP_GetInterfaceDeviceAlias(pipes_struct *p)
1576 const struct ndr_interface_call *call;
1577 struct ndr_pull *pull;
1578 struct ndr_push *push;
1579 enum ndr_err_code ndr_err;
1580 DATA_BLOB blob;
1581 struct PNP_GetInterfaceDeviceAlias *r;
1583 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETINTERFACEDEVICEALIAS];
1585 r = talloc(talloc_tos(), struct PNP_GetInterfaceDeviceAlias);
1586 if (r == NULL) {
1587 return false;
1590 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1591 talloc_free(r);
1592 return false;
1595 pull = ndr_pull_init_blob(&blob, r, NULL);
1596 if (pull == NULL) {
1597 talloc_free(r);
1598 return false;
1601 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1602 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1603 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1604 talloc_free(r);
1605 return false;
1608 if (DEBUGLEVEL >= 10) {
1609 NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceAlias, r);
1612 r->out.result = _PNP_GetInterfaceDeviceAlias(p, r);
1614 if (p->rng_fault_state) {
1615 talloc_free(r);
1616 /* Return true here, srv_pipe_hnd.c will take care */
1617 return true;
1620 if (DEBUGLEVEL >= 10) {
1621 NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceAlias, r);
1624 push = ndr_push_init_ctx(r, NULL);
1625 if (push == NULL) {
1626 talloc_free(r);
1627 return false;
1630 ndr_err = call->ndr_push(push, NDR_OUT, r);
1631 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1632 talloc_free(r);
1633 return false;
1636 blob = ndr_push_blob(push);
1637 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1638 talloc_free(r);
1639 return false;
1642 talloc_free(r);
1644 return true;
1647 static bool api_PNP_GetInterfaceDeviceList(pipes_struct *p)
1649 const struct ndr_interface_call *call;
1650 struct ndr_pull *pull;
1651 struct ndr_push *push;
1652 enum ndr_err_code ndr_err;
1653 DATA_BLOB blob;
1654 struct PNP_GetInterfaceDeviceList *r;
1656 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETINTERFACEDEVICELIST];
1658 r = talloc(talloc_tos(), struct PNP_GetInterfaceDeviceList);
1659 if (r == NULL) {
1660 return false;
1663 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1664 talloc_free(r);
1665 return false;
1668 pull = ndr_pull_init_blob(&blob, r, NULL);
1669 if (pull == NULL) {
1670 talloc_free(r);
1671 return false;
1674 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1675 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1676 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1677 talloc_free(r);
1678 return false;
1681 if (DEBUGLEVEL >= 10) {
1682 NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceList, r);
1685 r->out.result = _PNP_GetInterfaceDeviceList(p, r);
1687 if (p->rng_fault_state) {
1688 talloc_free(r);
1689 /* Return true here, srv_pipe_hnd.c will take care */
1690 return true;
1693 if (DEBUGLEVEL >= 10) {
1694 NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceList, r);
1697 push = ndr_push_init_ctx(r, NULL);
1698 if (push == NULL) {
1699 talloc_free(r);
1700 return false;
1703 ndr_err = call->ndr_push(push, NDR_OUT, r);
1704 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1705 talloc_free(r);
1706 return false;
1709 blob = ndr_push_blob(push);
1710 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1711 talloc_free(r);
1712 return false;
1715 talloc_free(r);
1717 return true;
1720 static bool api_PNP_GetInterfaceDeviceListSize(pipes_struct *p)
1722 const struct ndr_interface_call *call;
1723 struct ndr_pull *pull;
1724 struct ndr_push *push;
1725 enum ndr_err_code ndr_err;
1726 DATA_BLOB blob;
1727 struct PNP_GetInterfaceDeviceListSize *r;
1729 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETINTERFACEDEVICELISTSIZE];
1731 r = talloc(talloc_tos(), struct PNP_GetInterfaceDeviceListSize);
1732 if (r == NULL) {
1733 return false;
1736 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1737 talloc_free(r);
1738 return false;
1741 pull = ndr_pull_init_blob(&blob, r, NULL);
1742 if (pull == NULL) {
1743 talloc_free(r);
1744 return false;
1747 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1748 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1749 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1750 talloc_free(r);
1751 return false;
1754 if (DEBUGLEVEL >= 10) {
1755 NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceListSize, r);
1758 r->out.result = _PNP_GetInterfaceDeviceListSize(p, r);
1760 if (p->rng_fault_state) {
1761 talloc_free(r);
1762 /* Return true here, srv_pipe_hnd.c will take care */
1763 return true;
1766 if (DEBUGLEVEL >= 10) {
1767 NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceListSize, r);
1770 push = ndr_push_init_ctx(r, NULL);
1771 if (push == NULL) {
1772 talloc_free(r);
1773 return false;
1776 ndr_err = call->ndr_push(push, NDR_OUT, r);
1777 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1778 talloc_free(r);
1779 return false;
1782 blob = ndr_push_blob(push);
1783 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1784 talloc_free(r);
1785 return false;
1788 talloc_free(r);
1790 return true;
1793 static bool api_PNP_RegisterDeviceClassAssociation(pipes_struct *p)
1795 const struct ndr_interface_call *call;
1796 struct ndr_pull *pull;
1797 struct ndr_push *push;
1798 enum ndr_err_code ndr_err;
1799 DATA_BLOB blob;
1800 struct PNP_RegisterDeviceClassAssociation *r;
1802 call = &ndr_table_ntsvcs.calls[NDR_PNP_REGISTERDEVICECLASSASSOCIATION];
1804 r = talloc(talloc_tos(), struct PNP_RegisterDeviceClassAssociation);
1805 if (r == NULL) {
1806 return false;
1809 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1810 talloc_free(r);
1811 return false;
1814 pull = ndr_pull_init_blob(&blob, r, NULL);
1815 if (pull == NULL) {
1816 talloc_free(r);
1817 return false;
1820 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1821 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1822 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1823 talloc_free(r);
1824 return false;
1827 if (DEBUGLEVEL >= 10) {
1828 NDR_PRINT_IN_DEBUG(PNP_RegisterDeviceClassAssociation, r);
1831 r->out.result = _PNP_RegisterDeviceClassAssociation(p, r);
1833 if (p->rng_fault_state) {
1834 talloc_free(r);
1835 /* Return true here, srv_pipe_hnd.c will take care */
1836 return true;
1839 if (DEBUGLEVEL >= 10) {
1840 NDR_PRINT_OUT_DEBUG(PNP_RegisterDeviceClassAssociation, r);
1843 push = ndr_push_init_ctx(r, NULL);
1844 if (push == NULL) {
1845 talloc_free(r);
1846 return false;
1849 ndr_err = call->ndr_push(push, NDR_OUT, r);
1850 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1851 talloc_free(r);
1852 return false;
1855 blob = ndr_push_blob(push);
1856 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1857 talloc_free(r);
1858 return false;
1861 talloc_free(r);
1863 return true;
1866 static bool api_PNP_UnregisterDeviceClassAssociation(pipes_struct *p)
1868 const struct ndr_interface_call *call;
1869 struct ndr_pull *pull;
1870 struct ndr_push *push;
1871 enum ndr_err_code ndr_err;
1872 DATA_BLOB blob;
1873 struct PNP_UnregisterDeviceClassAssociation *r;
1875 call = &ndr_table_ntsvcs.calls[NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION];
1877 r = talloc(talloc_tos(), struct PNP_UnregisterDeviceClassAssociation);
1878 if (r == NULL) {
1879 return false;
1882 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1883 talloc_free(r);
1884 return false;
1887 pull = ndr_pull_init_blob(&blob, r, NULL);
1888 if (pull == NULL) {
1889 talloc_free(r);
1890 return false;
1893 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1894 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1895 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1896 talloc_free(r);
1897 return false;
1900 if (DEBUGLEVEL >= 10) {
1901 NDR_PRINT_IN_DEBUG(PNP_UnregisterDeviceClassAssociation, r);
1904 r->out.result = _PNP_UnregisterDeviceClassAssociation(p, r);
1906 if (p->rng_fault_state) {
1907 talloc_free(r);
1908 /* Return true here, srv_pipe_hnd.c will take care */
1909 return true;
1912 if (DEBUGLEVEL >= 10) {
1913 NDR_PRINT_OUT_DEBUG(PNP_UnregisterDeviceClassAssociation, r);
1916 push = ndr_push_init_ctx(r, NULL);
1917 if (push == NULL) {
1918 talloc_free(r);
1919 return false;
1922 ndr_err = call->ndr_push(push, NDR_OUT, r);
1923 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1924 talloc_free(r);
1925 return false;
1928 blob = ndr_push_blob(push);
1929 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1930 talloc_free(r);
1931 return false;
1934 talloc_free(r);
1936 return true;
1939 static bool api_PNP_GetClassRegProp(pipes_struct *p)
1941 const struct ndr_interface_call *call;
1942 struct ndr_pull *pull;
1943 struct ndr_push *push;
1944 enum ndr_err_code ndr_err;
1945 DATA_BLOB blob;
1946 struct PNP_GetClassRegProp *r;
1948 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSREGPROP];
1950 r = talloc(talloc_tos(), struct PNP_GetClassRegProp);
1951 if (r == NULL) {
1952 return false;
1955 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1956 talloc_free(r);
1957 return false;
1960 pull = ndr_pull_init_blob(&blob, r, NULL);
1961 if (pull == NULL) {
1962 talloc_free(r);
1963 return false;
1966 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1967 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1968 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1969 talloc_free(r);
1970 return false;
1973 if (DEBUGLEVEL >= 10) {
1974 NDR_PRINT_IN_DEBUG(PNP_GetClassRegProp, r);
1977 r->out.result = _PNP_GetClassRegProp(p, r);
1979 if (p->rng_fault_state) {
1980 talloc_free(r);
1981 /* Return true here, srv_pipe_hnd.c will take care */
1982 return true;
1985 if (DEBUGLEVEL >= 10) {
1986 NDR_PRINT_OUT_DEBUG(PNP_GetClassRegProp, r);
1989 push = ndr_push_init_ctx(r, NULL);
1990 if (push == NULL) {
1991 talloc_free(r);
1992 return false;
1995 ndr_err = call->ndr_push(push, NDR_OUT, r);
1996 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1997 talloc_free(r);
1998 return false;
2001 blob = ndr_push_blob(push);
2002 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2003 talloc_free(r);
2004 return false;
2007 talloc_free(r);
2009 return true;
2012 static bool api_PNP_SetClassRegProp(pipes_struct *p)
2014 const struct ndr_interface_call *call;
2015 struct ndr_pull *pull;
2016 struct ndr_push *push;
2017 enum ndr_err_code ndr_err;
2018 DATA_BLOB blob;
2019 struct PNP_SetClassRegProp *r;
2021 call = &ndr_table_ntsvcs.calls[NDR_PNP_SETCLASSREGPROP];
2023 r = talloc(talloc_tos(), struct PNP_SetClassRegProp);
2024 if (r == NULL) {
2025 return false;
2028 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2029 talloc_free(r);
2030 return false;
2033 pull = ndr_pull_init_blob(&blob, r, NULL);
2034 if (pull == NULL) {
2035 talloc_free(r);
2036 return false;
2039 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2040 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2041 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2042 talloc_free(r);
2043 return false;
2046 if (DEBUGLEVEL >= 10) {
2047 NDR_PRINT_IN_DEBUG(PNP_SetClassRegProp, r);
2050 r->out.result = _PNP_SetClassRegProp(p, r);
2052 if (p->rng_fault_state) {
2053 talloc_free(r);
2054 /* Return true here, srv_pipe_hnd.c will take care */
2055 return true;
2058 if (DEBUGLEVEL >= 10) {
2059 NDR_PRINT_OUT_DEBUG(PNP_SetClassRegProp, r);
2062 push = ndr_push_init_ctx(r, NULL);
2063 if (push == NULL) {
2064 talloc_free(r);
2065 return false;
2068 ndr_err = call->ndr_push(push, NDR_OUT, r);
2069 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2070 talloc_free(r);
2071 return false;
2074 blob = ndr_push_blob(push);
2075 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2076 talloc_free(r);
2077 return false;
2080 talloc_free(r);
2082 return true;
2085 static bool api_PNP_CreateDevInst(pipes_struct *p)
2087 const struct ndr_interface_call *call;
2088 struct ndr_pull *pull;
2089 struct ndr_push *push;
2090 enum ndr_err_code ndr_err;
2091 DATA_BLOB blob;
2092 struct PNP_CreateDevInst *r;
2094 call = &ndr_table_ntsvcs.calls[NDR_PNP_CREATEDEVINST];
2096 r = talloc(talloc_tos(), struct PNP_CreateDevInst);
2097 if (r == NULL) {
2098 return false;
2101 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2102 talloc_free(r);
2103 return false;
2106 pull = ndr_pull_init_blob(&blob, r, NULL);
2107 if (pull == NULL) {
2108 talloc_free(r);
2109 return false;
2112 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2113 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2114 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2115 talloc_free(r);
2116 return false;
2119 if (DEBUGLEVEL >= 10) {
2120 NDR_PRINT_IN_DEBUG(PNP_CreateDevInst, r);
2123 r->out.result = _PNP_CreateDevInst(p, r);
2125 if (p->rng_fault_state) {
2126 talloc_free(r);
2127 /* Return true here, srv_pipe_hnd.c will take care */
2128 return true;
2131 if (DEBUGLEVEL >= 10) {
2132 NDR_PRINT_OUT_DEBUG(PNP_CreateDevInst, r);
2135 push = ndr_push_init_ctx(r, NULL);
2136 if (push == NULL) {
2137 talloc_free(r);
2138 return false;
2141 ndr_err = call->ndr_push(push, NDR_OUT, r);
2142 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2143 talloc_free(r);
2144 return false;
2147 blob = ndr_push_blob(push);
2148 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2149 talloc_free(r);
2150 return false;
2153 talloc_free(r);
2155 return true;
2158 static bool api_PNP_DeviceInstanceAction(pipes_struct *p)
2160 const struct ndr_interface_call *call;
2161 struct ndr_pull *pull;
2162 struct ndr_push *push;
2163 enum ndr_err_code ndr_err;
2164 DATA_BLOB blob;
2165 struct PNP_DeviceInstanceAction *r;
2167 call = &ndr_table_ntsvcs.calls[NDR_PNP_DEVICEINSTANCEACTION];
2169 r = talloc(talloc_tos(), struct PNP_DeviceInstanceAction);
2170 if (r == NULL) {
2171 return false;
2174 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2175 talloc_free(r);
2176 return false;
2179 pull = ndr_pull_init_blob(&blob, r, NULL);
2180 if (pull == NULL) {
2181 talloc_free(r);
2182 return false;
2185 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2186 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2187 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2188 talloc_free(r);
2189 return false;
2192 if (DEBUGLEVEL >= 10) {
2193 NDR_PRINT_IN_DEBUG(PNP_DeviceInstanceAction, r);
2196 r->out.result = _PNP_DeviceInstanceAction(p, r);
2198 if (p->rng_fault_state) {
2199 talloc_free(r);
2200 /* Return true here, srv_pipe_hnd.c will take care */
2201 return true;
2204 if (DEBUGLEVEL >= 10) {
2205 NDR_PRINT_OUT_DEBUG(PNP_DeviceInstanceAction, r);
2208 push = ndr_push_init_ctx(r, NULL);
2209 if (push == NULL) {
2210 talloc_free(r);
2211 return false;
2214 ndr_err = call->ndr_push(push, NDR_OUT, r);
2215 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2216 talloc_free(r);
2217 return false;
2220 blob = ndr_push_blob(push);
2221 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2222 talloc_free(r);
2223 return false;
2226 talloc_free(r);
2228 return true;
2231 static bool api_PNP_GetDeviceStatus(pipes_struct *p)
2233 const struct ndr_interface_call *call;
2234 struct ndr_pull *pull;
2235 struct ndr_push *push;
2236 enum ndr_err_code ndr_err;
2237 DATA_BLOB blob;
2238 struct PNP_GetDeviceStatus *r;
2240 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEVICESTATUS];
2242 r = talloc(talloc_tos(), struct PNP_GetDeviceStatus);
2243 if (r == NULL) {
2244 return false;
2247 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2248 talloc_free(r);
2249 return false;
2252 pull = ndr_pull_init_blob(&blob, r, NULL);
2253 if (pull == NULL) {
2254 talloc_free(r);
2255 return false;
2258 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2259 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2260 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2261 talloc_free(r);
2262 return false;
2265 if (DEBUGLEVEL >= 10) {
2266 NDR_PRINT_IN_DEBUG(PNP_GetDeviceStatus, r);
2269 r->out.result = _PNP_GetDeviceStatus(p, r);
2271 if (p->rng_fault_state) {
2272 talloc_free(r);
2273 /* Return true here, srv_pipe_hnd.c will take care */
2274 return true;
2277 if (DEBUGLEVEL >= 10) {
2278 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceStatus, r);
2281 push = ndr_push_init_ctx(r, NULL);
2282 if (push == NULL) {
2283 talloc_free(r);
2284 return false;
2287 ndr_err = call->ndr_push(push, NDR_OUT, r);
2288 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2289 talloc_free(r);
2290 return false;
2293 blob = ndr_push_blob(push);
2294 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2295 talloc_free(r);
2296 return false;
2299 talloc_free(r);
2301 return true;
2304 static bool api_PNP_SetDeviceProblem(pipes_struct *p)
2306 const struct ndr_interface_call *call;
2307 struct ndr_pull *pull;
2308 struct ndr_push *push;
2309 enum ndr_err_code ndr_err;
2310 DATA_BLOB blob;
2311 struct PNP_SetDeviceProblem *r;
2313 call = &ndr_table_ntsvcs.calls[NDR_PNP_SETDEVICEPROBLEM];
2315 r = talloc(talloc_tos(), struct PNP_SetDeviceProblem);
2316 if (r == NULL) {
2317 return false;
2320 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2321 talloc_free(r);
2322 return false;
2325 pull = ndr_pull_init_blob(&blob, r, NULL);
2326 if (pull == NULL) {
2327 talloc_free(r);
2328 return false;
2331 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2332 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2333 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2334 talloc_free(r);
2335 return false;
2338 if (DEBUGLEVEL >= 10) {
2339 NDR_PRINT_IN_DEBUG(PNP_SetDeviceProblem, r);
2342 r->out.result = _PNP_SetDeviceProblem(p, r);
2344 if (p->rng_fault_state) {
2345 talloc_free(r);
2346 /* Return true here, srv_pipe_hnd.c will take care */
2347 return true;
2350 if (DEBUGLEVEL >= 10) {
2351 NDR_PRINT_OUT_DEBUG(PNP_SetDeviceProblem, r);
2354 push = ndr_push_init_ctx(r, NULL);
2355 if (push == NULL) {
2356 talloc_free(r);
2357 return false;
2360 ndr_err = call->ndr_push(push, NDR_OUT, r);
2361 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2362 talloc_free(r);
2363 return false;
2366 blob = ndr_push_blob(push);
2367 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2368 talloc_free(r);
2369 return false;
2372 talloc_free(r);
2374 return true;
2377 static bool api_PNP_DisableDevInst(pipes_struct *p)
2379 const struct ndr_interface_call *call;
2380 struct ndr_pull *pull;
2381 struct ndr_push *push;
2382 enum ndr_err_code ndr_err;
2383 DATA_BLOB blob;
2384 struct PNP_DisableDevInst *r;
2386 call = &ndr_table_ntsvcs.calls[NDR_PNP_DISABLEDEVINST];
2388 r = talloc(talloc_tos(), struct PNP_DisableDevInst);
2389 if (r == NULL) {
2390 return false;
2393 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2394 talloc_free(r);
2395 return false;
2398 pull = ndr_pull_init_blob(&blob, r, NULL);
2399 if (pull == NULL) {
2400 talloc_free(r);
2401 return false;
2404 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2405 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2406 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2407 talloc_free(r);
2408 return false;
2411 if (DEBUGLEVEL >= 10) {
2412 NDR_PRINT_IN_DEBUG(PNP_DisableDevInst, r);
2415 r->out.result = _PNP_DisableDevInst(p, r);
2417 if (p->rng_fault_state) {
2418 talloc_free(r);
2419 /* Return true here, srv_pipe_hnd.c will take care */
2420 return true;
2423 if (DEBUGLEVEL >= 10) {
2424 NDR_PRINT_OUT_DEBUG(PNP_DisableDevInst, r);
2427 push = ndr_push_init_ctx(r, NULL);
2428 if (push == NULL) {
2429 talloc_free(r);
2430 return false;
2433 ndr_err = call->ndr_push(push, NDR_OUT, r);
2434 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2435 talloc_free(r);
2436 return false;
2439 blob = ndr_push_blob(push);
2440 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2441 talloc_free(r);
2442 return false;
2445 talloc_free(r);
2447 return true;
2450 static bool api_PNP_UninstallDevInst(pipes_struct *p)
2452 const struct ndr_interface_call *call;
2453 struct ndr_pull *pull;
2454 struct ndr_push *push;
2455 enum ndr_err_code ndr_err;
2456 DATA_BLOB blob;
2457 struct PNP_UninstallDevInst *r;
2459 call = &ndr_table_ntsvcs.calls[NDR_PNP_UNINSTALLDEVINST];
2461 r = talloc(talloc_tos(), struct PNP_UninstallDevInst);
2462 if (r == NULL) {
2463 return false;
2466 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2467 talloc_free(r);
2468 return false;
2471 pull = ndr_pull_init_blob(&blob, r, NULL);
2472 if (pull == NULL) {
2473 talloc_free(r);
2474 return false;
2477 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2478 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2479 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2480 talloc_free(r);
2481 return false;
2484 if (DEBUGLEVEL >= 10) {
2485 NDR_PRINT_IN_DEBUG(PNP_UninstallDevInst, r);
2488 r->out.result = _PNP_UninstallDevInst(p, r);
2490 if (p->rng_fault_state) {
2491 talloc_free(r);
2492 /* Return true here, srv_pipe_hnd.c will take care */
2493 return true;
2496 if (DEBUGLEVEL >= 10) {
2497 NDR_PRINT_OUT_DEBUG(PNP_UninstallDevInst, r);
2500 push = ndr_push_init_ctx(r, NULL);
2501 if (push == NULL) {
2502 talloc_free(r);
2503 return false;
2506 ndr_err = call->ndr_push(push, NDR_OUT, r);
2507 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2508 talloc_free(r);
2509 return false;
2512 blob = ndr_push_blob(push);
2513 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2514 talloc_free(r);
2515 return false;
2518 talloc_free(r);
2520 return true;
2523 static bool api_PNP_AddID(pipes_struct *p)
2525 const struct ndr_interface_call *call;
2526 struct ndr_pull *pull;
2527 struct ndr_push *push;
2528 enum ndr_err_code ndr_err;
2529 DATA_BLOB blob;
2530 struct PNP_AddID *r;
2532 call = &ndr_table_ntsvcs.calls[NDR_PNP_ADDID];
2534 r = talloc(talloc_tos(), struct PNP_AddID);
2535 if (r == NULL) {
2536 return false;
2539 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2540 talloc_free(r);
2541 return false;
2544 pull = ndr_pull_init_blob(&blob, r, NULL);
2545 if (pull == NULL) {
2546 talloc_free(r);
2547 return false;
2550 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2551 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2552 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2553 talloc_free(r);
2554 return false;
2557 if (DEBUGLEVEL >= 10) {
2558 NDR_PRINT_IN_DEBUG(PNP_AddID, r);
2561 r->out.result = _PNP_AddID(p, r);
2563 if (p->rng_fault_state) {
2564 talloc_free(r);
2565 /* Return true here, srv_pipe_hnd.c will take care */
2566 return true;
2569 if (DEBUGLEVEL >= 10) {
2570 NDR_PRINT_OUT_DEBUG(PNP_AddID, r);
2573 push = ndr_push_init_ctx(r, NULL);
2574 if (push == NULL) {
2575 talloc_free(r);
2576 return false;
2579 ndr_err = call->ndr_push(push, NDR_OUT, r);
2580 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2581 talloc_free(r);
2582 return false;
2585 blob = ndr_push_blob(push);
2586 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2587 talloc_free(r);
2588 return false;
2591 talloc_free(r);
2593 return true;
2596 static bool api_PNP_RegisterDriver(pipes_struct *p)
2598 const struct ndr_interface_call *call;
2599 struct ndr_pull *pull;
2600 struct ndr_push *push;
2601 enum ndr_err_code ndr_err;
2602 DATA_BLOB blob;
2603 struct PNP_RegisterDriver *r;
2605 call = &ndr_table_ntsvcs.calls[NDR_PNP_REGISTERDRIVER];
2607 r = talloc(talloc_tos(), struct PNP_RegisterDriver);
2608 if (r == NULL) {
2609 return false;
2612 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2613 talloc_free(r);
2614 return false;
2617 pull = ndr_pull_init_blob(&blob, r, NULL);
2618 if (pull == NULL) {
2619 talloc_free(r);
2620 return false;
2623 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2624 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2625 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2626 talloc_free(r);
2627 return false;
2630 if (DEBUGLEVEL >= 10) {
2631 NDR_PRINT_IN_DEBUG(PNP_RegisterDriver, r);
2634 r->out.result = _PNP_RegisterDriver(p, r);
2636 if (p->rng_fault_state) {
2637 talloc_free(r);
2638 /* Return true here, srv_pipe_hnd.c will take care */
2639 return true;
2642 if (DEBUGLEVEL >= 10) {
2643 NDR_PRINT_OUT_DEBUG(PNP_RegisterDriver, r);
2646 push = ndr_push_init_ctx(r, NULL);
2647 if (push == NULL) {
2648 talloc_free(r);
2649 return false;
2652 ndr_err = call->ndr_push(push, NDR_OUT, r);
2653 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2654 talloc_free(r);
2655 return false;
2658 blob = ndr_push_blob(push);
2659 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2660 talloc_free(r);
2661 return false;
2664 talloc_free(r);
2666 return true;
2669 static bool api_PNP_QueryRemove(pipes_struct *p)
2671 const struct ndr_interface_call *call;
2672 struct ndr_pull *pull;
2673 struct ndr_push *push;
2674 enum ndr_err_code ndr_err;
2675 DATA_BLOB blob;
2676 struct PNP_QueryRemove *r;
2678 call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYREMOVE];
2680 r = talloc(talloc_tos(), struct PNP_QueryRemove);
2681 if (r == NULL) {
2682 return false;
2685 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2686 talloc_free(r);
2687 return false;
2690 pull = ndr_pull_init_blob(&blob, r, NULL);
2691 if (pull == NULL) {
2692 talloc_free(r);
2693 return false;
2696 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2697 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2698 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2699 talloc_free(r);
2700 return false;
2703 if (DEBUGLEVEL >= 10) {
2704 NDR_PRINT_IN_DEBUG(PNP_QueryRemove, r);
2707 r->out.result = _PNP_QueryRemove(p, r);
2709 if (p->rng_fault_state) {
2710 talloc_free(r);
2711 /* Return true here, srv_pipe_hnd.c will take care */
2712 return true;
2715 if (DEBUGLEVEL >= 10) {
2716 NDR_PRINT_OUT_DEBUG(PNP_QueryRemove, r);
2719 push = ndr_push_init_ctx(r, NULL);
2720 if (push == NULL) {
2721 talloc_free(r);
2722 return false;
2725 ndr_err = call->ndr_push(push, NDR_OUT, r);
2726 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2727 talloc_free(r);
2728 return false;
2731 blob = ndr_push_blob(push);
2732 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2733 talloc_free(r);
2734 return false;
2737 talloc_free(r);
2739 return true;
2742 static bool api_PNP_RequestDeviceEject(pipes_struct *p)
2744 const struct ndr_interface_call *call;
2745 struct ndr_pull *pull;
2746 struct ndr_push *push;
2747 enum ndr_err_code ndr_err;
2748 DATA_BLOB blob;
2749 struct PNP_RequestDeviceEject *r;
2751 call = &ndr_table_ntsvcs.calls[NDR_PNP_REQUESTDEVICEEJECT];
2753 r = talloc(talloc_tos(), struct PNP_RequestDeviceEject);
2754 if (r == NULL) {
2755 return false;
2758 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2759 talloc_free(r);
2760 return false;
2763 pull = ndr_pull_init_blob(&blob, r, NULL);
2764 if (pull == NULL) {
2765 talloc_free(r);
2766 return false;
2769 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2770 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2771 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2772 talloc_free(r);
2773 return false;
2776 if (DEBUGLEVEL >= 10) {
2777 NDR_PRINT_IN_DEBUG(PNP_RequestDeviceEject, r);
2780 r->out.result = _PNP_RequestDeviceEject(p, r);
2782 if (p->rng_fault_state) {
2783 talloc_free(r);
2784 /* Return true here, srv_pipe_hnd.c will take care */
2785 return true;
2788 if (DEBUGLEVEL >= 10) {
2789 NDR_PRINT_OUT_DEBUG(PNP_RequestDeviceEject, r);
2792 push = ndr_push_init_ctx(r, NULL);
2793 if (push == NULL) {
2794 talloc_free(r);
2795 return false;
2798 ndr_err = call->ndr_push(push, NDR_OUT, r);
2799 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2800 talloc_free(r);
2801 return false;
2804 blob = ndr_push_blob(push);
2805 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2806 talloc_free(r);
2807 return false;
2810 talloc_free(r);
2812 return true;
2815 static bool api_PNP_IsDockStationPresent(pipes_struct *p)
2817 const struct ndr_interface_call *call;
2818 struct ndr_pull *pull;
2819 struct ndr_push *push;
2820 enum ndr_err_code ndr_err;
2821 DATA_BLOB blob;
2822 struct PNP_IsDockStationPresent *r;
2824 call = &ndr_table_ntsvcs.calls[NDR_PNP_ISDOCKSTATIONPRESENT];
2826 r = talloc(talloc_tos(), struct PNP_IsDockStationPresent);
2827 if (r == NULL) {
2828 return false;
2831 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2832 talloc_free(r);
2833 return false;
2836 pull = ndr_pull_init_blob(&blob, r, NULL);
2837 if (pull == NULL) {
2838 talloc_free(r);
2839 return false;
2842 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2843 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2844 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2845 talloc_free(r);
2846 return false;
2849 if (DEBUGLEVEL >= 10) {
2850 NDR_PRINT_IN_DEBUG(PNP_IsDockStationPresent, r);
2853 r->out.result = _PNP_IsDockStationPresent(p, r);
2855 if (p->rng_fault_state) {
2856 talloc_free(r);
2857 /* Return true here, srv_pipe_hnd.c will take care */
2858 return true;
2861 if (DEBUGLEVEL >= 10) {
2862 NDR_PRINT_OUT_DEBUG(PNP_IsDockStationPresent, r);
2865 push = ndr_push_init_ctx(r, NULL);
2866 if (push == NULL) {
2867 talloc_free(r);
2868 return false;
2871 ndr_err = call->ndr_push(push, NDR_OUT, r);
2872 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2873 talloc_free(r);
2874 return false;
2877 blob = ndr_push_blob(push);
2878 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2879 talloc_free(r);
2880 return false;
2883 talloc_free(r);
2885 return true;
2888 static bool api_PNP_RequestEjectPC(pipes_struct *p)
2890 const struct ndr_interface_call *call;
2891 struct ndr_pull *pull;
2892 struct ndr_push *push;
2893 enum ndr_err_code ndr_err;
2894 DATA_BLOB blob;
2895 struct PNP_RequestEjectPC *r;
2897 call = &ndr_table_ntsvcs.calls[NDR_PNP_REQUESTEJECTPC];
2899 r = talloc(talloc_tos(), struct PNP_RequestEjectPC);
2900 if (r == NULL) {
2901 return false;
2904 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2905 talloc_free(r);
2906 return false;
2909 pull = ndr_pull_init_blob(&blob, r, NULL);
2910 if (pull == NULL) {
2911 talloc_free(r);
2912 return false;
2915 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2916 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2917 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2918 talloc_free(r);
2919 return false;
2922 if (DEBUGLEVEL >= 10) {
2923 NDR_PRINT_IN_DEBUG(PNP_RequestEjectPC, r);
2926 r->out.result = _PNP_RequestEjectPC(p, r);
2928 if (p->rng_fault_state) {
2929 talloc_free(r);
2930 /* Return true here, srv_pipe_hnd.c will take care */
2931 return true;
2934 if (DEBUGLEVEL >= 10) {
2935 NDR_PRINT_OUT_DEBUG(PNP_RequestEjectPC, r);
2938 push = ndr_push_init_ctx(r, NULL);
2939 if (push == NULL) {
2940 talloc_free(r);
2941 return false;
2944 ndr_err = call->ndr_push(push, NDR_OUT, r);
2945 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2946 talloc_free(r);
2947 return false;
2950 blob = ndr_push_blob(push);
2951 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2952 talloc_free(r);
2953 return false;
2956 talloc_free(r);
2958 return true;
2961 static bool api_PNP_HwProfFlags(pipes_struct *p)
2963 const struct ndr_interface_call *call;
2964 struct ndr_pull *pull;
2965 struct ndr_push *push;
2966 enum ndr_err_code ndr_err;
2967 DATA_BLOB blob;
2968 struct PNP_HwProfFlags *r;
2970 call = &ndr_table_ntsvcs.calls[NDR_PNP_HWPROFFLAGS];
2972 r = talloc(talloc_tos(), struct PNP_HwProfFlags);
2973 if (r == NULL) {
2974 return false;
2977 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2978 talloc_free(r);
2979 return false;
2982 pull = ndr_pull_init_blob(&blob, r, NULL);
2983 if (pull == NULL) {
2984 talloc_free(r);
2985 return false;
2988 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2989 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2990 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2991 talloc_free(r);
2992 return false;
2995 if (DEBUGLEVEL >= 10) {
2996 NDR_PRINT_IN_DEBUG(PNP_HwProfFlags, r);
2999 ZERO_STRUCT(r->out);
3000 r->out.profile_flags = r->in.profile_flags;
3001 r->out.veto_type = r->in.veto_type;
3002 r->out.unknown5a = talloc_zero(r, const char *);
3003 if (r->out.unknown5a == NULL) {
3004 talloc_free(r);
3005 return false;
3008 r->out.result = _PNP_HwProfFlags(p, r);
3010 if (p->rng_fault_state) {
3011 talloc_free(r);
3012 /* Return true here, srv_pipe_hnd.c will take care */
3013 return true;
3016 if (DEBUGLEVEL >= 10) {
3017 NDR_PRINT_OUT_DEBUG(PNP_HwProfFlags, r);
3020 push = ndr_push_init_ctx(r, NULL);
3021 if (push == NULL) {
3022 talloc_free(r);
3023 return false;
3026 ndr_err = call->ndr_push(push, NDR_OUT, r);
3027 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3028 talloc_free(r);
3029 return false;
3032 blob = ndr_push_blob(push);
3033 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3034 talloc_free(r);
3035 return false;
3038 talloc_free(r);
3040 return true;
3043 static bool api_PNP_GetHwProfInfo(pipes_struct *p)
3045 const struct ndr_interface_call *call;
3046 struct ndr_pull *pull;
3047 struct ndr_push *push;
3048 enum ndr_err_code ndr_err;
3049 DATA_BLOB blob;
3050 struct PNP_GetHwProfInfo *r;
3052 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETHWPROFINFO];
3054 r = talloc(talloc_tos(), struct PNP_GetHwProfInfo);
3055 if (r == NULL) {
3056 return false;
3059 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3060 talloc_free(r);
3061 return false;
3064 pull = ndr_pull_init_blob(&blob, r, NULL);
3065 if (pull == NULL) {
3066 talloc_free(r);
3067 return false;
3070 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3071 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3072 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3073 talloc_free(r);
3074 return false;
3077 if (DEBUGLEVEL >= 10) {
3078 NDR_PRINT_IN_DEBUG(PNP_GetHwProfInfo, r);
3081 ZERO_STRUCT(r->out);
3082 r->out.info = r->in.info;
3083 r->out.result = _PNP_GetHwProfInfo(p, r);
3085 if (p->rng_fault_state) {
3086 talloc_free(r);
3087 /* Return true here, srv_pipe_hnd.c will take care */
3088 return true;
3091 if (DEBUGLEVEL >= 10) {
3092 NDR_PRINT_OUT_DEBUG(PNP_GetHwProfInfo, r);
3095 push = ndr_push_init_ctx(r, NULL);
3096 if (push == NULL) {
3097 talloc_free(r);
3098 return false;
3101 ndr_err = call->ndr_push(push, NDR_OUT, r);
3102 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3103 talloc_free(r);
3104 return false;
3107 blob = ndr_push_blob(push);
3108 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3109 talloc_free(r);
3110 return false;
3113 talloc_free(r);
3115 return true;
3118 static bool api_PNP_AddEmptyLogConf(pipes_struct *p)
3120 const struct ndr_interface_call *call;
3121 struct ndr_pull *pull;
3122 struct ndr_push *push;
3123 enum ndr_err_code ndr_err;
3124 DATA_BLOB blob;
3125 struct PNP_AddEmptyLogConf *r;
3127 call = &ndr_table_ntsvcs.calls[NDR_PNP_ADDEMPTYLOGCONF];
3129 r = talloc(talloc_tos(), struct PNP_AddEmptyLogConf);
3130 if (r == NULL) {
3131 return false;
3134 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3135 talloc_free(r);
3136 return false;
3139 pull = ndr_pull_init_blob(&blob, r, NULL);
3140 if (pull == NULL) {
3141 talloc_free(r);
3142 return false;
3145 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3146 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3147 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3148 talloc_free(r);
3149 return false;
3152 if (DEBUGLEVEL >= 10) {
3153 NDR_PRINT_IN_DEBUG(PNP_AddEmptyLogConf, r);
3156 r->out.result = _PNP_AddEmptyLogConf(p, r);
3158 if (p->rng_fault_state) {
3159 talloc_free(r);
3160 /* Return true here, srv_pipe_hnd.c will take care */
3161 return true;
3164 if (DEBUGLEVEL >= 10) {
3165 NDR_PRINT_OUT_DEBUG(PNP_AddEmptyLogConf, r);
3168 push = ndr_push_init_ctx(r, NULL);
3169 if (push == NULL) {
3170 talloc_free(r);
3171 return false;
3174 ndr_err = call->ndr_push(push, NDR_OUT, r);
3175 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3176 talloc_free(r);
3177 return false;
3180 blob = ndr_push_blob(push);
3181 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3182 talloc_free(r);
3183 return false;
3186 talloc_free(r);
3188 return true;
3191 static bool api_PNP_FreeLogConf(pipes_struct *p)
3193 const struct ndr_interface_call *call;
3194 struct ndr_pull *pull;
3195 struct ndr_push *push;
3196 enum ndr_err_code ndr_err;
3197 DATA_BLOB blob;
3198 struct PNP_FreeLogConf *r;
3200 call = &ndr_table_ntsvcs.calls[NDR_PNP_FREELOGCONF];
3202 r = talloc(talloc_tos(), struct PNP_FreeLogConf);
3203 if (r == NULL) {
3204 return false;
3207 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3208 talloc_free(r);
3209 return false;
3212 pull = ndr_pull_init_blob(&blob, r, NULL);
3213 if (pull == NULL) {
3214 talloc_free(r);
3215 return false;
3218 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3219 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3220 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3221 talloc_free(r);
3222 return false;
3225 if (DEBUGLEVEL >= 10) {
3226 NDR_PRINT_IN_DEBUG(PNP_FreeLogConf, r);
3229 r->out.result = _PNP_FreeLogConf(p, r);
3231 if (p->rng_fault_state) {
3232 talloc_free(r);
3233 /* Return true here, srv_pipe_hnd.c will take care */
3234 return true;
3237 if (DEBUGLEVEL >= 10) {
3238 NDR_PRINT_OUT_DEBUG(PNP_FreeLogConf, r);
3241 push = ndr_push_init_ctx(r, NULL);
3242 if (push == NULL) {
3243 talloc_free(r);
3244 return false;
3247 ndr_err = call->ndr_push(push, NDR_OUT, r);
3248 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3249 talloc_free(r);
3250 return false;
3253 blob = ndr_push_blob(push);
3254 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3255 talloc_free(r);
3256 return false;
3259 talloc_free(r);
3261 return true;
3264 static bool api_PNP_GetFirstLogConf(pipes_struct *p)
3266 const struct ndr_interface_call *call;
3267 struct ndr_pull *pull;
3268 struct ndr_push *push;
3269 enum ndr_err_code ndr_err;
3270 DATA_BLOB blob;
3271 struct PNP_GetFirstLogConf *r;
3273 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETFIRSTLOGCONF];
3275 r = talloc(talloc_tos(), struct PNP_GetFirstLogConf);
3276 if (r == NULL) {
3277 return false;
3280 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3281 talloc_free(r);
3282 return false;
3285 pull = ndr_pull_init_blob(&blob, r, NULL);
3286 if (pull == NULL) {
3287 talloc_free(r);
3288 return false;
3291 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3292 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3293 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3294 talloc_free(r);
3295 return false;
3298 if (DEBUGLEVEL >= 10) {
3299 NDR_PRINT_IN_DEBUG(PNP_GetFirstLogConf, r);
3302 r->out.result = _PNP_GetFirstLogConf(p, r);
3304 if (p->rng_fault_state) {
3305 talloc_free(r);
3306 /* Return true here, srv_pipe_hnd.c will take care */
3307 return true;
3310 if (DEBUGLEVEL >= 10) {
3311 NDR_PRINT_OUT_DEBUG(PNP_GetFirstLogConf, r);
3314 push = ndr_push_init_ctx(r, NULL);
3315 if (push == NULL) {
3316 talloc_free(r);
3317 return false;
3320 ndr_err = call->ndr_push(push, NDR_OUT, r);
3321 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3322 talloc_free(r);
3323 return false;
3326 blob = ndr_push_blob(push);
3327 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3328 talloc_free(r);
3329 return false;
3332 talloc_free(r);
3334 return true;
3337 static bool api_PNP_GetNextLogConf(pipes_struct *p)
3339 const struct ndr_interface_call *call;
3340 struct ndr_pull *pull;
3341 struct ndr_push *push;
3342 enum ndr_err_code ndr_err;
3343 DATA_BLOB blob;
3344 struct PNP_GetNextLogConf *r;
3346 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETNEXTLOGCONF];
3348 r = talloc(talloc_tos(), struct PNP_GetNextLogConf);
3349 if (r == NULL) {
3350 return false;
3353 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3354 talloc_free(r);
3355 return false;
3358 pull = ndr_pull_init_blob(&blob, r, NULL);
3359 if (pull == NULL) {
3360 talloc_free(r);
3361 return false;
3364 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3365 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3366 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3367 talloc_free(r);
3368 return false;
3371 if (DEBUGLEVEL >= 10) {
3372 NDR_PRINT_IN_DEBUG(PNP_GetNextLogConf, r);
3375 r->out.result = _PNP_GetNextLogConf(p, r);
3377 if (p->rng_fault_state) {
3378 talloc_free(r);
3379 /* Return true here, srv_pipe_hnd.c will take care */
3380 return true;
3383 if (DEBUGLEVEL >= 10) {
3384 NDR_PRINT_OUT_DEBUG(PNP_GetNextLogConf, r);
3387 push = ndr_push_init_ctx(r, NULL);
3388 if (push == NULL) {
3389 talloc_free(r);
3390 return false;
3393 ndr_err = call->ndr_push(push, NDR_OUT, r);
3394 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3395 talloc_free(r);
3396 return false;
3399 blob = ndr_push_blob(push);
3400 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3401 talloc_free(r);
3402 return false;
3405 talloc_free(r);
3407 return true;
3410 static bool api_PNP_GetLogConfPriority(pipes_struct *p)
3412 const struct ndr_interface_call *call;
3413 struct ndr_pull *pull;
3414 struct ndr_push *push;
3415 enum ndr_err_code ndr_err;
3416 DATA_BLOB blob;
3417 struct PNP_GetLogConfPriority *r;
3419 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETLOGCONFPRIORITY];
3421 r = talloc(talloc_tos(), struct PNP_GetLogConfPriority);
3422 if (r == NULL) {
3423 return false;
3426 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3427 talloc_free(r);
3428 return false;
3431 pull = ndr_pull_init_blob(&blob, r, NULL);
3432 if (pull == NULL) {
3433 talloc_free(r);
3434 return false;
3437 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3438 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3439 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3440 talloc_free(r);
3441 return false;
3444 if (DEBUGLEVEL >= 10) {
3445 NDR_PRINT_IN_DEBUG(PNP_GetLogConfPriority, r);
3448 r->out.result = _PNP_GetLogConfPriority(p, r);
3450 if (p->rng_fault_state) {
3451 talloc_free(r);
3452 /* Return true here, srv_pipe_hnd.c will take care */
3453 return true;
3456 if (DEBUGLEVEL >= 10) {
3457 NDR_PRINT_OUT_DEBUG(PNP_GetLogConfPriority, r);
3460 push = ndr_push_init_ctx(r, NULL);
3461 if (push == NULL) {
3462 talloc_free(r);
3463 return false;
3466 ndr_err = call->ndr_push(push, NDR_OUT, r);
3467 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3468 talloc_free(r);
3469 return false;
3472 blob = ndr_push_blob(push);
3473 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3474 talloc_free(r);
3475 return false;
3478 talloc_free(r);
3480 return true;
3483 static bool api_PNP_AddResDes(pipes_struct *p)
3485 const struct ndr_interface_call *call;
3486 struct ndr_pull *pull;
3487 struct ndr_push *push;
3488 enum ndr_err_code ndr_err;
3489 DATA_BLOB blob;
3490 struct PNP_AddResDes *r;
3492 call = &ndr_table_ntsvcs.calls[NDR_PNP_ADDRESDES];
3494 r = talloc(talloc_tos(), struct PNP_AddResDes);
3495 if (r == NULL) {
3496 return false;
3499 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3500 talloc_free(r);
3501 return false;
3504 pull = ndr_pull_init_blob(&blob, r, NULL);
3505 if (pull == NULL) {
3506 talloc_free(r);
3507 return false;
3510 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3511 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3512 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3513 talloc_free(r);
3514 return false;
3517 if (DEBUGLEVEL >= 10) {
3518 NDR_PRINT_IN_DEBUG(PNP_AddResDes, r);
3521 r->out.result = _PNP_AddResDes(p, r);
3523 if (p->rng_fault_state) {
3524 talloc_free(r);
3525 /* Return true here, srv_pipe_hnd.c will take care */
3526 return true;
3529 if (DEBUGLEVEL >= 10) {
3530 NDR_PRINT_OUT_DEBUG(PNP_AddResDes, r);
3533 push = ndr_push_init_ctx(r, NULL);
3534 if (push == NULL) {
3535 talloc_free(r);
3536 return false;
3539 ndr_err = call->ndr_push(push, NDR_OUT, r);
3540 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3541 talloc_free(r);
3542 return false;
3545 blob = ndr_push_blob(push);
3546 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3547 talloc_free(r);
3548 return false;
3551 talloc_free(r);
3553 return true;
3556 static bool api_PNP_FreeResDes(pipes_struct *p)
3558 const struct ndr_interface_call *call;
3559 struct ndr_pull *pull;
3560 struct ndr_push *push;
3561 enum ndr_err_code ndr_err;
3562 DATA_BLOB blob;
3563 struct PNP_FreeResDes *r;
3565 call = &ndr_table_ntsvcs.calls[NDR_PNP_FREERESDES];
3567 r = talloc(talloc_tos(), struct PNP_FreeResDes);
3568 if (r == NULL) {
3569 return false;
3572 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3573 talloc_free(r);
3574 return false;
3577 pull = ndr_pull_init_blob(&blob, r, NULL);
3578 if (pull == NULL) {
3579 talloc_free(r);
3580 return false;
3583 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3584 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3585 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3586 talloc_free(r);
3587 return false;
3590 if (DEBUGLEVEL >= 10) {
3591 NDR_PRINT_IN_DEBUG(PNP_FreeResDes, r);
3594 r->out.result = _PNP_FreeResDes(p, r);
3596 if (p->rng_fault_state) {
3597 talloc_free(r);
3598 /* Return true here, srv_pipe_hnd.c will take care */
3599 return true;
3602 if (DEBUGLEVEL >= 10) {
3603 NDR_PRINT_OUT_DEBUG(PNP_FreeResDes, r);
3606 push = ndr_push_init_ctx(r, NULL);
3607 if (push == NULL) {
3608 talloc_free(r);
3609 return false;
3612 ndr_err = call->ndr_push(push, NDR_OUT, r);
3613 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3614 talloc_free(r);
3615 return false;
3618 blob = ndr_push_blob(push);
3619 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3620 talloc_free(r);
3621 return false;
3624 talloc_free(r);
3626 return true;
3629 static bool api_PNP_GetNextResDes(pipes_struct *p)
3631 const struct ndr_interface_call *call;
3632 struct ndr_pull *pull;
3633 struct ndr_push *push;
3634 enum ndr_err_code ndr_err;
3635 DATA_BLOB blob;
3636 struct PNP_GetNextResDes *r;
3638 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETNEXTRESDES];
3640 r = talloc(talloc_tos(), struct PNP_GetNextResDes);
3641 if (r == NULL) {
3642 return false;
3645 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3646 talloc_free(r);
3647 return false;
3650 pull = ndr_pull_init_blob(&blob, r, NULL);
3651 if (pull == NULL) {
3652 talloc_free(r);
3653 return false;
3656 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3657 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3658 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3659 talloc_free(r);
3660 return false;
3663 if (DEBUGLEVEL >= 10) {
3664 NDR_PRINT_IN_DEBUG(PNP_GetNextResDes, r);
3667 r->out.result = _PNP_GetNextResDes(p, r);
3669 if (p->rng_fault_state) {
3670 talloc_free(r);
3671 /* Return true here, srv_pipe_hnd.c will take care */
3672 return true;
3675 if (DEBUGLEVEL >= 10) {
3676 NDR_PRINT_OUT_DEBUG(PNP_GetNextResDes, r);
3679 push = ndr_push_init_ctx(r, NULL);
3680 if (push == NULL) {
3681 talloc_free(r);
3682 return false;
3685 ndr_err = call->ndr_push(push, NDR_OUT, r);
3686 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3687 talloc_free(r);
3688 return false;
3691 blob = ndr_push_blob(push);
3692 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3693 talloc_free(r);
3694 return false;
3697 talloc_free(r);
3699 return true;
3702 static bool api_PNP_GetResDesData(pipes_struct *p)
3704 const struct ndr_interface_call *call;
3705 struct ndr_pull *pull;
3706 struct ndr_push *push;
3707 enum ndr_err_code ndr_err;
3708 DATA_BLOB blob;
3709 struct PNP_GetResDesData *r;
3711 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETRESDESDATA];
3713 r = talloc(talloc_tos(), struct PNP_GetResDesData);
3714 if (r == NULL) {
3715 return false;
3718 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3719 talloc_free(r);
3720 return false;
3723 pull = ndr_pull_init_blob(&blob, r, NULL);
3724 if (pull == NULL) {
3725 talloc_free(r);
3726 return false;
3729 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3730 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3731 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3732 talloc_free(r);
3733 return false;
3736 if (DEBUGLEVEL >= 10) {
3737 NDR_PRINT_IN_DEBUG(PNP_GetResDesData, r);
3740 r->out.result = _PNP_GetResDesData(p, r);
3742 if (p->rng_fault_state) {
3743 talloc_free(r);
3744 /* Return true here, srv_pipe_hnd.c will take care */
3745 return true;
3748 if (DEBUGLEVEL >= 10) {
3749 NDR_PRINT_OUT_DEBUG(PNP_GetResDesData, r);
3752 push = ndr_push_init_ctx(r, NULL);
3753 if (push == NULL) {
3754 talloc_free(r);
3755 return false;
3758 ndr_err = call->ndr_push(push, NDR_OUT, r);
3759 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3760 talloc_free(r);
3761 return false;
3764 blob = ndr_push_blob(push);
3765 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3766 talloc_free(r);
3767 return false;
3770 talloc_free(r);
3772 return true;
3775 static bool api_PNP_GetResDesDataSize(pipes_struct *p)
3777 const struct ndr_interface_call *call;
3778 struct ndr_pull *pull;
3779 struct ndr_push *push;
3780 enum ndr_err_code ndr_err;
3781 DATA_BLOB blob;
3782 struct PNP_GetResDesDataSize *r;
3784 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETRESDESDATASIZE];
3786 r = talloc(talloc_tos(), struct PNP_GetResDesDataSize);
3787 if (r == NULL) {
3788 return false;
3791 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3792 talloc_free(r);
3793 return false;
3796 pull = ndr_pull_init_blob(&blob, r, NULL);
3797 if (pull == NULL) {
3798 talloc_free(r);
3799 return false;
3802 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3803 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3804 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3805 talloc_free(r);
3806 return false;
3809 if (DEBUGLEVEL >= 10) {
3810 NDR_PRINT_IN_DEBUG(PNP_GetResDesDataSize, r);
3813 r->out.result = _PNP_GetResDesDataSize(p, r);
3815 if (p->rng_fault_state) {
3816 talloc_free(r);
3817 /* Return true here, srv_pipe_hnd.c will take care */
3818 return true;
3821 if (DEBUGLEVEL >= 10) {
3822 NDR_PRINT_OUT_DEBUG(PNP_GetResDesDataSize, r);
3825 push = ndr_push_init_ctx(r, NULL);
3826 if (push == NULL) {
3827 talloc_free(r);
3828 return false;
3831 ndr_err = call->ndr_push(push, NDR_OUT, r);
3832 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3833 talloc_free(r);
3834 return false;
3837 blob = ndr_push_blob(push);
3838 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3839 talloc_free(r);
3840 return false;
3843 talloc_free(r);
3845 return true;
3848 static bool api_PNP_ModifyResDes(pipes_struct *p)
3850 const struct ndr_interface_call *call;
3851 struct ndr_pull *pull;
3852 struct ndr_push *push;
3853 enum ndr_err_code ndr_err;
3854 DATA_BLOB blob;
3855 struct PNP_ModifyResDes *r;
3857 call = &ndr_table_ntsvcs.calls[NDR_PNP_MODIFYRESDES];
3859 r = talloc(talloc_tos(), struct PNP_ModifyResDes);
3860 if (r == NULL) {
3861 return false;
3864 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3865 talloc_free(r);
3866 return false;
3869 pull = ndr_pull_init_blob(&blob, r, NULL);
3870 if (pull == NULL) {
3871 talloc_free(r);
3872 return false;
3875 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3876 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3877 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3878 talloc_free(r);
3879 return false;
3882 if (DEBUGLEVEL >= 10) {
3883 NDR_PRINT_IN_DEBUG(PNP_ModifyResDes, r);
3886 r->out.result = _PNP_ModifyResDes(p, r);
3888 if (p->rng_fault_state) {
3889 talloc_free(r);
3890 /* Return true here, srv_pipe_hnd.c will take care */
3891 return true;
3894 if (DEBUGLEVEL >= 10) {
3895 NDR_PRINT_OUT_DEBUG(PNP_ModifyResDes, r);
3898 push = ndr_push_init_ctx(r, NULL);
3899 if (push == NULL) {
3900 talloc_free(r);
3901 return false;
3904 ndr_err = call->ndr_push(push, NDR_OUT, r);
3905 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3906 talloc_free(r);
3907 return false;
3910 blob = ndr_push_blob(push);
3911 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3912 talloc_free(r);
3913 return false;
3916 talloc_free(r);
3918 return true;
3921 static bool api_PNP_DetectResourceLimit(pipes_struct *p)
3923 const struct ndr_interface_call *call;
3924 struct ndr_pull *pull;
3925 struct ndr_push *push;
3926 enum ndr_err_code ndr_err;
3927 DATA_BLOB blob;
3928 struct PNP_DetectResourceLimit *r;
3930 call = &ndr_table_ntsvcs.calls[NDR_PNP_DETECTRESOURCELIMIT];
3932 r = talloc(talloc_tos(), struct PNP_DetectResourceLimit);
3933 if (r == NULL) {
3934 return false;
3937 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3938 talloc_free(r);
3939 return false;
3942 pull = ndr_pull_init_blob(&blob, r, NULL);
3943 if (pull == NULL) {
3944 talloc_free(r);
3945 return false;
3948 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3949 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3950 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3951 talloc_free(r);
3952 return false;
3955 if (DEBUGLEVEL >= 10) {
3956 NDR_PRINT_IN_DEBUG(PNP_DetectResourceLimit, r);
3959 r->out.result = _PNP_DetectResourceLimit(p, r);
3961 if (p->rng_fault_state) {
3962 talloc_free(r);
3963 /* Return true here, srv_pipe_hnd.c will take care */
3964 return true;
3967 if (DEBUGLEVEL >= 10) {
3968 NDR_PRINT_OUT_DEBUG(PNP_DetectResourceLimit, r);
3971 push = ndr_push_init_ctx(r, NULL);
3972 if (push == NULL) {
3973 talloc_free(r);
3974 return false;
3977 ndr_err = call->ndr_push(push, NDR_OUT, r);
3978 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3979 talloc_free(r);
3980 return false;
3983 blob = ndr_push_blob(push);
3984 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3985 talloc_free(r);
3986 return false;
3989 talloc_free(r);
3991 return true;
3994 static bool api_PNP_QueryResConfList(pipes_struct *p)
3996 const struct ndr_interface_call *call;
3997 struct ndr_pull *pull;
3998 struct ndr_push *push;
3999 enum ndr_err_code ndr_err;
4000 DATA_BLOB blob;
4001 struct PNP_QueryResConfList *r;
4003 call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYRESCONFLIST];
4005 r = talloc(talloc_tos(), struct PNP_QueryResConfList);
4006 if (r == NULL) {
4007 return false;
4010 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4011 talloc_free(r);
4012 return false;
4015 pull = ndr_pull_init_blob(&blob, r, NULL);
4016 if (pull == NULL) {
4017 talloc_free(r);
4018 return false;
4021 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4022 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4023 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4024 talloc_free(r);
4025 return false;
4028 if (DEBUGLEVEL >= 10) {
4029 NDR_PRINT_IN_DEBUG(PNP_QueryResConfList, r);
4032 r->out.result = _PNP_QueryResConfList(p, r);
4034 if (p->rng_fault_state) {
4035 talloc_free(r);
4036 /* Return true here, srv_pipe_hnd.c will take care */
4037 return true;
4040 if (DEBUGLEVEL >= 10) {
4041 NDR_PRINT_OUT_DEBUG(PNP_QueryResConfList, r);
4044 push = ndr_push_init_ctx(r, NULL);
4045 if (push == NULL) {
4046 talloc_free(r);
4047 return false;
4050 ndr_err = call->ndr_push(push, NDR_OUT, r);
4051 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4052 talloc_free(r);
4053 return false;
4056 blob = ndr_push_blob(push);
4057 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4058 talloc_free(r);
4059 return false;
4062 talloc_free(r);
4064 return true;
4067 static bool api_PNP_SetHwProf(pipes_struct *p)
4069 const struct ndr_interface_call *call;
4070 struct ndr_pull *pull;
4071 struct ndr_push *push;
4072 enum ndr_err_code ndr_err;
4073 DATA_BLOB blob;
4074 struct PNP_SetHwProf *r;
4076 call = &ndr_table_ntsvcs.calls[NDR_PNP_SETHWPROF];
4078 r = talloc(talloc_tos(), struct PNP_SetHwProf);
4079 if (r == NULL) {
4080 return false;
4083 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4084 talloc_free(r);
4085 return false;
4088 pull = ndr_pull_init_blob(&blob, r, NULL);
4089 if (pull == NULL) {
4090 talloc_free(r);
4091 return false;
4094 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4095 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4096 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4097 talloc_free(r);
4098 return false;
4101 if (DEBUGLEVEL >= 10) {
4102 NDR_PRINT_IN_DEBUG(PNP_SetHwProf, r);
4105 r->out.result = _PNP_SetHwProf(p, r);
4107 if (p->rng_fault_state) {
4108 talloc_free(r);
4109 /* Return true here, srv_pipe_hnd.c will take care */
4110 return true;
4113 if (DEBUGLEVEL >= 10) {
4114 NDR_PRINT_OUT_DEBUG(PNP_SetHwProf, r);
4117 push = ndr_push_init_ctx(r, NULL);
4118 if (push == NULL) {
4119 talloc_free(r);
4120 return false;
4123 ndr_err = call->ndr_push(push, NDR_OUT, r);
4124 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4125 talloc_free(r);
4126 return false;
4129 blob = ndr_push_blob(push);
4130 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4131 talloc_free(r);
4132 return false;
4135 talloc_free(r);
4137 return true;
4140 static bool api_PNP_QueryArbitratorFreeData(pipes_struct *p)
4142 const struct ndr_interface_call *call;
4143 struct ndr_pull *pull;
4144 struct ndr_push *push;
4145 enum ndr_err_code ndr_err;
4146 DATA_BLOB blob;
4147 struct PNP_QueryArbitratorFreeData *r;
4149 call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYARBITRATORFREEDATA];
4151 r = talloc(talloc_tos(), struct PNP_QueryArbitratorFreeData);
4152 if (r == NULL) {
4153 return false;
4156 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4157 talloc_free(r);
4158 return false;
4161 pull = ndr_pull_init_blob(&blob, r, NULL);
4162 if (pull == NULL) {
4163 talloc_free(r);
4164 return false;
4167 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4168 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4169 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4170 talloc_free(r);
4171 return false;
4174 if (DEBUGLEVEL >= 10) {
4175 NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeData, r);
4178 r->out.result = _PNP_QueryArbitratorFreeData(p, r);
4180 if (p->rng_fault_state) {
4181 talloc_free(r);
4182 /* Return true here, srv_pipe_hnd.c will take care */
4183 return true;
4186 if (DEBUGLEVEL >= 10) {
4187 NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeData, r);
4190 push = ndr_push_init_ctx(r, NULL);
4191 if (push == NULL) {
4192 talloc_free(r);
4193 return false;
4196 ndr_err = call->ndr_push(push, NDR_OUT, r);
4197 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4198 talloc_free(r);
4199 return false;
4202 blob = ndr_push_blob(push);
4203 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4204 talloc_free(r);
4205 return false;
4208 talloc_free(r);
4210 return true;
4213 static bool api_PNP_QueryArbitratorFreeSize(pipes_struct *p)
4215 const struct ndr_interface_call *call;
4216 struct ndr_pull *pull;
4217 struct ndr_push *push;
4218 enum ndr_err_code ndr_err;
4219 DATA_BLOB blob;
4220 struct PNP_QueryArbitratorFreeSize *r;
4222 call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYARBITRATORFREESIZE];
4224 r = talloc(talloc_tos(), struct PNP_QueryArbitratorFreeSize);
4225 if (r == NULL) {
4226 return false;
4229 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4230 talloc_free(r);
4231 return false;
4234 pull = ndr_pull_init_blob(&blob, r, NULL);
4235 if (pull == NULL) {
4236 talloc_free(r);
4237 return false;
4240 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4241 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4242 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4243 talloc_free(r);
4244 return false;
4247 if (DEBUGLEVEL >= 10) {
4248 NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeSize, r);
4251 r->out.result = _PNP_QueryArbitratorFreeSize(p, r);
4253 if (p->rng_fault_state) {
4254 talloc_free(r);
4255 /* Return true here, srv_pipe_hnd.c will take care */
4256 return true;
4259 if (DEBUGLEVEL >= 10) {
4260 NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeSize, r);
4263 push = ndr_push_init_ctx(r, NULL);
4264 if (push == NULL) {
4265 talloc_free(r);
4266 return false;
4269 ndr_err = call->ndr_push(push, NDR_OUT, r);
4270 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4271 talloc_free(r);
4272 return false;
4275 blob = ndr_push_blob(push);
4276 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4277 talloc_free(r);
4278 return false;
4281 talloc_free(r);
4283 return true;
4286 static bool api_PNP_RunDetection(pipes_struct *p)
4288 const struct ndr_interface_call *call;
4289 struct ndr_pull *pull;
4290 struct ndr_push *push;
4291 enum ndr_err_code ndr_err;
4292 DATA_BLOB blob;
4293 struct PNP_RunDetection *r;
4295 call = &ndr_table_ntsvcs.calls[NDR_PNP_RUNDETECTION];
4297 r = talloc(talloc_tos(), struct PNP_RunDetection);
4298 if (r == NULL) {
4299 return false;
4302 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4303 talloc_free(r);
4304 return false;
4307 pull = ndr_pull_init_blob(&blob, r, NULL);
4308 if (pull == NULL) {
4309 talloc_free(r);
4310 return false;
4313 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4314 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4315 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4316 talloc_free(r);
4317 return false;
4320 if (DEBUGLEVEL >= 10) {
4321 NDR_PRINT_IN_DEBUG(PNP_RunDetection, r);
4324 r->out.result = _PNP_RunDetection(p, r);
4326 if (p->rng_fault_state) {
4327 talloc_free(r);
4328 /* Return true here, srv_pipe_hnd.c will take care */
4329 return true;
4332 if (DEBUGLEVEL >= 10) {
4333 NDR_PRINT_OUT_DEBUG(PNP_RunDetection, r);
4336 push = ndr_push_init_ctx(r, NULL);
4337 if (push == NULL) {
4338 talloc_free(r);
4339 return false;
4342 ndr_err = call->ndr_push(push, NDR_OUT, r);
4343 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4344 talloc_free(r);
4345 return false;
4348 blob = ndr_push_blob(push);
4349 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4350 talloc_free(r);
4351 return false;
4354 talloc_free(r);
4356 return true;
4359 static bool api_PNP_RegisterNotification(pipes_struct *p)
4361 const struct ndr_interface_call *call;
4362 struct ndr_pull *pull;
4363 struct ndr_push *push;
4364 enum ndr_err_code ndr_err;
4365 DATA_BLOB blob;
4366 struct PNP_RegisterNotification *r;
4368 call = &ndr_table_ntsvcs.calls[NDR_PNP_REGISTERNOTIFICATION];
4370 r = talloc(talloc_tos(), struct PNP_RegisterNotification);
4371 if (r == NULL) {
4372 return false;
4375 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4376 talloc_free(r);
4377 return false;
4380 pull = ndr_pull_init_blob(&blob, r, NULL);
4381 if (pull == NULL) {
4382 talloc_free(r);
4383 return false;
4386 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4387 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4388 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4389 talloc_free(r);
4390 return false;
4393 if (DEBUGLEVEL >= 10) {
4394 NDR_PRINT_IN_DEBUG(PNP_RegisterNotification, r);
4397 r->out.result = _PNP_RegisterNotification(p, r);
4399 if (p->rng_fault_state) {
4400 talloc_free(r);
4401 /* Return true here, srv_pipe_hnd.c will take care */
4402 return true;
4405 if (DEBUGLEVEL >= 10) {
4406 NDR_PRINT_OUT_DEBUG(PNP_RegisterNotification, r);
4409 push = ndr_push_init_ctx(r, NULL);
4410 if (push == NULL) {
4411 talloc_free(r);
4412 return false;
4415 ndr_err = call->ndr_push(push, NDR_OUT, r);
4416 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4417 talloc_free(r);
4418 return false;
4421 blob = ndr_push_blob(push);
4422 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4423 talloc_free(r);
4424 return false;
4427 talloc_free(r);
4429 return true;
4432 static bool api_PNP_UnregisterNotification(pipes_struct *p)
4434 const struct ndr_interface_call *call;
4435 struct ndr_pull *pull;
4436 struct ndr_push *push;
4437 enum ndr_err_code ndr_err;
4438 DATA_BLOB blob;
4439 struct PNP_UnregisterNotification *r;
4441 call = &ndr_table_ntsvcs.calls[NDR_PNP_UNREGISTERNOTIFICATION];
4443 r = talloc(talloc_tos(), struct PNP_UnregisterNotification);
4444 if (r == NULL) {
4445 return false;
4448 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4449 talloc_free(r);
4450 return false;
4453 pull = ndr_pull_init_blob(&blob, r, NULL);
4454 if (pull == NULL) {
4455 talloc_free(r);
4456 return false;
4459 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4460 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4461 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4462 talloc_free(r);
4463 return false;
4466 if (DEBUGLEVEL >= 10) {
4467 NDR_PRINT_IN_DEBUG(PNP_UnregisterNotification, r);
4470 r->out.result = _PNP_UnregisterNotification(p, r);
4472 if (p->rng_fault_state) {
4473 talloc_free(r);
4474 /* Return true here, srv_pipe_hnd.c will take care */
4475 return true;
4478 if (DEBUGLEVEL >= 10) {
4479 NDR_PRINT_OUT_DEBUG(PNP_UnregisterNotification, r);
4482 push = ndr_push_init_ctx(r, NULL);
4483 if (push == NULL) {
4484 talloc_free(r);
4485 return false;
4488 ndr_err = call->ndr_push(push, NDR_OUT, r);
4489 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4490 talloc_free(r);
4491 return false;
4494 blob = ndr_push_blob(push);
4495 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4496 talloc_free(r);
4497 return false;
4500 talloc_free(r);
4502 return true;
4505 static bool api_PNP_GetCustomDevProp(pipes_struct *p)
4507 const struct ndr_interface_call *call;
4508 struct ndr_pull *pull;
4509 struct ndr_push *push;
4510 enum ndr_err_code ndr_err;
4511 DATA_BLOB blob;
4512 struct PNP_GetCustomDevProp *r;
4514 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCUSTOMDEVPROP];
4516 r = talloc(talloc_tos(), struct PNP_GetCustomDevProp);
4517 if (r == NULL) {
4518 return false;
4521 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4522 talloc_free(r);
4523 return false;
4526 pull = ndr_pull_init_blob(&blob, r, NULL);
4527 if (pull == NULL) {
4528 talloc_free(r);
4529 return false;
4532 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4533 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4534 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4535 talloc_free(r);
4536 return false;
4539 if (DEBUGLEVEL >= 10) {
4540 NDR_PRINT_IN_DEBUG(PNP_GetCustomDevProp, r);
4543 r->out.result = _PNP_GetCustomDevProp(p, r);
4545 if (p->rng_fault_state) {
4546 talloc_free(r);
4547 /* Return true here, srv_pipe_hnd.c will take care */
4548 return true;
4551 if (DEBUGLEVEL >= 10) {
4552 NDR_PRINT_OUT_DEBUG(PNP_GetCustomDevProp, r);
4555 push = ndr_push_init_ctx(r, NULL);
4556 if (push == NULL) {
4557 talloc_free(r);
4558 return false;
4561 ndr_err = call->ndr_push(push, NDR_OUT, r);
4562 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4563 talloc_free(r);
4564 return false;
4567 blob = ndr_push_blob(push);
4568 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4569 talloc_free(r);
4570 return false;
4573 talloc_free(r);
4575 return true;
4578 static bool api_PNP_GetVersionInternal(pipes_struct *p)
4580 const struct ndr_interface_call *call;
4581 struct ndr_pull *pull;
4582 struct ndr_push *push;
4583 enum ndr_err_code ndr_err;
4584 DATA_BLOB blob;
4585 struct PNP_GetVersionInternal *r;
4587 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETVERSIONINTERNAL];
4589 r = talloc(talloc_tos(), struct PNP_GetVersionInternal);
4590 if (r == NULL) {
4591 return false;
4594 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4595 talloc_free(r);
4596 return false;
4599 pull = ndr_pull_init_blob(&blob, r, NULL);
4600 if (pull == NULL) {
4601 talloc_free(r);
4602 return false;
4605 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4606 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4607 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4608 talloc_free(r);
4609 return false;
4612 if (DEBUGLEVEL >= 10) {
4613 NDR_PRINT_IN_DEBUG(PNP_GetVersionInternal, r);
4616 r->out.result = _PNP_GetVersionInternal(p, r);
4618 if (p->rng_fault_state) {
4619 talloc_free(r);
4620 /* Return true here, srv_pipe_hnd.c will take care */
4621 return true;
4624 if (DEBUGLEVEL >= 10) {
4625 NDR_PRINT_OUT_DEBUG(PNP_GetVersionInternal, r);
4628 push = ndr_push_init_ctx(r, NULL);
4629 if (push == NULL) {
4630 talloc_free(r);
4631 return false;
4634 ndr_err = call->ndr_push(push, NDR_OUT, r);
4635 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4636 talloc_free(r);
4637 return false;
4640 blob = ndr_push_blob(push);
4641 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4642 talloc_free(r);
4643 return false;
4646 talloc_free(r);
4648 return true;
4651 static bool api_PNP_GetBlockedDriverInfo(pipes_struct *p)
4653 const struct ndr_interface_call *call;
4654 struct ndr_pull *pull;
4655 struct ndr_push *push;
4656 enum ndr_err_code ndr_err;
4657 DATA_BLOB blob;
4658 struct PNP_GetBlockedDriverInfo *r;
4660 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETBLOCKEDDRIVERINFO];
4662 r = talloc(talloc_tos(), struct PNP_GetBlockedDriverInfo);
4663 if (r == NULL) {
4664 return false;
4667 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4668 talloc_free(r);
4669 return false;
4672 pull = ndr_pull_init_blob(&blob, r, NULL);
4673 if (pull == NULL) {
4674 talloc_free(r);
4675 return false;
4678 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4679 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4680 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4681 talloc_free(r);
4682 return false;
4685 if (DEBUGLEVEL >= 10) {
4686 NDR_PRINT_IN_DEBUG(PNP_GetBlockedDriverInfo, r);
4689 r->out.result = _PNP_GetBlockedDriverInfo(p, r);
4691 if (p->rng_fault_state) {
4692 talloc_free(r);
4693 /* Return true here, srv_pipe_hnd.c will take care */
4694 return true;
4697 if (DEBUGLEVEL >= 10) {
4698 NDR_PRINT_OUT_DEBUG(PNP_GetBlockedDriverInfo, r);
4701 push = ndr_push_init_ctx(r, NULL);
4702 if (push == NULL) {
4703 talloc_free(r);
4704 return false;
4707 ndr_err = call->ndr_push(push, NDR_OUT, r);
4708 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4709 talloc_free(r);
4710 return false;
4713 blob = ndr_push_blob(push);
4714 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4715 talloc_free(r);
4716 return false;
4719 talloc_free(r);
4721 return true;
4724 static bool api_PNP_GetServerSideDeviceInstallFlags(pipes_struct *p)
4726 const struct ndr_interface_call *call;
4727 struct ndr_pull *pull;
4728 struct ndr_push *push;
4729 enum ndr_err_code ndr_err;
4730 DATA_BLOB blob;
4731 struct PNP_GetServerSideDeviceInstallFlags *r;
4733 call = &ndr_table_ntsvcs.calls[NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS];
4735 r = talloc(talloc_tos(), struct PNP_GetServerSideDeviceInstallFlags);
4736 if (r == NULL) {
4737 return false;
4740 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4741 talloc_free(r);
4742 return false;
4745 pull = ndr_pull_init_blob(&blob, r, NULL);
4746 if (pull == NULL) {
4747 talloc_free(r);
4748 return false;
4751 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4752 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4753 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4754 talloc_free(r);
4755 return false;
4758 if (DEBUGLEVEL >= 10) {
4759 NDR_PRINT_IN_DEBUG(PNP_GetServerSideDeviceInstallFlags, r);
4762 r->out.result = _PNP_GetServerSideDeviceInstallFlags(p, r);
4764 if (p->rng_fault_state) {
4765 talloc_free(r);
4766 /* Return true here, srv_pipe_hnd.c will take care */
4767 return true;
4770 if (DEBUGLEVEL >= 10) {
4771 NDR_PRINT_OUT_DEBUG(PNP_GetServerSideDeviceInstallFlags, r);
4774 push = ndr_push_init_ctx(r, NULL);
4775 if (push == NULL) {
4776 talloc_free(r);
4777 return false;
4780 ndr_err = call->ndr_push(push, NDR_OUT, r);
4781 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4782 talloc_free(r);
4783 return false;
4786 blob = ndr_push_blob(push);
4787 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4788 talloc_free(r);
4789 return false;
4792 talloc_free(r);
4794 return true;
4798 /* Tables */
4799 static struct api_struct api_ntsvcs_cmds[] =
4801 {"PNP_DISCONNECT", NDR_PNP_DISCONNECT, api_PNP_Disconnect},
4802 {"PNP_CONNECT", NDR_PNP_CONNECT, api_PNP_Connect},
4803 {"PNP_GETVERSION", NDR_PNP_GETVERSION, api_PNP_GetVersion},
4804 {"PNP_GETGLOBALSTATE", NDR_PNP_GETGLOBALSTATE, api_PNP_GetGlobalState},
4805 {"PNP_INITDETECTION", NDR_PNP_INITDETECTION, api_PNP_InitDetection},
4806 {"PNP_REPORTLOGON", NDR_PNP_REPORTLOGON, api_PNP_ReportLogOn},
4807 {"PNP_VALIDATEDEVICEINSTANCE", NDR_PNP_VALIDATEDEVICEINSTANCE, api_PNP_ValidateDeviceInstance},
4808 {"PNP_GETROOTDEVICEINSTANCE", NDR_PNP_GETROOTDEVICEINSTANCE, api_PNP_GetRootDeviceInstance},
4809 {"PNP_GETRELATEDDEVICEINSTANCE", NDR_PNP_GETRELATEDDEVICEINSTANCE, api_PNP_GetRelatedDeviceInstance},
4810 {"PNP_ENUMERATESUBKEYS", NDR_PNP_ENUMERATESUBKEYS, api_PNP_EnumerateSubKeys},
4811 {"PNP_GETDEVICELIST", NDR_PNP_GETDEVICELIST, api_PNP_GetDeviceList},
4812 {"PNP_GETDEVICELISTSIZE", NDR_PNP_GETDEVICELISTSIZE, api_PNP_GetDeviceListSize},
4813 {"PNP_GETDEPTH", NDR_PNP_GETDEPTH, api_PNP_GetDepth},
4814 {"PNP_GETDEVICEREGPROP", NDR_PNP_GETDEVICEREGPROP, api_PNP_GetDeviceRegProp},
4815 {"PNP_SETDEVICEREGPROP", NDR_PNP_SETDEVICEREGPROP, api_PNP_SetDeviceRegProp},
4816 {"PNP_GETCLASSINSTANCE", NDR_PNP_GETCLASSINSTANCE, api_PNP_GetClassInstance},
4817 {"PNP_CREATEKEY", NDR_PNP_CREATEKEY, api_PNP_CreateKey},
4818 {"PNP_DELETEREGISTRYKEY", NDR_PNP_DELETEREGISTRYKEY, api_PNP_DeleteRegistryKey},
4819 {"PNP_GETCLASSCOUNT", NDR_PNP_GETCLASSCOUNT, api_PNP_GetClassCount},
4820 {"PNP_GETCLASSNAME", NDR_PNP_GETCLASSNAME, api_PNP_GetClassName},
4821 {"PNP_DELETECLASSKEY", NDR_PNP_DELETECLASSKEY, api_PNP_DeleteClassKey},
4822 {"PNP_GETINTERFACEDEVICEALIAS", NDR_PNP_GETINTERFACEDEVICEALIAS, api_PNP_GetInterfaceDeviceAlias},
4823 {"PNP_GETINTERFACEDEVICELIST", NDR_PNP_GETINTERFACEDEVICELIST, api_PNP_GetInterfaceDeviceList},
4824 {"PNP_GETINTERFACEDEVICELISTSIZE", NDR_PNP_GETINTERFACEDEVICELISTSIZE, api_PNP_GetInterfaceDeviceListSize},
4825 {"PNP_REGISTERDEVICECLASSASSOCIATION", NDR_PNP_REGISTERDEVICECLASSASSOCIATION, api_PNP_RegisterDeviceClassAssociation},
4826 {"PNP_UNREGISTERDEVICECLASSASSOCIATION", NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION, api_PNP_UnregisterDeviceClassAssociation},
4827 {"PNP_GETCLASSREGPROP", NDR_PNP_GETCLASSREGPROP, api_PNP_GetClassRegProp},
4828 {"PNP_SETCLASSREGPROP", NDR_PNP_SETCLASSREGPROP, api_PNP_SetClassRegProp},
4829 {"PNP_CREATEDEVINST", NDR_PNP_CREATEDEVINST, api_PNP_CreateDevInst},
4830 {"PNP_DEVICEINSTANCEACTION", NDR_PNP_DEVICEINSTANCEACTION, api_PNP_DeviceInstanceAction},
4831 {"PNP_GETDEVICESTATUS", NDR_PNP_GETDEVICESTATUS, api_PNP_GetDeviceStatus},
4832 {"PNP_SETDEVICEPROBLEM", NDR_PNP_SETDEVICEPROBLEM, api_PNP_SetDeviceProblem},
4833 {"PNP_DISABLEDEVINST", NDR_PNP_DISABLEDEVINST, api_PNP_DisableDevInst},
4834 {"PNP_UNINSTALLDEVINST", NDR_PNP_UNINSTALLDEVINST, api_PNP_UninstallDevInst},
4835 {"PNP_ADDID", NDR_PNP_ADDID, api_PNP_AddID},
4836 {"PNP_REGISTERDRIVER", NDR_PNP_REGISTERDRIVER, api_PNP_RegisterDriver},
4837 {"PNP_QUERYREMOVE", NDR_PNP_QUERYREMOVE, api_PNP_QueryRemove},
4838 {"PNP_REQUESTDEVICEEJECT", NDR_PNP_REQUESTDEVICEEJECT, api_PNP_RequestDeviceEject},
4839 {"PNP_ISDOCKSTATIONPRESENT", NDR_PNP_ISDOCKSTATIONPRESENT, api_PNP_IsDockStationPresent},
4840 {"PNP_REQUESTEJECTPC", NDR_PNP_REQUESTEJECTPC, api_PNP_RequestEjectPC},
4841 {"PNP_HWPROFFLAGS", NDR_PNP_HWPROFFLAGS, api_PNP_HwProfFlags},
4842 {"PNP_GETHWPROFINFO", NDR_PNP_GETHWPROFINFO, api_PNP_GetHwProfInfo},
4843 {"PNP_ADDEMPTYLOGCONF", NDR_PNP_ADDEMPTYLOGCONF, api_PNP_AddEmptyLogConf},
4844 {"PNP_FREELOGCONF", NDR_PNP_FREELOGCONF, api_PNP_FreeLogConf},
4845 {"PNP_GETFIRSTLOGCONF", NDR_PNP_GETFIRSTLOGCONF, api_PNP_GetFirstLogConf},
4846 {"PNP_GETNEXTLOGCONF", NDR_PNP_GETNEXTLOGCONF, api_PNP_GetNextLogConf},
4847 {"PNP_GETLOGCONFPRIORITY", NDR_PNP_GETLOGCONFPRIORITY, api_PNP_GetLogConfPriority},
4848 {"PNP_ADDRESDES", NDR_PNP_ADDRESDES, api_PNP_AddResDes},
4849 {"PNP_FREERESDES", NDR_PNP_FREERESDES, api_PNP_FreeResDes},
4850 {"PNP_GETNEXTRESDES", NDR_PNP_GETNEXTRESDES, api_PNP_GetNextResDes},
4851 {"PNP_GETRESDESDATA", NDR_PNP_GETRESDESDATA, api_PNP_GetResDesData},
4852 {"PNP_GETRESDESDATASIZE", NDR_PNP_GETRESDESDATASIZE, api_PNP_GetResDesDataSize},
4853 {"PNP_MODIFYRESDES", NDR_PNP_MODIFYRESDES, api_PNP_ModifyResDes},
4854 {"PNP_DETECTRESOURCELIMIT", NDR_PNP_DETECTRESOURCELIMIT, api_PNP_DetectResourceLimit},
4855 {"PNP_QUERYRESCONFLIST", NDR_PNP_QUERYRESCONFLIST, api_PNP_QueryResConfList},
4856 {"PNP_SETHWPROF", NDR_PNP_SETHWPROF, api_PNP_SetHwProf},
4857 {"PNP_QUERYARBITRATORFREEDATA", NDR_PNP_QUERYARBITRATORFREEDATA, api_PNP_QueryArbitratorFreeData},
4858 {"PNP_QUERYARBITRATORFREESIZE", NDR_PNP_QUERYARBITRATORFREESIZE, api_PNP_QueryArbitratorFreeSize},
4859 {"PNP_RUNDETECTION", NDR_PNP_RUNDETECTION, api_PNP_RunDetection},
4860 {"PNP_REGISTERNOTIFICATION", NDR_PNP_REGISTERNOTIFICATION, api_PNP_RegisterNotification},
4861 {"PNP_UNREGISTERNOTIFICATION", NDR_PNP_UNREGISTERNOTIFICATION, api_PNP_UnregisterNotification},
4862 {"PNP_GETCUSTOMDEVPROP", NDR_PNP_GETCUSTOMDEVPROP, api_PNP_GetCustomDevProp},
4863 {"PNP_GETVERSIONINTERNAL", NDR_PNP_GETVERSIONINTERNAL, api_PNP_GetVersionInternal},
4864 {"PNP_GETBLOCKEDDRIVERINFO", NDR_PNP_GETBLOCKEDDRIVERINFO, api_PNP_GetBlockedDriverInfo},
4865 {"PNP_GETSERVERSIDEDEVICEINSTALLFLAGS", NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS, api_PNP_GetServerSideDeviceInstallFlags},
4868 void ntsvcs_get_pipe_fns(struct api_struct **fns, int *n_fns)
4870 *fns = api_ntsvcs_cmds;
4871 *n_fns = sizeof(api_ntsvcs_cmds) / sizeof(struct api_struct);
4874 NTSTATUS rpc_ntsvcs_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *_r)
4876 if (cli->pipes_struct == NULL) {
4877 return NT_STATUS_INVALID_PARAMETER;
4880 switch (opnum)
4882 case NDR_PNP_DISCONNECT: {
4883 struct PNP_Disconnect *r = (struct PNP_Disconnect *)_r;
4884 r->out.result = _PNP_Disconnect(cli->pipes_struct, r);
4885 return NT_STATUS_OK;
4888 case NDR_PNP_CONNECT: {
4889 struct PNP_Connect *r = (struct PNP_Connect *)_r;
4890 r->out.result = _PNP_Connect(cli->pipes_struct, r);
4891 return NT_STATUS_OK;
4894 case NDR_PNP_GETVERSION: {
4895 struct PNP_GetVersion *r = (struct PNP_GetVersion *)_r;
4896 ZERO_STRUCT(r->out);
4897 r->out.version = talloc_zero(mem_ctx, uint16_t);
4898 if (r->out.version == NULL) {
4899 return NT_STATUS_NO_MEMORY;
4902 r->out.result = _PNP_GetVersion(cli->pipes_struct, r);
4903 return NT_STATUS_OK;
4906 case NDR_PNP_GETGLOBALSTATE: {
4907 struct PNP_GetGlobalState *r = (struct PNP_GetGlobalState *)_r;
4908 r->out.result = _PNP_GetGlobalState(cli->pipes_struct, r);
4909 return NT_STATUS_OK;
4912 case NDR_PNP_INITDETECTION: {
4913 struct PNP_InitDetection *r = (struct PNP_InitDetection *)_r;
4914 r->out.result = _PNP_InitDetection(cli->pipes_struct, r);
4915 return NT_STATUS_OK;
4918 case NDR_PNP_REPORTLOGON: {
4919 struct PNP_ReportLogOn *r = (struct PNP_ReportLogOn *)_r;
4920 r->out.result = _PNP_ReportLogOn(cli->pipes_struct, r);
4921 return NT_STATUS_OK;
4924 case NDR_PNP_VALIDATEDEVICEINSTANCE: {
4925 struct PNP_ValidateDeviceInstance *r = (struct PNP_ValidateDeviceInstance *)_r;
4926 r->out.result = _PNP_ValidateDeviceInstance(cli->pipes_struct, r);
4927 return NT_STATUS_OK;
4930 case NDR_PNP_GETROOTDEVICEINSTANCE: {
4931 struct PNP_GetRootDeviceInstance *r = (struct PNP_GetRootDeviceInstance *)_r;
4932 r->out.result = _PNP_GetRootDeviceInstance(cli->pipes_struct, r);
4933 return NT_STATUS_OK;
4936 case NDR_PNP_GETRELATEDDEVICEINSTANCE: {
4937 struct PNP_GetRelatedDeviceInstance *r = (struct PNP_GetRelatedDeviceInstance *)_r;
4938 r->out.result = _PNP_GetRelatedDeviceInstance(cli->pipes_struct, r);
4939 return NT_STATUS_OK;
4942 case NDR_PNP_ENUMERATESUBKEYS: {
4943 struct PNP_EnumerateSubKeys *r = (struct PNP_EnumerateSubKeys *)_r;
4944 r->out.result = _PNP_EnumerateSubKeys(cli->pipes_struct, r);
4945 return NT_STATUS_OK;
4948 case NDR_PNP_GETDEVICELIST: {
4949 struct PNP_GetDeviceList *r = (struct PNP_GetDeviceList *)_r;
4950 ZERO_STRUCT(r->out);
4951 r->out.length = r->in.length;
4952 r->out.buffer = talloc_zero_array(mem_ctx, uint16_t, *r->out.length);
4953 if (r->out.buffer == NULL) {
4954 return NT_STATUS_NO_MEMORY;
4957 r->out.result = _PNP_GetDeviceList(cli->pipes_struct, r);
4958 return NT_STATUS_OK;
4961 case NDR_PNP_GETDEVICELISTSIZE: {
4962 struct PNP_GetDeviceListSize *r = (struct PNP_GetDeviceListSize *)_r;
4963 ZERO_STRUCT(r->out);
4964 r->out.size = talloc_zero(mem_ctx, uint32_t);
4965 if (r->out.size == NULL) {
4966 return NT_STATUS_NO_MEMORY;
4969 r->out.result = _PNP_GetDeviceListSize(cli->pipes_struct, r);
4970 return NT_STATUS_OK;
4973 case NDR_PNP_GETDEPTH: {
4974 struct PNP_GetDepth *r = (struct PNP_GetDepth *)_r;
4975 r->out.result = _PNP_GetDepth(cli->pipes_struct, r);
4976 return NT_STATUS_OK;
4979 case NDR_PNP_GETDEVICEREGPROP: {
4980 struct PNP_GetDeviceRegProp *r = (struct PNP_GetDeviceRegProp *)_r;
4981 ZERO_STRUCT(r->out);
4982 r->out.reg_data_type = r->in.reg_data_type;
4983 r->out.buffer_size = r->in.buffer_size;
4984 r->out.needed = r->in.needed;
4985 r->out.buffer = talloc_zero_array(mem_ctx, uint8_t, *r->out.buffer_size);
4986 if (r->out.buffer == NULL) {
4987 return NT_STATUS_NO_MEMORY;
4990 r->out.result = _PNP_GetDeviceRegProp(cli->pipes_struct, r);
4991 return NT_STATUS_OK;
4994 case NDR_PNP_SETDEVICEREGPROP: {
4995 struct PNP_SetDeviceRegProp *r = (struct PNP_SetDeviceRegProp *)_r;
4996 r->out.result = _PNP_SetDeviceRegProp(cli->pipes_struct, r);
4997 return NT_STATUS_OK;
5000 case NDR_PNP_GETCLASSINSTANCE: {
5001 struct PNP_GetClassInstance *r = (struct PNP_GetClassInstance *)_r;
5002 r->out.result = _PNP_GetClassInstance(cli->pipes_struct, r);
5003 return NT_STATUS_OK;
5006 case NDR_PNP_CREATEKEY: {
5007 struct PNP_CreateKey *r = (struct PNP_CreateKey *)_r;
5008 r->out.result = _PNP_CreateKey(cli->pipes_struct, r);
5009 return NT_STATUS_OK;
5012 case NDR_PNP_DELETEREGISTRYKEY: {
5013 struct PNP_DeleteRegistryKey *r = (struct PNP_DeleteRegistryKey *)_r;
5014 r->out.result = _PNP_DeleteRegistryKey(cli->pipes_struct, r);
5015 return NT_STATUS_OK;
5018 case NDR_PNP_GETCLASSCOUNT: {
5019 struct PNP_GetClassCount *r = (struct PNP_GetClassCount *)_r;
5020 r->out.result = _PNP_GetClassCount(cli->pipes_struct, r);
5021 return NT_STATUS_OK;
5024 case NDR_PNP_GETCLASSNAME: {
5025 struct PNP_GetClassName *r = (struct PNP_GetClassName *)_r;
5026 r->out.result = _PNP_GetClassName(cli->pipes_struct, r);
5027 return NT_STATUS_OK;
5030 case NDR_PNP_DELETECLASSKEY: {
5031 struct PNP_DeleteClassKey *r = (struct PNP_DeleteClassKey *)_r;
5032 r->out.result = _PNP_DeleteClassKey(cli->pipes_struct, r);
5033 return NT_STATUS_OK;
5036 case NDR_PNP_GETINTERFACEDEVICEALIAS: {
5037 struct PNP_GetInterfaceDeviceAlias *r = (struct PNP_GetInterfaceDeviceAlias *)_r;
5038 r->out.result = _PNP_GetInterfaceDeviceAlias(cli->pipes_struct, r);
5039 return NT_STATUS_OK;
5042 case NDR_PNP_GETINTERFACEDEVICELIST: {
5043 struct PNP_GetInterfaceDeviceList *r = (struct PNP_GetInterfaceDeviceList *)_r;
5044 r->out.result = _PNP_GetInterfaceDeviceList(cli->pipes_struct, r);
5045 return NT_STATUS_OK;
5048 case NDR_PNP_GETINTERFACEDEVICELISTSIZE: {
5049 struct PNP_GetInterfaceDeviceListSize *r = (struct PNP_GetInterfaceDeviceListSize *)_r;
5050 r->out.result = _PNP_GetInterfaceDeviceListSize(cli->pipes_struct, r);
5051 return NT_STATUS_OK;
5054 case NDR_PNP_REGISTERDEVICECLASSASSOCIATION: {
5055 struct PNP_RegisterDeviceClassAssociation *r = (struct PNP_RegisterDeviceClassAssociation *)_r;
5056 r->out.result = _PNP_RegisterDeviceClassAssociation(cli->pipes_struct, r);
5057 return NT_STATUS_OK;
5060 case NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION: {
5061 struct PNP_UnregisterDeviceClassAssociation *r = (struct PNP_UnregisterDeviceClassAssociation *)_r;
5062 r->out.result = _PNP_UnregisterDeviceClassAssociation(cli->pipes_struct, r);
5063 return NT_STATUS_OK;
5066 case NDR_PNP_GETCLASSREGPROP: {
5067 struct PNP_GetClassRegProp *r = (struct PNP_GetClassRegProp *)_r;
5068 r->out.result = _PNP_GetClassRegProp(cli->pipes_struct, r);
5069 return NT_STATUS_OK;
5072 case NDR_PNP_SETCLASSREGPROP: {
5073 struct PNP_SetClassRegProp *r = (struct PNP_SetClassRegProp *)_r;
5074 r->out.result = _PNP_SetClassRegProp(cli->pipes_struct, r);
5075 return NT_STATUS_OK;
5078 case NDR_PNP_CREATEDEVINST: {
5079 struct PNP_CreateDevInst *r = (struct PNP_CreateDevInst *)_r;
5080 r->out.result = _PNP_CreateDevInst(cli->pipes_struct, r);
5081 return NT_STATUS_OK;
5084 case NDR_PNP_DEVICEINSTANCEACTION: {
5085 struct PNP_DeviceInstanceAction *r = (struct PNP_DeviceInstanceAction *)_r;
5086 r->out.result = _PNP_DeviceInstanceAction(cli->pipes_struct, r);
5087 return NT_STATUS_OK;
5090 case NDR_PNP_GETDEVICESTATUS: {
5091 struct PNP_GetDeviceStatus *r = (struct PNP_GetDeviceStatus *)_r;
5092 r->out.result = _PNP_GetDeviceStatus(cli->pipes_struct, r);
5093 return NT_STATUS_OK;
5096 case NDR_PNP_SETDEVICEPROBLEM: {
5097 struct PNP_SetDeviceProblem *r = (struct PNP_SetDeviceProblem *)_r;
5098 r->out.result = _PNP_SetDeviceProblem(cli->pipes_struct, r);
5099 return NT_STATUS_OK;
5102 case NDR_PNP_DISABLEDEVINST: {
5103 struct PNP_DisableDevInst *r = (struct PNP_DisableDevInst *)_r;
5104 r->out.result = _PNP_DisableDevInst(cli->pipes_struct, r);
5105 return NT_STATUS_OK;
5108 case NDR_PNP_UNINSTALLDEVINST: {
5109 struct PNP_UninstallDevInst *r = (struct PNP_UninstallDevInst *)_r;
5110 r->out.result = _PNP_UninstallDevInst(cli->pipes_struct, r);
5111 return NT_STATUS_OK;
5114 case NDR_PNP_ADDID: {
5115 struct PNP_AddID *r = (struct PNP_AddID *)_r;
5116 r->out.result = _PNP_AddID(cli->pipes_struct, r);
5117 return NT_STATUS_OK;
5120 case NDR_PNP_REGISTERDRIVER: {
5121 struct PNP_RegisterDriver *r = (struct PNP_RegisterDriver *)_r;
5122 r->out.result = _PNP_RegisterDriver(cli->pipes_struct, r);
5123 return NT_STATUS_OK;
5126 case NDR_PNP_QUERYREMOVE: {
5127 struct PNP_QueryRemove *r = (struct PNP_QueryRemove *)_r;
5128 r->out.result = _PNP_QueryRemove(cli->pipes_struct, r);
5129 return NT_STATUS_OK;
5132 case NDR_PNP_REQUESTDEVICEEJECT: {
5133 struct PNP_RequestDeviceEject *r = (struct PNP_RequestDeviceEject *)_r;
5134 r->out.result = _PNP_RequestDeviceEject(cli->pipes_struct, r);
5135 return NT_STATUS_OK;
5138 case NDR_PNP_ISDOCKSTATIONPRESENT: {
5139 struct PNP_IsDockStationPresent *r = (struct PNP_IsDockStationPresent *)_r;
5140 r->out.result = _PNP_IsDockStationPresent(cli->pipes_struct, r);
5141 return NT_STATUS_OK;
5144 case NDR_PNP_REQUESTEJECTPC: {
5145 struct PNP_RequestEjectPC *r = (struct PNP_RequestEjectPC *)_r;
5146 r->out.result = _PNP_RequestEjectPC(cli->pipes_struct, r);
5147 return NT_STATUS_OK;
5150 case NDR_PNP_HWPROFFLAGS: {
5151 struct PNP_HwProfFlags *r = (struct PNP_HwProfFlags *)_r;
5152 ZERO_STRUCT(r->out);
5153 r->out.profile_flags = r->in.profile_flags;
5154 r->out.veto_type = r->in.veto_type;
5155 r->out.unknown5a = talloc_zero(mem_ctx, const char *);
5156 if (r->out.unknown5a == NULL) {
5157 return NT_STATUS_NO_MEMORY;
5160 r->out.result = _PNP_HwProfFlags(cli->pipes_struct, r);
5161 return NT_STATUS_OK;
5164 case NDR_PNP_GETHWPROFINFO: {
5165 struct PNP_GetHwProfInfo *r = (struct PNP_GetHwProfInfo *)_r;
5166 ZERO_STRUCT(r->out);
5167 r->out.info = r->in.info;
5168 r->out.result = _PNP_GetHwProfInfo(cli->pipes_struct, r);
5169 return NT_STATUS_OK;
5172 case NDR_PNP_ADDEMPTYLOGCONF: {
5173 struct PNP_AddEmptyLogConf *r = (struct PNP_AddEmptyLogConf *)_r;
5174 r->out.result = _PNP_AddEmptyLogConf(cli->pipes_struct, r);
5175 return NT_STATUS_OK;
5178 case NDR_PNP_FREELOGCONF: {
5179 struct PNP_FreeLogConf *r = (struct PNP_FreeLogConf *)_r;
5180 r->out.result = _PNP_FreeLogConf(cli->pipes_struct, r);
5181 return NT_STATUS_OK;
5184 case NDR_PNP_GETFIRSTLOGCONF: {
5185 struct PNP_GetFirstLogConf *r = (struct PNP_GetFirstLogConf *)_r;
5186 r->out.result = _PNP_GetFirstLogConf(cli->pipes_struct, r);
5187 return NT_STATUS_OK;
5190 case NDR_PNP_GETNEXTLOGCONF: {
5191 struct PNP_GetNextLogConf *r = (struct PNP_GetNextLogConf *)_r;
5192 r->out.result = _PNP_GetNextLogConf(cli->pipes_struct, r);
5193 return NT_STATUS_OK;
5196 case NDR_PNP_GETLOGCONFPRIORITY: {
5197 struct PNP_GetLogConfPriority *r = (struct PNP_GetLogConfPriority *)_r;
5198 r->out.result = _PNP_GetLogConfPriority(cli->pipes_struct, r);
5199 return NT_STATUS_OK;
5202 case NDR_PNP_ADDRESDES: {
5203 struct PNP_AddResDes *r = (struct PNP_AddResDes *)_r;
5204 r->out.result = _PNP_AddResDes(cli->pipes_struct, r);
5205 return NT_STATUS_OK;
5208 case NDR_PNP_FREERESDES: {
5209 struct PNP_FreeResDes *r = (struct PNP_FreeResDes *)_r;
5210 r->out.result = _PNP_FreeResDes(cli->pipes_struct, r);
5211 return NT_STATUS_OK;
5214 case NDR_PNP_GETNEXTRESDES: {
5215 struct PNP_GetNextResDes *r = (struct PNP_GetNextResDes *)_r;
5216 r->out.result = _PNP_GetNextResDes(cli->pipes_struct, r);
5217 return NT_STATUS_OK;
5220 case NDR_PNP_GETRESDESDATA: {
5221 struct PNP_GetResDesData *r = (struct PNP_GetResDesData *)_r;
5222 r->out.result = _PNP_GetResDesData(cli->pipes_struct, r);
5223 return NT_STATUS_OK;
5226 case NDR_PNP_GETRESDESDATASIZE: {
5227 struct PNP_GetResDesDataSize *r = (struct PNP_GetResDesDataSize *)_r;
5228 r->out.result = _PNP_GetResDesDataSize(cli->pipes_struct, r);
5229 return NT_STATUS_OK;
5232 case NDR_PNP_MODIFYRESDES: {
5233 struct PNP_ModifyResDes *r = (struct PNP_ModifyResDes *)_r;
5234 r->out.result = _PNP_ModifyResDes(cli->pipes_struct, r);
5235 return NT_STATUS_OK;
5238 case NDR_PNP_DETECTRESOURCELIMIT: {
5239 struct PNP_DetectResourceLimit *r = (struct PNP_DetectResourceLimit *)_r;
5240 r->out.result = _PNP_DetectResourceLimit(cli->pipes_struct, r);
5241 return NT_STATUS_OK;
5244 case NDR_PNP_QUERYRESCONFLIST: {
5245 struct PNP_QueryResConfList *r = (struct PNP_QueryResConfList *)_r;
5246 r->out.result = _PNP_QueryResConfList(cli->pipes_struct, r);
5247 return NT_STATUS_OK;
5250 case NDR_PNP_SETHWPROF: {
5251 struct PNP_SetHwProf *r = (struct PNP_SetHwProf *)_r;
5252 r->out.result = _PNP_SetHwProf(cli->pipes_struct, r);
5253 return NT_STATUS_OK;
5256 case NDR_PNP_QUERYARBITRATORFREEDATA: {
5257 struct PNP_QueryArbitratorFreeData *r = (struct PNP_QueryArbitratorFreeData *)_r;
5258 r->out.result = _PNP_QueryArbitratorFreeData(cli->pipes_struct, r);
5259 return NT_STATUS_OK;
5262 case NDR_PNP_QUERYARBITRATORFREESIZE: {
5263 struct PNP_QueryArbitratorFreeSize *r = (struct PNP_QueryArbitratorFreeSize *)_r;
5264 r->out.result = _PNP_QueryArbitratorFreeSize(cli->pipes_struct, r);
5265 return NT_STATUS_OK;
5268 case NDR_PNP_RUNDETECTION: {
5269 struct PNP_RunDetection *r = (struct PNP_RunDetection *)_r;
5270 r->out.result = _PNP_RunDetection(cli->pipes_struct, r);
5271 return NT_STATUS_OK;
5274 case NDR_PNP_REGISTERNOTIFICATION: {
5275 struct PNP_RegisterNotification *r = (struct PNP_RegisterNotification *)_r;
5276 r->out.result = _PNP_RegisterNotification(cli->pipes_struct, r);
5277 return NT_STATUS_OK;
5280 case NDR_PNP_UNREGISTERNOTIFICATION: {
5281 struct PNP_UnregisterNotification *r = (struct PNP_UnregisterNotification *)_r;
5282 r->out.result = _PNP_UnregisterNotification(cli->pipes_struct, r);
5283 return NT_STATUS_OK;
5286 case NDR_PNP_GETCUSTOMDEVPROP: {
5287 struct PNP_GetCustomDevProp *r = (struct PNP_GetCustomDevProp *)_r;
5288 r->out.result = _PNP_GetCustomDevProp(cli->pipes_struct, r);
5289 return NT_STATUS_OK;
5292 case NDR_PNP_GETVERSIONINTERNAL: {
5293 struct PNP_GetVersionInternal *r = (struct PNP_GetVersionInternal *)_r;
5294 r->out.result = _PNP_GetVersionInternal(cli->pipes_struct, r);
5295 return NT_STATUS_OK;
5298 case NDR_PNP_GETBLOCKEDDRIVERINFO: {
5299 struct PNP_GetBlockedDriverInfo *r = (struct PNP_GetBlockedDriverInfo *)_r;
5300 r->out.result = _PNP_GetBlockedDriverInfo(cli->pipes_struct, r);
5301 return NT_STATUS_OK;
5304 case NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS: {
5305 struct PNP_GetServerSideDeviceInstallFlags *r = (struct PNP_GetServerSideDeviceInstallFlags *)_r;
5306 r->out.result = _PNP_GetServerSideDeviceInstallFlags(cli->pipes_struct, r);
5307 return NT_STATUS_OK;
5310 default:
5311 return NT_STATUS_NOT_IMPLEMENTED;
5315 NTSTATUS rpc_ntsvcs_init(void)
5317 return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "ntsvcs", "ntsvcs", &ndr_table_ntsvcs, api_ntsvcs_cmds, sizeof(api_ntsvcs_cmds) / sizeof(struct api_struct));