s4-smbtorture: fix test_GetJob.
[Samba/gebeck_regimport.git] / librpc / gen_ndr / cli_eventlog.c
blob6b084d22171c9cb2870fbd92a1587b9af653296f
1 /*
2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
7 #include "../librpc/gen_ndr/cli_eventlog.h"
9 NTSTATUS rpccli_eventlog_ClearEventLogW(struct rpc_pipe_client *cli,
10 TALLOC_CTX *mem_ctx,
11 struct policy_handle *handle /* [in] [ref] */,
12 struct lsa_String *backupfile /* [in] [unique] */)
14 struct eventlog_ClearEventLogW r;
15 NTSTATUS status;
17 /* In parameters */
18 r.in.handle = handle;
19 r.in.backupfile = backupfile;
21 if (DEBUGLEVEL >= 10) {
22 NDR_PRINT_IN_DEBUG(eventlog_ClearEventLogW, &r);
25 status = cli->dispatch(cli,
26 mem_ctx,
27 &ndr_table_eventlog,
28 NDR_EVENTLOG_CLEAREVENTLOGW,
29 &r);
31 if (!NT_STATUS_IS_OK(status)) {
32 return status;
35 if (DEBUGLEVEL >= 10) {
36 NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogW, &r);
39 if (NT_STATUS_IS_ERR(status)) {
40 return status;
43 /* Return variables */
45 /* Return result */
46 return r.out.result;
49 NTSTATUS rpccli_eventlog_BackupEventLogW(struct rpc_pipe_client *cli,
50 TALLOC_CTX *mem_ctx,
51 struct policy_handle *handle /* [in] [ref] */,
52 struct lsa_String *backup_filename /* [in] [ref] */)
54 struct eventlog_BackupEventLogW r;
55 NTSTATUS status;
57 /* In parameters */
58 r.in.handle = handle;
59 r.in.backup_filename = backup_filename;
61 if (DEBUGLEVEL >= 10) {
62 NDR_PRINT_IN_DEBUG(eventlog_BackupEventLogW, &r);
65 status = cli->dispatch(cli,
66 mem_ctx,
67 &ndr_table_eventlog,
68 NDR_EVENTLOG_BACKUPEVENTLOGW,
69 &r);
71 if (!NT_STATUS_IS_OK(status)) {
72 return status;
75 if (DEBUGLEVEL >= 10) {
76 NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogW, &r);
79 if (NT_STATUS_IS_ERR(status)) {
80 return status;
83 /* Return variables */
85 /* Return result */
86 return r.out.result;
89 NTSTATUS rpccli_eventlog_CloseEventLog(struct rpc_pipe_client *cli,
90 TALLOC_CTX *mem_ctx,
91 struct policy_handle *handle /* [in,out] [ref] */)
93 struct eventlog_CloseEventLog r;
94 NTSTATUS status;
96 /* In parameters */
97 r.in.handle = handle;
99 if (DEBUGLEVEL >= 10) {
100 NDR_PRINT_IN_DEBUG(eventlog_CloseEventLog, &r);
103 status = cli->dispatch(cli,
104 mem_ctx,
105 &ndr_table_eventlog,
106 NDR_EVENTLOG_CLOSEEVENTLOG,
107 &r);
109 if (!NT_STATUS_IS_OK(status)) {
110 return status;
113 if (DEBUGLEVEL >= 10) {
114 NDR_PRINT_OUT_DEBUG(eventlog_CloseEventLog, &r);
117 if (NT_STATUS_IS_ERR(status)) {
118 return status;
121 /* Return variables */
122 *handle = *r.out.handle;
124 /* Return result */
125 return r.out.result;
128 NTSTATUS rpccli_eventlog_DeregisterEventSource(struct rpc_pipe_client *cli,
129 TALLOC_CTX *mem_ctx,
130 struct policy_handle *handle /* [in,out] [ref] */)
132 struct eventlog_DeregisterEventSource r;
133 NTSTATUS status;
135 /* In parameters */
136 r.in.handle = handle;
138 if (DEBUGLEVEL >= 10) {
139 NDR_PRINT_IN_DEBUG(eventlog_DeregisterEventSource, &r);
142 status = cli->dispatch(cli,
143 mem_ctx,
144 &ndr_table_eventlog,
145 NDR_EVENTLOG_DEREGISTEREVENTSOURCE,
146 &r);
148 if (!NT_STATUS_IS_OK(status)) {
149 return status;
152 if (DEBUGLEVEL >= 10) {
153 NDR_PRINT_OUT_DEBUG(eventlog_DeregisterEventSource, &r);
156 if (NT_STATUS_IS_ERR(status)) {
157 return status;
160 /* Return variables */
161 *handle = *r.out.handle;
163 /* Return result */
164 return r.out.result;
167 NTSTATUS rpccli_eventlog_GetNumRecords(struct rpc_pipe_client *cli,
168 TALLOC_CTX *mem_ctx,
169 struct policy_handle *handle /* [in] [ref] */,
170 uint32_t *number /* [out] [ref] */)
172 struct eventlog_GetNumRecords r;
173 NTSTATUS status;
175 /* In parameters */
176 r.in.handle = handle;
178 if (DEBUGLEVEL >= 10) {
179 NDR_PRINT_IN_DEBUG(eventlog_GetNumRecords, &r);
182 status = cli->dispatch(cli,
183 mem_ctx,
184 &ndr_table_eventlog,
185 NDR_EVENTLOG_GETNUMRECORDS,
186 &r);
188 if (!NT_STATUS_IS_OK(status)) {
189 return status;
192 if (DEBUGLEVEL >= 10) {
193 NDR_PRINT_OUT_DEBUG(eventlog_GetNumRecords, &r);
196 if (NT_STATUS_IS_ERR(status)) {
197 return status;
200 /* Return variables */
201 *number = *r.out.number;
203 /* Return result */
204 return r.out.result;
207 NTSTATUS rpccli_eventlog_GetOldestRecord(struct rpc_pipe_client *cli,
208 TALLOC_CTX *mem_ctx,
209 struct policy_handle *handle /* [in] [ref] */,
210 uint32_t *oldest_entry /* [out] [ref] */)
212 struct eventlog_GetOldestRecord r;
213 NTSTATUS status;
215 /* In parameters */
216 r.in.handle = handle;
218 if (DEBUGLEVEL >= 10) {
219 NDR_PRINT_IN_DEBUG(eventlog_GetOldestRecord, &r);
222 status = cli->dispatch(cli,
223 mem_ctx,
224 &ndr_table_eventlog,
225 NDR_EVENTLOG_GETOLDESTRECORD,
226 &r);
228 if (!NT_STATUS_IS_OK(status)) {
229 return status;
232 if (DEBUGLEVEL >= 10) {
233 NDR_PRINT_OUT_DEBUG(eventlog_GetOldestRecord, &r);
236 if (NT_STATUS_IS_ERR(status)) {
237 return status;
240 /* Return variables */
241 *oldest_entry = *r.out.oldest_entry;
243 /* Return result */
244 return r.out.result;
247 NTSTATUS rpccli_eventlog_ChangeNotify(struct rpc_pipe_client *cli,
248 TALLOC_CTX *mem_ctx)
250 struct eventlog_ChangeNotify r;
251 NTSTATUS status;
253 /* In parameters */
255 if (DEBUGLEVEL >= 10) {
256 NDR_PRINT_IN_DEBUG(eventlog_ChangeNotify, &r);
259 status = cli->dispatch(cli,
260 mem_ctx,
261 &ndr_table_eventlog,
262 NDR_EVENTLOG_CHANGENOTIFY,
263 &r);
265 if (!NT_STATUS_IS_OK(status)) {
266 return status;
269 if (DEBUGLEVEL >= 10) {
270 NDR_PRINT_OUT_DEBUG(eventlog_ChangeNotify, &r);
273 if (NT_STATUS_IS_ERR(status)) {
274 return status;
277 /* Return variables */
279 /* Return result */
280 return r.out.result;
283 NTSTATUS rpccli_eventlog_OpenEventLogW(struct rpc_pipe_client *cli,
284 TALLOC_CTX *mem_ctx,
285 struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */,
286 struct lsa_String *logname /* [in] [ref] */,
287 struct lsa_String *servername /* [in] [ref] */,
288 uint32_t major_version /* [in] */,
289 uint32_t minor_version /* [in] */,
290 struct policy_handle *handle /* [out] [ref] */)
292 struct eventlog_OpenEventLogW r;
293 NTSTATUS status;
295 /* In parameters */
296 r.in.unknown0 = unknown0;
297 r.in.logname = logname;
298 r.in.servername = servername;
299 r.in.major_version = major_version;
300 r.in.minor_version = minor_version;
302 if (DEBUGLEVEL >= 10) {
303 NDR_PRINT_IN_DEBUG(eventlog_OpenEventLogW, &r);
306 status = cli->dispatch(cli,
307 mem_ctx,
308 &ndr_table_eventlog,
309 NDR_EVENTLOG_OPENEVENTLOGW,
310 &r);
312 if (!NT_STATUS_IS_OK(status)) {
313 return status;
316 if (DEBUGLEVEL >= 10) {
317 NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogW, &r);
320 if (NT_STATUS_IS_ERR(status)) {
321 return status;
324 /* Return variables */
325 *handle = *r.out.handle;
327 /* Return result */
328 return r.out.result;
331 NTSTATUS rpccli_eventlog_RegisterEventSourceW(struct rpc_pipe_client *cli,
332 TALLOC_CTX *mem_ctx,
333 struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */,
334 struct lsa_String *module_name /* [in] [ref] */,
335 struct lsa_String *reg_module_name /* [in] [ref] */,
336 uint32_t major_version /* [in] */,
337 uint32_t minor_version /* [in] */,
338 struct policy_handle *log_handle /* [out] [ref] */)
340 struct eventlog_RegisterEventSourceW r;
341 NTSTATUS status;
343 /* In parameters */
344 r.in.unknown0 = unknown0;
345 r.in.module_name = module_name;
346 r.in.reg_module_name = reg_module_name;
347 r.in.major_version = major_version;
348 r.in.minor_version = minor_version;
350 if (DEBUGLEVEL >= 10) {
351 NDR_PRINT_IN_DEBUG(eventlog_RegisterEventSourceW, &r);
354 status = cli->dispatch(cli,
355 mem_ctx,
356 &ndr_table_eventlog,
357 NDR_EVENTLOG_REGISTEREVENTSOURCEW,
358 &r);
360 if (!NT_STATUS_IS_OK(status)) {
361 return status;
364 if (DEBUGLEVEL >= 10) {
365 NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceW, &r);
368 if (NT_STATUS_IS_ERR(status)) {
369 return status;
372 /* Return variables */
373 *log_handle = *r.out.log_handle;
375 /* Return result */
376 return r.out.result;
379 NTSTATUS rpccli_eventlog_OpenBackupEventLogW(struct rpc_pipe_client *cli,
380 TALLOC_CTX *mem_ctx,
381 struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */,
382 struct lsa_String *backup_logname /* [in] [ref] */,
383 uint32_t major_version /* [in] */,
384 uint32_t minor_version /* [in] */,
385 struct policy_handle *handle /* [out] [ref] */)
387 struct eventlog_OpenBackupEventLogW r;
388 NTSTATUS status;
390 /* In parameters */
391 r.in.unknown0 = unknown0;
392 r.in.backup_logname = backup_logname;
393 r.in.major_version = major_version;
394 r.in.minor_version = minor_version;
396 if (DEBUGLEVEL >= 10) {
397 NDR_PRINT_IN_DEBUG(eventlog_OpenBackupEventLogW, &r);
400 status = cli->dispatch(cli,
401 mem_ctx,
402 &ndr_table_eventlog,
403 NDR_EVENTLOG_OPENBACKUPEVENTLOGW,
404 &r);
406 if (!NT_STATUS_IS_OK(status)) {
407 return status;
410 if (DEBUGLEVEL >= 10) {
411 NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogW, &r);
414 if (NT_STATUS_IS_ERR(status)) {
415 return status;
418 /* Return variables */
419 *handle = *r.out.handle;
421 /* Return result */
422 return r.out.result;
425 NTSTATUS rpccli_eventlog_ReadEventLogW(struct rpc_pipe_client *cli,
426 TALLOC_CTX *mem_ctx,
427 struct policy_handle *handle /* [in] [ref] */,
428 uint32_t flags /* [in] */,
429 uint32_t offset /* [in] */,
430 uint32_t number_of_bytes /* [in] [range(0,0x7FFFF)] */,
431 uint8_t *data /* [out] [ref,size_is(number_of_bytes)] */,
432 uint32_t *sent_size /* [out] [ref] */,
433 uint32_t *real_size /* [out] [ref] */)
435 struct eventlog_ReadEventLogW r;
436 NTSTATUS status;
438 /* In parameters */
439 r.in.handle = handle;
440 r.in.flags = flags;
441 r.in.offset = offset;
442 r.in.number_of_bytes = number_of_bytes;
444 if (DEBUGLEVEL >= 10) {
445 NDR_PRINT_IN_DEBUG(eventlog_ReadEventLogW, &r);
448 status = cli->dispatch(cli,
449 mem_ctx,
450 &ndr_table_eventlog,
451 NDR_EVENTLOG_READEVENTLOGW,
452 &r);
454 if (!NT_STATUS_IS_OK(status)) {
455 return status;
458 if (DEBUGLEVEL >= 10) {
459 NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogW, &r);
462 if (NT_STATUS_IS_ERR(status)) {
463 return status;
466 /* Return variables */
467 memcpy(data, r.out.data, r.in.number_of_bytes * sizeof(*data));
468 *sent_size = *r.out.sent_size;
469 *real_size = *r.out.real_size;
471 /* Return result */
472 return r.out.result;
475 NTSTATUS rpccli_eventlog_ReportEventW(struct rpc_pipe_client *cli,
476 TALLOC_CTX *mem_ctx,
477 struct policy_handle *handle /* [in] [ref] */,
478 time_t timestamp /* [in] */,
479 enum eventlogEventTypes event_type /* [in] */,
480 uint16_t event_category /* [in] */,
481 uint32_t event_id /* [in] */,
482 uint16_t num_of_strings /* [in] [range(0,256)] */,
483 uint32_t data_size /* [in] [range(0,0x3FFFF)] */,
484 struct lsa_String *servername /* [in] [ref] */,
485 struct dom_sid *user_sid /* [in] [unique] */,
486 struct lsa_String **strings /* [in] [unique,size_is(num_of_strings)] */,
487 uint8_t *data /* [in] [unique,size_is(data_size)] */,
488 uint16_t flags /* [in] */,
489 uint32_t *record_number /* [in,out] [unique] */,
490 time_t *time_written /* [in,out] [unique] */)
492 struct eventlog_ReportEventW r;
493 NTSTATUS status;
495 /* In parameters */
496 r.in.handle = handle;
497 r.in.timestamp = timestamp;
498 r.in.event_type = event_type;
499 r.in.event_category = event_category;
500 r.in.event_id = event_id;
501 r.in.num_of_strings = num_of_strings;
502 r.in.data_size = data_size;
503 r.in.servername = servername;
504 r.in.user_sid = user_sid;
505 r.in.strings = strings;
506 r.in.data = data;
507 r.in.flags = flags;
508 r.in.record_number = record_number;
509 r.in.time_written = time_written;
511 if (DEBUGLEVEL >= 10) {
512 NDR_PRINT_IN_DEBUG(eventlog_ReportEventW, &r);
515 status = cli->dispatch(cli,
516 mem_ctx,
517 &ndr_table_eventlog,
518 NDR_EVENTLOG_REPORTEVENTW,
519 &r);
521 if (!NT_STATUS_IS_OK(status)) {
522 return status;
525 if (DEBUGLEVEL >= 10) {
526 NDR_PRINT_OUT_DEBUG(eventlog_ReportEventW, &r);
529 if (NT_STATUS_IS_ERR(status)) {
530 return status;
533 /* Return variables */
534 if (record_number && r.out.record_number) {
535 *record_number = *r.out.record_number;
537 if (time_written && r.out.time_written) {
538 *time_written = *r.out.time_written;
541 /* Return result */
542 return r.out.result;
545 NTSTATUS rpccli_eventlog_ClearEventLogA(struct rpc_pipe_client *cli,
546 TALLOC_CTX *mem_ctx)
548 struct eventlog_ClearEventLogA r;
549 NTSTATUS status;
551 /* In parameters */
553 if (DEBUGLEVEL >= 10) {
554 NDR_PRINT_IN_DEBUG(eventlog_ClearEventLogA, &r);
557 status = cli->dispatch(cli,
558 mem_ctx,
559 &ndr_table_eventlog,
560 NDR_EVENTLOG_CLEAREVENTLOGA,
561 &r);
563 if (!NT_STATUS_IS_OK(status)) {
564 return status;
567 if (DEBUGLEVEL >= 10) {
568 NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogA, &r);
571 if (NT_STATUS_IS_ERR(status)) {
572 return status;
575 /* Return variables */
577 /* Return result */
578 return r.out.result;
581 NTSTATUS rpccli_eventlog_BackupEventLogA(struct rpc_pipe_client *cli,
582 TALLOC_CTX *mem_ctx)
584 struct eventlog_BackupEventLogA r;
585 NTSTATUS status;
587 /* In parameters */
589 if (DEBUGLEVEL >= 10) {
590 NDR_PRINT_IN_DEBUG(eventlog_BackupEventLogA, &r);
593 status = cli->dispatch(cli,
594 mem_ctx,
595 &ndr_table_eventlog,
596 NDR_EVENTLOG_BACKUPEVENTLOGA,
597 &r);
599 if (!NT_STATUS_IS_OK(status)) {
600 return status;
603 if (DEBUGLEVEL >= 10) {
604 NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogA, &r);
607 if (NT_STATUS_IS_ERR(status)) {
608 return status;
611 /* Return variables */
613 /* Return result */
614 return r.out.result;
617 NTSTATUS rpccli_eventlog_OpenEventLogA(struct rpc_pipe_client *cli,
618 TALLOC_CTX *mem_ctx)
620 struct eventlog_OpenEventLogA r;
621 NTSTATUS status;
623 /* In parameters */
625 if (DEBUGLEVEL >= 10) {
626 NDR_PRINT_IN_DEBUG(eventlog_OpenEventLogA, &r);
629 status = cli->dispatch(cli,
630 mem_ctx,
631 &ndr_table_eventlog,
632 NDR_EVENTLOG_OPENEVENTLOGA,
633 &r);
635 if (!NT_STATUS_IS_OK(status)) {
636 return status;
639 if (DEBUGLEVEL >= 10) {
640 NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogA, &r);
643 if (NT_STATUS_IS_ERR(status)) {
644 return status;
647 /* Return variables */
649 /* Return result */
650 return r.out.result;
653 NTSTATUS rpccli_eventlog_RegisterEventSourceA(struct rpc_pipe_client *cli,
654 TALLOC_CTX *mem_ctx)
656 struct eventlog_RegisterEventSourceA r;
657 NTSTATUS status;
659 /* In parameters */
661 if (DEBUGLEVEL >= 10) {
662 NDR_PRINT_IN_DEBUG(eventlog_RegisterEventSourceA, &r);
665 status = cli->dispatch(cli,
666 mem_ctx,
667 &ndr_table_eventlog,
668 NDR_EVENTLOG_REGISTEREVENTSOURCEA,
669 &r);
671 if (!NT_STATUS_IS_OK(status)) {
672 return status;
675 if (DEBUGLEVEL >= 10) {
676 NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceA, &r);
679 if (NT_STATUS_IS_ERR(status)) {
680 return status;
683 /* Return variables */
685 /* Return result */
686 return r.out.result;
689 NTSTATUS rpccli_eventlog_OpenBackupEventLogA(struct rpc_pipe_client *cli,
690 TALLOC_CTX *mem_ctx)
692 struct eventlog_OpenBackupEventLogA r;
693 NTSTATUS status;
695 /* In parameters */
697 if (DEBUGLEVEL >= 10) {
698 NDR_PRINT_IN_DEBUG(eventlog_OpenBackupEventLogA, &r);
701 status = cli->dispatch(cli,
702 mem_ctx,
703 &ndr_table_eventlog,
704 NDR_EVENTLOG_OPENBACKUPEVENTLOGA,
705 &r);
707 if (!NT_STATUS_IS_OK(status)) {
708 return status;
711 if (DEBUGLEVEL >= 10) {
712 NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogA, &r);
715 if (NT_STATUS_IS_ERR(status)) {
716 return status;
719 /* Return variables */
721 /* Return result */
722 return r.out.result;
725 NTSTATUS rpccli_eventlog_ReadEventLogA(struct rpc_pipe_client *cli,
726 TALLOC_CTX *mem_ctx)
728 struct eventlog_ReadEventLogA r;
729 NTSTATUS status;
731 /* In parameters */
733 if (DEBUGLEVEL >= 10) {
734 NDR_PRINT_IN_DEBUG(eventlog_ReadEventLogA, &r);
737 status = cli->dispatch(cli,
738 mem_ctx,
739 &ndr_table_eventlog,
740 NDR_EVENTLOG_READEVENTLOGA,
741 &r);
743 if (!NT_STATUS_IS_OK(status)) {
744 return status;
747 if (DEBUGLEVEL >= 10) {
748 NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogA, &r);
751 if (NT_STATUS_IS_ERR(status)) {
752 return status;
755 /* Return variables */
757 /* Return result */
758 return r.out.result;
761 NTSTATUS rpccli_eventlog_ReportEventA(struct rpc_pipe_client *cli,
762 TALLOC_CTX *mem_ctx)
764 struct eventlog_ReportEventA r;
765 NTSTATUS status;
767 /* In parameters */
769 if (DEBUGLEVEL >= 10) {
770 NDR_PRINT_IN_DEBUG(eventlog_ReportEventA, &r);
773 status = cli->dispatch(cli,
774 mem_ctx,
775 &ndr_table_eventlog,
776 NDR_EVENTLOG_REPORTEVENTA,
777 &r);
779 if (!NT_STATUS_IS_OK(status)) {
780 return status;
783 if (DEBUGLEVEL >= 10) {
784 NDR_PRINT_OUT_DEBUG(eventlog_ReportEventA, &r);
787 if (NT_STATUS_IS_ERR(status)) {
788 return status;
791 /* Return variables */
793 /* Return result */
794 return r.out.result;
797 NTSTATUS rpccli_eventlog_RegisterClusterSvc(struct rpc_pipe_client *cli,
798 TALLOC_CTX *mem_ctx)
800 struct eventlog_RegisterClusterSvc r;
801 NTSTATUS status;
803 /* In parameters */
805 if (DEBUGLEVEL >= 10) {
806 NDR_PRINT_IN_DEBUG(eventlog_RegisterClusterSvc, &r);
809 status = cli->dispatch(cli,
810 mem_ctx,
811 &ndr_table_eventlog,
812 NDR_EVENTLOG_REGISTERCLUSTERSVC,
813 &r);
815 if (!NT_STATUS_IS_OK(status)) {
816 return status;
819 if (DEBUGLEVEL >= 10) {
820 NDR_PRINT_OUT_DEBUG(eventlog_RegisterClusterSvc, &r);
823 if (NT_STATUS_IS_ERR(status)) {
824 return status;
827 /* Return variables */
829 /* Return result */
830 return r.out.result;
833 NTSTATUS rpccli_eventlog_DeregisterClusterSvc(struct rpc_pipe_client *cli,
834 TALLOC_CTX *mem_ctx)
836 struct eventlog_DeregisterClusterSvc r;
837 NTSTATUS status;
839 /* In parameters */
841 if (DEBUGLEVEL >= 10) {
842 NDR_PRINT_IN_DEBUG(eventlog_DeregisterClusterSvc, &r);
845 status = cli->dispatch(cli,
846 mem_ctx,
847 &ndr_table_eventlog,
848 NDR_EVENTLOG_DEREGISTERCLUSTERSVC,
849 &r);
851 if (!NT_STATUS_IS_OK(status)) {
852 return status;
855 if (DEBUGLEVEL >= 10) {
856 NDR_PRINT_OUT_DEBUG(eventlog_DeregisterClusterSvc, &r);
859 if (NT_STATUS_IS_ERR(status)) {
860 return status;
863 /* Return variables */
865 /* Return result */
866 return r.out.result;
869 NTSTATUS rpccli_eventlog_WriteClusterEvents(struct rpc_pipe_client *cli,
870 TALLOC_CTX *mem_ctx)
872 struct eventlog_WriteClusterEvents r;
873 NTSTATUS status;
875 /* In parameters */
877 if (DEBUGLEVEL >= 10) {
878 NDR_PRINT_IN_DEBUG(eventlog_WriteClusterEvents, &r);
881 status = cli->dispatch(cli,
882 mem_ctx,
883 &ndr_table_eventlog,
884 NDR_EVENTLOG_WRITECLUSTEREVENTS,
885 &r);
887 if (!NT_STATUS_IS_OK(status)) {
888 return status;
891 if (DEBUGLEVEL >= 10) {
892 NDR_PRINT_OUT_DEBUG(eventlog_WriteClusterEvents, &r);
895 if (NT_STATUS_IS_ERR(status)) {
896 return status;
899 /* Return variables */
901 /* Return result */
902 return r.out.result;
905 NTSTATUS rpccli_eventlog_GetLogIntormation(struct rpc_pipe_client *cli,
906 TALLOC_CTX *mem_ctx,
907 struct policy_handle *handle /* [in] [ref] */,
908 uint32_t level /* [in] */,
909 uint8_t *buffer /* [out] [ref,size_is(buf_size)] */,
910 uint32_t buf_size /* [in] [range(0,1024)] */,
911 uint32_t *bytes_needed /* [out] [ref] */)
913 struct eventlog_GetLogIntormation r;
914 NTSTATUS status;
916 /* In parameters */
917 r.in.handle = handle;
918 r.in.level = level;
919 r.in.buf_size = buf_size;
921 if (DEBUGLEVEL >= 10) {
922 NDR_PRINT_IN_DEBUG(eventlog_GetLogIntormation, &r);
925 status = cli->dispatch(cli,
926 mem_ctx,
927 &ndr_table_eventlog,
928 NDR_EVENTLOG_GETLOGINTORMATION,
929 &r);
931 if (!NT_STATUS_IS_OK(status)) {
932 return status;
935 if (DEBUGLEVEL >= 10) {
936 NDR_PRINT_OUT_DEBUG(eventlog_GetLogIntormation, &r);
939 if (NT_STATUS_IS_ERR(status)) {
940 return status;
943 /* Return variables */
944 memcpy(buffer, r.out.buffer, r.in.buf_size * sizeof(*buffer));
945 *bytes_needed = *r.out.bytes_needed;
947 /* Return result */
948 return r.out.result;
951 NTSTATUS rpccli_eventlog_FlushEventLog(struct rpc_pipe_client *cli,
952 TALLOC_CTX *mem_ctx,
953 struct policy_handle *handle /* [in] [ref] */)
955 struct eventlog_FlushEventLog r;
956 NTSTATUS status;
958 /* In parameters */
959 r.in.handle = handle;
961 if (DEBUGLEVEL >= 10) {
962 NDR_PRINT_IN_DEBUG(eventlog_FlushEventLog, &r);
965 status = cli->dispatch(cli,
966 mem_ctx,
967 &ndr_table_eventlog,
968 NDR_EVENTLOG_FLUSHEVENTLOG,
969 &r);
971 if (!NT_STATUS_IS_OK(status)) {
972 return status;
975 if (DEBUGLEVEL >= 10) {
976 NDR_PRINT_OUT_DEBUG(eventlog_FlushEventLog, &r);
979 if (NT_STATUS_IS_ERR(status)) {
980 return status;
983 /* Return variables */
985 /* Return result */
986 return r.out.result;
989 NTSTATUS rpccli_eventlog_ReportEventAndSourceW(struct rpc_pipe_client *cli,
990 TALLOC_CTX *mem_ctx,
991 struct policy_handle *handle /* [in] [ref] */,
992 time_t timestamp /* [in] */,
993 enum eventlogEventTypes event_type /* [in] */,
994 uint16_t event_category /* [in] */,
995 uint32_t event_id /* [in] */,
996 struct lsa_String *sourcename /* [in] [ref] */,
997 uint16_t num_of_strings /* [in] [range(0,256)] */,
998 uint32_t data_size /* [in] [range(0,0x3FFFF)] */,
999 struct lsa_String *servername /* [in] [ref] */,
1000 struct dom_sid *user_sid /* [in] [unique] */,
1001 struct lsa_String **strings /* [in] [unique,size_is(num_of_strings)] */,
1002 uint8_t *data /* [in] [unique,size_is(data_size)] */,
1003 uint16_t flags /* [in] */,
1004 uint32_t *record_number /* [in,out] [unique] */,
1005 time_t *time_written /* [in,out] [unique] */)
1007 struct eventlog_ReportEventAndSourceW r;
1008 NTSTATUS status;
1010 /* In parameters */
1011 r.in.handle = handle;
1012 r.in.timestamp = timestamp;
1013 r.in.event_type = event_type;
1014 r.in.event_category = event_category;
1015 r.in.event_id = event_id;
1016 r.in.sourcename = sourcename;
1017 r.in.num_of_strings = num_of_strings;
1018 r.in.data_size = data_size;
1019 r.in.servername = servername;
1020 r.in.user_sid = user_sid;
1021 r.in.strings = strings;
1022 r.in.data = data;
1023 r.in.flags = flags;
1024 r.in.record_number = record_number;
1025 r.in.time_written = time_written;
1027 if (DEBUGLEVEL >= 10) {
1028 NDR_PRINT_IN_DEBUG(eventlog_ReportEventAndSourceW, &r);
1031 status = cli->dispatch(cli,
1032 mem_ctx,
1033 &ndr_table_eventlog,
1034 NDR_EVENTLOG_REPORTEVENTANDSOURCEW,
1035 &r);
1037 if (!NT_STATUS_IS_OK(status)) {
1038 return status;
1041 if (DEBUGLEVEL >= 10) {
1042 NDR_PRINT_OUT_DEBUG(eventlog_ReportEventAndSourceW, &r);
1045 if (NT_STATUS_IS_ERR(status)) {
1046 return status;
1049 /* Return variables */
1050 if (record_number && r.out.record_number) {
1051 *record_number = *r.out.record_number;
1053 if (time_written && r.out.time_written) {
1054 *time_written = *r.out.time_written;
1057 /* Return result */
1058 return r.out.result;