2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
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
);
33 state
->out_mem_ctx
= NULL
;
34 state
->dispatch_recv
= cli
->dispatch_recv
;
37 state
->orig
.in
.handle
= _handle
;
38 state
->orig
.in
.backupfile
= _backupfile
;
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
,
50 NDR_EVENTLOG_CLEAREVENTLOGW
,
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
);
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
);
68 if (state
->out_mem_ctx
) {
69 mem_ctx
= state
->out_mem_ctx
;
74 status
= state
->dispatch_recv(subreq
, mem_ctx
);
76 if (!NT_STATUS_IS_OK(status
)) {
77 tevent_req_nterror(req
, status
);
81 /* Copy out parameters */
84 state
->orig
.out
.result
= state
->tmp
.out
.result
;
86 /* Reset temporary structure */
87 ZERO_STRUCT(state
->tmp
);
92 NTSTATUS
rpccli_eventlog_ClearEventLogW_recv(struct tevent_req
*req
,
96 struct rpccli_eventlog_ClearEventLogW_state
*state
= tevent_req_data(
97 req
, struct rpccli_eventlog_ClearEventLogW_state
);
100 if (tevent_req_is_nterror(req
, &status
)) {
101 tevent_req_received(req
);
105 /* Steal possbile out parameters to the callers context */
106 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
109 *result
= state
->orig
.out
.result
;
111 tevent_req_received(req
);
115 NTSTATUS
rpccli_eventlog_ClearEventLogW(struct rpc_pipe_client
*cli
,
117 struct policy_handle
*handle
/* [in] [ref] */,
118 struct lsa_String
*backupfile
/* [in] [unique] */)
120 struct eventlog_ClearEventLogW r
;
124 r
.in
.handle
= handle
;
125 r
.in
.backupfile
= backupfile
;
127 status
= cli
->dispatch(cli
,
130 NDR_EVENTLOG_CLEAREVENTLOGW
,
133 if (!NT_STATUS_IS_OK(status
)) {
137 if (NT_STATUS_IS_ERR(status
)) {
141 /* Return variables */
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
);
171 state
->out_mem_ctx
= NULL
;
172 state
->dispatch_recv
= cli
->dispatch_recv
;
175 state
->orig
.in
.handle
= _handle
;
176 state
->orig
.in
.backup_filename
= _backup_filename
;
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
,
188 NDR_EVENTLOG_BACKUPEVENTLOGW
,
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
);
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
);
206 if (state
->out_mem_ctx
) {
207 mem_ctx
= state
->out_mem_ctx
;
212 status
= state
->dispatch_recv(subreq
, mem_ctx
);
214 if (!NT_STATUS_IS_OK(status
)) {
215 tevent_req_nterror(req
, status
);
219 /* Copy out parameters */
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
,
234 struct rpccli_eventlog_BackupEventLogW_state
*state
= tevent_req_data(
235 req
, struct rpccli_eventlog_BackupEventLogW_state
);
238 if (tevent_req_is_nterror(req
, &status
)) {
239 tevent_req_received(req
);
243 /* Steal possbile out parameters to the callers context */
244 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
247 *result
= state
->orig
.out
.result
;
249 tevent_req_received(req
);
253 NTSTATUS
rpccli_eventlog_BackupEventLogW(struct rpc_pipe_client
*cli
,
255 struct policy_handle
*handle
/* [in] [ref] */,
256 struct lsa_String
*backup_filename
/* [in] [ref] */)
258 struct eventlog_BackupEventLogW r
;
262 r
.in
.handle
= handle
;
263 r
.in
.backup_filename
= backup_filename
;
265 status
= cli
->dispatch(cli
,
268 NDR_EVENTLOG_BACKUPEVENTLOGW
,
271 if (!NT_STATUS_IS_OK(status
)) {
275 if (NT_STATUS_IS_ERR(status
)) {
279 /* Return variables */
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
);
308 state
->out_mem_ctx
= NULL
;
309 state
->dispatch_recv
= cli
->dispatch_recv
;
312 state
->orig
.in
.handle
= _handle
;
315 state
->orig
.out
.handle
= _handle
;
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
,
331 NDR_EVENTLOG_CLOSEEVENTLOG
,
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
);
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
);
349 if (state
->out_mem_ctx
) {
350 mem_ctx
= state
->out_mem_ctx
;
355 status
= state
->dispatch_recv(subreq
, mem_ctx
);
357 if (!NT_STATUS_IS_OK(status
)) {
358 tevent_req_nterror(req
, status
);
362 /* Copy out parameters */
363 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
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
,
378 struct rpccli_eventlog_CloseEventLog_state
*state
= tevent_req_data(
379 req
, struct rpccli_eventlog_CloseEventLog_state
);
382 if (tevent_req_is_nterror(req
, &status
)) {
383 tevent_req_received(req
);
387 /* Steal possbile out parameters to the callers context */
388 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
391 *result
= state
->orig
.out
.result
;
393 tevent_req_received(req
);
397 NTSTATUS
rpccli_eventlog_CloseEventLog(struct rpc_pipe_client
*cli
,
399 struct policy_handle
*handle
/* [in,out] [ref] */)
401 struct eventlog_CloseEventLog r
;
405 r
.in
.handle
= handle
;
407 status
= cli
->dispatch(cli
,
410 NDR_EVENTLOG_CLOSEEVENTLOG
,
413 if (!NT_STATUS_IS_OK(status
)) {
417 if (NT_STATUS_IS_ERR(status
)) {
421 /* Return variables */
422 *handle
= *r
.out
.handle
;
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
);
451 state
->out_mem_ctx
= NULL
;
452 state
->dispatch_recv
= cli
->dispatch_recv
;
455 state
->orig
.in
.handle
= _handle
;
458 state
->orig
.out
.handle
= _handle
;
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
,
474 NDR_EVENTLOG_DEREGISTEREVENTSOURCE
,
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
);
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
);
492 if (state
->out_mem_ctx
) {
493 mem_ctx
= state
->out_mem_ctx
;
498 status
= state
->dispatch_recv(subreq
, mem_ctx
);
500 if (!NT_STATUS_IS_OK(status
)) {
501 tevent_req_nterror(req
, status
);
505 /* Copy out parameters */
506 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
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
,
521 struct rpccli_eventlog_DeregisterEventSource_state
*state
= tevent_req_data(
522 req
, struct rpccli_eventlog_DeregisterEventSource_state
);
525 if (tevent_req_is_nterror(req
, &status
)) {
526 tevent_req_received(req
);
530 /* Steal possbile out parameters to the callers context */
531 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
534 *result
= state
->orig
.out
.result
;
536 tevent_req_received(req
);
540 NTSTATUS
rpccli_eventlog_DeregisterEventSource(struct rpc_pipe_client
*cli
,
542 struct policy_handle
*handle
/* [in,out] [ref] */)
544 struct eventlog_DeregisterEventSource r
;
548 r
.in
.handle
= handle
;
550 status
= cli
->dispatch(cli
,
553 NDR_EVENTLOG_DEREGISTEREVENTSOURCE
,
556 if (!NT_STATUS_IS_OK(status
)) {
560 if (NT_STATUS_IS_ERR(status
)) {
564 /* Return variables */
565 *handle
= *r
.out
.handle
;
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
);
595 state
->out_mem_ctx
= NULL
;
596 state
->dispatch_recv
= cli
->dispatch_recv
;
599 state
->orig
.in
.handle
= _handle
;
602 state
->orig
.out
.number
= _number
;
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
,
618 NDR_EVENTLOG_GETNUMRECORDS
,
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
);
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
);
636 if (state
->out_mem_ctx
) {
637 mem_ctx
= state
->out_mem_ctx
;
642 status
= state
->dispatch_recv(subreq
, mem_ctx
);
644 if (!NT_STATUS_IS_OK(status
)) {
645 tevent_req_nterror(req
, status
);
649 /* Copy out parameters */
650 *state
->orig
.out
.number
= *state
->tmp
.out
.number
;
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
,
665 struct rpccli_eventlog_GetNumRecords_state
*state
= tevent_req_data(
666 req
, struct rpccli_eventlog_GetNumRecords_state
);
669 if (tevent_req_is_nterror(req
, &status
)) {
670 tevent_req_received(req
);
674 /* Steal possbile out parameters to the callers context */
675 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
678 *result
= state
->orig
.out
.result
;
680 tevent_req_received(req
);
684 NTSTATUS
rpccli_eventlog_GetNumRecords(struct rpc_pipe_client
*cli
,
686 struct policy_handle
*handle
/* [in] [ref] */,
687 uint32_t *number
/* [out] [ref] */)
689 struct eventlog_GetNumRecords r
;
693 r
.in
.handle
= handle
;
695 status
= cli
->dispatch(cli
,
698 NDR_EVENTLOG_GETNUMRECORDS
,
701 if (!NT_STATUS_IS_OK(status
)) {
705 if (NT_STATUS_IS_ERR(status
)) {
709 /* Return variables */
710 *number
= *r
.out
.number
;
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
);
740 state
->out_mem_ctx
= NULL
;
741 state
->dispatch_recv
= cli
->dispatch_recv
;
744 state
->orig
.in
.handle
= _handle
;
747 state
->orig
.out
.oldest_entry
= _oldest_entry
;
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
,
763 NDR_EVENTLOG_GETOLDESTRECORD
,
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
);
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
);
781 if (state
->out_mem_ctx
) {
782 mem_ctx
= state
->out_mem_ctx
;
787 status
= state
->dispatch_recv(subreq
, mem_ctx
);
789 if (!NT_STATUS_IS_OK(status
)) {
790 tevent_req_nterror(req
, status
);
794 /* Copy out parameters */
795 *state
->orig
.out
.oldest_entry
= *state
->tmp
.out
.oldest_entry
;
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
,
810 struct rpccli_eventlog_GetOldestRecord_state
*state
= tevent_req_data(
811 req
, struct rpccli_eventlog_GetOldestRecord_state
);
814 if (tevent_req_is_nterror(req
, &status
)) {
815 tevent_req_received(req
);
819 /* Steal possbile out parameters to the callers context */
820 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
823 *result
= state
->orig
.out
.result
;
825 tevent_req_received(req
);
829 NTSTATUS
rpccli_eventlog_GetOldestRecord(struct rpc_pipe_client
*cli
,
831 struct policy_handle
*handle
/* [in] [ref] */,
832 uint32_t *oldest_entry
/* [out] [ref] */)
834 struct eventlog_GetOldestRecord r
;
838 r
.in
.handle
= handle
;
840 status
= cli
->dispatch(cli
,
843 NDR_EVENTLOG_GETOLDESTRECORD
,
846 if (!NT_STATUS_IS_OK(status
)) {
850 if (NT_STATUS_IS_ERR(status
)) {
854 /* Return variables */
855 *oldest_entry
= *r
.out
.oldest_entry
;
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
);
883 state
->out_mem_ctx
= NULL
;
884 state
->dispatch_recv
= cli
->dispatch_recv
;
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
,
898 NDR_EVENTLOG_CHANGENOTIFY
,
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
);
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
);
916 if (state
->out_mem_ctx
) {
917 mem_ctx
= state
->out_mem_ctx
;
922 status
= state
->dispatch_recv(subreq
, mem_ctx
);
924 if (!NT_STATUS_IS_OK(status
)) {
925 tevent_req_nterror(req
, status
);
929 /* Copy out parameters */
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
,
944 struct rpccli_eventlog_ChangeNotify_state
*state
= tevent_req_data(
945 req
, struct rpccli_eventlog_ChangeNotify_state
);
948 if (tevent_req_is_nterror(req
, &status
)) {
949 tevent_req_received(req
);
953 /* Steal possbile out parameters to the callers context */
954 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
957 *result
= state
->orig
.out
.result
;
959 tevent_req_received(req
);
963 NTSTATUS
rpccli_eventlog_ChangeNotify(struct rpc_pipe_client
*cli
,
966 struct eventlog_ChangeNotify r
;
971 status
= cli
->dispatch(cli
,
974 NDR_EVENTLOG_CHANGENOTIFY
,
977 if (!NT_STATUS_IS_OK(status
)) {
981 if (NT_STATUS_IS_ERR(status
)) {
985 /* Return variables */
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
);
1019 state
->out_mem_ctx
= NULL
;
1020 state
->dispatch_recv
= cli
->dispatch_recv
;
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
;
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
,
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
);
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
);
1062 TALLOC_CTX
*mem_ctx
;
1064 if (state
->out_mem_ctx
) {
1065 mem_ctx
= state
->out_mem_ctx
;
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
);
1077 /* Copy out parameters */
1078 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
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
,
1093 struct rpccli_eventlog_OpenEventLogW_state
*state
= tevent_req_data(
1094 req
, struct rpccli_eventlog_OpenEventLogW_state
);
1097 if (tevent_req_is_nterror(req
, &status
)) {
1098 tevent_req_received(req
);
1102 /* Steal possbile out parameters to the callers context */
1103 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
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
;
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
,
1133 &ndr_table_eventlog
,
1134 NDR_EVENTLOG_OPENEVENTLOGW
,
1137 if (!NT_STATUS_IS_OK(status
)) {
1141 if (NT_STATUS_IS_ERR(status
)) {
1145 /* Return variables */
1146 *handle
= *r
.out
.handle
;
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
);
1180 state
->out_mem_ctx
= NULL
;
1181 state
->dispatch_recv
= cli
->dispatch_recv
;
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
;
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
,
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
);
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
);
1223 TALLOC_CTX
*mem_ctx
;
1225 if (state
->out_mem_ctx
) {
1226 mem_ctx
= state
->out_mem_ctx
;
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
);
1238 /* Copy out parameters */
1239 *state
->orig
.out
.log_handle
= *state
->tmp
.out
.log_handle
;
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
,
1254 struct rpccli_eventlog_RegisterEventSourceW_state
*state
= tevent_req_data(
1255 req
, struct rpccli_eventlog_RegisterEventSourceW_state
);
1258 if (tevent_req_is_nterror(req
, &status
)) {
1259 tevent_req_received(req
);
1263 /* Steal possbile out parameters to the callers context */
1264 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
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
;
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
,
1294 &ndr_table_eventlog
,
1295 NDR_EVENTLOG_REGISTEREVENTSOURCEW
,
1298 if (!NT_STATUS_IS_OK(status
)) {
1302 if (NT_STATUS_IS_ERR(status
)) {
1306 /* Return variables */
1307 *log_handle
= *r
.out
.log_handle
;
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
);
1340 state
->out_mem_ctx
= NULL
;
1341 state
->dispatch_recv
= cli
->dispatch_recv
;
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
;
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
,
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
);
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
);
1382 TALLOC_CTX
*mem_ctx
;
1384 if (state
->out_mem_ctx
) {
1385 mem_ctx
= state
->out_mem_ctx
;
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
);
1397 /* Copy out parameters */
1398 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
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
,
1413 struct rpccli_eventlog_OpenBackupEventLogW_state
*state
= tevent_req_data(
1414 req
, struct rpccli_eventlog_OpenBackupEventLogW_state
);
1417 if (tevent_req_is_nterror(req
, &status
)) {
1418 tevent_req_received(req
);
1422 /* Steal possbile out parameters to the callers context */
1423 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
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
;
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
,
1451 &ndr_table_eventlog
,
1452 NDR_EVENTLOG_OPENBACKUPEVENTLOGW
,
1455 if (!NT_STATUS_IS_OK(status
)) {
1459 if (NT_STATUS_IS_ERR(status
)) {
1463 /* Return variables */
1464 *handle
= *r
.out
.handle
;
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
);
1499 state
->out_mem_ctx
= NULL
;
1500 state
->dispatch_recv
= cli
->dispatch_recv
;
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
;
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
,
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
);
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
);
1543 TALLOC_CTX
*mem_ctx
;
1545 if (state
->out_mem_ctx
) {
1546 mem_ctx
= state
->out_mem_ctx
;
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
);
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
;
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
,
1576 struct rpccli_eventlog_ReadEventLogW_state
*state
= tevent_req_data(
1577 req
, struct rpccli_eventlog_ReadEventLogW_state
);
1580 if (tevent_req_is_nterror(req
, &status
)) {
1581 tevent_req_received(req
);
1585 /* Steal possbile out parameters to the callers context */
1586 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
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
;
1609 r
.in
.handle
= handle
;
1611 r
.in
.offset
= offset
;
1612 r
.in
.number_of_bytes
= number_of_bytes
;
1614 status
= cli
->dispatch(cli
,
1616 &ndr_table_eventlog
,
1617 NDR_EVENTLOG_READEVENTLOGW
,
1620 if (!NT_STATUS_IS_OK(status
)) {
1624 if (NT_STATUS_IS_ERR(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
;
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
);
1673 state
->out_mem_ctx
= NULL
;
1674 state
->dispatch_recv
= cli
->dispatch_recv
;
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
;
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
,
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
);
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
);
1726 TALLOC_CTX
*mem_ctx
;
1728 if (state
->out_mem_ctx
) {
1729 mem_ctx
= state
->out_mem_ctx
;
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
);
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
;
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
,
1762 struct rpccli_eventlog_ReportEventW_state
*state
= tevent_req_data(
1763 req
, struct rpccli_eventlog_ReportEventW_state
);
1766 if (tevent_req_is_nterror(req
, &status
)) {
1767 tevent_req_received(req
);
1771 /* Steal possbile out parameters to the callers context */
1772 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
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
;
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
;
1814 r
.in
.record_number
= record_number
;
1815 r
.in
.time_written
= time_written
;
1817 status
= cli
->dispatch(cli
,
1819 &ndr_table_eventlog
,
1820 NDR_EVENTLOG_REPORTEVENTW
,
1823 if (!NT_STATUS_IS_OK(status
)) {
1827 if (NT_STATUS_IS_ERR(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
;
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
);
1865 state
->out_mem_ctx
= NULL
;
1866 state
->dispatch_recv
= cli
->dispatch_recv
;
1870 /* Out parameters */
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
,
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
);
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
);
1896 TALLOC_CTX
*mem_ctx
;
1898 if (state
->out_mem_ctx
) {
1899 mem_ctx
= state
->out_mem_ctx
;
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
);
1911 /* Copy out parameters */
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
,
1926 struct rpccli_eventlog_ClearEventLogA_state
*state
= tevent_req_data(
1927 req
, struct rpccli_eventlog_ClearEventLogA_state
);
1930 if (tevent_req_is_nterror(req
, &status
)) {
1931 tevent_req_received(req
);
1935 /* Steal possbile out parameters to the callers context */
1936 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
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
;
1953 status
= cli
->dispatch(cli
,
1955 &ndr_table_eventlog
,
1956 NDR_EVENTLOG_CLEAREVENTLOGA
,
1959 if (!NT_STATUS_IS_OK(status
)) {
1963 if (NT_STATUS_IS_ERR(status
)) {
1967 /* Return variables */
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
);
1995 state
->out_mem_ctx
= NULL
;
1996 state
->dispatch_recv
= cli
->dispatch_recv
;
2000 /* Out parameters */
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
,
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
);
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
);
2026 TALLOC_CTX
*mem_ctx
;
2028 if (state
->out_mem_ctx
) {
2029 mem_ctx
= state
->out_mem_ctx
;
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
);
2041 /* Copy out parameters */
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
,
2056 struct rpccli_eventlog_BackupEventLogA_state
*state
= tevent_req_data(
2057 req
, struct rpccli_eventlog_BackupEventLogA_state
);
2060 if (tevent_req_is_nterror(req
, &status
)) {
2061 tevent_req_received(req
);
2065 /* Steal possbile out parameters to the callers context */
2066 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
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
;
2083 status
= cli
->dispatch(cli
,
2085 &ndr_table_eventlog
,
2086 NDR_EVENTLOG_BACKUPEVENTLOGA
,
2089 if (!NT_STATUS_IS_OK(status
)) {
2093 if (NT_STATUS_IS_ERR(status
)) {
2097 /* Return variables */
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
);
2125 state
->out_mem_ctx
= NULL
;
2126 state
->dispatch_recv
= cli
->dispatch_recv
;
2130 /* Out parameters */
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
,
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
);
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
);
2156 TALLOC_CTX
*mem_ctx
;
2158 if (state
->out_mem_ctx
) {
2159 mem_ctx
= state
->out_mem_ctx
;
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
);
2171 /* Copy out parameters */
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
,
2186 struct rpccli_eventlog_OpenEventLogA_state
*state
= tevent_req_data(
2187 req
, struct rpccli_eventlog_OpenEventLogA_state
);
2190 if (tevent_req_is_nterror(req
, &status
)) {
2191 tevent_req_received(req
);
2195 /* Steal possbile out parameters to the callers context */
2196 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
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
;
2213 status
= cli
->dispatch(cli
,
2215 &ndr_table_eventlog
,
2216 NDR_EVENTLOG_OPENEVENTLOGA
,
2219 if (!NT_STATUS_IS_OK(status
)) {
2223 if (NT_STATUS_IS_ERR(status
)) {
2227 /* Return variables */
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
);
2255 state
->out_mem_ctx
= NULL
;
2256 state
->dispatch_recv
= cli
->dispatch_recv
;
2260 /* Out parameters */
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
,
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
);
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
);
2286 TALLOC_CTX
*mem_ctx
;
2288 if (state
->out_mem_ctx
) {
2289 mem_ctx
= state
->out_mem_ctx
;
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
);
2301 /* Copy out parameters */
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
,
2316 struct rpccli_eventlog_RegisterEventSourceA_state
*state
= tevent_req_data(
2317 req
, struct rpccli_eventlog_RegisterEventSourceA_state
);
2320 if (tevent_req_is_nterror(req
, &status
)) {
2321 tevent_req_received(req
);
2325 /* Steal possbile out parameters to the callers context */
2326 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
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
;
2343 status
= cli
->dispatch(cli
,
2345 &ndr_table_eventlog
,
2346 NDR_EVENTLOG_REGISTEREVENTSOURCEA
,
2349 if (!NT_STATUS_IS_OK(status
)) {
2353 if (NT_STATUS_IS_ERR(status
)) {
2357 /* Return variables */
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
);
2385 state
->out_mem_ctx
= NULL
;
2386 state
->dispatch_recv
= cli
->dispatch_recv
;
2390 /* Out parameters */
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
,
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
);
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
);
2416 TALLOC_CTX
*mem_ctx
;
2418 if (state
->out_mem_ctx
) {
2419 mem_ctx
= state
->out_mem_ctx
;
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
);
2431 /* Copy out parameters */
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
,
2446 struct rpccli_eventlog_OpenBackupEventLogA_state
*state
= tevent_req_data(
2447 req
, struct rpccli_eventlog_OpenBackupEventLogA_state
);
2450 if (tevent_req_is_nterror(req
, &status
)) {
2451 tevent_req_received(req
);
2455 /* Steal possbile out parameters to the callers context */
2456 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
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
;
2473 status
= cli
->dispatch(cli
,
2475 &ndr_table_eventlog
,
2476 NDR_EVENTLOG_OPENBACKUPEVENTLOGA
,
2479 if (!NT_STATUS_IS_OK(status
)) {
2483 if (NT_STATUS_IS_ERR(status
)) {
2487 /* Return variables */
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
);
2515 state
->out_mem_ctx
= NULL
;
2516 state
->dispatch_recv
= cli
->dispatch_recv
;
2520 /* Out parameters */
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
,
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
);
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
);
2546 TALLOC_CTX
*mem_ctx
;
2548 if (state
->out_mem_ctx
) {
2549 mem_ctx
= state
->out_mem_ctx
;
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
);
2561 /* Copy out parameters */
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
,
2576 struct rpccli_eventlog_ReadEventLogA_state
*state
= tevent_req_data(
2577 req
, struct rpccli_eventlog_ReadEventLogA_state
);
2580 if (tevent_req_is_nterror(req
, &status
)) {
2581 tevent_req_received(req
);
2585 /* Steal possbile out parameters to the callers context */
2586 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
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
;
2603 status
= cli
->dispatch(cli
,
2605 &ndr_table_eventlog
,
2606 NDR_EVENTLOG_READEVENTLOGA
,
2609 if (!NT_STATUS_IS_OK(status
)) {
2613 if (NT_STATUS_IS_ERR(status
)) {
2617 /* Return variables */
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
);
2645 state
->out_mem_ctx
= NULL
;
2646 state
->dispatch_recv
= cli
->dispatch_recv
;
2650 /* Out parameters */
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
,
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
);
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
);
2676 TALLOC_CTX
*mem_ctx
;
2678 if (state
->out_mem_ctx
) {
2679 mem_ctx
= state
->out_mem_ctx
;
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
);
2691 /* Copy out parameters */
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
,
2706 struct rpccli_eventlog_ReportEventA_state
*state
= tevent_req_data(
2707 req
, struct rpccli_eventlog_ReportEventA_state
);
2710 if (tevent_req_is_nterror(req
, &status
)) {
2711 tevent_req_received(req
);
2715 /* Steal possbile out parameters to the callers context */
2716 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
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
;
2733 status
= cli
->dispatch(cli
,
2735 &ndr_table_eventlog
,
2736 NDR_EVENTLOG_REPORTEVENTA
,
2739 if (!NT_STATUS_IS_OK(status
)) {
2743 if (NT_STATUS_IS_ERR(status
)) {
2747 /* Return variables */
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
);
2775 state
->out_mem_ctx
= NULL
;
2776 state
->dispatch_recv
= cli
->dispatch_recv
;
2780 /* Out parameters */
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
,
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
);
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
);
2806 TALLOC_CTX
*mem_ctx
;
2808 if (state
->out_mem_ctx
) {
2809 mem_ctx
= state
->out_mem_ctx
;
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
);
2821 /* Copy out parameters */
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
,
2836 struct rpccli_eventlog_RegisterClusterSvc_state
*state
= tevent_req_data(
2837 req
, struct rpccli_eventlog_RegisterClusterSvc_state
);
2840 if (tevent_req_is_nterror(req
, &status
)) {
2841 tevent_req_received(req
);
2845 /* Steal possbile out parameters to the callers context */
2846 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
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
;
2863 status
= cli
->dispatch(cli
,
2865 &ndr_table_eventlog
,
2866 NDR_EVENTLOG_REGISTERCLUSTERSVC
,
2869 if (!NT_STATUS_IS_OK(status
)) {
2873 if (NT_STATUS_IS_ERR(status
)) {
2877 /* Return variables */
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
);
2905 state
->out_mem_ctx
= NULL
;
2906 state
->dispatch_recv
= cli
->dispatch_recv
;
2910 /* Out parameters */
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
,
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
);
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
);
2936 TALLOC_CTX
*mem_ctx
;
2938 if (state
->out_mem_ctx
) {
2939 mem_ctx
= state
->out_mem_ctx
;
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
);
2951 /* Copy out parameters */
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
,
2966 struct rpccli_eventlog_DeregisterClusterSvc_state
*state
= tevent_req_data(
2967 req
, struct rpccli_eventlog_DeregisterClusterSvc_state
);
2970 if (tevent_req_is_nterror(req
, &status
)) {
2971 tevent_req_received(req
);
2975 /* Steal possbile out parameters to the callers context */
2976 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
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
;
2993 status
= cli
->dispatch(cli
,
2995 &ndr_table_eventlog
,
2996 NDR_EVENTLOG_DEREGISTERCLUSTERSVC
,
2999 if (!NT_STATUS_IS_OK(status
)) {
3003 if (NT_STATUS_IS_ERR(status
)) {
3007 /* Return variables */
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
);
3035 state
->out_mem_ctx
= NULL
;
3036 state
->dispatch_recv
= cli
->dispatch_recv
;
3040 /* Out parameters */
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
,
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
);
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
);
3066 TALLOC_CTX
*mem_ctx
;
3068 if (state
->out_mem_ctx
) {
3069 mem_ctx
= state
->out_mem_ctx
;
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
);
3081 /* Copy out parameters */
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
,
3096 struct rpccli_eventlog_WriteClusterEvents_state
*state
= tevent_req_data(
3097 req
, struct rpccli_eventlog_WriteClusterEvents_state
);
3100 if (tevent_req_is_nterror(req
, &status
)) {
3101 tevent_req_received(req
);
3105 /* Steal possbile out parameters to the callers context */
3106 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
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
;
3123 status
= cli
->dispatch(cli
,
3125 &ndr_table_eventlog
,
3126 NDR_EVENTLOG_WRITECLUSTEREVENTS
,
3129 if (!NT_STATUS_IS_OK(status
)) {
3133 if (NT_STATUS_IS_ERR(status
)) {
3137 /* Return variables */
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
);
3170 state
->out_mem_ctx
= NULL
;
3171 state
->dispatch_recv
= cli
->dispatch_recv
;
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
;
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
,
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
);
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
);
3212 TALLOC_CTX
*mem_ctx
;
3214 if (state
->out_mem_ctx
) {
3215 mem_ctx
= state
->out_mem_ctx
;
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
);
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
;
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
,
3244 struct rpccli_eventlog_GetLogInformation_state
*state
= tevent_req_data(
3245 req
, struct rpccli_eventlog_GetLogInformation_state
);
3248 if (tevent_req_is_nterror(req
, &status
)) {
3249 tevent_req_received(req
);
3253 /* Steal possbile out parameters to the callers context */
3254 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
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
;
3275 r
.in
.handle
= handle
;
3277 r
.in
.buf_size
= buf_size
;
3279 status
= cli
->dispatch(cli
,
3281 &ndr_table_eventlog
,
3282 NDR_EVENTLOG_GETLOGINFORMATION
,
3285 if (!NT_STATUS_IS_OK(status
)) {
3289 if (NT_STATUS_IS_ERR(status
)) {
3293 /* Return variables */
3294 memcpy(buffer
, r
.out
.buffer
, (r
.in
.buf_size
) * sizeof(*buffer
));
3295 *bytes_needed
= *r
.out
.bytes_needed
;
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
);
3324 state
->out_mem_ctx
= NULL
;
3325 state
->dispatch_recv
= cli
->dispatch_recv
;
3328 state
->orig
.in
.handle
= _handle
;
3330 /* Out parameters */
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
,
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
);
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
);
3356 TALLOC_CTX
*mem_ctx
;
3358 if (state
->out_mem_ctx
) {
3359 mem_ctx
= state
->out_mem_ctx
;
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
);
3371 /* Copy out parameters */
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
,
3386 struct rpccli_eventlog_FlushEventLog_state
*state
= tevent_req_data(
3387 req
, struct rpccli_eventlog_FlushEventLog_state
);
3390 if (tevent_req_is_nterror(req
, &status
)) {
3391 tevent_req_received(req
);
3395 /* Steal possbile out parameters to the callers context */
3396 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
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
;
3413 r
.in
.handle
= handle
;
3415 status
= cli
->dispatch(cli
,
3417 &ndr_table_eventlog
,
3418 NDR_EVENTLOG_FLUSHEVENTLOG
,
3421 if (!NT_STATUS_IS_OK(status
)) {
3425 if (NT_STATUS_IS_ERR(status
)) {
3429 /* Return variables */
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
);
3472 state
->out_mem_ctx
= NULL
;
3473 state
->dispatch_recv
= cli
->dispatch_recv
;
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
;
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
,
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
);
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
);
3526 TALLOC_CTX
*mem_ctx
;
3528 if (state
->out_mem_ctx
) {
3529 mem_ctx
= state
->out_mem_ctx
;
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
);
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
;
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
,
3562 struct rpccli_eventlog_ReportEventAndSourceW_state
*state
= tevent_req_data(
3563 req
, struct rpccli_eventlog_ReportEventAndSourceW_state
);
3566 if (tevent_req_is_nterror(req
, &status
)) {
3567 tevent_req_received(req
);
3571 /* Steal possbile out parameters to the callers context */
3572 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
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
;
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
;
3616 r
.in
.record_number
= record_number
;
3617 r
.in
.time_written
= time_written
;
3619 status
= cli
->dispatch(cli
,
3621 &ndr_table_eventlog
,
3622 NDR_EVENTLOG_REPORTEVENTANDSOURCEW
,
3625 if (!NT_STATUS_IS_OK(status
)) {
3629 if (NT_STATUS_IS_ERR(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
;
3642 return r
.out
.result
;