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 struct ndr_pull *pull;
12 struct ndr_push *push;
15 struct eventlog_ClearEventLogW r;
16 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_ClearEventLogW");
18 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
23 pull = ndr_pull_init_blob(&blob, mem_ctx);
27 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
28 status = ndr_pull_eventlog_ClearEventLogW(pull, NDR_IN, &r);
29 if (NT_STATUS_IS_ERR(status)) {
34 r.out.result = _eventlog_ClearEventLogW(p, r.in.handle, r.in.unknown);
36 push = ndr_push_init_ctx(mem_ctx);
42 status = ndr_push_eventlog_ClearEventLogW(push, NDR_OUT, &r);
43 if (NT_STATUS_IS_ERR(status)) {
48 blob = ndr_push_blob(push);
49 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
59 static BOOL api_eventlog_BackupEventLogW(pipes_struct *p)
61 struct ndr_pull *pull;
62 struct ndr_push *push;
65 struct eventlog_BackupEventLogW r;
66 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_BackupEventLogW");
68 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
73 pull = ndr_pull_init_blob(&blob, mem_ctx);
77 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
78 status = ndr_pull_eventlog_BackupEventLogW(pull, NDR_IN, &r);
79 if (NT_STATUS_IS_ERR(status)) {
84 r.out.result = _eventlog_BackupEventLogW(p);
86 push = ndr_push_init_ctx(mem_ctx);
92 status = ndr_push_eventlog_BackupEventLogW(push, NDR_OUT, &r);
93 if (NT_STATUS_IS_ERR(status)) {
98 blob = ndr_push_blob(push);
99 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
100 talloc_free(mem_ctx);
104 talloc_free(mem_ctx);
109 static BOOL api_eventlog_CloseEventLog(pipes_struct *p)
111 struct ndr_pull *pull;
112 struct ndr_push *push;
115 struct eventlog_CloseEventLog r;
116 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_CloseEventLog");
118 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
119 talloc_free(mem_ctx);
123 pull = ndr_pull_init_blob(&blob, mem_ctx);
127 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
128 status = ndr_pull_eventlog_CloseEventLog(pull, NDR_IN, &r);
129 if (NT_STATUS_IS_ERR(status)) {
130 talloc_free(mem_ctx);
135 r.out.handle = r.in.handle;
136 r.out.result = _eventlog_CloseEventLog(p, r.in.handle);
138 push = ndr_push_init_ctx(mem_ctx);
140 talloc_free(mem_ctx);
144 status = ndr_push_eventlog_CloseEventLog(push, NDR_OUT, &r);
145 if (NT_STATUS_IS_ERR(status)) {
146 talloc_free(mem_ctx);
150 blob = ndr_push_blob(push);
151 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
152 talloc_free(mem_ctx);
156 talloc_free(mem_ctx);
161 static BOOL api_eventlog_DeregisterEventSource(pipes_struct *p)
163 struct ndr_pull *pull;
164 struct ndr_push *push;
167 struct eventlog_DeregisterEventSource r;
168 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_DeregisterEventSource");
170 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
171 talloc_free(mem_ctx);
175 pull = ndr_pull_init_blob(&blob, mem_ctx);
179 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
180 status = ndr_pull_eventlog_DeregisterEventSource(pull, NDR_IN, &r);
181 if (NT_STATUS_IS_ERR(status)) {
182 talloc_free(mem_ctx);
186 r.out.result = _eventlog_DeregisterEventSource(p);
188 push = ndr_push_init_ctx(mem_ctx);
190 talloc_free(mem_ctx);
194 status = ndr_push_eventlog_DeregisterEventSource(push, NDR_OUT, &r);
195 if (NT_STATUS_IS_ERR(status)) {
196 talloc_free(mem_ctx);
200 blob = ndr_push_blob(push);
201 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
202 talloc_free(mem_ctx);
206 talloc_free(mem_ctx);
211 static BOOL api_eventlog_GetNumRecords(pipes_struct *p)
213 struct ndr_pull *pull;
214 struct ndr_push *push;
217 struct eventlog_GetNumRecords r;
218 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_GetNumRecords");
220 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
221 talloc_free(mem_ctx);
225 pull = ndr_pull_init_blob(&blob, mem_ctx);
229 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
230 status = ndr_pull_eventlog_GetNumRecords(pull, NDR_IN, &r);
231 if (NT_STATUS_IS_ERR(status)) {
232 talloc_free(mem_ctx);
237 r.out.number = talloc_size(mem_ctx, sizeof(*r.out.number));
238 if (r.out.number == NULL) {
239 talloc_free(mem_ctx);
243 r.out.result = _eventlog_GetNumRecords(p, r.in.handle, r.out.number);
245 push = ndr_push_init_ctx(mem_ctx);
247 talloc_free(mem_ctx);
251 status = ndr_push_eventlog_GetNumRecords(push, NDR_OUT, &r);
252 if (NT_STATUS_IS_ERR(status)) {
253 talloc_free(mem_ctx);
257 blob = ndr_push_blob(push);
258 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
259 talloc_free(mem_ctx);
263 talloc_free(mem_ctx);
268 static BOOL api_eventlog_GetOldestRecord(pipes_struct *p)
270 struct ndr_pull *pull;
271 struct ndr_push *push;
274 struct eventlog_GetOldestRecord r;
275 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_GetOldestRecord");
277 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
278 talloc_free(mem_ctx);
282 pull = ndr_pull_init_blob(&blob, mem_ctx);
286 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
287 status = ndr_pull_eventlog_GetOldestRecord(pull, NDR_IN, &r);
288 if (NT_STATUS_IS_ERR(status)) {
289 talloc_free(mem_ctx);
293 r.out.result = _eventlog_GetOldestRecord(p);
295 push = ndr_push_init_ctx(mem_ctx);
297 talloc_free(mem_ctx);
301 status = ndr_push_eventlog_GetOldestRecord(push, NDR_OUT, &r);
302 if (NT_STATUS_IS_ERR(status)) {
303 talloc_free(mem_ctx);
307 blob = ndr_push_blob(push);
308 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
309 talloc_free(mem_ctx);
313 talloc_free(mem_ctx);
318 static BOOL api_eventlog_ChangeNotify(pipes_struct *p)
320 struct ndr_pull *pull;
321 struct ndr_push *push;
324 struct eventlog_ChangeNotify r;
325 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_ChangeNotify");
327 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
328 talloc_free(mem_ctx);
332 pull = ndr_pull_init_blob(&blob, mem_ctx);
336 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
337 status = ndr_pull_eventlog_ChangeNotify(pull, NDR_IN, &r);
338 if (NT_STATUS_IS_ERR(status)) {
339 talloc_free(mem_ctx);
343 r.out.result = _eventlog_ChangeNotify(p);
345 push = ndr_push_init_ctx(mem_ctx);
347 talloc_free(mem_ctx);
351 status = ndr_push_eventlog_ChangeNotify(push, NDR_OUT, &r);
352 if (NT_STATUS_IS_ERR(status)) {
353 talloc_free(mem_ctx);
357 blob = ndr_push_blob(push);
358 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
359 talloc_free(mem_ctx);
363 talloc_free(mem_ctx);
368 static BOOL api_eventlog_OpenEventLogW(pipes_struct *p)
370 struct ndr_pull *pull;
371 struct ndr_push *push;
374 struct eventlog_OpenEventLogW r;
375 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_OpenEventLogW");
377 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
378 talloc_free(mem_ctx);
382 pull = ndr_pull_init_blob(&blob, mem_ctx);
386 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
387 status = ndr_pull_eventlog_OpenEventLogW(pull, NDR_IN, &r);
388 if (NT_STATUS_IS_ERR(status)) {
389 talloc_free(mem_ctx);
394 r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle));
395 if (r.out.handle == NULL) {
396 talloc_free(mem_ctx);
400 r.out.result = _eventlog_OpenEventLogW(p, r.in.unknown0, r.in.logname, r.in.servername, r.in.unknown2, r.in.unknown3, r.out.handle);
402 push = ndr_push_init_ctx(mem_ctx);
404 talloc_free(mem_ctx);
408 status = ndr_push_eventlog_OpenEventLogW(push, NDR_OUT, &r);
409 if (NT_STATUS_IS_ERR(status)) {
410 talloc_free(mem_ctx);
414 blob = ndr_push_blob(push);
415 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
416 talloc_free(mem_ctx);
420 talloc_free(mem_ctx);
425 static BOOL api_eventlog_RegisterEventSourceW(pipes_struct *p)
427 struct ndr_pull *pull;
428 struct ndr_push *push;
431 struct eventlog_RegisterEventSourceW r;
432 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_RegisterEventSourceW");
434 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
435 talloc_free(mem_ctx);
439 pull = ndr_pull_init_blob(&blob, mem_ctx);
443 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
444 status = ndr_pull_eventlog_RegisterEventSourceW(pull, NDR_IN, &r);
445 if (NT_STATUS_IS_ERR(status)) {
446 talloc_free(mem_ctx);
450 r.out.result = _eventlog_RegisterEventSourceW(p);
452 push = ndr_push_init_ctx(mem_ctx);
454 talloc_free(mem_ctx);
458 status = ndr_push_eventlog_RegisterEventSourceW(push, NDR_OUT, &r);
459 if (NT_STATUS_IS_ERR(status)) {
460 talloc_free(mem_ctx);
464 blob = ndr_push_blob(push);
465 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
466 talloc_free(mem_ctx);
470 talloc_free(mem_ctx);
475 static BOOL api_eventlog_OpenBackupEventLogW(pipes_struct *p)
477 struct ndr_pull *pull;
478 struct ndr_push *push;
481 struct eventlog_OpenBackupEventLogW r;
482 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_OpenBackupEventLogW");
484 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
485 talloc_free(mem_ctx);
489 pull = ndr_pull_init_blob(&blob, mem_ctx);
493 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
494 status = ndr_pull_eventlog_OpenBackupEventLogW(pull, NDR_IN, &r);
495 if (NT_STATUS_IS_ERR(status)) {
496 talloc_free(mem_ctx);
500 r.out.result = _eventlog_OpenBackupEventLogW(p);
502 push = ndr_push_init_ctx(mem_ctx);
504 talloc_free(mem_ctx);
508 status = ndr_push_eventlog_OpenBackupEventLogW(push, NDR_OUT, &r);
509 if (NT_STATUS_IS_ERR(status)) {
510 talloc_free(mem_ctx);
514 blob = ndr_push_blob(push);
515 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
516 talloc_free(mem_ctx);
520 talloc_free(mem_ctx);
525 static BOOL api_eventlog_ReadEventLogW(pipes_struct *p)
527 struct ndr_pull *pull;
528 struct ndr_push *push;
531 struct eventlog_ReadEventLogW r;
532 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_ReadEventLogW");
534 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
535 talloc_free(mem_ctx);
539 pull = ndr_pull_init_blob(&blob, mem_ctx);
543 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
544 status = ndr_pull_eventlog_ReadEventLogW(pull, NDR_IN, &r);
545 if (NT_STATUS_IS_ERR(status)) {
546 talloc_free(mem_ctx);
551 r.out.data = talloc_array_size(mem_ctx, sizeof(*r.out.data), r.in.number_of_bytes);
552 if (r.out.data == NULL) {
553 talloc_free(mem_ctx);
557 r.out.sent_size = talloc_size(mem_ctx, sizeof(*r.out.sent_size));
558 if (r.out.sent_size == NULL) {
559 talloc_free(mem_ctx);
563 r.out.real_size = talloc_size(mem_ctx, sizeof(*r.out.real_size));
564 if (r.out.real_size == NULL) {
565 talloc_free(mem_ctx);
569 r.out.result = _eventlog_ReadEventLogW(p, r.in.handle, r.in.flags, r.in.offset, r.in.number_of_bytes, r.out.data, r.out.sent_size, r.out.real_size);
571 push = ndr_push_init_ctx(mem_ctx);
573 talloc_free(mem_ctx);
577 status = ndr_push_eventlog_ReadEventLogW(push, NDR_OUT, &r);
578 if (NT_STATUS_IS_ERR(status)) {
579 talloc_free(mem_ctx);
583 blob = ndr_push_blob(push);
584 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
585 talloc_free(mem_ctx);
589 talloc_free(mem_ctx);
594 static BOOL api_eventlog_ReportEventW(pipes_struct *p)
596 struct ndr_pull *pull;
597 struct ndr_push *push;
600 struct eventlog_ReportEventW r;
601 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_ReportEventW");
603 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
604 talloc_free(mem_ctx);
608 pull = ndr_pull_init_blob(&blob, mem_ctx);
612 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
613 status = ndr_pull_eventlog_ReportEventW(pull, NDR_IN, &r);
614 if (NT_STATUS_IS_ERR(status)) {
615 talloc_free(mem_ctx);
619 r.out.result = _eventlog_ReportEventW(p);
621 push = ndr_push_init_ctx(mem_ctx);
623 talloc_free(mem_ctx);
627 status = ndr_push_eventlog_ReportEventW(push, NDR_OUT, &r);
628 if (NT_STATUS_IS_ERR(status)) {
629 talloc_free(mem_ctx);
633 blob = ndr_push_blob(push);
634 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
635 talloc_free(mem_ctx);
639 talloc_free(mem_ctx);
644 static BOOL api_eventlog_ClearEventLogA(pipes_struct *p)
646 struct ndr_pull *pull;
647 struct ndr_push *push;
650 struct eventlog_ClearEventLogA r;
651 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_ClearEventLogA");
653 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
654 talloc_free(mem_ctx);
658 pull = ndr_pull_init_blob(&blob, mem_ctx);
662 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
663 status = ndr_pull_eventlog_ClearEventLogA(pull, NDR_IN, &r);
664 if (NT_STATUS_IS_ERR(status)) {
665 talloc_free(mem_ctx);
669 r.out.result = _eventlog_ClearEventLogA(p);
671 push = ndr_push_init_ctx(mem_ctx);
673 talloc_free(mem_ctx);
677 status = ndr_push_eventlog_ClearEventLogA(push, NDR_OUT, &r);
678 if (NT_STATUS_IS_ERR(status)) {
679 talloc_free(mem_ctx);
683 blob = ndr_push_blob(push);
684 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
685 talloc_free(mem_ctx);
689 talloc_free(mem_ctx);
694 static BOOL api_eventlog_BackupEventLogA(pipes_struct *p)
696 struct ndr_pull *pull;
697 struct ndr_push *push;
700 struct eventlog_BackupEventLogA r;
701 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_BackupEventLogA");
703 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
704 talloc_free(mem_ctx);
708 pull = ndr_pull_init_blob(&blob, mem_ctx);
712 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
713 status = ndr_pull_eventlog_BackupEventLogA(pull, NDR_IN, &r);
714 if (NT_STATUS_IS_ERR(status)) {
715 talloc_free(mem_ctx);
719 r.out.result = _eventlog_BackupEventLogA(p);
721 push = ndr_push_init_ctx(mem_ctx);
723 talloc_free(mem_ctx);
727 status = ndr_push_eventlog_BackupEventLogA(push, NDR_OUT, &r);
728 if (NT_STATUS_IS_ERR(status)) {
729 talloc_free(mem_ctx);
733 blob = ndr_push_blob(push);
734 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
735 talloc_free(mem_ctx);
739 talloc_free(mem_ctx);
744 static BOOL api_eventlog_OpenEventLogA(pipes_struct *p)
746 struct ndr_pull *pull;
747 struct ndr_push *push;
750 struct eventlog_OpenEventLogA r;
751 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_OpenEventLogA");
753 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
754 talloc_free(mem_ctx);
758 pull = ndr_pull_init_blob(&blob, mem_ctx);
762 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
763 status = ndr_pull_eventlog_OpenEventLogA(pull, NDR_IN, &r);
764 if (NT_STATUS_IS_ERR(status)) {
765 talloc_free(mem_ctx);
769 r.out.result = _eventlog_OpenEventLogA(p);
771 push = ndr_push_init_ctx(mem_ctx);
773 talloc_free(mem_ctx);
777 status = ndr_push_eventlog_OpenEventLogA(push, NDR_OUT, &r);
778 if (NT_STATUS_IS_ERR(status)) {
779 talloc_free(mem_ctx);
783 blob = ndr_push_blob(push);
784 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
785 talloc_free(mem_ctx);
789 talloc_free(mem_ctx);
794 static BOOL api_eventlog_RegisterEventSourceA(pipes_struct *p)
796 struct ndr_pull *pull;
797 struct ndr_push *push;
800 struct eventlog_RegisterEventSourceA r;
801 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_RegisterEventSourceA");
803 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
804 talloc_free(mem_ctx);
808 pull = ndr_pull_init_blob(&blob, mem_ctx);
812 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
813 status = ndr_pull_eventlog_RegisterEventSourceA(pull, NDR_IN, &r);
814 if (NT_STATUS_IS_ERR(status)) {
815 talloc_free(mem_ctx);
819 r.out.result = _eventlog_RegisterEventSourceA(p);
821 push = ndr_push_init_ctx(mem_ctx);
823 talloc_free(mem_ctx);
827 status = ndr_push_eventlog_RegisterEventSourceA(push, NDR_OUT, &r);
828 if (NT_STATUS_IS_ERR(status)) {
829 talloc_free(mem_ctx);
833 blob = ndr_push_blob(push);
834 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
835 talloc_free(mem_ctx);
839 talloc_free(mem_ctx);
844 static BOOL api_eventlog_OpenBackupEventLogA(pipes_struct *p)
846 struct ndr_pull *pull;
847 struct ndr_push *push;
850 struct eventlog_OpenBackupEventLogA r;
851 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_OpenBackupEventLogA");
853 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
854 talloc_free(mem_ctx);
858 pull = ndr_pull_init_blob(&blob, mem_ctx);
862 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
863 status = ndr_pull_eventlog_OpenBackupEventLogA(pull, NDR_IN, &r);
864 if (NT_STATUS_IS_ERR(status)) {
865 talloc_free(mem_ctx);
869 r.out.result = _eventlog_OpenBackupEventLogA(p);
871 push = ndr_push_init_ctx(mem_ctx);
873 talloc_free(mem_ctx);
877 status = ndr_push_eventlog_OpenBackupEventLogA(push, NDR_OUT, &r);
878 if (NT_STATUS_IS_ERR(status)) {
879 talloc_free(mem_ctx);
883 blob = ndr_push_blob(push);
884 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
885 talloc_free(mem_ctx);
889 talloc_free(mem_ctx);
894 static BOOL api_eventlog_ReadEventLogA(pipes_struct *p)
896 struct ndr_pull *pull;
897 struct ndr_push *push;
900 struct eventlog_ReadEventLogA r;
901 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_ReadEventLogA");
903 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
904 talloc_free(mem_ctx);
908 pull = ndr_pull_init_blob(&blob, mem_ctx);
912 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
913 status = ndr_pull_eventlog_ReadEventLogA(pull, NDR_IN, &r);
914 if (NT_STATUS_IS_ERR(status)) {
915 talloc_free(mem_ctx);
919 r.out.result = _eventlog_ReadEventLogA(p);
921 push = ndr_push_init_ctx(mem_ctx);
923 talloc_free(mem_ctx);
927 status = ndr_push_eventlog_ReadEventLogA(push, NDR_OUT, &r);
928 if (NT_STATUS_IS_ERR(status)) {
929 talloc_free(mem_ctx);
933 blob = ndr_push_blob(push);
934 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
935 talloc_free(mem_ctx);
939 talloc_free(mem_ctx);
944 static BOOL api_eventlog_ReportEventA(pipes_struct *p)
946 struct ndr_pull *pull;
947 struct ndr_push *push;
950 struct eventlog_ReportEventA r;
951 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_ReportEventA");
953 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
954 talloc_free(mem_ctx);
958 pull = ndr_pull_init_blob(&blob, mem_ctx);
962 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
963 status = ndr_pull_eventlog_ReportEventA(pull, NDR_IN, &r);
964 if (NT_STATUS_IS_ERR(status)) {
965 talloc_free(mem_ctx);
969 r.out.result = _eventlog_ReportEventA(p);
971 push = ndr_push_init_ctx(mem_ctx);
973 talloc_free(mem_ctx);
977 status = ndr_push_eventlog_ReportEventA(push, NDR_OUT, &r);
978 if (NT_STATUS_IS_ERR(status)) {
979 talloc_free(mem_ctx);
983 blob = ndr_push_blob(push);
984 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
985 talloc_free(mem_ctx);
989 talloc_free(mem_ctx);
994 static BOOL api_eventlog_RegisterClusterSvc(pipes_struct *p)
996 struct ndr_pull *pull;
997 struct ndr_push *push;
1000 struct eventlog_RegisterClusterSvc r;
1001 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_RegisterClusterSvc");
1003 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1004 talloc_free(mem_ctx);
1008 pull = ndr_pull_init_blob(&blob, mem_ctx);
1012 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1013 status = ndr_pull_eventlog_RegisterClusterSvc(pull, NDR_IN, &r);
1014 if (NT_STATUS_IS_ERR(status)) {
1015 talloc_free(mem_ctx);
1019 r.out.result = _eventlog_RegisterClusterSvc(p);
1021 push = ndr_push_init_ctx(mem_ctx);
1023 talloc_free(mem_ctx);
1027 status = ndr_push_eventlog_RegisterClusterSvc(push, NDR_OUT, &r);
1028 if (NT_STATUS_IS_ERR(status)) {
1029 talloc_free(mem_ctx);
1033 blob = ndr_push_blob(push);
1034 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1035 talloc_free(mem_ctx);
1039 talloc_free(mem_ctx);
1044 static BOOL api_eventlog_DeregisterClusterSvc(pipes_struct *p)
1046 struct ndr_pull *pull;
1047 struct ndr_push *push;
1050 struct eventlog_DeregisterClusterSvc r;
1051 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_DeregisterClusterSvc");
1053 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1054 talloc_free(mem_ctx);
1058 pull = ndr_pull_init_blob(&blob, mem_ctx);
1062 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1063 status = ndr_pull_eventlog_DeregisterClusterSvc(pull, NDR_IN, &r);
1064 if (NT_STATUS_IS_ERR(status)) {
1065 talloc_free(mem_ctx);
1069 r.out.result = _eventlog_DeregisterClusterSvc(p);
1071 push = ndr_push_init_ctx(mem_ctx);
1073 talloc_free(mem_ctx);
1077 status = ndr_push_eventlog_DeregisterClusterSvc(push, NDR_OUT, &r);
1078 if (NT_STATUS_IS_ERR(status)) {
1079 talloc_free(mem_ctx);
1083 blob = ndr_push_blob(push);
1084 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1085 talloc_free(mem_ctx);
1089 talloc_free(mem_ctx);
1094 static BOOL api_eventlog_WriteClusterEvents(pipes_struct *p)
1096 struct ndr_pull *pull;
1097 struct ndr_push *push;
1100 struct eventlog_WriteClusterEvents r;
1101 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_WriteClusterEvents");
1103 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1104 talloc_free(mem_ctx);
1108 pull = ndr_pull_init_blob(&blob, mem_ctx);
1112 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1113 status = ndr_pull_eventlog_WriteClusterEvents(pull, NDR_IN, &r);
1114 if (NT_STATUS_IS_ERR(status)) {
1115 talloc_free(mem_ctx);
1119 r.out.result = _eventlog_WriteClusterEvents(p);
1121 push = ndr_push_init_ctx(mem_ctx);
1123 talloc_free(mem_ctx);
1127 status = ndr_push_eventlog_WriteClusterEvents(push, NDR_OUT, &r);
1128 if (NT_STATUS_IS_ERR(status)) {
1129 talloc_free(mem_ctx);
1133 blob = ndr_push_blob(push);
1134 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1135 talloc_free(mem_ctx);
1139 talloc_free(mem_ctx);
1144 static BOOL api_eventlog_GetLogIntormation(pipes_struct *p)
1146 struct ndr_pull *pull;
1147 struct ndr_push *push;
1150 struct eventlog_GetLogIntormation r;
1151 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_GetLogIntormation");
1153 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1154 talloc_free(mem_ctx);
1158 pull = ndr_pull_init_blob(&blob, mem_ctx);
1162 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1163 status = ndr_pull_eventlog_GetLogIntormation(pull, NDR_IN, &r);
1164 if (NT_STATUS_IS_ERR(status)) {
1165 talloc_free(mem_ctx);
1169 r.out.result = _eventlog_GetLogIntormation(p);
1171 push = ndr_push_init_ctx(mem_ctx);
1173 talloc_free(mem_ctx);
1177 status = ndr_push_eventlog_GetLogIntormation(push, NDR_OUT, &r);
1178 if (NT_STATUS_IS_ERR(status)) {
1179 talloc_free(mem_ctx);
1183 blob = ndr_push_blob(push);
1184 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1185 talloc_free(mem_ctx);
1189 talloc_free(mem_ctx);
1194 static BOOL api_eventlog_FlushEventLog(pipes_struct *p)
1196 struct ndr_pull *pull;
1197 struct ndr_push *push;
1200 struct eventlog_FlushEventLog r;
1201 TALLOC_CTX *mem_ctx = talloc_init("api_eventlog_FlushEventLog");
1203 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1204 talloc_free(mem_ctx);
1208 pull = ndr_pull_init_blob(&blob, mem_ctx);
1212 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1213 status = ndr_pull_eventlog_FlushEventLog(pull, NDR_IN, &r);
1214 if (NT_STATUS_IS_ERR(status)) {
1215 talloc_free(mem_ctx);
1219 r.out.result = _eventlog_FlushEventLog(p, r.in.handle);
1221 push = ndr_push_init_ctx(mem_ctx);
1223 talloc_free(mem_ctx);
1227 status = ndr_push_eventlog_FlushEventLog(push, NDR_OUT, &r);
1228 if (NT_STATUS_IS_ERR(status)) {
1229 talloc_free(mem_ctx);
1233 blob = ndr_push_blob(push);
1234 if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1235 talloc_free(mem_ctx);
1239 talloc_free(mem_ctx);
1246 static struct api_struct api_eventlog_cmds[] =
1248 {"EVENTLOG_CLEAREVENTLOGW", DCERPC_EVENTLOG_CLEAREVENTLOGW, api_eventlog_ClearEventLogW},
1249 {"EVENTLOG_BACKUPEVENTLOGW", DCERPC_EVENTLOG_BACKUPEVENTLOGW, api_eventlog_BackupEventLogW},
1250 {"EVENTLOG_CLOSEEVENTLOG", DCERPC_EVENTLOG_CLOSEEVENTLOG, api_eventlog_CloseEventLog},
1251 {"EVENTLOG_DEREGISTEREVENTSOURCE", DCERPC_EVENTLOG_DEREGISTEREVENTSOURCE, api_eventlog_DeregisterEventSource},
1252 {"EVENTLOG_GETNUMRECORDS", DCERPC_EVENTLOG_GETNUMRECORDS, api_eventlog_GetNumRecords},
1253 {"EVENTLOG_GETOLDESTRECORD", DCERPC_EVENTLOG_GETOLDESTRECORD, api_eventlog_GetOldestRecord},
1254 {"EVENTLOG_CHANGENOTIFY", DCERPC_EVENTLOG_CHANGENOTIFY, api_eventlog_ChangeNotify},
1255 {"EVENTLOG_OPENEVENTLOGW", DCERPC_EVENTLOG_OPENEVENTLOGW, api_eventlog_OpenEventLogW},
1256 {"EVENTLOG_REGISTEREVENTSOURCEW", DCERPC_EVENTLOG_REGISTEREVENTSOURCEW, api_eventlog_RegisterEventSourceW},
1257 {"EVENTLOG_OPENBACKUPEVENTLOGW", DCERPC_EVENTLOG_OPENBACKUPEVENTLOGW, api_eventlog_OpenBackupEventLogW},
1258 {"EVENTLOG_READEVENTLOGW", DCERPC_EVENTLOG_READEVENTLOGW, api_eventlog_ReadEventLogW},
1259 {"EVENTLOG_REPORTEVENTW", DCERPC_EVENTLOG_REPORTEVENTW, api_eventlog_ReportEventW},
1260 {"EVENTLOG_CLEAREVENTLOGA", DCERPC_EVENTLOG_CLEAREVENTLOGA, api_eventlog_ClearEventLogA},
1261 {"EVENTLOG_BACKUPEVENTLOGA", DCERPC_EVENTLOG_BACKUPEVENTLOGA, api_eventlog_BackupEventLogA},
1262 {"EVENTLOG_OPENEVENTLOGA", DCERPC_EVENTLOG_OPENEVENTLOGA, api_eventlog_OpenEventLogA},
1263 {"EVENTLOG_REGISTEREVENTSOURCEA", DCERPC_EVENTLOG_REGISTEREVENTSOURCEA, api_eventlog_RegisterEventSourceA},
1264 {"EVENTLOG_OPENBACKUPEVENTLOGA", DCERPC_EVENTLOG_OPENBACKUPEVENTLOGA, api_eventlog_OpenBackupEventLogA},
1265 {"EVENTLOG_READEVENTLOGA", DCERPC_EVENTLOG_READEVENTLOGA, api_eventlog_ReadEventLogA},
1266 {"EVENTLOG_REPORTEVENTA", DCERPC_EVENTLOG_REPORTEVENTA, api_eventlog_ReportEventA},
1267 {"EVENTLOG_REGISTERCLUSTERSVC", DCERPC_EVENTLOG_REGISTERCLUSTERSVC, api_eventlog_RegisterClusterSvc},
1268 {"EVENTLOG_DEREGISTERCLUSTERSVC", DCERPC_EVENTLOG_DEREGISTERCLUSTERSVC, api_eventlog_DeregisterClusterSvc},
1269 {"EVENTLOG_WRITECLUSTEREVENTS", DCERPC_EVENTLOG_WRITECLUSTEREVENTS, api_eventlog_WriteClusterEvents},
1270 {"EVENTLOG_GETLOGINTORMATION", DCERPC_EVENTLOG_GETLOGINTORMATION, api_eventlog_GetLogIntormation},
1271 {"EVENTLOG_FLUSHEVENTLOG", DCERPC_EVENTLOG_FLUSHEVENTLOG, api_eventlog_FlushEventLog},
1274 void eventlog_get_pipe_fns(struct api_struct **fns, int *n_fns)
1276 *fns = api_eventlog_cmds;
1277 *n_fns = sizeof(api_eventlog_cmds) / sizeof(struct api_struct);
1280 NTSTATUS rpc_eventlog_init(void)
1282 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "eventlog", "eventlog", api_eventlog_cmds, sizeof(api_eventlog_cmds) / sizeof(struct api_struct));