2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/srv_eventlog.h"
9 static bool api_eventlog_ClearEventLogW(pipes_struct
*p
)
11 const struct ndr_interface_call
*call
;
12 struct ndr_pull
*pull
;
13 struct ndr_push
*push
;
14 enum ndr_err_code ndr_err
;
16 struct eventlog_ClearEventLogW
*r
;
18 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_CLEAREVENTLOGW
];
20 r
= talloc(talloc_tos(), struct eventlog_ClearEventLogW
);
25 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
30 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
36 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
37 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
38 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
43 if (DEBUGLEVEL
>= 10) {
44 NDR_PRINT_IN_DEBUG(eventlog_ClearEventLogW
, r
);
47 r
->out
.result
= _eventlog_ClearEventLogW(p
, r
);
49 if (p
->rng_fault_state
) {
51 /* Return true here, srv_pipe_hnd.c will take care */
55 if (DEBUGLEVEL
>= 10) {
56 NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogW
, r
);
59 push
= ndr_push_init_ctx(r
, NULL
);
65 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
66 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
71 blob
= ndr_push_blob(push
);
72 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
82 static bool api_eventlog_BackupEventLogW(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
;
89 struct eventlog_BackupEventLogW
*r
;
91 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_BACKUPEVENTLOGW
];
93 r
= talloc(talloc_tos(), struct eventlog_BackupEventLogW
);
98 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
103 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
116 if (DEBUGLEVEL
>= 10) {
117 NDR_PRINT_IN_DEBUG(eventlog_BackupEventLogW
, r
);
120 r
->out
.result
= _eventlog_BackupEventLogW(p
, r
);
122 if (p
->rng_fault_state
) {
124 /* Return true here, srv_pipe_hnd.c will take care */
128 if (DEBUGLEVEL
>= 10) {
129 NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogW
, r
);
132 push
= ndr_push_init_ctx(r
, NULL
);
138 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
139 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
144 blob
= ndr_push_blob(push
);
145 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
155 static bool api_eventlog_CloseEventLog(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
;
162 struct eventlog_CloseEventLog
*r
;
164 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_CLOSEEVENTLOG
];
166 r
= talloc(talloc_tos(), struct eventlog_CloseEventLog
);
171 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
176 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
189 if (DEBUGLEVEL
>= 10) {
190 NDR_PRINT_IN_DEBUG(eventlog_CloseEventLog
, r
);
194 r
->out
.handle
= r
->in
.handle
;
195 r
->out
.result
= _eventlog_CloseEventLog(p
, r
);
197 if (p
->rng_fault_state
) {
199 /* Return true here, srv_pipe_hnd.c will take care */
203 if (DEBUGLEVEL
>= 10) {
204 NDR_PRINT_OUT_DEBUG(eventlog_CloseEventLog
, r
);
207 push
= ndr_push_init_ctx(r
, NULL
);
213 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
214 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
219 blob
= ndr_push_blob(push
);
220 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
230 static bool api_eventlog_DeregisterEventSource(pipes_struct
*p
)
232 const struct ndr_interface_call
*call
;
233 struct ndr_pull
*pull
;
234 struct ndr_push
*push
;
235 enum ndr_err_code ndr_err
;
237 struct eventlog_DeregisterEventSource
*r
;
239 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_DEREGISTEREVENTSOURCE
];
241 r
= talloc(talloc_tos(), struct eventlog_DeregisterEventSource
);
246 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
251 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
257 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
258 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
259 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
264 if (DEBUGLEVEL
>= 10) {
265 NDR_PRINT_IN_DEBUG(eventlog_DeregisterEventSource
, r
);
269 r
->out
.handle
= r
->in
.handle
;
270 r
->out
.result
= _eventlog_DeregisterEventSource(p
, r
);
272 if (p
->rng_fault_state
) {
274 /* Return true here, srv_pipe_hnd.c will take care */
278 if (DEBUGLEVEL
>= 10) {
279 NDR_PRINT_OUT_DEBUG(eventlog_DeregisterEventSource
, r
);
282 push
= ndr_push_init_ctx(r
, NULL
);
288 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
289 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
294 blob
= ndr_push_blob(push
);
295 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
305 static bool api_eventlog_GetNumRecords(pipes_struct
*p
)
307 const struct ndr_interface_call
*call
;
308 struct ndr_pull
*pull
;
309 struct ndr_push
*push
;
310 enum ndr_err_code ndr_err
;
312 struct eventlog_GetNumRecords
*r
;
314 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_GETNUMRECORDS
];
316 r
= talloc(talloc_tos(), struct eventlog_GetNumRecords
);
321 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
326 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
332 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
333 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
334 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
339 if (DEBUGLEVEL
>= 10) {
340 NDR_PRINT_IN_DEBUG(eventlog_GetNumRecords
, r
);
344 r
->out
.number
= talloc_zero(r
, uint32_t);
345 if (r
->out
.number
== NULL
) {
350 r
->out
.result
= _eventlog_GetNumRecords(p
, r
);
352 if (p
->rng_fault_state
) {
354 /* Return true here, srv_pipe_hnd.c will take care */
358 if (DEBUGLEVEL
>= 10) {
359 NDR_PRINT_OUT_DEBUG(eventlog_GetNumRecords
, r
);
362 push
= ndr_push_init_ctx(r
, NULL
);
368 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
369 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
374 blob
= ndr_push_blob(push
);
375 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
385 static bool api_eventlog_GetOldestRecord(pipes_struct
*p
)
387 const struct ndr_interface_call
*call
;
388 struct ndr_pull
*pull
;
389 struct ndr_push
*push
;
390 enum ndr_err_code ndr_err
;
392 struct eventlog_GetOldestRecord
*r
;
394 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_GETOLDESTRECORD
];
396 r
= talloc(talloc_tos(), struct eventlog_GetOldestRecord
);
401 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
406 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
412 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
413 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
414 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
419 if (DEBUGLEVEL
>= 10) {
420 NDR_PRINT_IN_DEBUG(eventlog_GetOldestRecord
, r
);
424 r
->out
.oldest_entry
= talloc_zero(r
, uint32_t);
425 if (r
->out
.oldest_entry
== NULL
) {
430 r
->out
.result
= _eventlog_GetOldestRecord(p
, r
);
432 if (p
->rng_fault_state
) {
434 /* Return true here, srv_pipe_hnd.c will take care */
438 if (DEBUGLEVEL
>= 10) {
439 NDR_PRINT_OUT_DEBUG(eventlog_GetOldestRecord
, r
);
442 push
= ndr_push_init_ctx(r
, NULL
);
448 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
449 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
454 blob
= ndr_push_blob(push
);
455 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
465 static bool api_eventlog_ChangeNotify(pipes_struct
*p
)
467 const struct ndr_interface_call
*call
;
468 struct ndr_pull
*pull
;
469 struct ndr_push
*push
;
470 enum ndr_err_code ndr_err
;
472 struct eventlog_ChangeNotify
*r
;
474 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_CHANGENOTIFY
];
476 r
= talloc(talloc_tos(), struct eventlog_ChangeNotify
);
481 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
486 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
492 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
493 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
494 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
499 if (DEBUGLEVEL
>= 10) {
500 NDR_PRINT_IN_DEBUG(eventlog_ChangeNotify
, r
);
503 r
->out
.result
= _eventlog_ChangeNotify(p
, r
);
505 if (p
->rng_fault_state
) {
507 /* Return true here, srv_pipe_hnd.c will take care */
511 if (DEBUGLEVEL
>= 10) {
512 NDR_PRINT_OUT_DEBUG(eventlog_ChangeNotify
, r
);
515 push
= ndr_push_init_ctx(r
, NULL
);
521 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
522 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
527 blob
= ndr_push_blob(push
);
528 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
538 static bool api_eventlog_OpenEventLogW(pipes_struct
*p
)
540 const struct ndr_interface_call
*call
;
541 struct ndr_pull
*pull
;
542 struct ndr_push
*push
;
543 enum ndr_err_code ndr_err
;
545 struct eventlog_OpenEventLogW
*r
;
547 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_OPENEVENTLOGW
];
549 r
= talloc(talloc_tos(), struct eventlog_OpenEventLogW
);
554 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
559 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
565 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
566 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
567 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
572 if (DEBUGLEVEL
>= 10) {
573 NDR_PRINT_IN_DEBUG(eventlog_OpenEventLogW
, r
);
577 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
578 if (r
->out
.handle
== NULL
) {
583 r
->out
.result
= _eventlog_OpenEventLogW(p
, r
);
585 if (p
->rng_fault_state
) {
587 /* Return true here, srv_pipe_hnd.c will take care */
591 if (DEBUGLEVEL
>= 10) {
592 NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogW
, r
);
595 push
= ndr_push_init_ctx(r
, NULL
);
601 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
602 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
607 blob
= ndr_push_blob(push
);
608 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
618 static bool api_eventlog_RegisterEventSourceW(pipes_struct
*p
)
620 const struct ndr_interface_call
*call
;
621 struct ndr_pull
*pull
;
622 struct ndr_push
*push
;
623 enum ndr_err_code ndr_err
;
625 struct eventlog_RegisterEventSourceW
*r
;
627 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_REGISTEREVENTSOURCEW
];
629 r
= talloc(talloc_tos(), struct eventlog_RegisterEventSourceW
);
634 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
639 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
645 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
646 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
647 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
652 if (DEBUGLEVEL
>= 10) {
653 NDR_PRINT_IN_DEBUG(eventlog_RegisterEventSourceW
, r
);
657 r
->out
.log_handle
= talloc_zero(r
, struct policy_handle
);
658 if (r
->out
.log_handle
== NULL
) {
663 r
->out
.result
= _eventlog_RegisterEventSourceW(p
, r
);
665 if (p
->rng_fault_state
) {
667 /* Return true here, srv_pipe_hnd.c will take care */
671 if (DEBUGLEVEL
>= 10) {
672 NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceW
, r
);
675 push
= ndr_push_init_ctx(r
, NULL
);
681 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
682 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
687 blob
= ndr_push_blob(push
);
688 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
698 static bool api_eventlog_OpenBackupEventLogW(pipes_struct
*p
)
700 const struct ndr_interface_call
*call
;
701 struct ndr_pull
*pull
;
702 struct ndr_push
*push
;
703 enum ndr_err_code ndr_err
;
705 struct eventlog_OpenBackupEventLogW
*r
;
707 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_OPENBACKUPEVENTLOGW
];
709 r
= talloc(talloc_tos(), struct eventlog_OpenBackupEventLogW
);
714 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
719 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
725 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
726 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
727 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
732 if (DEBUGLEVEL
>= 10) {
733 NDR_PRINT_IN_DEBUG(eventlog_OpenBackupEventLogW
, r
);
737 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
738 if (r
->out
.handle
== NULL
) {
743 r
->out
.result
= _eventlog_OpenBackupEventLogW(p
, r
);
745 if (p
->rng_fault_state
) {
747 /* Return true here, srv_pipe_hnd.c will take care */
751 if (DEBUGLEVEL
>= 10) {
752 NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogW
, r
);
755 push
= ndr_push_init_ctx(r
, NULL
);
761 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
762 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
767 blob
= ndr_push_blob(push
);
768 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
778 static bool api_eventlog_ReadEventLogW(pipes_struct
*p
)
780 const struct ndr_interface_call
*call
;
781 struct ndr_pull
*pull
;
782 struct ndr_push
*push
;
783 enum ndr_err_code ndr_err
;
785 struct eventlog_ReadEventLogW
*r
;
787 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_READEVENTLOGW
];
789 r
= talloc(talloc_tos(), struct eventlog_ReadEventLogW
);
794 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
799 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
805 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
806 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
807 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
812 if (DEBUGLEVEL
>= 10) {
813 NDR_PRINT_IN_DEBUG(eventlog_ReadEventLogW
, r
);
817 r
->out
.data
= talloc_zero_array(r
, uint8_t, r
->in
.number_of_bytes
);
818 if (r
->out
.data
== NULL
) {
823 r
->out
.sent_size
= talloc_zero(r
, uint32_t);
824 if (r
->out
.sent_size
== NULL
) {
829 r
->out
.real_size
= talloc_zero(r
, uint32_t);
830 if (r
->out
.real_size
== NULL
) {
835 r
->out
.result
= _eventlog_ReadEventLogW(p
, r
);
837 if (p
->rng_fault_state
) {
839 /* Return true here, srv_pipe_hnd.c will take care */
843 if (DEBUGLEVEL
>= 10) {
844 NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogW
, r
);
847 push
= ndr_push_init_ctx(r
, NULL
);
853 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
854 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
859 blob
= ndr_push_blob(push
);
860 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
870 static bool api_eventlog_ReportEventW(pipes_struct
*p
)
872 const struct ndr_interface_call
*call
;
873 struct ndr_pull
*pull
;
874 struct ndr_push
*push
;
875 enum ndr_err_code ndr_err
;
877 struct eventlog_ReportEventW
*r
;
879 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_REPORTEVENTW
];
881 r
= talloc(talloc_tos(), struct eventlog_ReportEventW
);
886 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
891 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
897 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
898 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
899 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
904 if (DEBUGLEVEL
>= 10) {
905 NDR_PRINT_IN_DEBUG(eventlog_ReportEventW
, r
);
909 r
->out
.record_number
= r
->in
.record_number
;
910 r
->out
.time_written
= r
->in
.time_written
;
911 r
->out
.result
= _eventlog_ReportEventW(p
, r
);
913 if (p
->rng_fault_state
) {
915 /* Return true here, srv_pipe_hnd.c will take care */
919 if (DEBUGLEVEL
>= 10) {
920 NDR_PRINT_OUT_DEBUG(eventlog_ReportEventW
, r
);
923 push
= ndr_push_init_ctx(r
, NULL
);
929 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
930 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
935 blob
= ndr_push_blob(push
);
936 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
946 static bool api_eventlog_ClearEventLogA(pipes_struct
*p
)
948 const struct ndr_interface_call
*call
;
949 struct ndr_pull
*pull
;
950 struct ndr_push
*push
;
951 enum ndr_err_code ndr_err
;
953 struct eventlog_ClearEventLogA
*r
;
955 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_CLEAREVENTLOGA
];
957 r
= talloc(talloc_tos(), struct eventlog_ClearEventLogA
);
962 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
967 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
973 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
974 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
975 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
980 if (DEBUGLEVEL
>= 10) {
981 NDR_PRINT_IN_DEBUG(eventlog_ClearEventLogA
, r
);
984 r
->out
.result
= _eventlog_ClearEventLogA(p
, r
);
986 if (p
->rng_fault_state
) {
988 /* Return true here, srv_pipe_hnd.c will take care */
992 if (DEBUGLEVEL
>= 10) {
993 NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogA
, r
);
996 push
= ndr_push_init_ctx(r
, NULL
);
1002 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1003 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1008 blob
= ndr_push_blob(push
);
1009 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1019 static bool api_eventlog_BackupEventLogA(pipes_struct
*p
)
1021 const struct ndr_interface_call
*call
;
1022 struct ndr_pull
*pull
;
1023 struct ndr_push
*push
;
1024 enum ndr_err_code ndr_err
;
1026 struct eventlog_BackupEventLogA
*r
;
1028 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_BACKUPEVENTLOGA
];
1030 r
= talloc(talloc_tos(), struct eventlog_BackupEventLogA
);
1035 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1040 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1046 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1047 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1048 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1053 if (DEBUGLEVEL
>= 10) {
1054 NDR_PRINT_IN_DEBUG(eventlog_BackupEventLogA
, r
);
1057 r
->out
.result
= _eventlog_BackupEventLogA(p
, r
);
1059 if (p
->rng_fault_state
) {
1061 /* Return true here, srv_pipe_hnd.c will take care */
1065 if (DEBUGLEVEL
>= 10) {
1066 NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogA
, r
);
1069 push
= ndr_push_init_ctx(r
, NULL
);
1075 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1076 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1081 blob
= ndr_push_blob(push
);
1082 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1092 static bool api_eventlog_OpenEventLogA(pipes_struct
*p
)
1094 const struct ndr_interface_call
*call
;
1095 struct ndr_pull
*pull
;
1096 struct ndr_push
*push
;
1097 enum ndr_err_code ndr_err
;
1099 struct eventlog_OpenEventLogA
*r
;
1101 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_OPENEVENTLOGA
];
1103 r
= talloc(talloc_tos(), struct eventlog_OpenEventLogA
);
1108 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1113 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1119 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1120 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1121 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1126 if (DEBUGLEVEL
>= 10) {
1127 NDR_PRINT_IN_DEBUG(eventlog_OpenEventLogA
, r
);
1130 r
->out
.result
= _eventlog_OpenEventLogA(p
, r
);
1132 if (p
->rng_fault_state
) {
1134 /* Return true here, srv_pipe_hnd.c will take care */
1138 if (DEBUGLEVEL
>= 10) {
1139 NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogA
, r
);
1142 push
= ndr_push_init_ctx(r
, NULL
);
1148 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1149 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1154 blob
= ndr_push_blob(push
);
1155 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1165 static bool api_eventlog_RegisterEventSourceA(pipes_struct
*p
)
1167 const struct ndr_interface_call
*call
;
1168 struct ndr_pull
*pull
;
1169 struct ndr_push
*push
;
1170 enum ndr_err_code ndr_err
;
1172 struct eventlog_RegisterEventSourceA
*r
;
1174 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_REGISTEREVENTSOURCEA
];
1176 r
= talloc(talloc_tos(), struct eventlog_RegisterEventSourceA
);
1181 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1186 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1192 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1193 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1194 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1199 if (DEBUGLEVEL
>= 10) {
1200 NDR_PRINT_IN_DEBUG(eventlog_RegisterEventSourceA
, r
);
1203 r
->out
.result
= _eventlog_RegisterEventSourceA(p
, r
);
1205 if (p
->rng_fault_state
) {
1207 /* Return true here, srv_pipe_hnd.c will take care */
1211 if (DEBUGLEVEL
>= 10) {
1212 NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceA
, r
);
1215 push
= ndr_push_init_ctx(r
, NULL
);
1221 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1222 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1227 blob
= ndr_push_blob(push
);
1228 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1238 static bool api_eventlog_OpenBackupEventLogA(pipes_struct
*p
)
1240 const struct ndr_interface_call
*call
;
1241 struct ndr_pull
*pull
;
1242 struct ndr_push
*push
;
1243 enum ndr_err_code ndr_err
;
1245 struct eventlog_OpenBackupEventLogA
*r
;
1247 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_OPENBACKUPEVENTLOGA
];
1249 r
= talloc(talloc_tos(), struct eventlog_OpenBackupEventLogA
);
1254 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1259 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1265 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1266 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1267 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1272 if (DEBUGLEVEL
>= 10) {
1273 NDR_PRINT_IN_DEBUG(eventlog_OpenBackupEventLogA
, r
);
1276 r
->out
.result
= _eventlog_OpenBackupEventLogA(p
, r
);
1278 if (p
->rng_fault_state
) {
1280 /* Return true here, srv_pipe_hnd.c will take care */
1284 if (DEBUGLEVEL
>= 10) {
1285 NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogA
, r
);
1288 push
= ndr_push_init_ctx(r
, NULL
);
1294 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1295 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1300 blob
= ndr_push_blob(push
);
1301 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1311 static bool api_eventlog_ReadEventLogA(pipes_struct
*p
)
1313 const struct ndr_interface_call
*call
;
1314 struct ndr_pull
*pull
;
1315 struct ndr_push
*push
;
1316 enum ndr_err_code ndr_err
;
1318 struct eventlog_ReadEventLogA
*r
;
1320 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_READEVENTLOGA
];
1322 r
= talloc(talloc_tos(), struct eventlog_ReadEventLogA
);
1327 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1332 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1338 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1339 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1340 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1345 if (DEBUGLEVEL
>= 10) {
1346 NDR_PRINT_IN_DEBUG(eventlog_ReadEventLogA
, r
);
1349 r
->out
.result
= _eventlog_ReadEventLogA(p
, r
);
1351 if (p
->rng_fault_state
) {
1353 /* Return true here, srv_pipe_hnd.c will take care */
1357 if (DEBUGLEVEL
>= 10) {
1358 NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogA
, r
);
1361 push
= ndr_push_init_ctx(r
, NULL
);
1367 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1368 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1373 blob
= ndr_push_blob(push
);
1374 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1384 static bool api_eventlog_ReportEventA(pipes_struct
*p
)
1386 const struct ndr_interface_call
*call
;
1387 struct ndr_pull
*pull
;
1388 struct ndr_push
*push
;
1389 enum ndr_err_code ndr_err
;
1391 struct eventlog_ReportEventA
*r
;
1393 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_REPORTEVENTA
];
1395 r
= talloc(talloc_tos(), struct eventlog_ReportEventA
);
1400 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1405 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1411 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1412 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1413 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1418 if (DEBUGLEVEL
>= 10) {
1419 NDR_PRINT_IN_DEBUG(eventlog_ReportEventA
, r
);
1422 r
->out
.result
= _eventlog_ReportEventA(p
, r
);
1424 if (p
->rng_fault_state
) {
1426 /* Return true here, srv_pipe_hnd.c will take care */
1430 if (DEBUGLEVEL
>= 10) {
1431 NDR_PRINT_OUT_DEBUG(eventlog_ReportEventA
, r
);
1434 push
= ndr_push_init_ctx(r
, NULL
);
1440 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1441 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1446 blob
= ndr_push_blob(push
);
1447 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1457 static bool api_eventlog_RegisterClusterSvc(pipes_struct
*p
)
1459 const struct ndr_interface_call
*call
;
1460 struct ndr_pull
*pull
;
1461 struct ndr_push
*push
;
1462 enum ndr_err_code ndr_err
;
1464 struct eventlog_RegisterClusterSvc
*r
;
1466 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_REGISTERCLUSTERSVC
];
1468 r
= talloc(talloc_tos(), struct eventlog_RegisterClusterSvc
);
1473 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1478 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1484 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1485 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1486 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1491 if (DEBUGLEVEL
>= 10) {
1492 NDR_PRINT_IN_DEBUG(eventlog_RegisterClusterSvc
, r
);
1495 r
->out
.result
= _eventlog_RegisterClusterSvc(p
, r
);
1497 if (p
->rng_fault_state
) {
1499 /* Return true here, srv_pipe_hnd.c will take care */
1503 if (DEBUGLEVEL
>= 10) {
1504 NDR_PRINT_OUT_DEBUG(eventlog_RegisterClusterSvc
, r
);
1507 push
= ndr_push_init_ctx(r
, NULL
);
1513 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1514 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1519 blob
= ndr_push_blob(push
);
1520 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1530 static bool api_eventlog_DeregisterClusterSvc(pipes_struct
*p
)
1532 const struct ndr_interface_call
*call
;
1533 struct ndr_pull
*pull
;
1534 struct ndr_push
*push
;
1535 enum ndr_err_code ndr_err
;
1537 struct eventlog_DeregisterClusterSvc
*r
;
1539 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_DEREGISTERCLUSTERSVC
];
1541 r
= talloc(talloc_tos(), struct eventlog_DeregisterClusterSvc
);
1546 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1551 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1557 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1558 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1559 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1564 if (DEBUGLEVEL
>= 10) {
1565 NDR_PRINT_IN_DEBUG(eventlog_DeregisterClusterSvc
, r
);
1568 r
->out
.result
= _eventlog_DeregisterClusterSvc(p
, r
);
1570 if (p
->rng_fault_state
) {
1572 /* Return true here, srv_pipe_hnd.c will take care */
1576 if (DEBUGLEVEL
>= 10) {
1577 NDR_PRINT_OUT_DEBUG(eventlog_DeregisterClusterSvc
, r
);
1580 push
= ndr_push_init_ctx(r
, NULL
);
1586 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1587 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1592 blob
= ndr_push_blob(push
);
1593 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1603 static bool api_eventlog_WriteClusterEvents(pipes_struct
*p
)
1605 const struct ndr_interface_call
*call
;
1606 struct ndr_pull
*pull
;
1607 struct ndr_push
*push
;
1608 enum ndr_err_code ndr_err
;
1610 struct eventlog_WriteClusterEvents
*r
;
1612 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_WRITECLUSTEREVENTS
];
1614 r
= talloc(talloc_tos(), struct eventlog_WriteClusterEvents
);
1619 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1624 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1630 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1631 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1632 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1637 if (DEBUGLEVEL
>= 10) {
1638 NDR_PRINT_IN_DEBUG(eventlog_WriteClusterEvents
, r
);
1641 r
->out
.result
= _eventlog_WriteClusterEvents(p
, r
);
1643 if (p
->rng_fault_state
) {
1645 /* Return true here, srv_pipe_hnd.c will take care */
1649 if (DEBUGLEVEL
>= 10) {
1650 NDR_PRINT_OUT_DEBUG(eventlog_WriteClusterEvents
, r
);
1653 push
= ndr_push_init_ctx(r
, NULL
);
1659 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1660 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1665 blob
= ndr_push_blob(push
);
1666 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1676 static bool api_eventlog_GetLogInformation(pipes_struct
*p
)
1678 const struct ndr_interface_call
*call
;
1679 struct ndr_pull
*pull
;
1680 struct ndr_push
*push
;
1681 enum ndr_err_code ndr_err
;
1683 struct eventlog_GetLogInformation
*r
;
1685 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_GETLOGINFORMATION
];
1687 r
= talloc(talloc_tos(), struct eventlog_GetLogInformation
);
1692 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1697 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1703 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1704 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1705 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1710 if (DEBUGLEVEL
>= 10) {
1711 NDR_PRINT_IN_DEBUG(eventlog_GetLogInformation
, r
);
1714 ZERO_STRUCT(r
->out
);
1715 r
->out
.buffer
= talloc_zero_array(r
, uint8_t, r
->in
.buf_size
);
1716 if (r
->out
.buffer
== NULL
) {
1721 r
->out
.bytes_needed
= talloc_zero(r
, uint32_t);
1722 if (r
->out
.bytes_needed
== NULL
) {
1727 r
->out
.result
= _eventlog_GetLogInformation(p
, r
);
1729 if (p
->rng_fault_state
) {
1731 /* Return true here, srv_pipe_hnd.c will take care */
1735 if (DEBUGLEVEL
>= 10) {
1736 NDR_PRINT_OUT_DEBUG(eventlog_GetLogInformation
, r
);
1739 push
= ndr_push_init_ctx(r
, NULL
);
1745 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1746 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1751 blob
= ndr_push_blob(push
);
1752 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1762 static bool api_eventlog_FlushEventLog(pipes_struct
*p
)
1764 const struct ndr_interface_call
*call
;
1765 struct ndr_pull
*pull
;
1766 struct ndr_push
*push
;
1767 enum ndr_err_code ndr_err
;
1769 struct eventlog_FlushEventLog
*r
;
1771 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_FLUSHEVENTLOG
];
1773 r
= talloc(talloc_tos(), struct eventlog_FlushEventLog
);
1778 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1783 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1789 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1790 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1791 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1796 if (DEBUGLEVEL
>= 10) {
1797 NDR_PRINT_IN_DEBUG(eventlog_FlushEventLog
, r
);
1800 r
->out
.result
= _eventlog_FlushEventLog(p
, r
);
1802 if (p
->rng_fault_state
) {
1804 /* Return true here, srv_pipe_hnd.c will take care */
1808 if (DEBUGLEVEL
>= 10) {
1809 NDR_PRINT_OUT_DEBUG(eventlog_FlushEventLog
, r
);
1812 push
= ndr_push_init_ctx(r
, NULL
);
1818 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1819 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1824 blob
= ndr_push_blob(push
);
1825 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1835 static bool api_eventlog_ReportEventAndSourceW(pipes_struct
*p
)
1837 const struct ndr_interface_call
*call
;
1838 struct ndr_pull
*pull
;
1839 struct ndr_push
*push
;
1840 enum ndr_err_code ndr_err
;
1842 struct eventlog_ReportEventAndSourceW
*r
;
1844 call
= &ndr_table_eventlog
.calls
[NDR_EVENTLOG_REPORTEVENTANDSOURCEW
];
1846 r
= talloc(talloc_tos(), struct eventlog_ReportEventAndSourceW
);
1851 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1856 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1862 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1863 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1864 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1869 if (DEBUGLEVEL
>= 10) {
1870 NDR_PRINT_IN_DEBUG(eventlog_ReportEventAndSourceW
, r
);
1873 ZERO_STRUCT(r
->out
);
1874 r
->out
.record_number
= r
->in
.record_number
;
1875 r
->out
.time_written
= r
->in
.time_written
;
1876 r
->out
.result
= _eventlog_ReportEventAndSourceW(p
, r
);
1878 if (p
->rng_fault_state
) {
1880 /* Return true here, srv_pipe_hnd.c will take care */
1884 if (DEBUGLEVEL
>= 10) {
1885 NDR_PRINT_OUT_DEBUG(eventlog_ReportEventAndSourceW
, r
);
1888 push
= ndr_push_init_ctx(r
, NULL
);
1894 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1895 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1900 blob
= ndr_push_blob(push
);
1901 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1913 static struct api_struct api_eventlog_cmds
[] =
1915 {"EVENTLOG_CLEAREVENTLOGW", NDR_EVENTLOG_CLEAREVENTLOGW
, api_eventlog_ClearEventLogW
},
1916 {"EVENTLOG_BACKUPEVENTLOGW", NDR_EVENTLOG_BACKUPEVENTLOGW
, api_eventlog_BackupEventLogW
},
1917 {"EVENTLOG_CLOSEEVENTLOG", NDR_EVENTLOG_CLOSEEVENTLOG
, api_eventlog_CloseEventLog
},
1918 {"EVENTLOG_DEREGISTEREVENTSOURCE", NDR_EVENTLOG_DEREGISTEREVENTSOURCE
, api_eventlog_DeregisterEventSource
},
1919 {"EVENTLOG_GETNUMRECORDS", NDR_EVENTLOG_GETNUMRECORDS
, api_eventlog_GetNumRecords
},
1920 {"EVENTLOG_GETOLDESTRECORD", NDR_EVENTLOG_GETOLDESTRECORD
, api_eventlog_GetOldestRecord
},
1921 {"EVENTLOG_CHANGENOTIFY", NDR_EVENTLOG_CHANGENOTIFY
, api_eventlog_ChangeNotify
},
1922 {"EVENTLOG_OPENEVENTLOGW", NDR_EVENTLOG_OPENEVENTLOGW
, api_eventlog_OpenEventLogW
},
1923 {"EVENTLOG_REGISTEREVENTSOURCEW", NDR_EVENTLOG_REGISTEREVENTSOURCEW
, api_eventlog_RegisterEventSourceW
},
1924 {"EVENTLOG_OPENBACKUPEVENTLOGW", NDR_EVENTLOG_OPENBACKUPEVENTLOGW
, api_eventlog_OpenBackupEventLogW
},
1925 {"EVENTLOG_READEVENTLOGW", NDR_EVENTLOG_READEVENTLOGW
, api_eventlog_ReadEventLogW
},
1926 {"EVENTLOG_REPORTEVENTW", NDR_EVENTLOG_REPORTEVENTW
, api_eventlog_ReportEventW
},
1927 {"EVENTLOG_CLEAREVENTLOGA", NDR_EVENTLOG_CLEAREVENTLOGA
, api_eventlog_ClearEventLogA
},
1928 {"EVENTLOG_BACKUPEVENTLOGA", NDR_EVENTLOG_BACKUPEVENTLOGA
, api_eventlog_BackupEventLogA
},
1929 {"EVENTLOG_OPENEVENTLOGA", NDR_EVENTLOG_OPENEVENTLOGA
, api_eventlog_OpenEventLogA
},
1930 {"EVENTLOG_REGISTEREVENTSOURCEA", NDR_EVENTLOG_REGISTEREVENTSOURCEA
, api_eventlog_RegisterEventSourceA
},
1931 {"EVENTLOG_OPENBACKUPEVENTLOGA", NDR_EVENTLOG_OPENBACKUPEVENTLOGA
, api_eventlog_OpenBackupEventLogA
},
1932 {"EVENTLOG_READEVENTLOGA", NDR_EVENTLOG_READEVENTLOGA
, api_eventlog_ReadEventLogA
},
1933 {"EVENTLOG_REPORTEVENTA", NDR_EVENTLOG_REPORTEVENTA
, api_eventlog_ReportEventA
},
1934 {"EVENTLOG_REGISTERCLUSTERSVC", NDR_EVENTLOG_REGISTERCLUSTERSVC
, api_eventlog_RegisterClusterSvc
},
1935 {"EVENTLOG_DEREGISTERCLUSTERSVC", NDR_EVENTLOG_DEREGISTERCLUSTERSVC
, api_eventlog_DeregisterClusterSvc
},
1936 {"EVENTLOG_WRITECLUSTEREVENTS", NDR_EVENTLOG_WRITECLUSTEREVENTS
, api_eventlog_WriteClusterEvents
},
1937 {"EVENTLOG_GETLOGINFORMATION", NDR_EVENTLOG_GETLOGINFORMATION
, api_eventlog_GetLogInformation
},
1938 {"EVENTLOG_FLUSHEVENTLOG", NDR_EVENTLOG_FLUSHEVENTLOG
, api_eventlog_FlushEventLog
},
1939 {"EVENTLOG_REPORTEVENTANDSOURCEW", NDR_EVENTLOG_REPORTEVENTANDSOURCEW
, api_eventlog_ReportEventAndSourceW
},
1942 void eventlog_get_pipe_fns(struct api_struct
**fns
, int *n_fns
)
1944 *fns
= api_eventlog_cmds
;
1945 *n_fns
= sizeof(api_eventlog_cmds
) / sizeof(struct api_struct
);
1948 NTSTATUS
rpc_eventlog_dispatch(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, const struct ndr_interface_table
*table
, uint32_t opnum
, void *_r
)
1950 if (cli
->pipes_struct
== NULL
) {
1951 return NT_STATUS_INVALID_PARAMETER
;
1956 case NDR_EVENTLOG_CLEAREVENTLOGW
: {
1957 struct eventlog_ClearEventLogW
*r
= (struct eventlog_ClearEventLogW
*)_r
;
1958 r
->out
.result
= _eventlog_ClearEventLogW(cli
->pipes_struct
, r
);
1959 return NT_STATUS_OK
;
1962 case NDR_EVENTLOG_BACKUPEVENTLOGW
: {
1963 struct eventlog_BackupEventLogW
*r
= (struct eventlog_BackupEventLogW
*)_r
;
1964 r
->out
.result
= _eventlog_BackupEventLogW(cli
->pipes_struct
, r
);
1965 return NT_STATUS_OK
;
1968 case NDR_EVENTLOG_CLOSEEVENTLOG
: {
1969 struct eventlog_CloseEventLog
*r
= (struct eventlog_CloseEventLog
*)_r
;
1970 ZERO_STRUCT(r
->out
);
1971 r
->out
.handle
= r
->in
.handle
;
1972 r
->out
.result
= _eventlog_CloseEventLog(cli
->pipes_struct
, r
);
1973 return NT_STATUS_OK
;
1976 case NDR_EVENTLOG_DEREGISTEREVENTSOURCE
: {
1977 struct eventlog_DeregisterEventSource
*r
= (struct eventlog_DeregisterEventSource
*)_r
;
1978 ZERO_STRUCT(r
->out
);
1979 r
->out
.handle
= r
->in
.handle
;
1980 r
->out
.result
= _eventlog_DeregisterEventSource(cli
->pipes_struct
, r
);
1981 return NT_STATUS_OK
;
1984 case NDR_EVENTLOG_GETNUMRECORDS
: {
1985 struct eventlog_GetNumRecords
*r
= (struct eventlog_GetNumRecords
*)_r
;
1986 ZERO_STRUCT(r
->out
);
1987 r
->out
.number
= talloc_zero(mem_ctx
, uint32_t);
1988 if (r
->out
.number
== NULL
) {
1989 return NT_STATUS_NO_MEMORY
;
1992 r
->out
.result
= _eventlog_GetNumRecords(cli
->pipes_struct
, r
);
1993 return NT_STATUS_OK
;
1996 case NDR_EVENTLOG_GETOLDESTRECORD
: {
1997 struct eventlog_GetOldestRecord
*r
= (struct eventlog_GetOldestRecord
*)_r
;
1998 ZERO_STRUCT(r
->out
);
1999 r
->out
.oldest_entry
= talloc_zero(mem_ctx
, uint32_t);
2000 if (r
->out
.oldest_entry
== NULL
) {
2001 return NT_STATUS_NO_MEMORY
;
2004 r
->out
.result
= _eventlog_GetOldestRecord(cli
->pipes_struct
, r
);
2005 return NT_STATUS_OK
;
2008 case NDR_EVENTLOG_CHANGENOTIFY
: {
2009 struct eventlog_ChangeNotify
*r
= (struct eventlog_ChangeNotify
*)_r
;
2010 r
->out
.result
= _eventlog_ChangeNotify(cli
->pipes_struct
, r
);
2011 return NT_STATUS_OK
;
2014 case NDR_EVENTLOG_OPENEVENTLOGW
: {
2015 struct eventlog_OpenEventLogW
*r
= (struct eventlog_OpenEventLogW
*)_r
;
2016 ZERO_STRUCT(r
->out
);
2017 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
2018 if (r
->out
.handle
== NULL
) {
2019 return NT_STATUS_NO_MEMORY
;
2022 r
->out
.result
= _eventlog_OpenEventLogW(cli
->pipes_struct
, r
);
2023 return NT_STATUS_OK
;
2026 case NDR_EVENTLOG_REGISTEREVENTSOURCEW
: {
2027 struct eventlog_RegisterEventSourceW
*r
= (struct eventlog_RegisterEventSourceW
*)_r
;
2028 ZERO_STRUCT(r
->out
);
2029 r
->out
.log_handle
= talloc_zero(mem_ctx
, struct policy_handle
);
2030 if (r
->out
.log_handle
== NULL
) {
2031 return NT_STATUS_NO_MEMORY
;
2034 r
->out
.result
= _eventlog_RegisterEventSourceW(cli
->pipes_struct
, r
);
2035 return NT_STATUS_OK
;
2038 case NDR_EVENTLOG_OPENBACKUPEVENTLOGW
: {
2039 struct eventlog_OpenBackupEventLogW
*r
= (struct eventlog_OpenBackupEventLogW
*)_r
;
2040 ZERO_STRUCT(r
->out
);
2041 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
2042 if (r
->out
.handle
== NULL
) {
2043 return NT_STATUS_NO_MEMORY
;
2046 r
->out
.result
= _eventlog_OpenBackupEventLogW(cli
->pipes_struct
, r
);
2047 return NT_STATUS_OK
;
2050 case NDR_EVENTLOG_READEVENTLOGW
: {
2051 struct eventlog_ReadEventLogW
*r
= (struct eventlog_ReadEventLogW
*)_r
;
2052 ZERO_STRUCT(r
->out
);
2053 r
->out
.data
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.number_of_bytes
);
2054 if (r
->out
.data
== NULL
) {
2055 return NT_STATUS_NO_MEMORY
;
2058 r
->out
.sent_size
= talloc_zero(mem_ctx
, uint32_t);
2059 if (r
->out
.sent_size
== NULL
) {
2060 return NT_STATUS_NO_MEMORY
;
2063 r
->out
.real_size
= talloc_zero(mem_ctx
, uint32_t);
2064 if (r
->out
.real_size
== NULL
) {
2065 return NT_STATUS_NO_MEMORY
;
2068 r
->out
.result
= _eventlog_ReadEventLogW(cli
->pipes_struct
, r
);
2069 return NT_STATUS_OK
;
2072 case NDR_EVENTLOG_REPORTEVENTW
: {
2073 struct eventlog_ReportEventW
*r
= (struct eventlog_ReportEventW
*)_r
;
2074 ZERO_STRUCT(r
->out
);
2075 r
->out
.record_number
= r
->in
.record_number
;
2076 r
->out
.time_written
= r
->in
.time_written
;
2077 r
->out
.result
= _eventlog_ReportEventW(cli
->pipes_struct
, r
);
2078 return NT_STATUS_OK
;
2081 case NDR_EVENTLOG_CLEAREVENTLOGA
: {
2082 struct eventlog_ClearEventLogA
*r
= (struct eventlog_ClearEventLogA
*)_r
;
2083 r
->out
.result
= _eventlog_ClearEventLogA(cli
->pipes_struct
, r
);
2084 return NT_STATUS_OK
;
2087 case NDR_EVENTLOG_BACKUPEVENTLOGA
: {
2088 struct eventlog_BackupEventLogA
*r
= (struct eventlog_BackupEventLogA
*)_r
;
2089 r
->out
.result
= _eventlog_BackupEventLogA(cli
->pipes_struct
, r
);
2090 return NT_STATUS_OK
;
2093 case NDR_EVENTLOG_OPENEVENTLOGA
: {
2094 struct eventlog_OpenEventLogA
*r
= (struct eventlog_OpenEventLogA
*)_r
;
2095 r
->out
.result
= _eventlog_OpenEventLogA(cli
->pipes_struct
, r
);
2096 return NT_STATUS_OK
;
2099 case NDR_EVENTLOG_REGISTEREVENTSOURCEA
: {
2100 struct eventlog_RegisterEventSourceA
*r
= (struct eventlog_RegisterEventSourceA
*)_r
;
2101 r
->out
.result
= _eventlog_RegisterEventSourceA(cli
->pipes_struct
, r
);
2102 return NT_STATUS_OK
;
2105 case NDR_EVENTLOG_OPENBACKUPEVENTLOGA
: {
2106 struct eventlog_OpenBackupEventLogA
*r
= (struct eventlog_OpenBackupEventLogA
*)_r
;
2107 r
->out
.result
= _eventlog_OpenBackupEventLogA(cli
->pipes_struct
, r
);
2108 return NT_STATUS_OK
;
2111 case NDR_EVENTLOG_READEVENTLOGA
: {
2112 struct eventlog_ReadEventLogA
*r
= (struct eventlog_ReadEventLogA
*)_r
;
2113 r
->out
.result
= _eventlog_ReadEventLogA(cli
->pipes_struct
, r
);
2114 return NT_STATUS_OK
;
2117 case NDR_EVENTLOG_REPORTEVENTA
: {
2118 struct eventlog_ReportEventA
*r
= (struct eventlog_ReportEventA
*)_r
;
2119 r
->out
.result
= _eventlog_ReportEventA(cli
->pipes_struct
, r
);
2120 return NT_STATUS_OK
;
2123 case NDR_EVENTLOG_REGISTERCLUSTERSVC
: {
2124 struct eventlog_RegisterClusterSvc
*r
= (struct eventlog_RegisterClusterSvc
*)_r
;
2125 r
->out
.result
= _eventlog_RegisterClusterSvc(cli
->pipes_struct
, r
);
2126 return NT_STATUS_OK
;
2129 case NDR_EVENTLOG_DEREGISTERCLUSTERSVC
: {
2130 struct eventlog_DeregisterClusterSvc
*r
= (struct eventlog_DeregisterClusterSvc
*)_r
;
2131 r
->out
.result
= _eventlog_DeregisterClusterSvc(cli
->pipes_struct
, r
);
2132 return NT_STATUS_OK
;
2135 case NDR_EVENTLOG_WRITECLUSTEREVENTS
: {
2136 struct eventlog_WriteClusterEvents
*r
= (struct eventlog_WriteClusterEvents
*)_r
;
2137 r
->out
.result
= _eventlog_WriteClusterEvents(cli
->pipes_struct
, r
);
2138 return NT_STATUS_OK
;
2141 case NDR_EVENTLOG_GETLOGINFORMATION
: {
2142 struct eventlog_GetLogInformation
*r
= (struct eventlog_GetLogInformation
*)_r
;
2143 ZERO_STRUCT(r
->out
);
2144 r
->out
.buffer
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.buf_size
);
2145 if (r
->out
.buffer
== NULL
) {
2146 return NT_STATUS_NO_MEMORY
;
2149 r
->out
.bytes_needed
= talloc_zero(mem_ctx
, uint32_t);
2150 if (r
->out
.bytes_needed
== NULL
) {
2151 return NT_STATUS_NO_MEMORY
;
2154 r
->out
.result
= _eventlog_GetLogInformation(cli
->pipes_struct
, r
);
2155 return NT_STATUS_OK
;
2158 case NDR_EVENTLOG_FLUSHEVENTLOG
: {
2159 struct eventlog_FlushEventLog
*r
= (struct eventlog_FlushEventLog
*)_r
;
2160 r
->out
.result
= _eventlog_FlushEventLog(cli
->pipes_struct
, r
);
2161 return NT_STATUS_OK
;
2164 case NDR_EVENTLOG_REPORTEVENTANDSOURCEW
: {
2165 struct eventlog_ReportEventAndSourceW
*r
= (struct eventlog_ReportEventAndSourceW
*)_r
;
2166 ZERO_STRUCT(r
->out
);
2167 r
->out
.record_number
= r
->in
.record_number
;
2168 r
->out
.time_written
= r
->in
.time_written
;
2169 r
->out
.result
= _eventlog_ReportEventAndSourceW(cli
->pipes_struct
, r
);
2170 return NT_STATUS_OK
;
2174 return NT_STATUS_NOT_IMPLEMENTED
;
2178 NTSTATUS
rpc_eventlog_init(void)
2180 return rpc_srv_register(SMB_RPC_INTERFACE_VERSION
, "eventlog", "eventlog", &ndr_table_eventlog
, api_eventlog_cmds
, sizeof(api_eventlog_cmds
) / sizeof(struct api_struct
));