WHATSNEW: Start release notes for Samba 3.5.21.
[Samba.git] / librpc / gen_ndr / cli_eventlog.c
blobf5a86ca11a88090625364390ad408f2042198163
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 struct rpccli_eventlog_ClearEventLogW_state {
10 struct eventlog_ClearEventLogW orig;
11 struct eventlog_ClearEventLogW tmp;
12 TALLOC_CTX *out_mem_ctx;
13 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
16 static void rpccli_eventlog_ClearEventLogW_done(struct tevent_req *subreq);
18 struct tevent_req *rpccli_eventlog_ClearEventLogW_send(TALLOC_CTX *mem_ctx,
19 struct tevent_context *ev,
20 struct rpc_pipe_client *cli,
21 struct policy_handle *_handle /* [in] [ref] */,
22 struct lsa_String *_backupfile /* [in] [unique] */)
24 struct tevent_req *req;
25 struct rpccli_eventlog_ClearEventLogW_state *state;
26 struct tevent_req *subreq;
28 req = tevent_req_create(mem_ctx, &state,
29 struct rpccli_eventlog_ClearEventLogW_state);
30 if (req == NULL) {
31 return NULL;
33 state->out_mem_ctx = NULL;
34 state->dispatch_recv = cli->dispatch_recv;
36 /* In parameters */
37 state->orig.in.handle = _handle;
38 state->orig.in.backupfile = _backupfile;
40 /* Out parameters */
42 /* Result */
43 ZERO_STRUCT(state->orig.out.result);
45 /* make a temporary copy, that we pass to the dispatch function */
46 state->tmp = state->orig;
48 subreq = cli->dispatch_send(state, ev, cli,
49 &ndr_table_eventlog,
50 NDR_EVENTLOG_CLEAREVENTLOGW,
51 &state->tmp);
52 if (tevent_req_nomem(subreq, req)) {
53 return tevent_req_post(req, ev);
55 tevent_req_set_callback(subreq, rpccli_eventlog_ClearEventLogW_done, req);
56 return req;
59 static void rpccli_eventlog_ClearEventLogW_done(struct tevent_req *subreq)
61 struct tevent_req *req = tevent_req_callback_data(
62 subreq, struct tevent_req);
63 struct rpccli_eventlog_ClearEventLogW_state *state = tevent_req_data(
64 req, struct rpccli_eventlog_ClearEventLogW_state);
65 NTSTATUS status;
66 TALLOC_CTX *mem_ctx;
68 if (state->out_mem_ctx) {
69 mem_ctx = state->out_mem_ctx;
70 } else {
71 mem_ctx = state;
74 status = state->dispatch_recv(subreq, mem_ctx);
75 TALLOC_FREE(subreq);
76 if (!NT_STATUS_IS_OK(status)) {
77 tevent_req_nterror(req, status);
78 return;
81 /* Copy out parameters */
83 /* Copy result */
84 state->orig.out.result = state->tmp.out.result;
86 /* Reset temporary structure */
87 ZERO_STRUCT(state->tmp);
89 tevent_req_done(req);
92 NTSTATUS rpccli_eventlog_ClearEventLogW_recv(struct tevent_req *req,
93 TALLOC_CTX *mem_ctx,
94 NTSTATUS *result)
96 struct rpccli_eventlog_ClearEventLogW_state *state = tevent_req_data(
97 req, struct rpccli_eventlog_ClearEventLogW_state);
98 NTSTATUS status;
100 if (tevent_req_is_nterror(req, &status)) {
101 tevent_req_received(req);
102 return status;
105 /* Steal possbile out parameters to the callers context */
106 talloc_steal(mem_ctx, state->out_mem_ctx);
108 /* Return result */
109 *result = state->orig.out.result;
111 tevent_req_received(req);
112 return NT_STATUS_OK;
115 NTSTATUS rpccli_eventlog_ClearEventLogW(struct rpc_pipe_client *cli,
116 TALLOC_CTX *mem_ctx,
117 struct policy_handle *handle /* [in] [ref] */,
118 struct lsa_String *backupfile /* [in] [unique] */)
120 struct eventlog_ClearEventLogW r;
121 NTSTATUS status;
123 /* In parameters */
124 r.in.handle = handle;
125 r.in.backupfile = backupfile;
127 status = cli->dispatch(cli,
128 mem_ctx,
129 &ndr_table_eventlog,
130 NDR_EVENTLOG_CLEAREVENTLOGW,
131 &r);
133 if (!NT_STATUS_IS_OK(status)) {
134 return status;
137 if (NT_STATUS_IS_ERR(status)) {
138 return status;
141 /* Return variables */
143 /* Return result */
144 return r.out.result;
147 struct rpccli_eventlog_BackupEventLogW_state {
148 struct eventlog_BackupEventLogW orig;
149 struct eventlog_BackupEventLogW tmp;
150 TALLOC_CTX *out_mem_ctx;
151 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
154 static void rpccli_eventlog_BackupEventLogW_done(struct tevent_req *subreq);
156 struct tevent_req *rpccli_eventlog_BackupEventLogW_send(TALLOC_CTX *mem_ctx,
157 struct tevent_context *ev,
158 struct rpc_pipe_client *cli,
159 struct policy_handle *_handle /* [in] [ref] */,
160 struct lsa_String *_backup_filename /* [in] [ref] */)
162 struct tevent_req *req;
163 struct rpccli_eventlog_BackupEventLogW_state *state;
164 struct tevent_req *subreq;
166 req = tevent_req_create(mem_ctx, &state,
167 struct rpccli_eventlog_BackupEventLogW_state);
168 if (req == NULL) {
169 return NULL;
171 state->out_mem_ctx = NULL;
172 state->dispatch_recv = cli->dispatch_recv;
174 /* In parameters */
175 state->orig.in.handle = _handle;
176 state->orig.in.backup_filename = _backup_filename;
178 /* Out parameters */
180 /* Result */
181 ZERO_STRUCT(state->orig.out.result);
183 /* make a temporary copy, that we pass to the dispatch function */
184 state->tmp = state->orig;
186 subreq = cli->dispatch_send(state, ev, cli,
187 &ndr_table_eventlog,
188 NDR_EVENTLOG_BACKUPEVENTLOGW,
189 &state->tmp);
190 if (tevent_req_nomem(subreq, req)) {
191 return tevent_req_post(req, ev);
193 tevent_req_set_callback(subreq, rpccli_eventlog_BackupEventLogW_done, req);
194 return req;
197 static void rpccli_eventlog_BackupEventLogW_done(struct tevent_req *subreq)
199 struct tevent_req *req = tevent_req_callback_data(
200 subreq, struct tevent_req);
201 struct rpccli_eventlog_BackupEventLogW_state *state = tevent_req_data(
202 req, struct rpccli_eventlog_BackupEventLogW_state);
203 NTSTATUS status;
204 TALLOC_CTX *mem_ctx;
206 if (state->out_mem_ctx) {
207 mem_ctx = state->out_mem_ctx;
208 } else {
209 mem_ctx = state;
212 status = state->dispatch_recv(subreq, mem_ctx);
213 TALLOC_FREE(subreq);
214 if (!NT_STATUS_IS_OK(status)) {
215 tevent_req_nterror(req, status);
216 return;
219 /* Copy out parameters */
221 /* Copy result */
222 state->orig.out.result = state->tmp.out.result;
224 /* Reset temporary structure */
225 ZERO_STRUCT(state->tmp);
227 tevent_req_done(req);
230 NTSTATUS rpccli_eventlog_BackupEventLogW_recv(struct tevent_req *req,
231 TALLOC_CTX *mem_ctx,
232 NTSTATUS *result)
234 struct rpccli_eventlog_BackupEventLogW_state *state = tevent_req_data(
235 req, struct rpccli_eventlog_BackupEventLogW_state);
236 NTSTATUS status;
238 if (tevent_req_is_nterror(req, &status)) {
239 tevent_req_received(req);
240 return status;
243 /* Steal possbile out parameters to the callers context */
244 talloc_steal(mem_ctx, state->out_mem_ctx);
246 /* Return result */
247 *result = state->orig.out.result;
249 tevent_req_received(req);
250 return NT_STATUS_OK;
253 NTSTATUS rpccli_eventlog_BackupEventLogW(struct rpc_pipe_client *cli,
254 TALLOC_CTX *mem_ctx,
255 struct policy_handle *handle /* [in] [ref] */,
256 struct lsa_String *backup_filename /* [in] [ref] */)
258 struct eventlog_BackupEventLogW r;
259 NTSTATUS status;
261 /* In parameters */
262 r.in.handle = handle;
263 r.in.backup_filename = backup_filename;
265 status = cli->dispatch(cli,
266 mem_ctx,
267 &ndr_table_eventlog,
268 NDR_EVENTLOG_BACKUPEVENTLOGW,
269 &r);
271 if (!NT_STATUS_IS_OK(status)) {
272 return status;
275 if (NT_STATUS_IS_ERR(status)) {
276 return status;
279 /* Return variables */
281 /* Return result */
282 return r.out.result;
285 struct rpccli_eventlog_CloseEventLog_state {
286 struct eventlog_CloseEventLog orig;
287 struct eventlog_CloseEventLog tmp;
288 TALLOC_CTX *out_mem_ctx;
289 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
292 static void rpccli_eventlog_CloseEventLog_done(struct tevent_req *subreq);
294 struct tevent_req *rpccli_eventlog_CloseEventLog_send(TALLOC_CTX *mem_ctx,
295 struct tevent_context *ev,
296 struct rpc_pipe_client *cli,
297 struct policy_handle *_handle /* [in,out] [ref] */)
299 struct tevent_req *req;
300 struct rpccli_eventlog_CloseEventLog_state *state;
301 struct tevent_req *subreq;
303 req = tevent_req_create(mem_ctx, &state,
304 struct rpccli_eventlog_CloseEventLog_state);
305 if (req == NULL) {
306 return NULL;
308 state->out_mem_ctx = NULL;
309 state->dispatch_recv = cli->dispatch_recv;
311 /* In parameters */
312 state->orig.in.handle = _handle;
314 /* Out parameters */
315 state->orig.out.handle = _handle;
317 /* Result */
318 ZERO_STRUCT(state->orig.out.result);
320 state->out_mem_ctx = talloc_named_const(state, 0,
321 "rpccli_eventlog_CloseEventLog_out_memory");
322 if (tevent_req_nomem(state->out_mem_ctx, req)) {
323 return tevent_req_post(req, ev);
326 /* make a temporary copy, that we pass to the dispatch function */
327 state->tmp = state->orig;
329 subreq = cli->dispatch_send(state, ev, cli,
330 &ndr_table_eventlog,
331 NDR_EVENTLOG_CLOSEEVENTLOG,
332 &state->tmp);
333 if (tevent_req_nomem(subreq, req)) {
334 return tevent_req_post(req, ev);
336 tevent_req_set_callback(subreq, rpccli_eventlog_CloseEventLog_done, req);
337 return req;
340 static void rpccli_eventlog_CloseEventLog_done(struct tevent_req *subreq)
342 struct tevent_req *req = tevent_req_callback_data(
343 subreq, struct tevent_req);
344 struct rpccli_eventlog_CloseEventLog_state *state = tevent_req_data(
345 req, struct rpccli_eventlog_CloseEventLog_state);
346 NTSTATUS status;
347 TALLOC_CTX *mem_ctx;
349 if (state->out_mem_ctx) {
350 mem_ctx = state->out_mem_ctx;
351 } else {
352 mem_ctx = state;
355 status = state->dispatch_recv(subreq, mem_ctx);
356 TALLOC_FREE(subreq);
357 if (!NT_STATUS_IS_OK(status)) {
358 tevent_req_nterror(req, status);
359 return;
362 /* Copy out parameters */
363 *state->orig.out.handle = *state->tmp.out.handle;
365 /* Copy result */
366 state->orig.out.result = state->tmp.out.result;
368 /* Reset temporary structure */
369 ZERO_STRUCT(state->tmp);
371 tevent_req_done(req);
374 NTSTATUS rpccli_eventlog_CloseEventLog_recv(struct tevent_req *req,
375 TALLOC_CTX *mem_ctx,
376 NTSTATUS *result)
378 struct rpccli_eventlog_CloseEventLog_state *state = tevent_req_data(
379 req, struct rpccli_eventlog_CloseEventLog_state);
380 NTSTATUS status;
382 if (tevent_req_is_nterror(req, &status)) {
383 tevent_req_received(req);
384 return status;
387 /* Steal possbile out parameters to the callers context */
388 talloc_steal(mem_ctx, state->out_mem_ctx);
390 /* Return result */
391 *result = state->orig.out.result;
393 tevent_req_received(req);
394 return NT_STATUS_OK;
397 NTSTATUS rpccli_eventlog_CloseEventLog(struct rpc_pipe_client *cli,
398 TALLOC_CTX *mem_ctx,
399 struct policy_handle *handle /* [in,out] [ref] */)
401 struct eventlog_CloseEventLog r;
402 NTSTATUS status;
404 /* In parameters */
405 r.in.handle = handle;
407 status = cli->dispatch(cli,
408 mem_ctx,
409 &ndr_table_eventlog,
410 NDR_EVENTLOG_CLOSEEVENTLOG,
411 &r);
413 if (!NT_STATUS_IS_OK(status)) {
414 return status;
417 if (NT_STATUS_IS_ERR(status)) {
418 return status;
421 /* Return variables */
422 *handle = *r.out.handle;
424 /* Return result */
425 return r.out.result;
428 struct rpccli_eventlog_DeregisterEventSource_state {
429 struct eventlog_DeregisterEventSource orig;
430 struct eventlog_DeregisterEventSource tmp;
431 TALLOC_CTX *out_mem_ctx;
432 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
435 static void rpccli_eventlog_DeregisterEventSource_done(struct tevent_req *subreq);
437 struct tevent_req *rpccli_eventlog_DeregisterEventSource_send(TALLOC_CTX *mem_ctx,
438 struct tevent_context *ev,
439 struct rpc_pipe_client *cli,
440 struct policy_handle *_handle /* [in,out] [ref] */)
442 struct tevent_req *req;
443 struct rpccli_eventlog_DeregisterEventSource_state *state;
444 struct tevent_req *subreq;
446 req = tevent_req_create(mem_ctx, &state,
447 struct rpccli_eventlog_DeregisterEventSource_state);
448 if (req == NULL) {
449 return NULL;
451 state->out_mem_ctx = NULL;
452 state->dispatch_recv = cli->dispatch_recv;
454 /* In parameters */
455 state->orig.in.handle = _handle;
457 /* Out parameters */
458 state->orig.out.handle = _handle;
460 /* Result */
461 ZERO_STRUCT(state->orig.out.result);
463 state->out_mem_ctx = talloc_named_const(state, 0,
464 "rpccli_eventlog_DeregisterEventSource_out_memory");
465 if (tevent_req_nomem(state->out_mem_ctx, req)) {
466 return tevent_req_post(req, ev);
469 /* make a temporary copy, that we pass to the dispatch function */
470 state->tmp = state->orig;
472 subreq = cli->dispatch_send(state, ev, cli,
473 &ndr_table_eventlog,
474 NDR_EVENTLOG_DEREGISTEREVENTSOURCE,
475 &state->tmp);
476 if (tevent_req_nomem(subreq, req)) {
477 return tevent_req_post(req, ev);
479 tevent_req_set_callback(subreq, rpccli_eventlog_DeregisterEventSource_done, req);
480 return req;
483 static void rpccli_eventlog_DeregisterEventSource_done(struct tevent_req *subreq)
485 struct tevent_req *req = tevent_req_callback_data(
486 subreq, struct tevent_req);
487 struct rpccli_eventlog_DeregisterEventSource_state *state = tevent_req_data(
488 req, struct rpccli_eventlog_DeregisterEventSource_state);
489 NTSTATUS status;
490 TALLOC_CTX *mem_ctx;
492 if (state->out_mem_ctx) {
493 mem_ctx = state->out_mem_ctx;
494 } else {
495 mem_ctx = state;
498 status = state->dispatch_recv(subreq, mem_ctx);
499 TALLOC_FREE(subreq);
500 if (!NT_STATUS_IS_OK(status)) {
501 tevent_req_nterror(req, status);
502 return;
505 /* Copy out parameters */
506 *state->orig.out.handle = *state->tmp.out.handle;
508 /* Copy result */
509 state->orig.out.result = state->tmp.out.result;
511 /* Reset temporary structure */
512 ZERO_STRUCT(state->tmp);
514 tevent_req_done(req);
517 NTSTATUS rpccli_eventlog_DeregisterEventSource_recv(struct tevent_req *req,
518 TALLOC_CTX *mem_ctx,
519 NTSTATUS *result)
521 struct rpccli_eventlog_DeregisterEventSource_state *state = tevent_req_data(
522 req, struct rpccli_eventlog_DeregisterEventSource_state);
523 NTSTATUS status;
525 if (tevent_req_is_nterror(req, &status)) {
526 tevent_req_received(req);
527 return status;
530 /* Steal possbile out parameters to the callers context */
531 talloc_steal(mem_ctx, state->out_mem_ctx);
533 /* Return result */
534 *result = state->orig.out.result;
536 tevent_req_received(req);
537 return NT_STATUS_OK;
540 NTSTATUS rpccli_eventlog_DeregisterEventSource(struct rpc_pipe_client *cli,
541 TALLOC_CTX *mem_ctx,
542 struct policy_handle *handle /* [in,out] [ref] */)
544 struct eventlog_DeregisterEventSource r;
545 NTSTATUS status;
547 /* In parameters */
548 r.in.handle = handle;
550 status = cli->dispatch(cli,
551 mem_ctx,
552 &ndr_table_eventlog,
553 NDR_EVENTLOG_DEREGISTEREVENTSOURCE,
554 &r);
556 if (!NT_STATUS_IS_OK(status)) {
557 return status;
560 if (NT_STATUS_IS_ERR(status)) {
561 return status;
564 /* Return variables */
565 *handle = *r.out.handle;
567 /* Return result */
568 return r.out.result;
571 struct rpccli_eventlog_GetNumRecords_state {
572 struct eventlog_GetNumRecords orig;
573 struct eventlog_GetNumRecords tmp;
574 TALLOC_CTX *out_mem_ctx;
575 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
578 static void rpccli_eventlog_GetNumRecords_done(struct tevent_req *subreq);
580 struct tevent_req *rpccli_eventlog_GetNumRecords_send(TALLOC_CTX *mem_ctx,
581 struct tevent_context *ev,
582 struct rpc_pipe_client *cli,
583 struct policy_handle *_handle /* [in] [ref] */,
584 uint32_t *_number /* [out] [ref] */)
586 struct tevent_req *req;
587 struct rpccli_eventlog_GetNumRecords_state *state;
588 struct tevent_req *subreq;
590 req = tevent_req_create(mem_ctx, &state,
591 struct rpccli_eventlog_GetNumRecords_state);
592 if (req == NULL) {
593 return NULL;
595 state->out_mem_ctx = NULL;
596 state->dispatch_recv = cli->dispatch_recv;
598 /* In parameters */
599 state->orig.in.handle = _handle;
601 /* Out parameters */
602 state->orig.out.number = _number;
604 /* Result */
605 ZERO_STRUCT(state->orig.out.result);
607 state->out_mem_ctx = talloc_named_const(state, 0,
608 "rpccli_eventlog_GetNumRecords_out_memory");
609 if (tevent_req_nomem(state->out_mem_ctx, req)) {
610 return tevent_req_post(req, ev);
613 /* make a temporary copy, that we pass to the dispatch function */
614 state->tmp = state->orig;
616 subreq = cli->dispatch_send(state, ev, cli,
617 &ndr_table_eventlog,
618 NDR_EVENTLOG_GETNUMRECORDS,
619 &state->tmp);
620 if (tevent_req_nomem(subreq, req)) {
621 return tevent_req_post(req, ev);
623 tevent_req_set_callback(subreq, rpccli_eventlog_GetNumRecords_done, req);
624 return req;
627 static void rpccli_eventlog_GetNumRecords_done(struct tevent_req *subreq)
629 struct tevent_req *req = tevent_req_callback_data(
630 subreq, struct tevent_req);
631 struct rpccli_eventlog_GetNumRecords_state *state = tevent_req_data(
632 req, struct rpccli_eventlog_GetNumRecords_state);
633 NTSTATUS status;
634 TALLOC_CTX *mem_ctx;
636 if (state->out_mem_ctx) {
637 mem_ctx = state->out_mem_ctx;
638 } else {
639 mem_ctx = state;
642 status = state->dispatch_recv(subreq, mem_ctx);
643 TALLOC_FREE(subreq);
644 if (!NT_STATUS_IS_OK(status)) {
645 tevent_req_nterror(req, status);
646 return;
649 /* Copy out parameters */
650 *state->orig.out.number = *state->tmp.out.number;
652 /* Copy result */
653 state->orig.out.result = state->tmp.out.result;
655 /* Reset temporary structure */
656 ZERO_STRUCT(state->tmp);
658 tevent_req_done(req);
661 NTSTATUS rpccli_eventlog_GetNumRecords_recv(struct tevent_req *req,
662 TALLOC_CTX *mem_ctx,
663 NTSTATUS *result)
665 struct rpccli_eventlog_GetNumRecords_state *state = tevent_req_data(
666 req, struct rpccli_eventlog_GetNumRecords_state);
667 NTSTATUS status;
669 if (tevent_req_is_nterror(req, &status)) {
670 tevent_req_received(req);
671 return status;
674 /* Steal possbile out parameters to the callers context */
675 talloc_steal(mem_ctx, state->out_mem_ctx);
677 /* Return result */
678 *result = state->orig.out.result;
680 tevent_req_received(req);
681 return NT_STATUS_OK;
684 NTSTATUS rpccli_eventlog_GetNumRecords(struct rpc_pipe_client *cli,
685 TALLOC_CTX *mem_ctx,
686 struct policy_handle *handle /* [in] [ref] */,
687 uint32_t *number /* [out] [ref] */)
689 struct eventlog_GetNumRecords r;
690 NTSTATUS status;
692 /* In parameters */
693 r.in.handle = handle;
695 status = cli->dispatch(cli,
696 mem_ctx,
697 &ndr_table_eventlog,
698 NDR_EVENTLOG_GETNUMRECORDS,
699 &r);
701 if (!NT_STATUS_IS_OK(status)) {
702 return status;
705 if (NT_STATUS_IS_ERR(status)) {
706 return status;
709 /* Return variables */
710 *number = *r.out.number;
712 /* Return result */
713 return r.out.result;
716 struct rpccli_eventlog_GetOldestRecord_state {
717 struct eventlog_GetOldestRecord orig;
718 struct eventlog_GetOldestRecord tmp;
719 TALLOC_CTX *out_mem_ctx;
720 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
723 static void rpccli_eventlog_GetOldestRecord_done(struct tevent_req *subreq);
725 struct tevent_req *rpccli_eventlog_GetOldestRecord_send(TALLOC_CTX *mem_ctx,
726 struct tevent_context *ev,
727 struct rpc_pipe_client *cli,
728 struct policy_handle *_handle /* [in] [ref] */,
729 uint32_t *_oldest_entry /* [out] [ref] */)
731 struct tevent_req *req;
732 struct rpccli_eventlog_GetOldestRecord_state *state;
733 struct tevent_req *subreq;
735 req = tevent_req_create(mem_ctx, &state,
736 struct rpccli_eventlog_GetOldestRecord_state);
737 if (req == NULL) {
738 return NULL;
740 state->out_mem_ctx = NULL;
741 state->dispatch_recv = cli->dispatch_recv;
743 /* In parameters */
744 state->orig.in.handle = _handle;
746 /* Out parameters */
747 state->orig.out.oldest_entry = _oldest_entry;
749 /* Result */
750 ZERO_STRUCT(state->orig.out.result);
752 state->out_mem_ctx = talloc_named_const(state, 0,
753 "rpccli_eventlog_GetOldestRecord_out_memory");
754 if (tevent_req_nomem(state->out_mem_ctx, req)) {
755 return tevent_req_post(req, ev);
758 /* make a temporary copy, that we pass to the dispatch function */
759 state->tmp = state->orig;
761 subreq = cli->dispatch_send(state, ev, cli,
762 &ndr_table_eventlog,
763 NDR_EVENTLOG_GETOLDESTRECORD,
764 &state->tmp);
765 if (tevent_req_nomem(subreq, req)) {
766 return tevent_req_post(req, ev);
768 tevent_req_set_callback(subreq, rpccli_eventlog_GetOldestRecord_done, req);
769 return req;
772 static void rpccli_eventlog_GetOldestRecord_done(struct tevent_req *subreq)
774 struct tevent_req *req = tevent_req_callback_data(
775 subreq, struct tevent_req);
776 struct rpccli_eventlog_GetOldestRecord_state *state = tevent_req_data(
777 req, struct rpccli_eventlog_GetOldestRecord_state);
778 NTSTATUS status;
779 TALLOC_CTX *mem_ctx;
781 if (state->out_mem_ctx) {
782 mem_ctx = state->out_mem_ctx;
783 } else {
784 mem_ctx = state;
787 status = state->dispatch_recv(subreq, mem_ctx);
788 TALLOC_FREE(subreq);
789 if (!NT_STATUS_IS_OK(status)) {
790 tevent_req_nterror(req, status);
791 return;
794 /* Copy out parameters */
795 *state->orig.out.oldest_entry = *state->tmp.out.oldest_entry;
797 /* Copy result */
798 state->orig.out.result = state->tmp.out.result;
800 /* Reset temporary structure */
801 ZERO_STRUCT(state->tmp);
803 tevent_req_done(req);
806 NTSTATUS rpccli_eventlog_GetOldestRecord_recv(struct tevent_req *req,
807 TALLOC_CTX *mem_ctx,
808 NTSTATUS *result)
810 struct rpccli_eventlog_GetOldestRecord_state *state = tevent_req_data(
811 req, struct rpccli_eventlog_GetOldestRecord_state);
812 NTSTATUS status;
814 if (tevent_req_is_nterror(req, &status)) {
815 tevent_req_received(req);
816 return status;
819 /* Steal possbile out parameters to the callers context */
820 talloc_steal(mem_ctx, state->out_mem_ctx);
822 /* Return result */
823 *result = state->orig.out.result;
825 tevent_req_received(req);
826 return NT_STATUS_OK;
829 NTSTATUS rpccli_eventlog_GetOldestRecord(struct rpc_pipe_client *cli,
830 TALLOC_CTX *mem_ctx,
831 struct policy_handle *handle /* [in] [ref] */,
832 uint32_t *oldest_entry /* [out] [ref] */)
834 struct eventlog_GetOldestRecord r;
835 NTSTATUS status;
837 /* In parameters */
838 r.in.handle = handle;
840 status = cli->dispatch(cli,
841 mem_ctx,
842 &ndr_table_eventlog,
843 NDR_EVENTLOG_GETOLDESTRECORD,
844 &r);
846 if (!NT_STATUS_IS_OK(status)) {
847 return status;
850 if (NT_STATUS_IS_ERR(status)) {
851 return status;
854 /* Return variables */
855 *oldest_entry = *r.out.oldest_entry;
857 /* Return result */
858 return r.out.result;
861 struct rpccli_eventlog_ChangeNotify_state {
862 struct eventlog_ChangeNotify orig;
863 struct eventlog_ChangeNotify tmp;
864 TALLOC_CTX *out_mem_ctx;
865 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
868 static void rpccli_eventlog_ChangeNotify_done(struct tevent_req *subreq);
870 struct tevent_req *rpccli_eventlog_ChangeNotify_send(TALLOC_CTX *mem_ctx,
871 struct tevent_context *ev,
872 struct rpc_pipe_client *cli)
874 struct tevent_req *req;
875 struct rpccli_eventlog_ChangeNotify_state *state;
876 struct tevent_req *subreq;
878 req = tevent_req_create(mem_ctx, &state,
879 struct rpccli_eventlog_ChangeNotify_state);
880 if (req == NULL) {
881 return NULL;
883 state->out_mem_ctx = NULL;
884 state->dispatch_recv = cli->dispatch_recv;
886 /* In parameters */
888 /* Out parameters */
890 /* Result */
891 ZERO_STRUCT(state->orig.out.result);
893 /* make a temporary copy, that we pass to the dispatch function */
894 state->tmp = state->orig;
896 subreq = cli->dispatch_send(state, ev, cli,
897 &ndr_table_eventlog,
898 NDR_EVENTLOG_CHANGENOTIFY,
899 &state->tmp);
900 if (tevent_req_nomem(subreq, req)) {
901 return tevent_req_post(req, ev);
903 tevent_req_set_callback(subreq, rpccli_eventlog_ChangeNotify_done, req);
904 return req;
907 static void rpccli_eventlog_ChangeNotify_done(struct tevent_req *subreq)
909 struct tevent_req *req = tevent_req_callback_data(
910 subreq, struct tevent_req);
911 struct rpccli_eventlog_ChangeNotify_state *state = tevent_req_data(
912 req, struct rpccli_eventlog_ChangeNotify_state);
913 NTSTATUS status;
914 TALLOC_CTX *mem_ctx;
916 if (state->out_mem_ctx) {
917 mem_ctx = state->out_mem_ctx;
918 } else {
919 mem_ctx = state;
922 status = state->dispatch_recv(subreq, mem_ctx);
923 TALLOC_FREE(subreq);
924 if (!NT_STATUS_IS_OK(status)) {
925 tevent_req_nterror(req, status);
926 return;
929 /* Copy out parameters */
931 /* Copy result */
932 state->orig.out.result = state->tmp.out.result;
934 /* Reset temporary structure */
935 ZERO_STRUCT(state->tmp);
937 tevent_req_done(req);
940 NTSTATUS rpccli_eventlog_ChangeNotify_recv(struct tevent_req *req,
941 TALLOC_CTX *mem_ctx,
942 NTSTATUS *result)
944 struct rpccli_eventlog_ChangeNotify_state *state = tevent_req_data(
945 req, struct rpccli_eventlog_ChangeNotify_state);
946 NTSTATUS status;
948 if (tevent_req_is_nterror(req, &status)) {
949 tevent_req_received(req);
950 return status;
953 /* Steal possbile out parameters to the callers context */
954 talloc_steal(mem_ctx, state->out_mem_ctx);
956 /* Return result */
957 *result = state->orig.out.result;
959 tevent_req_received(req);
960 return NT_STATUS_OK;
963 NTSTATUS rpccli_eventlog_ChangeNotify(struct rpc_pipe_client *cli,
964 TALLOC_CTX *mem_ctx)
966 struct eventlog_ChangeNotify r;
967 NTSTATUS status;
969 /* In parameters */
971 status = cli->dispatch(cli,
972 mem_ctx,
973 &ndr_table_eventlog,
974 NDR_EVENTLOG_CHANGENOTIFY,
975 &r);
977 if (!NT_STATUS_IS_OK(status)) {
978 return status;
981 if (NT_STATUS_IS_ERR(status)) {
982 return status;
985 /* Return variables */
987 /* Return result */
988 return r.out.result;
991 struct rpccli_eventlog_OpenEventLogW_state {
992 struct eventlog_OpenEventLogW orig;
993 struct eventlog_OpenEventLogW tmp;
994 TALLOC_CTX *out_mem_ctx;
995 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
998 static void rpccli_eventlog_OpenEventLogW_done(struct tevent_req *subreq);
1000 struct tevent_req *rpccli_eventlog_OpenEventLogW_send(TALLOC_CTX *mem_ctx,
1001 struct tevent_context *ev,
1002 struct rpc_pipe_client *cli,
1003 struct eventlog_OpenUnknown0 *_unknown0 /* [in] [unique] */,
1004 struct lsa_String *_logname /* [in] [ref] */,
1005 struct lsa_String *_servername /* [in] [ref] */,
1006 uint32_t _major_version /* [in] */,
1007 uint32_t _minor_version /* [in] */,
1008 struct policy_handle *_handle /* [out] [ref] */)
1010 struct tevent_req *req;
1011 struct rpccli_eventlog_OpenEventLogW_state *state;
1012 struct tevent_req *subreq;
1014 req = tevent_req_create(mem_ctx, &state,
1015 struct rpccli_eventlog_OpenEventLogW_state);
1016 if (req == NULL) {
1017 return NULL;
1019 state->out_mem_ctx = NULL;
1020 state->dispatch_recv = cli->dispatch_recv;
1022 /* In parameters */
1023 state->orig.in.unknown0 = _unknown0;
1024 state->orig.in.logname = _logname;
1025 state->orig.in.servername = _servername;
1026 state->orig.in.major_version = _major_version;
1027 state->orig.in.minor_version = _minor_version;
1029 /* Out parameters */
1030 state->orig.out.handle = _handle;
1032 /* Result */
1033 ZERO_STRUCT(state->orig.out.result);
1035 state->out_mem_ctx = talloc_named_const(state, 0,
1036 "rpccli_eventlog_OpenEventLogW_out_memory");
1037 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1038 return tevent_req_post(req, ev);
1041 /* make a temporary copy, that we pass to the dispatch function */
1042 state->tmp = state->orig;
1044 subreq = cli->dispatch_send(state, ev, cli,
1045 &ndr_table_eventlog,
1046 NDR_EVENTLOG_OPENEVENTLOGW,
1047 &state->tmp);
1048 if (tevent_req_nomem(subreq, req)) {
1049 return tevent_req_post(req, ev);
1051 tevent_req_set_callback(subreq, rpccli_eventlog_OpenEventLogW_done, req);
1052 return req;
1055 static void rpccli_eventlog_OpenEventLogW_done(struct tevent_req *subreq)
1057 struct tevent_req *req = tevent_req_callback_data(
1058 subreq, struct tevent_req);
1059 struct rpccli_eventlog_OpenEventLogW_state *state = tevent_req_data(
1060 req, struct rpccli_eventlog_OpenEventLogW_state);
1061 NTSTATUS status;
1062 TALLOC_CTX *mem_ctx;
1064 if (state->out_mem_ctx) {
1065 mem_ctx = state->out_mem_ctx;
1066 } else {
1067 mem_ctx = state;
1070 status = state->dispatch_recv(subreq, mem_ctx);
1071 TALLOC_FREE(subreq);
1072 if (!NT_STATUS_IS_OK(status)) {
1073 tevent_req_nterror(req, status);
1074 return;
1077 /* Copy out parameters */
1078 *state->orig.out.handle = *state->tmp.out.handle;
1080 /* Copy result */
1081 state->orig.out.result = state->tmp.out.result;
1083 /* Reset temporary structure */
1084 ZERO_STRUCT(state->tmp);
1086 tevent_req_done(req);
1089 NTSTATUS rpccli_eventlog_OpenEventLogW_recv(struct tevent_req *req,
1090 TALLOC_CTX *mem_ctx,
1091 NTSTATUS *result)
1093 struct rpccli_eventlog_OpenEventLogW_state *state = tevent_req_data(
1094 req, struct rpccli_eventlog_OpenEventLogW_state);
1095 NTSTATUS status;
1097 if (tevent_req_is_nterror(req, &status)) {
1098 tevent_req_received(req);
1099 return status;
1102 /* Steal possbile out parameters to the callers context */
1103 talloc_steal(mem_ctx, state->out_mem_ctx);
1105 /* Return result */
1106 *result = state->orig.out.result;
1108 tevent_req_received(req);
1109 return NT_STATUS_OK;
1112 NTSTATUS rpccli_eventlog_OpenEventLogW(struct rpc_pipe_client *cli,
1113 TALLOC_CTX *mem_ctx,
1114 struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */,
1115 struct lsa_String *logname /* [in] [ref] */,
1116 struct lsa_String *servername /* [in] [ref] */,
1117 uint32_t major_version /* [in] */,
1118 uint32_t minor_version /* [in] */,
1119 struct policy_handle *handle /* [out] [ref] */)
1121 struct eventlog_OpenEventLogW r;
1122 NTSTATUS status;
1124 /* In parameters */
1125 r.in.unknown0 = unknown0;
1126 r.in.logname = logname;
1127 r.in.servername = servername;
1128 r.in.major_version = major_version;
1129 r.in.minor_version = minor_version;
1131 status = cli->dispatch(cli,
1132 mem_ctx,
1133 &ndr_table_eventlog,
1134 NDR_EVENTLOG_OPENEVENTLOGW,
1135 &r);
1137 if (!NT_STATUS_IS_OK(status)) {
1138 return status;
1141 if (NT_STATUS_IS_ERR(status)) {
1142 return status;
1145 /* Return variables */
1146 *handle = *r.out.handle;
1148 /* Return result */
1149 return r.out.result;
1152 struct rpccli_eventlog_RegisterEventSourceW_state {
1153 struct eventlog_RegisterEventSourceW orig;
1154 struct eventlog_RegisterEventSourceW tmp;
1155 TALLOC_CTX *out_mem_ctx;
1156 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1159 static void rpccli_eventlog_RegisterEventSourceW_done(struct tevent_req *subreq);
1161 struct tevent_req *rpccli_eventlog_RegisterEventSourceW_send(TALLOC_CTX *mem_ctx,
1162 struct tevent_context *ev,
1163 struct rpc_pipe_client *cli,
1164 struct eventlog_OpenUnknown0 *_unknown0 /* [in] [unique] */,
1165 struct lsa_String *_module_name /* [in] [ref] */,
1166 struct lsa_String *_reg_module_name /* [in] [ref] */,
1167 uint32_t _major_version /* [in] */,
1168 uint32_t _minor_version /* [in] */,
1169 struct policy_handle *_log_handle /* [out] [ref] */)
1171 struct tevent_req *req;
1172 struct rpccli_eventlog_RegisterEventSourceW_state *state;
1173 struct tevent_req *subreq;
1175 req = tevent_req_create(mem_ctx, &state,
1176 struct rpccli_eventlog_RegisterEventSourceW_state);
1177 if (req == NULL) {
1178 return NULL;
1180 state->out_mem_ctx = NULL;
1181 state->dispatch_recv = cli->dispatch_recv;
1183 /* In parameters */
1184 state->orig.in.unknown0 = _unknown0;
1185 state->orig.in.module_name = _module_name;
1186 state->orig.in.reg_module_name = _reg_module_name;
1187 state->orig.in.major_version = _major_version;
1188 state->orig.in.minor_version = _minor_version;
1190 /* Out parameters */
1191 state->orig.out.log_handle = _log_handle;
1193 /* Result */
1194 ZERO_STRUCT(state->orig.out.result);
1196 state->out_mem_ctx = talloc_named_const(state, 0,
1197 "rpccli_eventlog_RegisterEventSourceW_out_memory");
1198 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1199 return tevent_req_post(req, ev);
1202 /* make a temporary copy, that we pass to the dispatch function */
1203 state->tmp = state->orig;
1205 subreq = cli->dispatch_send(state, ev, cli,
1206 &ndr_table_eventlog,
1207 NDR_EVENTLOG_REGISTEREVENTSOURCEW,
1208 &state->tmp);
1209 if (tevent_req_nomem(subreq, req)) {
1210 return tevent_req_post(req, ev);
1212 tevent_req_set_callback(subreq, rpccli_eventlog_RegisterEventSourceW_done, req);
1213 return req;
1216 static void rpccli_eventlog_RegisterEventSourceW_done(struct tevent_req *subreq)
1218 struct tevent_req *req = tevent_req_callback_data(
1219 subreq, struct tevent_req);
1220 struct rpccli_eventlog_RegisterEventSourceW_state *state = tevent_req_data(
1221 req, struct rpccli_eventlog_RegisterEventSourceW_state);
1222 NTSTATUS status;
1223 TALLOC_CTX *mem_ctx;
1225 if (state->out_mem_ctx) {
1226 mem_ctx = state->out_mem_ctx;
1227 } else {
1228 mem_ctx = state;
1231 status = state->dispatch_recv(subreq, mem_ctx);
1232 TALLOC_FREE(subreq);
1233 if (!NT_STATUS_IS_OK(status)) {
1234 tevent_req_nterror(req, status);
1235 return;
1238 /* Copy out parameters */
1239 *state->orig.out.log_handle = *state->tmp.out.log_handle;
1241 /* Copy result */
1242 state->orig.out.result = state->tmp.out.result;
1244 /* Reset temporary structure */
1245 ZERO_STRUCT(state->tmp);
1247 tevent_req_done(req);
1250 NTSTATUS rpccli_eventlog_RegisterEventSourceW_recv(struct tevent_req *req,
1251 TALLOC_CTX *mem_ctx,
1252 NTSTATUS *result)
1254 struct rpccli_eventlog_RegisterEventSourceW_state *state = tevent_req_data(
1255 req, struct rpccli_eventlog_RegisterEventSourceW_state);
1256 NTSTATUS status;
1258 if (tevent_req_is_nterror(req, &status)) {
1259 tevent_req_received(req);
1260 return status;
1263 /* Steal possbile out parameters to the callers context */
1264 talloc_steal(mem_ctx, state->out_mem_ctx);
1266 /* Return result */
1267 *result = state->orig.out.result;
1269 tevent_req_received(req);
1270 return NT_STATUS_OK;
1273 NTSTATUS rpccli_eventlog_RegisterEventSourceW(struct rpc_pipe_client *cli,
1274 TALLOC_CTX *mem_ctx,
1275 struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */,
1276 struct lsa_String *module_name /* [in] [ref] */,
1277 struct lsa_String *reg_module_name /* [in] [ref] */,
1278 uint32_t major_version /* [in] */,
1279 uint32_t minor_version /* [in] */,
1280 struct policy_handle *log_handle /* [out] [ref] */)
1282 struct eventlog_RegisterEventSourceW r;
1283 NTSTATUS status;
1285 /* In parameters */
1286 r.in.unknown0 = unknown0;
1287 r.in.module_name = module_name;
1288 r.in.reg_module_name = reg_module_name;
1289 r.in.major_version = major_version;
1290 r.in.minor_version = minor_version;
1292 status = cli->dispatch(cli,
1293 mem_ctx,
1294 &ndr_table_eventlog,
1295 NDR_EVENTLOG_REGISTEREVENTSOURCEW,
1296 &r);
1298 if (!NT_STATUS_IS_OK(status)) {
1299 return status;
1302 if (NT_STATUS_IS_ERR(status)) {
1303 return status;
1306 /* Return variables */
1307 *log_handle = *r.out.log_handle;
1309 /* Return result */
1310 return r.out.result;
1313 struct rpccli_eventlog_OpenBackupEventLogW_state {
1314 struct eventlog_OpenBackupEventLogW orig;
1315 struct eventlog_OpenBackupEventLogW tmp;
1316 TALLOC_CTX *out_mem_ctx;
1317 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1320 static void rpccli_eventlog_OpenBackupEventLogW_done(struct tevent_req *subreq);
1322 struct tevent_req *rpccli_eventlog_OpenBackupEventLogW_send(TALLOC_CTX *mem_ctx,
1323 struct tevent_context *ev,
1324 struct rpc_pipe_client *cli,
1325 struct eventlog_OpenUnknown0 *_unknown0 /* [in] [unique] */,
1326 struct lsa_String *_backup_logname /* [in] [ref] */,
1327 uint32_t _major_version /* [in] */,
1328 uint32_t _minor_version /* [in] */,
1329 struct policy_handle *_handle /* [out] [ref] */)
1331 struct tevent_req *req;
1332 struct rpccli_eventlog_OpenBackupEventLogW_state *state;
1333 struct tevent_req *subreq;
1335 req = tevent_req_create(mem_ctx, &state,
1336 struct rpccli_eventlog_OpenBackupEventLogW_state);
1337 if (req == NULL) {
1338 return NULL;
1340 state->out_mem_ctx = NULL;
1341 state->dispatch_recv = cli->dispatch_recv;
1343 /* In parameters */
1344 state->orig.in.unknown0 = _unknown0;
1345 state->orig.in.backup_logname = _backup_logname;
1346 state->orig.in.major_version = _major_version;
1347 state->orig.in.minor_version = _minor_version;
1349 /* Out parameters */
1350 state->orig.out.handle = _handle;
1352 /* Result */
1353 ZERO_STRUCT(state->orig.out.result);
1355 state->out_mem_ctx = talloc_named_const(state, 0,
1356 "rpccli_eventlog_OpenBackupEventLogW_out_memory");
1357 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1358 return tevent_req_post(req, ev);
1361 /* make a temporary copy, that we pass to the dispatch function */
1362 state->tmp = state->orig;
1364 subreq = cli->dispatch_send(state, ev, cli,
1365 &ndr_table_eventlog,
1366 NDR_EVENTLOG_OPENBACKUPEVENTLOGW,
1367 &state->tmp);
1368 if (tevent_req_nomem(subreq, req)) {
1369 return tevent_req_post(req, ev);
1371 tevent_req_set_callback(subreq, rpccli_eventlog_OpenBackupEventLogW_done, req);
1372 return req;
1375 static void rpccli_eventlog_OpenBackupEventLogW_done(struct tevent_req *subreq)
1377 struct tevent_req *req = tevent_req_callback_data(
1378 subreq, struct tevent_req);
1379 struct rpccli_eventlog_OpenBackupEventLogW_state *state = tevent_req_data(
1380 req, struct rpccli_eventlog_OpenBackupEventLogW_state);
1381 NTSTATUS status;
1382 TALLOC_CTX *mem_ctx;
1384 if (state->out_mem_ctx) {
1385 mem_ctx = state->out_mem_ctx;
1386 } else {
1387 mem_ctx = state;
1390 status = state->dispatch_recv(subreq, mem_ctx);
1391 TALLOC_FREE(subreq);
1392 if (!NT_STATUS_IS_OK(status)) {
1393 tevent_req_nterror(req, status);
1394 return;
1397 /* Copy out parameters */
1398 *state->orig.out.handle = *state->tmp.out.handle;
1400 /* Copy result */
1401 state->orig.out.result = state->tmp.out.result;
1403 /* Reset temporary structure */
1404 ZERO_STRUCT(state->tmp);
1406 tevent_req_done(req);
1409 NTSTATUS rpccli_eventlog_OpenBackupEventLogW_recv(struct tevent_req *req,
1410 TALLOC_CTX *mem_ctx,
1411 NTSTATUS *result)
1413 struct rpccli_eventlog_OpenBackupEventLogW_state *state = tevent_req_data(
1414 req, struct rpccli_eventlog_OpenBackupEventLogW_state);
1415 NTSTATUS status;
1417 if (tevent_req_is_nterror(req, &status)) {
1418 tevent_req_received(req);
1419 return status;
1422 /* Steal possbile out parameters to the callers context */
1423 talloc_steal(mem_ctx, state->out_mem_ctx);
1425 /* Return result */
1426 *result = state->orig.out.result;
1428 tevent_req_received(req);
1429 return NT_STATUS_OK;
1432 NTSTATUS rpccli_eventlog_OpenBackupEventLogW(struct rpc_pipe_client *cli,
1433 TALLOC_CTX *mem_ctx,
1434 struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */,
1435 struct lsa_String *backup_logname /* [in] [ref] */,
1436 uint32_t major_version /* [in] */,
1437 uint32_t minor_version /* [in] */,
1438 struct policy_handle *handle /* [out] [ref] */)
1440 struct eventlog_OpenBackupEventLogW r;
1441 NTSTATUS status;
1443 /* In parameters */
1444 r.in.unknown0 = unknown0;
1445 r.in.backup_logname = backup_logname;
1446 r.in.major_version = major_version;
1447 r.in.minor_version = minor_version;
1449 status = cli->dispatch(cli,
1450 mem_ctx,
1451 &ndr_table_eventlog,
1452 NDR_EVENTLOG_OPENBACKUPEVENTLOGW,
1453 &r);
1455 if (!NT_STATUS_IS_OK(status)) {
1456 return status;
1459 if (NT_STATUS_IS_ERR(status)) {
1460 return status;
1463 /* Return variables */
1464 *handle = *r.out.handle;
1466 /* Return result */
1467 return r.out.result;
1470 struct rpccli_eventlog_ReadEventLogW_state {
1471 struct eventlog_ReadEventLogW orig;
1472 struct eventlog_ReadEventLogW tmp;
1473 TALLOC_CTX *out_mem_ctx;
1474 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1477 static void rpccli_eventlog_ReadEventLogW_done(struct tevent_req *subreq);
1479 struct tevent_req *rpccli_eventlog_ReadEventLogW_send(TALLOC_CTX *mem_ctx,
1480 struct tevent_context *ev,
1481 struct rpc_pipe_client *cli,
1482 struct policy_handle *_handle /* [in] [ref] */,
1483 uint32_t _flags /* [in] */,
1484 uint32_t _offset /* [in] */,
1485 uint32_t _number_of_bytes /* [in] [range(0,0x7FFFF)] */,
1486 uint8_t *_data /* [out] [ref,size_is(number_of_bytes)] */,
1487 uint32_t *_sent_size /* [out] [ref] */,
1488 uint32_t *_real_size /* [out] [ref] */)
1490 struct tevent_req *req;
1491 struct rpccli_eventlog_ReadEventLogW_state *state;
1492 struct tevent_req *subreq;
1494 req = tevent_req_create(mem_ctx, &state,
1495 struct rpccli_eventlog_ReadEventLogW_state);
1496 if (req == NULL) {
1497 return NULL;
1499 state->out_mem_ctx = NULL;
1500 state->dispatch_recv = cli->dispatch_recv;
1502 /* In parameters */
1503 state->orig.in.handle = _handle;
1504 state->orig.in.flags = _flags;
1505 state->orig.in.offset = _offset;
1506 state->orig.in.number_of_bytes = _number_of_bytes;
1508 /* Out parameters */
1509 state->orig.out.data = _data;
1510 state->orig.out.sent_size = _sent_size;
1511 state->orig.out.real_size = _real_size;
1513 /* Result */
1514 ZERO_STRUCT(state->orig.out.result);
1516 state->out_mem_ctx = talloc_named_const(state, 0,
1517 "rpccli_eventlog_ReadEventLogW_out_memory");
1518 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1519 return tevent_req_post(req, ev);
1522 /* make a temporary copy, that we pass to the dispatch function */
1523 state->tmp = state->orig;
1525 subreq = cli->dispatch_send(state, ev, cli,
1526 &ndr_table_eventlog,
1527 NDR_EVENTLOG_READEVENTLOGW,
1528 &state->tmp);
1529 if (tevent_req_nomem(subreq, req)) {
1530 return tevent_req_post(req, ev);
1532 tevent_req_set_callback(subreq, rpccli_eventlog_ReadEventLogW_done, req);
1533 return req;
1536 static void rpccli_eventlog_ReadEventLogW_done(struct tevent_req *subreq)
1538 struct tevent_req *req = tevent_req_callback_data(
1539 subreq, struct tevent_req);
1540 struct rpccli_eventlog_ReadEventLogW_state *state = tevent_req_data(
1541 req, struct rpccli_eventlog_ReadEventLogW_state);
1542 NTSTATUS status;
1543 TALLOC_CTX *mem_ctx;
1545 if (state->out_mem_ctx) {
1546 mem_ctx = state->out_mem_ctx;
1547 } else {
1548 mem_ctx = state;
1551 status = state->dispatch_recv(subreq, mem_ctx);
1552 TALLOC_FREE(subreq);
1553 if (!NT_STATUS_IS_OK(status)) {
1554 tevent_req_nterror(req, status);
1555 return;
1558 /* Copy out parameters */
1559 memcpy(state->orig.out.data, state->tmp.out.data, (state->tmp.in.number_of_bytes) * sizeof(*state->orig.out.data));
1560 *state->orig.out.sent_size = *state->tmp.out.sent_size;
1561 *state->orig.out.real_size = *state->tmp.out.real_size;
1563 /* Copy result */
1564 state->orig.out.result = state->tmp.out.result;
1566 /* Reset temporary structure */
1567 ZERO_STRUCT(state->tmp);
1569 tevent_req_done(req);
1572 NTSTATUS rpccli_eventlog_ReadEventLogW_recv(struct tevent_req *req,
1573 TALLOC_CTX *mem_ctx,
1574 NTSTATUS *result)
1576 struct rpccli_eventlog_ReadEventLogW_state *state = tevent_req_data(
1577 req, struct rpccli_eventlog_ReadEventLogW_state);
1578 NTSTATUS status;
1580 if (tevent_req_is_nterror(req, &status)) {
1581 tevent_req_received(req);
1582 return status;
1585 /* Steal possbile out parameters to the callers context */
1586 talloc_steal(mem_ctx, state->out_mem_ctx);
1588 /* Return result */
1589 *result = state->orig.out.result;
1591 tevent_req_received(req);
1592 return NT_STATUS_OK;
1595 NTSTATUS rpccli_eventlog_ReadEventLogW(struct rpc_pipe_client *cli,
1596 TALLOC_CTX *mem_ctx,
1597 struct policy_handle *handle /* [in] [ref] */,
1598 uint32_t flags /* [in] */,
1599 uint32_t offset /* [in] */,
1600 uint32_t number_of_bytes /* [in] [range(0,0x7FFFF)] */,
1601 uint8_t *data /* [out] [ref,size_is(number_of_bytes)] */,
1602 uint32_t *sent_size /* [out] [ref] */,
1603 uint32_t *real_size /* [out] [ref] */)
1605 struct eventlog_ReadEventLogW r;
1606 NTSTATUS status;
1608 /* In parameters */
1609 r.in.handle = handle;
1610 r.in.flags = flags;
1611 r.in.offset = offset;
1612 r.in.number_of_bytes = number_of_bytes;
1614 status = cli->dispatch(cli,
1615 mem_ctx,
1616 &ndr_table_eventlog,
1617 NDR_EVENTLOG_READEVENTLOGW,
1618 &r);
1620 if (!NT_STATUS_IS_OK(status)) {
1621 return status;
1624 if (NT_STATUS_IS_ERR(status)) {
1625 return status;
1628 /* Return variables */
1629 memcpy(data, r.out.data, (r.in.number_of_bytes) * sizeof(*data));
1630 *sent_size = *r.out.sent_size;
1631 *real_size = *r.out.real_size;
1633 /* Return result */
1634 return r.out.result;
1637 struct rpccli_eventlog_ReportEventW_state {
1638 struct eventlog_ReportEventW orig;
1639 struct eventlog_ReportEventW tmp;
1640 TALLOC_CTX *out_mem_ctx;
1641 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1644 static void rpccli_eventlog_ReportEventW_done(struct tevent_req *subreq);
1646 struct tevent_req *rpccli_eventlog_ReportEventW_send(TALLOC_CTX *mem_ctx,
1647 struct tevent_context *ev,
1648 struct rpc_pipe_client *cli,
1649 struct policy_handle *_handle /* [in] [ref] */,
1650 time_t _timestamp /* [in] */,
1651 enum eventlogEventTypes _event_type /* [in] */,
1652 uint16_t _event_category /* [in] */,
1653 uint32_t _event_id /* [in] */,
1654 uint16_t _num_of_strings /* [in] [range(0,256)] */,
1655 uint32_t _data_size /* [in] [range(0,0x3FFFF)] */,
1656 struct lsa_String *_servername /* [in] [ref] */,
1657 struct dom_sid *_user_sid /* [in] [unique] */,
1658 struct lsa_String **_strings /* [in] [unique,size_is(num_of_strings)] */,
1659 uint8_t *_data /* [in] [unique,size_is(data_size)] */,
1660 uint16_t _flags /* [in] */,
1661 uint32_t *_record_number /* [in,out] [unique] */,
1662 time_t *_time_written /* [in,out] [unique] */)
1664 struct tevent_req *req;
1665 struct rpccli_eventlog_ReportEventW_state *state;
1666 struct tevent_req *subreq;
1668 req = tevent_req_create(mem_ctx, &state,
1669 struct rpccli_eventlog_ReportEventW_state);
1670 if (req == NULL) {
1671 return NULL;
1673 state->out_mem_ctx = NULL;
1674 state->dispatch_recv = cli->dispatch_recv;
1676 /* In parameters */
1677 state->orig.in.handle = _handle;
1678 state->orig.in.timestamp = _timestamp;
1679 state->orig.in.event_type = _event_type;
1680 state->orig.in.event_category = _event_category;
1681 state->orig.in.event_id = _event_id;
1682 state->orig.in.num_of_strings = _num_of_strings;
1683 state->orig.in.data_size = _data_size;
1684 state->orig.in.servername = _servername;
1685 state->orig.in.user_sid = _user_sid;
1686 state->orig.in.strings = _strings;
1687 state->orig.in.data = _data;
1688 state->orig.in.flags = _flags;
1689 state->orig.in.record_number = _record_number;
1690 state->orig.in.time_written = _time_written;
1692 /* Out parameters */
1693 state->orig.out.record_number = _record_number;
1694 state->orig.out.time_written = _time_written;
1696 /* Result */
1697 ZERO_STRUCT(state->orig.out.result);
1699 state->out_mem_ctx = talloc_named_const(state, 0,
1700 "rpccli_eventlog_ReportEventW_out_memory");
1701 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1702 return tevent_req_post(req, ev);
1705 /* make a temporary copy, that we pass to the dispatch function */
1706 state->tmp = state->orig;
1708 subreq = cli->dispatch_send(state, ev, cli,
1709 &ndr_table_eventlog,
1710 NDR_EVENTLOG_REPORTEVENTW,
1711 &state->tmp);
1712 if (tevent_req_nomem(subreq, req)) {
1713 return tevent_req_post(req, ev);
1715 tevent_req_set_callback(subreq, rpccli_eventlog_ReportEventW_done, req);
1716 return req;
1719 static void rpccli_eventlog_ReportEventW_done(struct tevent_req *subreq)
1721 struct tevent_req *req = tevent_req_callback_data(
1722 subreq, struct tevent_req);
1723 struct rpccli_eventlog_ReportEventW_state *state = tevent_req_data(
1724 req, struct rpccli_eventlog_ReportEventW_state);
1725 NTSTATUS status;
1726 TALLOC_CTX *mem_ctx;
1728 if (state->out_mem_ctx) {
1729 mem_ctx = state->out_mem_ctx;
1730 } else {
1731 mem_ctx = state;
1734 status = state->dispatch_recv(subreq, mem_ctx);
1735 TALLOC_FREE(subreq);
1736 if (!NT_STATUS_IS_OK(status)) {
1737 tevent_req_nterror(req, status);
1738 return;
1741 /* Copy out parameters */
1742 if (state->orig.out.record_number && state->tmp.out.record_number) {
1743 *state->orig.out.record_number = *state->tmp.out.record_number;
1745 if (state->orig.out.time_written && state->tmp.out.time_written) {
1746 *state->orig.out.time_written = *state->tmp.out.time_written;
1749 /* Copy result */
1750 state->orig.out.result = state->tmp.out.result;
1752 /* Reset temporary structure */
1753 ZERO_STRUCT(state->tmp);
1755 tevent_req_done(req);
1758 NTSTATUS rpccli_eventlog_ReportEventW_recv(struct tevent_req *req,
1759 TALLOC_CTX *mem_ctx,
1760 NTSTATUS *result)
1762 struct rpccli_eventlog_ReportEventW_state *state = tevent_req_data(
1763 req, struct rpccli_eventlog_ReportEventW_state);
1764 NTSTATUS status;
1766 if (tevent_req_is_nterror(req, &status)) {
1767 tevent_req_received(req);
1768 return status;
1771 /* Steal possbile out parameters to the callers context */
1772 talloc_steal(mem_ctx, state->out_mem_ctx);
1774 /* Return result */
1775 *result = state->orig.out.result;
1777 tevent_req_received(req);
1778 return NT_STATUS_OK;
1781 NTSTATUS rpccli_eventlog_ReportEventW(struct rpc_pipe_client *cli,
1782 TALLOC_CTX *mem_ctx,
1783 struct policy_handle *handle /* [in] [ref] */,
1784 time_t timestamp /* [in] */,
1785 enum eventlogEventTypes event_type /* [in] */,
1786 uint16_t event_category /* [in] */,
1787 uint32_t event_id /* [in] */,
1788 uint16_t num_of_strings /* [in] [range(0,256)] */,
1789 uint32_t data_size /* [in] [range(0,0x3FFFF)] */,
1790 struct lsa_String *servername /* [in] [ref] */,
1791 struct dom_sid *user_sid /* [in] [unique] */,
1792 struct lsa_String **strings /* [in] [unique,size_is(num_of_strings)] */,
1793 uint8_t *data /* [in] [unique,size_is(data_size)] */,
1794 uint16_t flags /* [in] */,
1795 uint32_t *record_number /* [in,out] [unique] */,
1796 time_t *time_written /* [in,out] [unique] */)
1798 struct eventlog_ReportEventW r;
1799 NTSTATUS status;
1801 /* In parameters */
1802 r.in.handle = handle;
1803 r.in.timestamp = timestamp;
1804 r.in.event_type = event_type;
1805 r.in.event_category = event_category;
1806 r.in.event_id = event_id;
1807 r.in.num_of_strings = num_of_strings;
1808 r.in.data_size = data_size;
1809 r.in.servername = servername;
1810 r.in.user_sid = user_sid;
1811 r.in.strings = strings;
1812 r.in.data = data;
1813 r.in.flags = flags;
1814 r.in.record_number = record_number;
1815 r.in.time_written = time_written;
1817 status = cli->dispatch(cli,
1818 mem_ctx,
1819 &ndr_table_eventlog,
1820 NDR_EVENTLOG_REPORTEVENTW,
1821 &r);
1823 if (!NT_STATUS_IS_OK(status)) {
1824 return status;
1827 if (NT_STATUS_IS_ERR(status)) {
1828 return status;
1831 /* Return variables */
1832 if (record_number && r.out.record_number) {
1833 *record_number = *r.out.record_number;
1835 if (time_written && r.out.time_written) {
1836 *time_written = *r.out.time_written;
1839 /* Return result */
1840 return r.out.result;
1843 struct rpccli_eventlog_ClearEventLogA_state {
1844 struct eventlog_ClearEventLogA orig;
1845 struct eventlog_ClearEventLogA tmp;
1846 TALLOC_CTX *out_mem_ctx;
1847 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1850 static void rpccli_eventlog_ClearEventLogA_done(struct tevent_req *subreq);
1852 struct tevent_req *rpccli_eventlog_ClearEventLogA_send(TALLOC_CTX *mem_ctx,
1853 struct tevent_context *ev,
1854 struct rpc_pipe_client *cli)
1856 struct tevent_req *req;
1857 struct rpccli_eventlog_ClearEventLogA_state *state;
1858 struct tevent_req *subreq;
1860 req = tevent_req_create(mem_ctx, &state,
1861 struct rpccli_eventlog_ClearEventLogA_state);
1862 if (req == NULL) {
1863 return NULL;
1865 state->out_mem_ctx = NULL;
1866 state->dispatch_recv = cli->dispatch_recv;
1868 /* In parameters */
1870 /* Out parameters */
1872 /* Result */
1873 ZERO_STRUCT(state->orig.out.result);
1875 /* make a temporary copy, that we pass to the dispatch function */
1876 state->tmp = state->orig;
1878 subreq = cli->dispatch_send(state, ev, cli,
1879 &ndr_table_eventlog,
1880 NDR_EVENTLOG_CLEAREVENTLOGA,
1881 &state->tmp);
1882 if (tevent_req_nomem(subreq, req)) {
1883 return tevent_req_post(req, ev);
1885 tevent_req_set_callback(subreq, rpccli_eventlog_ClearEventLogA_done, req);
1886 return req;
1889 static void rpccli_eventlog_ClearEventLogA_done(struct tevent_req *subreq)
1891 struct tevent_req *req = tevent_req_callback_data(
1892 subreq, struct tevent_req);
1893 struct rpccli_eventlog_ClearEventLogA_state *state = tevent_req_data(
1894 req, struct rpccli_eventlog_ClearEventLogA_state);
1895 NTSTATUS status;
1896 TALLOC_CTX *mem_ctx;
1898 if (state->out_mem_ctx) {
1899 mem_ctx = state->out_mem_ctx;
1900 } else {
1901 mem_ctx = state;
1904 status = state->dispatch_recv(subreq, mem_ctx);
1905 TALLOC_FREE(subreq);
1906 if (!NT_STATUS_IS_OK(status)) {
1907 tevent_req_nterror(req, status);
1908 return;
1911 /* Copy out parameters */
1913 /* Copy result */
1914 state->orig.out.result = state->tmp.out.result;
1916 /* Reset temporary structure */
1917 ZERO_STRUCT(state->tmp);
1919 tevent_req_done(req);
1922 NTSTATUS rpccli_eventlog_ClearEventLogA_recv(struct tevent_req *req,
1923 TALLOC_CTX *mem_ctx,
1924 NTSTATUS *result)
1926 struct rpccli_eventlog_ClearEventLogA_state *state = tevent_req_data(
1927 req, struct rpccli_eventlog_ClearEventLogA_state);
1928 NTSTATUS status;
1930 if (tevent_req_is_nterror(req, &status)) {
1931 tevent_req_received(req);
1932 return status;
1935 /* Steal possbile out parameters to the callers context */
1936 talloc_steal(mem_ctx, state->out_mem_ctx);
1938 /* Return result */
1939 *result = state->orig.out.result;
1941 tevent_req_received(req);
1942 return NT_STATUS_OK;
1945 NTSTATUS rpccli_eventlog_ClearEventLogA(struct rpc_pipe_client *cli,
1946 TALLOC_CTX *mem_ctx)
1948 struct eventlog_ClearEventLogA r;
1949 NTSTATUS status;
1951 /* In parameters */
1953 status = cli->dispatch(cli,
1954 mem_ctx,
1955 &ndr_table_eventlog,
1956 NDR_EVENTLOG_CLEAREVENTLOGA,
1957 &r);
1959 if (!NT_STATUS_IS_OK(status)) {
1960 return status;
1963 if (NT_STATUS_IS_ERR(status)) {
1964 return status;
1967 /* Return variables */
1969 /* Return result */
1970 return r.out.result;
1973 struct rpccli_eventlog_BackupEventLogA_state {
1974 struct eventlog_BackupEventLogA orig;
1975 struct eventlog_BackupEventLogA tmp;
1976 TALLOC_CTX *out_mem_ctx;
1977 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1980 static void rpccli_eventlog_BackupEventLogA_done(struct tevent_req *subreq);
1982 struct tevent_req *rpccli_eventlog_BackupEventLogA_send(TALLOC_CTX *mem_ctx,
1983 struct tevent_context *ev,
1984 struct rpc_pipe_client *cli)
1986 struct tevent_req *req;
1987 struct rpccli_eventlog_BackupEventLogA_state *state;
1988 struct tevent_req *subreq;
1990 req = tevent_req_create(mem_ctx, &state,
1991 struct rpccli_eventlog_BackupEventLogA_state);
1992 if (req == NULL) {
1993 return NULL;
1995 state->out_mem_ctx = NULL;
1996 state->dispatch_recv = cli->dispatch_recv;
1998 /* In parameters */
2000 /* Out parameters */
2002 /* Result */
2003 ZERO_STRUCT(state->orig.out.result);
2005 /* make a temporary copy, that we pass to the dispatch function */
2006 state->tmp = state->orig;
2008 subreq = cli->dispatch_send(state, ev, cli,
2009 &ndr_table_eventlog,
2010 NDR_EVENTLOG_BACKUPEVENTLOGA,
2011 &state->tmp);
2012 if (tevent_req_nomem(subreq, req)) {
2013 return tevent_req_post(req, ev);
2015 tevent_req_set_callback(subreq, rpccli_eventlog_BackupEventLogA_done, req);
2016 return req;
2019 static void rpccli_eventlog_BackupEventLogA_done(struct tevent_req *subreq)
2021 struct tevent_req *req = tevent_req_callback_data(
2022 subreq, struct tevent_req);
2023 struct rpccli_eventlog_BackupEventLogA_state *state = tevent_req_data(
2024 req, struct rpccli_eventlog_BackupEventLogA_state);
2025 NTSTATUS status;
2026 TALLOC_CTX *mem_ctx;
2028 if (state->out_mem_ctx) {
2029 mem_ctx = state->out_mem_ctx;
2030 } else {
2031 mem_ctx = state;
2034 status = state->dispatch_recv(subreq, mem_ctx);
2035 TALLOC_FREE(subreq);
2036 if (!NT_STATUS_IS_OK(status)) {
2037 tevent_req_nterror(req, status);
2038 return;
2041 /* Copy out parameters */
2043 /* Copy result */
2044 state->orig.out.result = state->tmp.out.result;
2046 /* Reset temporary structure */
2047 ZERO_STRUCT(state->tmp);
2049 tevent_req_done(req);
2052 NTSTATUS rpccli_eventlog_BackupEventLogA_recv(struct tevent_req *req,
2053 TALLOC_CTX *mem_ctx,
2054 NTSTATUS *result)
2056 struct rpccli_eventlog_BackupEventLogA_state *state = tevent_req_data(
2057 req, struct rpccli_eventlog_BackupEventLogA_state);
2058 NTSTATUS status;
2060 if (tevent_req_is_nterror(req, &status)) {
2061 tevent_req_received(req);
2062 return status;
2065 /* Steal possbile out parameters to the callers context */
2066 talloc_steal(mem_ctx, state->out_mem_ctx);
2068 /* Return result */
2069 *result = state->orig.out.result;
2071 tevent_req_received(req);
2072 return NT_STATUS_OK;
2075 NTSTATUS rpccli_eventlog_BackupEventLogA(struct rpc_pipe_client *cli,
2076 TALLOC_CTX *mem_ctx)
2078 struct eventlog_BackupEventLogA r;
2079 NTSTATUS status;
2081 /* In parameters */
2083 status = cli->dispatch(cli,
2084 mem_ctx,
2085 &ndr_table_eventlog,
2086 NDR_EVENTLOG_BACKUPEVENTLOGA,
2087 &r);
2089 if (!NT_STATUS_IS_OK(status)) {
2090 return status;
2093 if (NT_STATUS_IS_ERR(status)) {
2094 return status;
2097 /* Return variables */
2099 /* Return result */
2100 return r.out.result;
2103 struct rpccli_eventlog_OpenEventLogA_state {
2104 struct eventlog_OpenEventLogA orig;
2105 struct eventlog_OpenEventLogA tmp;
2106 TALLOC_CTX *out_mem_ctx;
2107 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2110 static void rpccli_eventlog_OpenEventLogA_done(struct tevent_req *subreq);
2112 struct tevent_req *rpccli_eventlog_OpenEventLogA_send(TALLOC_CTX *mem_ctx,
2113 struct tevent_context *ev,
2114 struct rpc_pipe_client *cli)
2116 struct tevent_req *req;
2117 struct rpccli_eventlog_OpenEventLogA_state *state;
2118 struct tevent_req *subreq;
2120 req = tevent_req_create(mem_ctx, &state,
2121 struct rpccli_eventlog_OpenEventLogA_state);
2122 if (req == NULL) {
2123 return NULL;
2125 state->out_mem_ctx = NULL;
2126 state->dispatch_recv = cli->dispatch_recv;
2128 /* In parameters */
2130 /* Out parameters */
2132 /* Result */
2133 ZERO_STRUCT(state->orig.out.result);
2135 /* make a temporary copy, that we pass to the dispatch function */
2136 state->tmp = state->orig;
2138 subreq = cli->dispatch_send(state, ev, cli,
2139 &ndr_table_eventlog,
2140 NDR_EVENTLOG_OPENEVENTLOGA,
2141 &state->tmp);
2142 if (tevent_req_nomem(subreq, req)) {
2143 return tevent_req_post(req, ev);
2145 tevent_req_set_callback(subreq, rpccli_eventlog_OpenEventLogA_done, req);
2146 return req;
2149 static void rpccli_eventlog_OpenEventLogA_done(struct tevent_req *subreq)
2151 struct tevent_req *req = tevent_req_callback_data(
2152 subreq, struct tevent_req);
2153 struct rpccli_eventlog_OpenEventLogA_state *state = tevent_req_data(
2154 req, struct rpccli_eventlog_OpenEventLogA_state);
2155 NTSTATUS status;
2156 TALLOC_CTX *mem_ctx;
2158 if (state->out_mem_ctx) {
2159 mem_ctx = state->out_mem_ctx;
2160 } else {
2161 mem_ctx = state;
2164 status = state->dispatch_recv(subreq, mem_ctx);
2165 TALLOC_FREE(subreq);
2166 if (!NT_STATUS_IS_OK(status)) {
2167 tevent_req_nterror(req, status);
2168 return;
2171 /* Copy out parameters */
2173 /* Copy result */
2174 state->orig.out.result = state->tmp.out.result;
2176 /* Reset temporary structure */
2177 ZERO_STRUCT(state->tmp);
2179 tevent_req_done(req);
2182 NTSTATUS rpccli_eventlog_OpenEventLogA_recv(struct tevent_req *req,
2183 TALLOC_CTX *mem_ctx,
2184 NTSTATUS *result)
2186 struct rpccli_eventlog_OpenEventLogA_state *state = tevent_req_data(
2187 req, struct rpccli_eventlog_OpenEventLogA_state);
2188 NTSTATUS status;
2190 if (tevent_req_is_nterror(req, &status)) {
2191 tevent_req_received(req);
2192 return status;
2195 /* Steal possbile out parameters to the callers context */
2196 talloc_steal(mem_ctx, state->out_mem_ctx);
2198 /* Return result */
2199 *result = state->orig.out.result;
2201 tevent_req_received(req);
2202 return NT_STATUS_OK;
2205 NTSTATUS rpccli_eventlog_OpenEventLogA(struct rpc_pipe_client *cli,
2206 TALLOC_CTX *mem_ctx)
2208 struct eventlog_OpenEventLogA r;
2209 NTSTATUS status;
2211 /* In parameters */
2213 status = cli->dispatch(cli,
2214 mem_ctx,
2215 &ndr_table_eventlog,
2216 NDR_EVENTLOG_OPENEVENTLOGA,
2217 &r);
2219 if (!NT_STATUS_IS_OK(status)) {
2220 return status;
2223 if (NT_STATUS_IS_ERR(status)) {
2224 return status;
2227 /* Return variables */
2229 /* Return result */
2230 return r.out.result;
2233 struct rpccli_eventlog_RegisterEventSourceA_state {
2234 struct eventlog_RegisterEventSourceA orig;
2235 struct eventlog_RegisterEventSourceA tmp;
2236 TALLOC_CTX *out_mem_ctx;
2237 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2240 static void rpccli_eventlog_RegisterEventSourceA_done(struct tevent_req *subreq);
2242 struct tevent_req *rpccli_eventlog_RegisterEventSourceA_send(TALLOC_CTX *mem_ctx,
2243 struct tevent_context *ev,
2244 struct rpc_pipe_client *cli)
2246 struct tevent_req *req;
2247 struct rpccli_eventlog_RegisterEventSourceA_state *state;
2248 struct tevent_req *subreq;
2250 req = tevent_req_create(mem_ctx, &state,
2251 struct rpccli_eventlog_RegisterEventSourceA_state);
2252 if (req == NULL) {
2253 return NULL;
2255 state->out_mem_ctx = NULL;
2256 state->dispatch_recv = cli->dispatch_recv;
2258 /* In parameters */
2260 /* Out parameters */
2262 /* Result */
2263 ZERO_STRUCT(state->orig.out.result);
2265 /* make a temporary copy, that we pass to the dispatch function */
2266 state->tmp = state->orig;
2268 subreq = cli->dispatch_send(state, ev, cli,
2269 &ndr_table_eventlog,
2270 NDR_EVENTLOG_REGISTEREVENTSOURCEA,
2271 &state->tmp);
2272 if (tevent_req_nomem(subreq, req)) {
2273 return tevent_req_post(req, ev);
2275 tevent_req_set_callback(subreq, rpccli_eventlog_RegisterEventSourceA_done, req);
2276 return req;
2279 static void rpccli_eventlog_RegisterEventSourceA_done(struct tevent_req *subreq)
2281 struct tevent_req *req = tevent_req_callback_data(
2282 subreq, struct tevent_req);
2283 struct rpccli_eventlog_RegisterEventSourceA_state *state = tevent_req_data(
2284 req, struct rpccli_eventlog_RegisterEventSourceA_state);
2285 NTSTATUS status;
2286 TALLOC_CTX *mem_ctx;
2288 if (state->out_mem_ctx) {
2289 mem_ctx = state->out_mem_ctx;
2290 } else {
2291 mem_ctx = state;
2294 status = state->dispatch_recv(subreq, mem_ctx);
2295 TALLOC_FREE(subreq);
2296 if (!NT_STATUS_IS_OK(status)) {
2297 tevent_req_nterror(req, status);
2298 return;
2301 /* Copy out parameters */
2303 /* Copy result */
2304 state->orig.out.result = state->tmp.out.result;
2306 /* Reset temporary structure */
2307 ZERO_STRUCT(state->tmp);
2309 tevent_req_done(req);
2312 NTSTATUS rpccli_eventlog_RegisterEventSourceA_recv(struct tevent_req *req,
2313 TALLOC_CTX *mem_ctx,
2314 NTSTATUS *result)
2316 struct rpccli_eventlog_RegisterEventSourceA_state *state = tevent_req_data(
2317 req, struct rpccli_eventlog_RegisterEventSourceA_state);
2318 NTSTATUS status;
2320 if (tevent_req_is_nterror(req, &status)) {
2321 tevent_req_received(req);
2322 return status;
2325 /* Steal possbile out parameters to the callers context */
2326 talloc_steal(mem_ctx, state->out_mem_ctx);
2328 /* Return result */
2329 *result = state->orig.out.result;
2331 tevent_req_received(req);
2332 return NT_STATUS_OK;
2335 NTSTATUS rpccli_eventlog_RegisterEventSourceA(struct rpc_pipe_client *cli,
2336 TALLOC_CTX *mem_ctx)
2338 struct eventlog_RegisterEventSourceA r;
2339 NTSTATUS status;
2341 /* In parameters */
2343 status = cli->dispatch(cli,
2344 mem_ctx,
2345 &ndr_table_eventlog,
2346 NDR_EVENTLOG_REGISTEREVENTSOURCEA,
2347 &r);
2349 if (!NT_STATUS_IS_OK(status)) {
2350 return status;
2353 if (NT_STATUS_IS_ERR(status)) {
2354 return status;
2357 /* Return variables */
2359 /* Return result */
2360 return r.out.result;
2363 struct rpccli_eventlog_OpenBackupEventLogA_state {
2364 struct eventlog_OpenBackupEventLogA orig;
2365 struct eventlog_OpenBackupEventLogA tmp;
2366 TALLOC_CTX *out_mem_ctx;
2367 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2370 static void rpccli_eventlog_OpenBackupEventLogA_done(struct tevent_req *subreq);
2372 struct tevent_req *rpccli_eventlog_OpenBackupEventLogA_send(TALLOC_CTX *mem_ctx,
2373 struct tevent_context *ev,
2374 struct rpc_pipe_client *cli)
2376 struct tevent_req *req;
2377 struct rpccli_eventlog_OpenBackupEventLogA_state *state;
2378 struct tevent_req *subreq;
2380 req = tevent_req_create(mem_ctx, &state,
2381 struct rpccli_eventlog_OpenBackupEventLogA_state);
2382 if (req == NULL) {
2383 return NULL;
2385 state->out_mem_ctx = NULL;
2386 state->dispatch_recv = cli->dispatch_recv;
2388 /* In parameters */
2390 /* Out parameters */
2392 /* Result */
2393 ZERO_STRUCT(state->orig.out.result);
2395 /* make a temporary copy, that we pass to the dispatch function */
2396 state->tmp = state->orig;
2398 subreq = cli->dispatch_send(state, ev, cli,
2399 &ndr_table_eventlog,
2400 NDR_EVENTLOG_OPENBACKUPEVENTLOGA,
2401 &state->tmp);
2402 if (tevent_req_nomem(subreq, req)) {
2403 return tevent_req_post(req, ev);
2405 tevent_req_set_callback(subreq, rpccli_eventlog_OpenBackupEventLogA_done, req);
2406 return req;
2409 static void rpccli_eventlog_OpenBackupEventLogA_done(struct tevent_req *subreq)
2411 struct tevent_req *req = tevent_req_callback_data(
2412 subreq, struct tevent_req);
2413 struct rpccli_eventlog_OpenBackupEventLogA_state *state = tevent_req_data(
2414 req, struct rpccli_eventlog_OpenBackupEventLogA_state);
2415 NTSTATUS status;
2416 TALLOC_CTX *mem_ctx;
2418 if (state->out_mem_ctx) {
2419 mem_ctx = state->out_mem_ctx;
2420 } else {
2421 mem_ctx = state;
2424 status = state->dispatch_recv(subreq, mem_ctx);
2425 TALLOC_FREE(subreq);
2426 if (!NT_STATUS_IS_OK(status)) {
2427 tevent_req_nterror(req, status);
2428 return;
2431 /* Copy out parameters */
2433 /* Copy result */
2434 state->orig.out.result = state->tmp.out.result;
2436 /* Reset temporary structure */
2437 ZERO_STRUCT(state->tmp);
2439 tevent_req_done(req);
2442 NTSTATUS rpccli_eventlog_OpenBackupEventLogA_recv(struct tevent_req *req,
2443 TALLOC_CTX *mem_ctx,
2444 NTSTATUS *result)
2446 struct rpccli_eventlog_OpenBackupEventLogA_state *state = tevent_req_data(
2447 req, struct rpccli_eventlog_OpenBackupEventLogA_state);
2448 NTSTATUS status;
2450 if (tevent_req_is_nterror(req, &status)) {
2451 tevent_req_received(req);
2452 return status;
2455 /* Steal possbile out parameters to the callers context */
2456 talloc_steal(mem_ctx, state->out_mem_ctx);
2458 /* Return result */
2459 *result = state->orig.out.result;
2461 tevent_req_received(req);
2462 return NT_STATUS_OK;
2465 NTSTATUS rpccli_eventlog_OpenBackupEventLogA(struct rpc_pipe_client *cli,
2466 TALLOC_CTX *mem_ctx)
2468 struct eventlog_OpenBackupEventLogA r;
2469 NTSTATUS status;
2471 /* In parameters */
2473 status = cli->dispatch(cli,
2474 mem_ctx,
2475 &ndr_table_eventlog,
2476 NDR_EVENTLOG_OPENBACKUPEVENTLOGA,
2477 &r);
2479 if (!NT_STATUS_IS_OK(status)) {
2480 return status;
2483 if (NT_STATUS_IS_ERR(status)) {
2484 return status;
2487 /* Return variables */
2489 /* Return result */
2490 return r.out.result;
2493 struct rpccli_eventlog_ReadEventLogA_state {
2494 struct eventlog_ReadEventLogA orig;
2495 struct eventlog_ReadEventLogA tmp;
2496 TALLOC_CTX *out_mem_ctx;
2497 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2500 static void rpccli_eventlog_ReadEventLogA_done(struct tevent_req *subreq);
2502 struct tevent_req *rpccli_eventlog_ReadEventLogA_send(TALLOC_CTX *mem_ctx,
2503 struct tevent_context *ev,
2504 struct rpc_pipe_client *cli)
2506 struct tevent_req *req;
2507 struct rpccli_eventlog_ReadEventLogA_state *state;
2508 struct tevent_req *subreq;
2510 req = tevent_req_create(mem_ctx, &state,
2511 struct rpccli_eventlog_ReadEventLogA_state);
2512 if (req == NULL) {
2513 return NULL;
2515 state->out_mem_ctx = NULL;
2516 state->dispatch_recv = cli->dispatch_recv;
2518 /* In parameters */
2520 /* Out parameters */
2522 /* Result */
2523 ZERO_STRUCT(state->orig.out.result);
2525 /* make a temporary copy, that we pass to the dispatch function */
2526 state->tmp = state->orig;
2528 subreq = cli->dispatch_send(state, ev, cli,
2529 &ndr_table_eventlog,
2530 NDR_EVENTLOG_READEVENTLOGA,
2531 &state->tmp);
2532 if (tevent_req_nomem(subreq, req)) {
2533 return tevent_req_post(req, ev);
2535 tevent_req_set_callback(subreq, rpccli_eventlog_ReadEventLogA_done, req);
2536 return req;
2539 static void rpccli_eventlog_ReadEventLogA_done(struct tevent_req *subreq)
2541 struct tevent_req *req = tevent_req_callback_data(
2542 subreq, struct tevent_req);
2543 struct rpccli_eventlog_ReadEventLogA_state *state = tevent_req_data(
2544 req, struct rpccli_eventlog_ReadEventLogA_state);
2545 NTSTATUS status;
2546 TALLOC_CTX *mem_ctx;
2548 if (state->out_mem_ctx) {
2549 mem_ctx = state->out_mem_ctx;
2550 } else {
2551 mem_ctx = state;
2554 status = state->dispatch_recv(subreq, mem_ctx);
2555 TALLOC_FREE(subreq);
2556 if (!NT_STATUS_IS_OK(status)) {
2557 tevent_req_nterror(req, status);
2558 return;
2561 /* Copy out parameters */
2563 /* Copy result */
2564 state->orig.out.result = state->tmp.out.result;
2566 /* Reset temporary structure */
2567 ZERO_STRUCT(state->tmp);
2569 tevent_req_done(req);
2572 NTSTATUS rpccli_eventlog_ReadEventLogA_recv(struct tevent_req *req,
2573 TALLOC_CTX *mem_ctx,
2574 NTSTATUS *result)
2576 struct rpccli_eventlog_ReadEventLogA_state *state = tevent_req_data(
2577 req, struct rpccli_eventlog_ReadEventLogA_state);
2578 NTSTATUS status;
2580 if (tevent_req_is_nterror(req, &status)) {
2581 tevent_req_received(req);
2582 return status;
2585 /* Steal possbile out parameters to the callers context */
2586 talloc_steal(mem_ctx, state->out_mem_ctx);
2588 /* Return result */
2589 *result = state->orig.out.result;
2591 tevent_req_received(req);
2592 return NT_STATUS_OK;
2595 NTSTATUS rpccli_eventlog_ReadEventLogA(struct rpc_pipe_client *cli,
2596 TALLOC_CTX *mem_ctx)
2598 struct eventlog_ReadEventLogA r;
2599 NTSTATUS status;
2601 /* In parameters */
2603 status = cli->dispatch(cli,
2604 mem_ctx,
2605 &ndr_table_eventlog,
2606 NDR_EVENTLOG_READEVENTLOGA,
2607 &r);
2609 if (!NT_STATUS_IS_OK(status)) {
2610 return status;
2613 if (NT_STATUS_IS_ERR(status)) {
2614 return status;
2617 /* Return variables */
2619 /* Return result */
2620 return r.out.result;
2623 struct rpccli_eventlog_ReportEventA_state {
2624 struct eventlog_ReportEventA orig;
2625 struct eventlog_ReportEventA tmp;
2626 TALLOC_CTX *out_mem_ctx;
2627 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2630 static void rpccli_eventlog_ReportEventA_done(struct tevent_req *subreq);
2632 struct tevent_req *rpccli_eventlog_ReportEventA_send(TALLOC_CTX *mem_ctx,
2633 struct tevent_context *ev,
2634 struct rpc_pipe_client *cli)
2636 struct tevent_req *req;
2637 struct rpccli_eventlog_ReportEventA_state *state;
2638 struct tevent_req *subreq;
2640 req = tevent_req_create(mem_ctx, &state,
2641 struct rpccli_eventlog_ReportEventA_state);
2642 if (req == NULL) {
2643 return NULL;
2645 state->out_mem_ctx = NULL;
2646 state->dispatch_recv = cli->dispatch_recv;
2648 /* In parameters */
2650 /* Out parameters */
2652 /* Result */
2653 ZERO_STRUCT(state->orig.out.result);
2655 /* make a temporary copy, that we pass to the dispatch function */
2656 state->tmp = state->orig;
2658 subreq = cli->dispatch_send(state, ev, cli,
2659 &ndr_table_eventlog,
2660 NDR_EVENTLOG_REPORTEVENTA,
2661 &state->tmp);
2662 if (tevent_req_nomem(subreq, req)) {
2663 return tevent_req_post(req, ev);
2665 tevent_req_set_callback(subreq, rpccli_eventlog_ReportEventA_done, req);
2666 return req;
2669 static void rpccli_eventlog_ReportEventA_done(struct tevent_req *subreq)
2671 struct tevent_req *req = tevent_req_callback_data(
2672 subreq, struct tevent_req);
2673 struct rpccli_eventlog_ReportEventA_state *state = tevent_req_data(
2674 req, struct rpccli_eventlog_ReportEventA_state);
2675 NTSTATUS status;
2676 TALLOC_CTX *mem_ctx;
2678 if (state->out_mem_ctx) {
2679 mem_ctx = state->out_mem_ctx;
2680 } else {
2681 mem_ctx = state;
2684 status = state->dispatch_recv(subreq, mem_ctx);
2685 TALLOC_FREE(subreq);
2686 if (!NT_STATUS_IS_OK(status)) {
2687 tevent_req_nterror(req, status);
2688 return;
2691 /* Copy out parameters */
2693 /* Copy result */
2694 state->orig.out.result = state->tmp.out.result;
2696 /* Reset temporary structure */
2697 ZERO_STRUCT(state->tmp);
2699 tevent_req_done(req);
2702 NTSTATUS rpccli_eventlog_ReportEventA_recv(struct tevent_req *req,
2703 TALLOC_CTX *mem_ctx,
2704 NTSTATUS *result)
2706 struct rpccli_eventlog_ReportEventA_state *state = tevent_req_data(
2707 req, struct rpccli_eventlog_ReportEventA_state);
2708 NTSTATUS status;
2710 if (tevent_req_is_nterror(req, &status)) {
2711 tevent_req_received(req);
2712 return status;
2715 /* Steal possbile out parameters to the callers context */
2716 talloc_steal(mem_ctx, state->out_mem_ctx);
2718 /* Return result */
2719 *result = state->orig.out.result;
2721 tevent_req_received(req);
2722 return NT_STATUS_OK;
2725 NTSTATUS rpccli_eventlog_ReportEventA(struct rpc_pipe_client *cli,
2726 TALLOC_CTX *mem_ctx)
2728 struct eventlog_ReportEventA r;
2729 NTSTATUS status;
2731 /* In parameters */
2733 status = cli->dispatch(cli,
2734 mem_ctx,
2735 &ndr_table_eventlog,
2736 NDR_EVENTLOG_REPORTEVENTA,
2737 &r);
2739 if (!NT_STATUS_IS_OK(status)) {
2740 return status;
2743 if (NT_STATUS_IS_ERR(status)) {
2744 return status;
2747 /* Return variables */
2749 /* Return result */
2750 return r.out.result;
2753 struct rpccli_eventlog_RegisterClusterSvc_state {
2754 struct eventlog_RegisterClusterSvc orig;
2755 struct eventlog_RegisterClusterSvc tmp;
2756 TALLOC_CTX *out_mem_ctx;
2757 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2760 static void rpccli_eventlog_RegisterClusterSvc_done(struct tevent_req *subreq);
2762 struct tevent_req *rpccli_eventlog_RegisterClusterSvc_send(TALLOC_CTX *mem_ctx,
2763 struct tevent_context *ev,
2764 struct rpc_pipe_client *cli)
2766 struct tevent_req *req;
2767 struct rpccli_eventlog_RegisterClusterSvc_state *state;
2768 struct tevent_req *subreq;
2770 req = tevent_req_create(mem_ctx, &state,
2771 struct rpccli_eventlog_RegisterClusterSvc_state);
2772 if (req == NULL) {
2773 return NULL;
2775 state->out_mem_ctx = NULL;
2776 state->dispatch_recv = cli->dispatch_recv;
2778 /* In parameters */
2780 /* Out parameters */
2782 /* Result */
2783 ZERO_STRUCT(state->orig.out.result);
2785 /* make a temporary copy, that we pass to the dispatch function */
2786 state->tmp = state->orig;
2788 subreq = cli->dispatch_send(state, ev, cli,
2789 &ndr_table_eventlog,
2790 NDR_EVENTLOG_REGISTERCLUSTERSVC,
2791 &state->tmp);
2792 if (tevent_req_nomem(subreq, req)) {
2793 return tevent_req_post(req, ev);
2795 tevent_req_set_callback(subreq, rpccli_eventlog_RegisterClusterSvc_done, req);
2796 return req;
2799 static void rpccli_eventlog_RegisterClusterSvc_done(struct tevent_req *subreq)
2801 struct tevent_req *req = tevent_req_callback_data(
2802 subreq, struct tevent_req);
2803 struct rpccli_eventlog_RegisterClusterSvc_state *state = tevent_req_data(
2804 req, struct rpccli_eventlog_RegisterClusterSvc_state);
2805 NTSTATUS status;
2806 TALLOC_CTX *mem_ctx;
2808 if (state->out_mem_ctx) {
2809 mem_ctx = state->out_mem_ctx;
2810 } else {
2811 mem_ctx = state;
2814 status = state->dispatch_recv(subreq, mem_ctx);
2815 TALLOC_FREE(subreq);
2816 if (!NT_STATUS_IS_OK(status)) {
2817 tevent_req_nterror(req, status);
2818 return;
2821 /* Copy out parameters */
2823 /* Copy result */
2824 state->orig.out.result = state->tmp.out.result;
2826 /* Reset temporary structure */
2827 ZERO_STRUCT(state->tmp);
2829 tevent_req_done(req);
2832 NTSTATUS rpccli_eventlog_RegisterClusterSvc_recv(struct tevent_req *req,
2833 TALLOC_CTX *mem_ctx,
2834 NTSTATUS *result)
2836 struct rpccli_eventlog_RegisterClusterSvc_state *state = tevent_req_data(
2837 req, struct rpccli_eventlog_RegisterClusterSvc_state);
2838 NTSTATUS status;
2840 if (tevent_req_is_nterror(req, &status)) {
2841 tevent_req_received(req);
2842 return status;
2845 /* Steal possbile out parameters to the callers context */
2846 talloc_steal(mem_ctx, state->out_mem_ctx);
2848 /* Return result */
2849 *result = state->orig.out.result;
2851 tevent_req_received(req);
2852 return NT_STATUS_OK;
2855 NTSTATUS rpccli_eventlog_RegisterClusterSvc(struct rpc_pipe_client *cli,
2856 TALLOC_CTX *mem_ctx)
2858 struct eventlog_RegisterClusterSvc r;
2859 NTSTATUS status;
2861 /* In parameters */
2863 status = cli->dispatch(cli,
2864 mem_ctx,
2865 &ndr_table_eventlog,
2866 NDR_EVENTLOG_REGISTERCLUSTERSVC,
2867 &r);
2869 if (!NT_STATUS_IS_OK(status)) {
2870 return status;
2873 if (NT_STATUS_IS_ERR(status)) {
2874 return status;
2877 /* Return variables */
2879 /* Return result */
2880 return r.out.result;
2883 struct rpccli_eventlog_DeregisterClusterSvc_state {
2884 struct eventlog_DeregisterClusterSvc orig;
2885 struct eventlog_DeregisterClusterSvc tmp;
2886 TALLOC_CTX *out_mem_ctx;
2887 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2890 static void rpccli_eventlog_DeregisterClusterSvc_done(struct tevent_req *subreq);
2892 struct tevent_req *rpccli_eventlog_DeregisterClusterSvc_send(TALLOC_CTX *mem_ctx,
2893 struct tevent_context *ev,
2894 struct rpc_pipe_client *cli)
2896 struct tevent_req *req;
2897 struct rpccli_eventlog_DeregisterClusterSvc_state *state;
2898 struct tevent_req *subreq;
2900 req = tevent_req_create(mem_ctx, &state,
2901 struct rpccli_eventlog_DeregisterClusterSvc_state);
2902 if (req == NULL) {
2903 return NULL;
2905 state->out_mem_ctx = NULL;
2906 state->dispatch_recv = cli->dispatch_recv;
2908 /* In parameters */
2910 /* Out parameters */
2912 /* Result */
2913 ZERO_STRUCT(state->orig.out.result);
2915 /* make a temporary copy, that we pass to the dispatch function */
2916 state->tmp = state->orig;
2918 subreq = cli->dispatch_send(state, ev, cli,
2919 &ndr_table_eventlog,
2920 NDR_EVENTLOG_DEREGISTERCLUSTERSVC,
2921 &state->tmp);
2922 if (tevent_req_nomem(subreq, req)) {
2923 return tevent_req_post(req, ev);
2925 tevent_req_set_callback(subreq, rpccli_eventlog_DeregisterClusterSvc_done, req);
2926 return req;
2929 static void rpccli_eventlog_DeregisterClusterSvc_done(struct tevent_req *subreq)
2931 struct tevent_req *req = tevent_req_callback_data(
2932 subreq, struct tevent_req);
2933 struct rpccli_eventlog_DeregisterClusterSvc_state *state = tevent_req_data(
2934 req, struct rpccli_eventlog_DeregisterClusterSvc_state);
2935 NTSTATUS status;
2936 TALLOC_CTX *mem_ctx;
2938 if (state->out_mem_ctx) {
2939 mem_ctx = state->out_mem_ctx;
2940 } else {
2941 mem_ctx = state;
2944 status = state->dispatch_recv(subreq, mem_ctx);
2945 TALLOC_FREE(subreq);
2946 if (!NT_STATUS_IS_OK(status)) {
2947 tevent_req_nterror(req, status);
2948 return;
2951 /* Copy out parameters */
2953 /* Copy result */
2954 state->orig.out.result = state->tmp.out.result;
2956 /* Reset temporary structure */
2957 ZERO_STRUCT(state->tmp);
2959 tevent_req_done(req);
2962 NTSTATUS rpccli_eventlog_DeregisterClusterSvc_recv(struct tevent_req *req,
2963 TALLOC_CTX *mem_ctx,
2964 NTSTATUS *result)
2966 struct rpccli_eventlog_DeregisterClusterSvc_state *state = tevent_req_data(
2967 req, struct rpccli_eventlog_DeregisterClusterSvc_state);
2968 NTSTATUS status;
2970 if (tevent_req_is_nterror(req, &status)) {
2971 tevent_req_received(req);
2972 return status;
2975 /* Steal possbile out parameters to the callers context */
2976 talloc_steal(mem_ctx, state->out_mem_ctx);
2978 /* Return result */
2979 *result = state->orig.out.result;
2981 tevent_req_received(req);
2982 return NT_STATUS_OK;
2985 NTSTATUS rpccli_eventlog_DeregisterClusterSvc(struct rpc_pipe_client *cli,
2986 TALLOC_CTX *mem_ctx)
2988 struct eventlog_DeregisterClusterSvc r;
2989 NTSTATUS status;
2991 /* In parameters */
2993 status = cli->dispatch(cli,
2994 mem_ctx,
2995 &ndr_table_eventlog,
2996 NDR_EVENTLOG_DEREGISTERCLUSTERSVC,
2997 &r);
2999 if (!NT_STATUS_IS_OK(status)) {
3000 return status;
3003 if (NT_STATUS_IS_ERR(status)) {
3004 return status;
3007 /* Return variables */
3009 /* Return result */
3010 return r.out.result;
3013 struct rpccli_eventlog_WriteClusterEvents_state {
3014 struct eventlog_WriteClusterEvents orig;
3015 struct eventlog_WriteClusterEvents tmp;
3016 TALLOC_CTX *out_mem_ctx;
3017 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3020 static void rpccli_eventlog_WriteClusterEvents_done(struct tevent_req *subreq);
3022 struct tevent_req *rpccli_eventlog_WriteClusterEvents_send(TALLOC_CTX *mem_ctx,
3023 struct tevent_context *ev,
3024 struct rpc_pipe_client *cli)
3026 struct tevent_req *req;
3027 struct rpccli_eventlog_WriteClusterEvents_state *state;
3028 struct tevent_req *subreq;
3030 req = tevent_req_create(mem_ctx, &state,
3031 struct rpccli_eventlog_WriteClusterEvents_state);
3032 if (req == NULL) {
3033 return NULL;
3035 state->out_mem_ctx = NULL;
3036 state->dispatch_recv = cli->dispatch_recv;
3038 /* In parameters */
3040 /* Out parameters */
3042 /* Result */
3043 ZERO_STRUCT(state->orig.out.result);
3045 /* make a temporary copy, that we pass to the dispatch function */
3046 state->tmp = state->orig;
3048 subreq = cli->dispatch_send(state, ev, cli,
3049 &ndr_table_eventlog,
3050 NDR_EVENTLOG_WRITECLUSTEREVENTS,
3051 &state->tmp);
3052 if (tevent_req_nomem(subreq, req)) {
3053 return tevent_req_post(req, ev);
3055 tevent_req_set_callback(subreq, rpccli_eventlog_WriteClusterEvents_done, req);
3056 return req;
3059 static void rpccli_eventlog_WriteClusterEvents_done(struct tevent_req *subreq)
3061 struct tevent_req *req = tevent_req_callback_data(
3062 subreq, struct tevent_req);
3063 struct rpccli_eventlog_WriteClusterEvents_state *state = tevent_req_data(
3064 req, struct rpccli_eventlog_WriteClusterEvents_state);
3065 NTSTATUS status;
3066 TALLOC_CTX *mem_ctx;
3068 if (state->out_mem_ctx) {
3069 mem_ctx = state->out_mem_ctx;
3070 } else {
3071 mem_ctx = state;
3074 status = state->dispatch_recv(subreq, mem_ctx);
3075 TALLOC_FREE(subreq);
3076 if (!NT_STATUS_IS_OK(status)) {
3077 tevent_req_nterror(req, status);
3078 return;
3081 /* Copy out parameters */
3083 /* Copy result */
3084 state->orig.out.result = state->tmp.out.result;
3086 /* Reset temporary structure */
3087 ZERO_STRUCT(state->tmp);
3089 tevent_req_done(req);
3092 NTSTATUS rpccli_eventlog_WriteClusterEvents_recv(struct tevent_req *req,
3093 TALLOC_CTX *mem_ctx,
3094 NTSTATUS *result)
3096 struct rpccli_eventlog_WriteClusterEvents_state *state = tevent_req_data(
3097 req, struct rpccli_eventlog_WriteClusterEvents_state);
3098 NTSTATUS status;
3100 if (tevent_req_is_nterror(req, &status)) {
3101 tevent_req_received(req);
3102 return status;
3105 /* Steal possbile out parameters to the callers context */
3106 talloc_steal(mem_ctx, state->out_mem_ctx);
3108 /* Return result */
3109 *result = state->orig.out.result;
3111 tevent_req_received(req);
3112 return NT_STATUS_OK;
3115 NTSTATUS rpccli_eventlog_WriteClusterEvents(struct rpc_pipe_client *cli,
3116 TALLOC_CTX *mem_ctx)
3118 struct eventlog_WriteClusterEvents r;
3119 NTSTATUS status;
3121 /* In parameters */
3123 status = cli->dispatch(cli,
3124 mem_ctx,
3125 &ndr_table_eventlog,
3126 NDR_EVENTLOG_WRITECLUSTEREVENTS,
3127 &r);
3129 if (!NT_STATUS_IS_OK(status)) {
3130 return status;
3133 if (NT_STATUS_IS_ERR(status)) {
3134 return status;
3137 /* Return variables */
3139 /* Return result */
3140 return r.out.result;
3143 struct rpccli_eventlog_GetLogInformation_state {
3144 struct eventlog_GetLogInformation orig;
3145 struct eventlog_GetLogInformation tmp;
3146 TALLOC_CTX *out_mem_ctx;
3147 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3150 static void rpccli_eventlog_GetLogInformation_done(struct tevent_req *subreq);
3152 struct tevent_req *rpccli_eventlog_GetLogInformation_send(TALLOC_CTX *mem_ctx,
3153 struct tevent_context *ev,
3154 struct rpc_pipe_client *cli,
3155 struct policy_handle *_handle /* [in] [ref] */,
3156 uint32_t _level /* [in] */,
3157 uint8_t *_buffer /* [out] [ref,size_is(buf_size)] */,
3158 uint32_t _buf_size /* [in] [range(0,1024)] */,
3159 uint32_t *_bytes_needed /* [out] [ref] */)
3161 struct tevent_req *req;
3162 struct rpccli_eventlog_GetLogInformation_state *state;
3163 struct tevent_req *subreq;
3165 req = tevent_req_create(mem_ctx, &state,
3166 struct rpccli_eventlog_GetLogInformation_state);
3167 if (req == NULL) {
3168 return NULL;
3170 state->out_mem_ctx = NULL;
3171 state->dispatch_recv = cli->dispatch_recv;
3173 /* In parameters */
3174 state->orig.in.handle = _handle;
3175 state->orig.in.level = _level;
3176 state->orig.in.buf_size = _buf_size;
3178 /* Out parameters */
3179 state->orig.out.buffer = _buffer;
3180 state->orig.out.bytes_needed = _bytes_needed;
3182 /* Result */
3183 ZERO_STRUCT(state->orig.out.result);
3185 state->out_mem_ctx = talloc_named_const(state, 0,
3186 "rpccli_eventlog_GetLogInformation_out_memory");
3187 if (tevent_req_nomem(state->out_mem_ctx, req)) {
3188 return tevent_req_post(req, ev);
3191 /* make a temporary copy, that we pass to the dispatch function */
3192 state->tmp = state->orig;
3194 subreq = cli->dispatch_send(state, ev, cli,
3195 &ndr_table_eventlog,
3196 NDR_EVENTLOG_GETLOGINFORMATION,
3197 &state->tmp);
3198 if (tevent_req_nomem(subreq, req)) {
3199 return tevent_req_post(req, ev);
3201 tevent_req_set_callback(subreq, rpccli_eventlog_GetLogInformation_done, req);
3202 return req;
3205 static void rpccli_eventlog_GetLogInformation_done(struct tevent_req *subreq)
3207 struct tevent_req *req = tevent_req_callback_data(
3208 subreq, struct tevent_req);
3209 struct rpccli_eventlog_GetLogInformation_state *state = tevent_req_data(
3210 req, struct rpccli_eventlog_GetLogInformation_state);
3211 NTSTATUS status;
3212 TALLOC_CTX *mem_ctx;
3214 if (state->out_mem_ctx) {
3215 mem_ctx = state->out_mem_ctx;
3216 } else {
3217 mem_ctx = state;
3220 status = state->dispatch_recv(subreq, mem_ctx);
3221 TALLOC_FREE(subreq);
3222 if (!NT_STATUS_IS_OK(status)) {
3223 tevent_req_nterror(req, status);
3224 return;
3227 /* Copy out parameters */
3228 memcpy(state->orig.out.buffer, state->tmp.out.buffer, (state->tmp.in.buf_size) * sizeof(*state->orig.out.buffer));
3229 *state->orig.out.bytes_needed = *state->tmp.out.bytes_needed;
3231 /* Copy result */
3232 state->orig.out.result = state->tmp.out.result;
3234 /* Reset temporary structure */
3235 ZERO_STRUCT(state->tmp);
3237 tevent_req_done(req);
3240 NTSTATUS rpccli_eventlog_GetLogInformation_recv(struct tevent_req *req,
3241 TALLOC_CTX *mem_ctx,
3242 NTSTATUS *result)
3244 struct rpccli_eventlog_GetLogInformation_state *state = tevent_req_data(
3245 req, struct rpccli_eventlog_GetLogInformation_state);
3246 NTSTATUS status;
3248 if (tevent_req_is_nterror(req, &status)) {
3249 tevent_req_received(req);
3250 return status;
3253 /* Steal possbile out parameters to the callers context */
3254 talloc_steal(mem_ctx, state->out_mem_ctx);
3256 /* Return result */
3257 *result = state->orig.out.result;
3259 tevent_req_received(req);
3260 return NT_STATUS_OK;
3263 NTSTATUS rpccli_eventlog_GetLogInformation(struct rpc_pipe_client *cli,
3264 TALLOC_CTX *mem_ctx,
3265 struct policy_handle *handle /* [in] [ref] */,
3266 uint32_t level /* [in] */,
3267 uint8_t *buffer /* [out] [ref,size_is(buf_size)] */,
3268 uint32_t buf_size /* [in] [range(0,1024)] */,
3269 uint32_t *bytes_needed /* [out] [ref] */)
3271 struct eventlog_GetLogInformation r;
3272 NTSTATUS status;
3274 /* In parameters */
3275 r.in.handle = handle;
3276 r.in.level = level;
3277 r.in.buf_size = buf_size;
3279 status = cli->dispatch(cli,
3280 mem_ctx,
3281 &ndr_table_eventlog,
3282 NDR_EVENTLOG_GETLOGINFORMATION,
3283 &r);
3285 if (!NT_STATUS_IS_OK(status)) {
3286 return status;
3289 if (NT_STATUS_IS_ERR(status)) {
3290 return status;
3293 /* Return variables */
3294 memcpy(buffer, r.out.buffer, (r.in.buf_size) * sizeof(*buffer));
3295 *bytes_needed = *r.out.bytes_needed;
3297 /* Return result */
3298 return r.out.result;
3301 struct rpccli_eventlog_FlushEventLog_state {
3302 struct eventlog_FlushEventLog orig;
3303 struct eventlog_FlushEventLog tmp;
3304 TALLOC_CTX *out_mem_ctx;
3305 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3308 static void rpccli_eventlog_FlushEventLog_done(struct tevent_req *subreq);
3310 struct tevent_req *rpccli_eventlog_FlushEventLog_send(TALLOC_CTX *mem_ctx,
3311 struct tevent_context *ev,
3312 struct rpc_pipe_client *cli,
3313 struct policy_handle *_handle /* [in] [ref] */)
3315 struct tevent_req *req;
3316 struct rpccli_eventlog_FlushEventLog_state *state;
3317 struct tevent_req *subreq;
3319 req = tevent_req_create(mem_ctx, &state,
3320 struct rpccli_eventlog_FlushEventLog_state);
3321 if (req == NULL) {
3322 return NULL;
3324 state->out_mem_ctx = NULL;
3325 state->dispatch_recv = cli->dispatch_recv;
3327 /* In parameters */
3328 state->orig.in.handle = _handle;
3330 /* Out parameters */
3332 /* Result */
3333 ZERO_STRUCT(state->orig.out.result);
3335 /* make a temporary copy, that we pass to the dispatch function */
3336 state->tmp = state->orig;
3338 subreq = cli->dispatch_send(state, ev, cli,
3339 &ndr_table_eventlog,
3340 NDR_EVENTLOG_FLUSHEVENTLOG,
3341 &state->tmp);
3342 if (tevent_req_nomem(subreq, req)) {
3343 return tevent_req_post(req, ev);
3345 tevent_req_set_callback(subreq, rpccli_eventlog_FlushEventLog_done, req);
3346 return req;
3349 static void rpccli_eventlog_FlushEventLog_done(struct tevent_req *subreq)
3351 struct tevent_req *req = tevent_req_callback_data(
3352 subreq, struct tevent_req);
3353 struct rpccli_eventlog_FlushEventLog_state *state = tevent_req_data(
3354 req, struct rpccli_eventlog_FlushEventLog_state);
3355 NTSTATUS status;
3356 TALLOC_CTX *mem_ctx;
3358 if (state->out_mem_ctx) {
3359 mem_ctx = state->out_mem_ctx;
3360 } else {
3361 mem_ctx = state;
3364 status = state->dispatch_recv(subreq, mem_ctx);
3365 TALLOC_FREE(subreq);
3366 if (!NT_STATUS_IS_OK(status)) {
3367 tevent_req_nterror(req, status);
3368 return;
3371 /* Copy out parameters */
3373 /* Copy result */
3374 state->orig.out.result = state->tmp.out.result;
3376 /* Reset temporary structure */
3377 ZERO_STRUCT(state->tmp);
3379 tevent_req_done(req);
3382 NTSTATUS rpccli_eventlog_FlushEventLog_recv(struct tevent_req *req,
3383 TALLOC_CTX *mem_ctx,
3384 NTSTATUS *result)
3386 struct rpccli_eventlog_FlushEventLog_state *state = tevent_req_data(
3387 req, struct rpccli_eventlog_FlushEventLog_state);
3388 NTSTATUS status;
3390 if (tevent_req_is_nterror(req, &status)) {
3391 tevent_req_received(req);
3392 return status;
3395 /* Steal possbile out parameters to the callers context */
3396 talloc_steal(mem_ctx, state->out_mem_ctx);
3398 /* Return result */
3399 *result = state->orig.out.result;
3401 tevent_req_received(req);
3402 return NT_STATUS_OK;
3405 NTSTATUS rpccli_eventlog_FlushEventLog(struct rpc_pipe_client *cli,
3406 TALLOC_CTX *mem_ctx,
3407 struct policy_handle *handle /* [in] [ref] */)
3409 struct eventlog_FlushEventLog r;
3410 NTSTATUS status;
3412 /* In parameters */
3413 r.in.handle = handle;
3415 status = cli->dispatch(cli,
3416 mem_ctx,
3417 &ndr_table_eventlog,
3418 NDR_EVENTLOG_FLUSHEVENTLOG,
3419 &r);
3421 if (!NT_STATUS_IS_OK(status)) {
3422 return status;
3425 if (NT_STATUS_IS_ERR(status)) {
3426 return status;
3429 /* Return variables */
3431 /* Return result */
3432 return r.out.result;
3435 struct rpccli_eventlog_ReportEventAndSourceW_state {
3436 struct eventlog_ReportEventAndSourceW orig;
3437 struct eventlog_ReportEventAndSourceW tmp;
3438 TALLOC_CTX *out_mem_ctx;
3439 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3442 static void rpccli_eventlog_ReportEventAndSourceW_done(struct tevent_req *subreq);
3444 struct tevent_req *rpccli_eventlog_ReportEventAndSourceW_send(TALLOC_CTX *mem_ctx,
3445 struct tevent_context *ev,
3446 struct rpc_pipe_client *cli,
3447 struct policy_handle *_handle /* [in] [ref] */,
3448 time_t _timestamp /* [in] */,
3449 enum eventlogEventTypes _event_type /* [in] */,
3450 uint16_t _event_category /* [in] */,
3451 uint32_t _event_id /* [in] */,
3452 struct lsa_String *_sourcename /* [in] [ref] */,
3453 uint16_t _num_of_strings /* [in] [range(0,256)] */,
3454 uint32_t _data_size /* [in] [range(0,0x3FFFF)] */,
3455 struct lsa_String *_servername /* [in] [ref] */,
3456 struct dom_sid *_user_sid /* [in] [unique] */,
3457 struct lsa_String **_strings /* [in] [unique,size_is(num_of_strings)] */,
3458 uint8_t *_data /* [in] [unique,size_is(data_size)] */,
3459 uint16_t _flags /* [in] */,
3460 uint32_t *_record_number /* [in,out] [unique] */,
3461 time_t *_time_written /* [in,out] [unique] */)
3463 struct tevent_req *req;
3464 struct rpccli_eventlog_ReportEventAndSourceW_state *state;
3465 struct tevent_req *subreq;
3467 req = tevent_req_create(mem_ctx, &state,
3468 struct rpccli_eventlog_ReportEventAndSourceW_state);
3469 if (req == NULL) {
3470 return NULL;
3472 state->out_mem_ctx = NULL;
3473 state->dispatch_recv = cli->dispatch_recv;
3475 /* In parameters */
3476 state->orig.in.handle = _handle;
3477 state->orig.in.timestamp = _timestamp;
3478 state->orig.in.event_type = _event_type;
3479 state->orig.in.event_category = _event_category;
3480 state->orig.in.event_id = _event_id;
3481 state->orig.in.sourcename = _sourcename;
3482 state->orig.in.num_of_strings = _num_of_strings;
3483 state->orig.in.data_size = _data_size;
3484 state->orig.in.servername = _servername;
3485 state->orig.in.user_sid = _user_sid;
3486 state->orig.in.strings = _strings;
3487 state->orig.in.data = _data;
3488 state->orig.in.flags = _flags;
3489 state->orig.in.record_number = _record_number;
3490 state->orig.in.time_written = _time_written;
3492 /* Out parameters */
3493 state->orig.out.record_number = _record_number;
3494 state->orig.out.time_written = _time_written;
3496 /* Result */
3497 ZERO_STRUCT(state->orig.out.result);
3499 state->out_mem_ctx = talloc_named_const(state, 0,
3500 "rpccli_eventlog_ReportEventAndSourceW_out_memory");
3501 if (tevent_req_nomem(state->out_mem_ctx, req)) {
3502 return tevent_req_post(req, ev);
3505 /* make a temporary copy, that we pass to the dispatch function */
3506 state->tmp = state->orig;
3508 subreq = cli->dispatch_send(state, ev, cli,
3509 &ndr_table_eventlog,
3510 NDR_EVENTLOG_REPORTEVENTANDSOURCEW,
3511 &state->tmp);
3512 if (tevent_req_nomem(subreq, req)) {
3513 return tevent_req_post(req, ev);
3515 tevent_req_set_callback(subreq, rpccli_eventlog_ReportEventAndSourceW_done, req);
3516 return req;
3519 static void rpccli_eventlog_ReportEventAndSourceW_done(struct tevent_req *subreq)
3521 struct tevent_req *req = tevent_req_callback_data(
3522 subreq, struct tevent_req);
3523 struct rpccli_eventlog_ReportEventAndSourceW_state *state = tevent_req_data(
3524 req, struct rpccli_eventlog_ReportEventAndSourceW_state);
3525 NTSTATUS status;
3526 TALLOC_CTX *mem_ctx;
3528 if (state->out_mem_ctx) {
3529 mem_ctx = state->out_mem_ctx;
3530 } else {
3531 mem_ctx = state;
3534 status = state->dispatch_recv(subreq, mem_ctx);
3535 TALLOC_FREE(subreq);
3536 if (!NT_STATUS_IS_OK(status)) {
3537 tevent_req_nterror(req, status);
3538 return;
3541 /* Copy out parameters */
3542 if (state->orig.out.record_number && state->tmp.out.record_number) {
3543 *state->orig.out.record_number = *state->tmp.out.record_number;
3545 if (state->orig.out.time_written && state->tmp.out.time_written) {
3546 *state->orig.out.time_written = *state->tmp.out.time_written;
3549 /* Copy result */
3550 state->orig.out.result = state->tmp.out.result;
3552 /* Reset temporary structure */
3553 ZERO_STRUCT(state->tmp);
3555 tevent_req_done(req);
3558 NTSTATUS rpccli_eventlog_ReportEventAndSourceW_recv(struct tevent_req *req,
3559 TALLOC_CTX *mem_ctx,
3560 NTSTATUS *result)
3562 struct rpccli_eventlog_ReportEventAndSourceW_state *state = tevent_req_data(
3563 req, struct rpccli_eventlog_ReportEventAndSourceW_state);
3564 NTSTATUS status;
3566 if (tevent_req_is_nterror(req, &status)) {
3567 tevent_req_received(req);
3568 return status;
3571 /* Steal possbile out parameters to the callers context */
3572 talloc_steal(mem_ctx, state->out_mem_ctx);
3574 /* Return result */
3575 *result = state->orig.out.result;
3577 tevent_req_received(req);
3578 return NT_STATUS_OK;
3581 NTSTATUS rpccli_eventlog_ReportEventAndSourceW(struct rpc_pipe_client *cli,
3582 TALLOC_CTX *mem_ctx,
3583 struct policy_handle *handle /* [in] [ref] */,
3584 time_t timestamp /* [in] */,
3585 enum eventlogEventTypes event_type /* [in] */,
3586 uint16_t event_category /* [in] */,
3587 uint32_t event_id /* [in] */,
3588 struct lsa_String *sourcename /* [in] [ref] */,
3589 uint16_t num_of_strings /* [in] [range(0,256)] */,
3590 uint32_t data_size /* [in] [range(0,0x3FFFF)] */,
3591 struct lsa_String *servername /* [in] [ref] */,
3592 struct dom_sid *user_sid /* [in] [unique] */,
3593 struct lsa_String **strings /* [in] [unique,size_is(num_of_strings)] */,
3594 uint8_t *data /* [in] [unique,size_is(data_size)] */,
3595 uint16_t flags /* [in] */,
3596 uint32_t *record_number /* [in,out] [unique] */,
3597 time_t *time_written /* [in,out] [unique] */)
3599 struct eventlog_ReportEventAndSourceW r;
3600 NTSTATUS status;
3602 /* In parameters */
3603 r.in.handle = handle;
3604 r.in.timestamp = timestamp;
3605 r.in.event_type = event_type;
3606 r.in.event_category = event_category;
3607 r.in.event_id = event_id;
3608 r.in.sourcename = sourcename;
3609 r.in.num_of_strings = num_of_strings;
3610 r.in.data_size = data_size;
3611 r.in.servername = servername;
3612 r.in.user_sid = user_sid;
3613 r.in.strings = strings;
3614 r.in.data = data;
3615 r.in.flags = flags;
3616 r.in.record_number = record_number;
3617 r.in.time_written = time_written;
3619 status = cli->dispatch(cli,
3620 mem_ctx,
3621 &ndr_table_eventlog,
3622 NDR_EVENTLOG_REPORTEVENTANDSOURCEW,
3623 &r);
3625 if (!NT_STATUS_IS_OK(status)) {
3626 return status;
3629 if (NT_STATUS_IS_ERR(status)) {
3630 return status;
3633 /* Return variables */
3634 if (record_number && r.out.record_number) {
3635 *record_number = *r.out.record_number;
3637 if (time_written && r.out.time_written) {
3638 *time_written = *r.out.time_written;
3641 /* Return result */
3642 return r.out.result;