/* [<][>][^][v][top][bottom][index][help] */
DEFINITIONS
This source file includes following definitions.
- rpccli_eventlog_ClearEventLogW
- rpccli_eventlog_BackupEventLogW
- rpccli_eventlog_CloseEventLog
- rpccli_eventlog_DeregisterEventSource
- rpccli_eventlog_GetNumRecords
- rpccli_eventlog_GetOldestRecord
- rpccli_eventlog_ChangeNotify
- rpccli_eventlog_OpenEventLogW
- rpccli_eventlog_RegisterEventSourceW
- rpccli_eventlog_OpenBackupEventLogW
- rpccli_eventlog_ReadEventLogW
- rpccli_eventlog_ReportEventW
- rpccli_eventlog_ClearEventLogA
- rpccli_eventlog_BackupEventLogA
- rpccli_eventlog_OpenEventLogA
- rpccli_eventlog_RegisterEventSourceA
- rpccli_eventlog_OpenBackupEventLogA
- rpccli_eventlog_ReadEventLogA
- rpccli_eventlog_ReportEventA
- rpccli_eventlog_RegisterClusterSvc
- rpccli_eventlog_DeregisterClusterSvc
- rpccli_eventlog_WriteClusterEvents
- rpccli_eventlog_GetLogInformation
- rpccli_eventlog_FlushEventLog
- rpccli_eventlog_ReportEventAndSourceW
1 /*
2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
4 */
5
6 #include "includes.h"
7 #include "../librpc/gen_ndr/cli_eventlog.h"
8
9 NTSTATUS rpccli_eventlog_ClearEventLogW(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
10 TALLOC_CTX *mem_ctx,
11 struct policy_handle *handle /* [in] [ref] */,
12 struct lsa_String *backupfile /* [in] [unique] */)
13 {
14 struct eventlog_ClearEventLogW r;
15 NTSTATUS status;
16
17 /* In parameters */
18 r.in.handle = handle;
19 r.in.backupfile = backupfile;
20
21 if (DEBUGLEVEL >= 10) {
22 NDR_PRINT_IN_DEBUG(eventlog_ClearEventLogW, &r);
23 }
24
25 status = cli->dispatch(cli,
26 mem_ctx,
27 &ndr_table_eventlog,
28 NDR_EVENTLOG_CLEAREVENTLOGW,
29 &r);
30
31 if (!NT_STATUS_IS_OK(status)) {
32 return status;
33 }
34
35 if (DEBUGLEVEL >= 10) {
36 NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogW, &r);
37 }
38
39 if (NT_STATUS_IS_ERR(status)) {
40 return status;
41 }
42
43 /* Return variables */
44
45 /* Return result */
46 return r.out.result;
47 }
48
49 NTSTATUS rpccli_eventlog_BackupEventLogW(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
50 TALLOC_CTX *mem_ctx,
51 struct policy_handle *handle /* [in] [ref] */,
52 struct lsa_String *backup_filename /* [in] [ref] */)
53 {
54 struct eventlog_BackupEventLogW r;
55 NTSTATUS status;
56
57 /* In parameters */
58 r.in.handle = handle;
59 r.in.backup_filename = backup_filename;
60
61 if (DEBUGLEVEL >= 10) {
62 NDR_PRINT_IN_DEBUG(eventlog_BackupEventLogW, &r);
63 }
64
65 status = cli->dispatch(cli,
66 mem_ctx,
67 &ndr_table_eventlog,
68 NDR_EVENTLOG_BACKUPEVENTLOGW,
69 &r);
70
71 if (!NT_STATUS_IS_OK(status)) {
72 return status;
73 }
74
75 if (DEBUGLEVEL >= 10) {
76 NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogW, &r);
77 }
78
79 if (NT_STATUS_IS_ERR(status)) {
80 return status;
81 }
82
83 /* Return variables */
84
85 /* Return result */
86 return r.out.result;
87 }
88
89 NTSTATUS rpccli_eventlog_CloseEventLog(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
90 TALLOC_CTX *mem_ctx,
91 struct policy_handle *handle /* [in,out] [ref] */)
92 {
93 struct eventlog_CloseEventLog r;
94 NTSTATUS status;
95
96 /* In parameters */
97 r.in.handle = handle;
98
99 if (DEBUGLEVEL >= 10) {
100 NDR_PRINT_IN_DEBUG(eventlog_CloseEventLog, &r);
101 }
102
103 status = cli->dispatch(cli,
104 mem_ctx,
105 &ndr_table_eventlog,
106 NDR_EVENTLOG_CLOSEEVENTLOG,
107 &r);
108
109 if (!NT_STATUS_IS_OK(status)) {
110 return status;
111 }
112
113 if (DEBUGLEVEL >= 10) {
114 NDR_PRINT_OUT_DEBUG(eventlog_CloseEventLog, &r);
115 }
116
117 if (NT_STATUS_IS_ERR(status)) {
118 return status;
119 }
120
121 /* Return variables */
122 *handle = *r.out.handle;
123
124 /* Return result */
125 return r.out.result;
126 }
127
128 NTSTATUS rpccli_eventlog_DeregisterEventSource(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
129 TALLOC_CTX *mem_ctx,
130 struct policy_handle *handle /* [in,out] [ref] */)
131 {
132 struct eventlog_DeregisterEventSource r;
133 NTSTATUS status;
134
135 /* In parameters */
136 r.in.handle = handle;
137
138 if (DEBUGLEVEL >= 10) {
139 NDR_PRINT_IN_DEBUG(eventlog_DeregisterEventSource, &r);
140 }
141
142 status = cli->dispatch(cli,
143 mem_ctx,
144 &ndr_table_eventlog,
145 NDR_EVENTLOG_DEREGISTEREVENTSOURCE,
146 &r);
147
148 if (!NT_STATUS_IS_OK(status)) {
149 return status;
150 }
151
152 if (DEBUGLEVEL >= 10) {
153 NDR_PRINT_OUT_DEBUG(eventlog_DeregisterEventSource, &r);
154 }
155
156 if (NT_STATUS_IS_ERR(status)) {
157 return status;
158 }
159
160 /* Return variables */
161 *handle = *r.out.handle;
162
163 /* Return result */
164 return r.out.result;
165 }
166
167 NTSTATUS rpccli_eventlog_GetNumRecords(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
168 TALLOC_CTX *mem_ctx,
169 struct policy_handle *handle /* [in] [ref] */,
170 uint32_t *number /* [out] [ref] */)
171 {
172 struct eventlog_GetNumRecords r;
173 NTSTATUS status;
174
175 /* In parameters */
176 r.in.handle = handle;
177
178 if (DEBUGLEVEL >= 10) {
179 NDR_PRINT_IN_DEBUG(eventlog_GetNumRecords, &r);
180 }
181
182 status = cli->dispatch(cli,
183 mem_ctx,
184 &ndr_table_eventlog,
185 NDR_EVENTLOG_GETNUMRECORDS,
186 &r);
187
188 if (!NT_STATUS_IS_OK(status)) {
189 return status;
190 }
191
192 if (DEBUGLEVEL >= 10) {
193 NDR_PRINT_OUT_DEBUG(eventlog_GetNumRecords, &r);
194 }
195
196 if (NT_STATUS_IS_ERR(status)) {
197 return status;
198 }
199
200 /* Return variables */
201 *number = *r.out.number;
202
203 /* Return result */
204 return r.out.result;
205 }
206
207 NTSTATUS rpccli_eventlog_GetOldestRecord(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
208 TALLOC_CTX *mem_ctx,
209 struct policy_handle *handle /* [in] [ref] */,
210 uint32_t *oldest_entry /* [out] [ref] */)
211 {
212 struct eventlog_GetOldestRecord r;
213 NTSTATUS status;
214
215 /* In parameters */
216 r.in.handle = handle;
217
218 if (DEBUGLEVEL >= 10) {
219 NDR_PRINT_IN_DEBUG(eventlog_GetOldestRecord, &r);
220 }
221
222 status = cli->dispatch(cli,
223 mem_ctx,
224 &ndr_table_eventlog,
225 NDR_EVENTLOG_GETOLDESTRECORD,
226 &r);
227
228 if (!NT_STATUS_IS_OK(status)) {
229 return status;
230 }
231
232 if (DEBUGLEVEL >= 10) {
233 NDR_PRINT_OUT_DEBUG(eventlog_GetOldestRecord, &r);
234 }
235
236 if (NT_STATUS_IS_ERR(status)) {
237 return status;
238 }
239
240 /* Return variables */
241 *oldest_entry = *r.out.oldest_entry;
242
243 /* Return result */
244 return r.out.result;
245 }
246
247 NTSTATUS rpccli_eventlog_ChangeNotify(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
248 TALLOC_CTX *mem_ctx)
249 {
250 struct eventlog_ChangeNotify r;
251 NTSTATUS status;
252
253 /* In parameters */
254
255 if (DEBUGLEVEL >= 10) {
256 NDR_PRINT_IN_DEBUG(eventlog_ChangeNotify, &r);
257 }
258
259 status = cli->dispatch(cli,
260 mem_ctx,
261 &ndr_table_eventlog,
262 NDR_EVENTLOG_CHANGENOTIFY,
263 &r);
264
265 if (!NT_STATUS_IS_OK(status)) {
266 return status;
267 }
268
269 if (DEBUGLEVEL >= 10) {
270 NDR_PRINT_OUT_DEBUG(eventlog_ChangeNotify, &r);
271 }
272
273 if (NT_STATUS_IS_ERR(status)) {
274 return status;
275 }
276
277 /* Return variables */
278
279 /* Return result */
280 return r.out.result;
281 }
282
283 NTSTATUS rpccli_eventlog_OpenEventLogW(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
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] */)
291 {
292 struct eventlog_OpenEventLogW r;
293 NTSTATUS status;
294
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;
301
302 if (DEBUGLEVEL >= 10) {
303 NDR_PRINT_IN_DEBUG(eventlog_OpenEventLogW, &r);
304 }
305
306 status = cli->dispatch(cli,
307 mem_ctx,
308 &ndr_table_eventlog,
309 NDR_EVENTLOG_OPENEVENTLOGW,
310 &r);
311
312 if (!NT_STATUS_IS_OK(status)) {
313 return status;
314 }
315
316 if (DEBUGLEVEL >= 10) {
317 NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogW, &r);
318 }
319
320 if (NT_STATUS_IS_ERR(status)) {
321 return status;
322 }
323
324 /* Return variables */
325 *handle = *r.out.handle;
326
327 /* Return result */
328 return r.out.result;
329 }
330
331 NTSTATUS rpccli_eventlog_RegisterEventSourceW(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
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] */)
339 {
340 struct eventlog_RegisterEventSourceW r;
341 NTSTATUS status;
342
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;
349
350 if (DEBUGLEVEL >= 10) {
351 NDR_PRINT_IN_DEBUG(eventlog_RegisterEventSourceW, &r);
352 }
353
354 status = cli->dispatch(cli,
355 mem_ctx,
356 &ndr_table_eventlog,
357 NDR_EVENTLOG_REGISTEREVENTSOURCEW,
358 &r);
359
360 if (!NT_STATUS_IS_OK(status)) {
361 return status;
362 }
363
364 if (DEBUGLEVEL >= 10) {
365 NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceW, &r);
366 }
367
368 if (NT_STATUS_IS_ERR(status)) {
369 return status;
370 }
371
372 /* Return variables */
373 *log_handle = *r.out.log_handle;
374
375 /* Return result */
376 return r.out.result;
377 }
378
379 NTSTATUS rpccli_eventlog_OpenBackupEventLogW(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
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] */)
386 {
387 struct eventlog_OpenBackupEventLogW r;
388 NTSTATUS status;
389
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;
395
396 if (DEBUGLEVEL >= 10) {
397 NDR_PRINT_IN_DEBUG(eventlog_OpenBackupEventLogW, &r);
398 }
399
400 status = cli->dispatch(cli,
401 mem_ctx,
402 &ndr_table_eventlog,
403 NDR_EVENTLOG_OPENBACKUPEVENTLOGW,
404 &r);
405
406 if (!NT_STATUS_IS_OK(status)) {
407 return status;
408 }
409
410 if (DEBUGLEVEL >= 10) {
411 NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogW, &r);
412 }
413
414 if (NT_STATUS_IS_ERR(status)) {
415 return status;
416 }
417
418 /* Return variables */
419 *handle = *r.out.handle;
420
421 /* Return result */
422 return r.out.result;
423 }
424
425 NTSTATUS rpccli_eventlog_ReadEventLogW(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
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] */)
434 {
435 struct eventlog_ReadEventLogW r;
436 NTSTATUS status;
437
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;
443
444 if (DEBUGLEVEL >= 10) {
445 NDR_PRINT_IN_DEBUG(eventlog_ReadEventLogW, &r);
446 }
447
448 status = cli->dispatch(cli,
449 mem_ctx,
450 &ndr_table_eventlog,
451 NDR_EVENTLOG_READEVENTLOGW,
452 &r);
453
454 if (!NT_STATUS_IS_OK(status)) {
455 return status;
456 }
457
458 if (DEBUGLEVEL >= 10) {
459 NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogW, &r);
460 }
461
462 if (NT_STATUS_IS_ERR(status)) {
463 return status;
464 }
465
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;
470
471 /* Return result */
472 return r.out.result;
473 }
474
475 NTSTATUS rpccli_eventlog_ReportEventW(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
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] */)
491 {
492 struct eventlog_ReportEventW r;
493 NTSTATUS status;
494
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;
510
511 if (DEBUGLEVEL >= 10) {
512 NDR_PRINT_IN_DEBUG(eventlog_ReportEventW, &r);
513 }
514
515 status = cli->dispatch(cli,
516 mem_ctx,
517 &ndr_table_eventlog,
518 NDR_EVENTLOG_REPORTEVENTW,
519 &r);
520
521 if (!NT_STATUS_IS_OK(status)) {
522 return status;
523 }
524
525 if (DEBUGLEVEL >= 10) {
526 NDR_PRINT_OUT_DEBUG(eventlog_ReportEventW, &r);
527 }
528
529 if (NT_STATUS_IS_ERR(status)) {
530 return status;
531 }
532
533 /* Return variables */
534 if (record_number && r.out.record_number) {
535 *record_number = *r.out.record_number;
536 }
537 if (time_written && r.out.time_written) {
538 *time_written = *r.out.time_written;
539 }
540
541 /* Return result */
542 return r.out.result;
543 }
544
545 NTSTATUS rpccli_eventlog_ClearEventLogA(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
546 TALLOC_CTX *mem_ctx)
547 {
548 struct eventlog_ClearEventLogA r;
549 NTSTATUS status;
550
551 /* In parameters */
552
553 if (DEBUGLEVEL >= 10) {
554 NDR_PRINT_IN_DEBUG(eventlog_ClearEventLogA, &r);
555 }
556
557 status = cli->dispatch(cli,
558 mem_ctx,
559 &ndr_table_eventlog,
560 NDR_EVENTLOG_CLEAREVENTLOGA,
561 &r);
562
563 if (!NT_STATUS_IS_OK(status)) {
564 return status;
565 }
566
567 if (DEBUGLEVEL >= 10) {
568 NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogA, &r);
569 }
570
571 if (NT_STATUS_IS_ERR(status)) {
572 return status;
573 }
574
575 /* Return variables */
576
577 /* Return result */
578 return r.out.result;
579 }
580
581 NTSTATUS rpccli_eventlog_BackupEventLogA(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
582 TALLOC_CTX *mem_ctx)
583 {
584 struct eventlog_BackupEventLogA r;
585 NTSTATUS status;
586
587 /* In parameters */
588
589 if (DEBUGLEVEL >= 10) {
590 NDR_PRINT_IN_DEBUG(eventlog_BackupEventLogA, &r);
591 }
592
593 status = cli->dispatch(cli,
594 mem_ctx,
595 &ndr_table_eventlog,
596 NDR_EVENTLOG_BACKUPEVENTLOGA,
597 &r);
598
599 if (!NT_STATUS_IS_OK(status)) {
600 return status;
601 }
602
603 if (DEBUGLEVEL >= 10) {
604 NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogA, &r);
605 }
606
607 if (NT_STATUS_IS_ERR(status)) {
608 return status;
609 }
610
611 /* Return variables */
612
613 /* Return result */
614 return r.out.result;
615 }
616
617 NTSTATUS rpccli_eventlog_OpenEventLogA(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
618 TALLOC_CTX *mem_ctx)
619 {
620 struct eventlog_OpenEventLogA r;
621 NTSTATUS status;
622
623 /* In parameters */
624
625 if (DEBUGLEVEL >= 10) {
626 NDR_PRINT_IN_DEBUG(eventlog_OpenEventLogA, &r);
627 }
628
629 status = cli->dispatch(cli,
630 mem_ctx,
631 &ndr_table_eventlog,
632 NDR_EVENTLOG_OPENEVENTLOGA,
633 &r);
634
635 if (!NT_STATUS_IS_OK(status)) {
636 return status;
637 }
638
639 if (DEBUGLEVEL >= 10) {
640 NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogA, &r);
641 }
642
643 if (NT_STATUS_IS_ERR(status)) {
644 return status;
645 }
646
647 /* Return variables */
648
649 /* Return result */
650 return r.out.result;
651 }
652
653 NTSTATUS rpccli_eventlog_RegisterEventSourceA(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
654 TALLOC_CTX *mem_ctx)
655 {
656 struct eventlog_RegisterEventSourceA r;
657 NTSTATUS status;
658
659 /* In parameters */
660
661 if (DEBUGLEVEL >= 10) {
662 NDR_PRINT_IN_DEBUG(eventlog_RegisterEventSourceA, &r);
663 }
664
665 status = cli->dispatch(cli,
666 mem_ctx,
667 &ndr_table_eventlog,
668 NDR_EVENTLOG_REGISTEREVENTSOURCEA,
669 &r);
670
671 if (!NT_STATUS_IS_OK(status)) {
672 return status;
673 }
674
675 if (DEBUGLEVEL >= 10) {
676 NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceA, &r);
677 }
678
679 if (NT_STATUS_IS_ERR(status)) {
680 return status;
681 }
682
683 /* Return variables */
684
685 /* Return result */
686 return r.out.result;
687 }
688
689 NTSTATUS rpccli_eventlog_OpenBackupEventLogA(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
690 TALLOC_CTX *mem_ctx)
691 {
692 struct eventlog_OpenBackupEventLogA r;
693 NTSTATUS status;
694
695 /* In parameters */
696
697 if (DEBUGLEVEL >= 10) {
698 NDR_PRINT_IN_DEBUG(eventlog_OpenBackupEventLogA, &r);
699 }
700
701 status = cli->dispatch(cli,
702 mem_ctx,
703 &ndr_table_eventlog,
704 NDR_EVENTLOG_OPENBACKUPEVENTLOGA,
705 &r);
706
707 if (!NT_STATUS_IS_OK(status)) {
708 return status;
709 }
710
711 if (DEBUGLEVEL >= 10) {
712 NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogA, &r);
713 }
714
715 if (NT_STATUS_IS_ERR(status)) {
716 return status;
717 }
718
719 /* Return variables */
720
721 /* Return result */
722 return r.out.result;
723 }
724
725 NTSTATUS rpccli_eventlog_ReadEventLogA(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
726 TALLOC_CTX *mem_ctx)
727 {
728 struct eventlog_ReadEventLogA r;
729 NTSTATUS status;
730
731 /* In parameters */
732
733 if (DEBUGLEVEL >= 10) {
734 NDR_PRINT_IN_DEBUG(eventlog_ReadEventLogA, &r);
735 }
736
737 status = cli->dispatch(cli,
738 mem_ctx,
739 &ndr_table_eventlog,
740 NDR_EVENTLOG_READEVENTLOGA,
741 &r);
742
743 if (!NT_STATUS_IS_OK(status)) {
744 return status;
745 }
746
747 if (DEBUGLEVEL >= 10) {
748 NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogA, &r);
749 }
750
751 if (NT_STATUS_IS_ERR(status)) {
752 return status;
753 }
754
755 /* Return variables */
756
757 /* Return result */
758 return r.out.result;
759 }
760
761 NTSTATUS rpccli_eventlog_ReportEventA(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
762 TALLOC_CTX *mem_ctx)
763 {
764 struct eventlog_ReportEventA r;
765 NTSTATUS status;
766
767 /* In parameters */
768
769 if (DEBUGLEVEL >= 10) {
770 NDR_PRINT_IN_DEBUG(eventlog_ReportEventA, &r);
771 }
772
773 status = cli->dispatch(cli,
774 mem_ctx,
775 &ndr_table_eventlog,
776 NDR_EVENTLOG_REPORTEVENTA,
777 &r);
778
779 if (!NT_STATUS_IS_OK(status)) {
780 return status;
781 }
782
783 if (DEBUGLEVEL >= 10) {
784 NDR_PRINT_OUT_DEBUG(eventlog_ReportEventA, &r);
785 }
786
787 if (NT_STATUS_IS_ERR(status)) {
788 return status;
789 }
790
791 /* Return variables */
792
793 /* Return result */
794 return r.out.result;
795 }
796
797 NTSTATUS rpccli_eventlog_RegisterClusterSvc(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
798 TALLOC_CTX *mem_ctx)
799 {
800 struct eventlog_RegisterClusterSvc r;
801 NTSTATUS status;
802
803 /* In parameters */
804
805 if (DEBUGLEVEL >= 10) {
806 NDR_PRINT_IN_DEBUG(eventlog_RegisterClusterSvc, &r);
807 }
808
809 status = cli->dispatch(cli,
810 mem_ctx,
811 &ndr_table_eventlog,
812 NDR_EVENTLOG_REGISTERCLUSTERSVC,
813 &r);
814
815 if (!NT_STATUS_IS_OK(status)) {
816 return status;
817 }
818
819 if (DEBUGLEVEL >= 10) {
820 NDR_PRINT_OUT_DEBUG(eventlog_RegisterClusterSvc, &r);
821 }
822
823 if (NT_STATUS_IS_ERR(status)) {
824 return status;
825 }
826
827 /* Return variables */
828
829 /* Return result */
830 return r.out.result;
831 }
832
833 NTSTATUS rpccli_eventlog_DeregisterClusterSvc(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
834 TALLOC_CTX *mem_ctx)
835 {
836 struct eventlog_DeregisterClusterSvc r;
837 NTSTATUS status;
838
839 /* In parameters */
840
841 if (DEBUGLEVEL >= 10) {
842 NDR_PRINT_IN_DEBUG(eventlog_DeregisterClusterSvc, &r);
843 }
844
845 status = cli->dispatch(cli,
846 mem_ctx,
847 &ndr_table_eventlog,
848 NDR_EVENTLOG_DEREGISTERCLUSTERSVC,
849 &r);
850
851 if (!NT_STATUS_IS_OK(status)) {
852 return status;
853 }
854
855 if (DEBUGLEVEL >= 10) {
856 NDR_PRINT_OUT_DEBUG(eventlog_DeregisterClusterSvc, &r);
857 }
858
859 if (NT_STATUS_IS_ERR(status)) {
860 return status;
861 }
862
863 /* Return variables */
864
865 /* Return result */
866 return r.out.result;
867 }
868
869 NTSTATUS rpccli_eventlog_WriteClusterEvents(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
870 TALLOC_CTX *mem_ctx)
871 {
872 struct eventlog_WriteClusterEvents r;
873 NTSTATUS status;
874
875 /* In parameters */
876
877 if (DEBUGLEVEL >= 10) {
878 NDR_PRINT_IN_DEBUG(eventlog_WriteClusterEvents, &r);
879 }
880
881 status = cli->dispatch(cli,
882 mem_ctx,
883 &ndr_table_eventlog,
884 NDR_EVENTLOG_WRITECLUSTEREVENTS,
885 &r);
886
887 if (!NT_STATUS_IS_OK(status)) {
888 return status;
889 }
890
891 if (DEBUGLEVEL >= 10) {
892 NDR_PRINT_OUT_DEBUG(eventlog_WriteClusterEvents, &r);
893 }
894
895 if (NT_STATUS_IS_ERR(status)) {
896 return status;
897 }
898
899 /* Return variables */
900
901 /* Return result */
902 return r.out.result;
903 }
904
905 NTSTATUS rpccli_eventlog_GetLogInformation(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
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] */)
912 {
913 struct eventlog_GetLogInformation r;
914 NTSTATUS status;
915
916 /* In parameters */
917 r.in.handle = handle;
918 r.in.level = level;
919 r.in.buf_size = buf_size;
920
921 if (DEBUGLEVEL >= 10) {
922 NDR_PRINT_IN_DEBUG(eventlog_GetLogInformation, &r);
923 }
924
925 status = cli->dispatch(cli,
926 mem_ctx,
927 &ndr_table_eventlog,
928 NDR_EVENTLOG_GETLOGINFORMATION,
929 &r);
930
931 if (!NT_STATUS_IS_OK(status)) {
932 return status;
933 }
934
935 if (DEBUGLEVEL >= 10) {
936 NDR_PRINT_OUT_DEBUG(eventlog_GetLogInformation, &r);
937 }
938
939 if (NT_STATUS_IS_ERR(status)) {
940 return status;
941 }
942
943 /* Return variables */
944 memcpy(buffer, r.out.buffer, r.in.buf_size * sizeof(*buffer));
945 *bytes_needed = *r.out.bytes_needed;
946
947 /* Return result */
948 return r.out.result;
949 }
950
951 NTSTATUS rpccli_eventlog_FlushEventLog(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
952 TALLOC_CTX *mem_ctx,
953 struct policy_handle *handle /* [in] [ref] */)
954 {
955 struct eventlog_FlushEventLog r;
956 NTSTATUS status;
957
958 /* In parameters */
959 r.in.handle = handle;
960
961 if (DEBUGLEVEL >= 10) {
962 NDR_PRINT_IN_DEBUG(eventlog_FlushEventLog, &r);
963 }
964
965 status = cli->dispatch(cli,
966 mem_ctx,
967 &ndr_table_eventlog,
968 NDR_EVENTLOG_FLUSHEVENTLOG,
969 &r);
970
971 if (!NT_STATUS_IS_OK(status)) {
972 return status;
973 }
974
975 if (DEBUGLEVEL >= 10) {
976 NDR_PRINT_OUT_DEBUG(eventlog_FlushEventLog, &r);
977 }
978
979 if (NT_STATUS_IS_ERR(status)) {
980 return status;
981 }
982
983 /* Return variables */
984
985 /* Return result */
986 return r.out.result;
987 }
988
989 NTSTATUS rpccli_eventlog_ReportEventAndSourceW(struct rpc_pipe_client *cli,
/* [<][>][^][v][top][bottom][index][help] */
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] */)
1006 {
1007 struct eventlog_ReportEventAndSourceW r;
1008 NTSTATUS status;
1009
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;
1026
1027 if (DEBUGLEVEL >= 10) {
1028 NDR_PRINT_IN_DEBUG(eventlog_ReportEventAndSourceW, &r);
1029 }
1030
1031 status = cli->dispatch(cli,
1032 mem_ctx,
1033 &ndr_table_eventlog,
1034 NDR_EVENTLOG_REPORTEVENTANDSOURCEW,
1035 &r);
1036
1037 if (!NT_STATUS_IS_OK(status)) {
1038 return status;
1039 }
1040
1041 if (DEBUGLEVEL >= 10) {
1042 NDR_PRINT_OUT_DEBUG(eventlog_ReportEventAndSourceW, &r);
1043 }
1044
1045 if (NT_STATUS_IS_ERR(status)) {
1046 return status;
1047 }
1048
1049 /* Return variables */
1050 if (record_number && r.out.record_number) {
1051 *record_number = *r.out.record_number;
1052 }
1053 if (time_written && r.out.time_written) {
1054 *time_written = *r.out.time_written;
1055 }
1056
1057 /* Return result */
1058 return r.out.result;
1059 }
1060