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 if (DEBUGLEVEL
>= 10) {
46 NDR_PRINT_IN_DEBUG(eventlog_ClearEventLogW
, &state
->orig
);
49 /* make a temporary copy, that we pass to the dispatch function */
50 state
->tmp
= state
->orig
;
52 subreq
= cli
->dispatch_send(state
, ev
, cli
,
54 NDR_EVENTLOG_CLEAREVENTLOGW
,
56 if (tevent_req_nomem(subreq
, req
)) {
57 return tevent_req_post(req
, ev
);
59 tevent_req_set_callback(subreq
, rpccli_eventlog_ClearEventLogW_done
, req
);
63 static void rpccli_eventlog_ClearEventLogW_done(struct tevent_req
*subreq
)
65 struct tevent_req
*req
= tevent_req_callback_data(
66 subreq
, struct tevent_req
);
67 struct rpccli_eventlog_ClearEventLogW_state
*state
= tevent_req_data(
68 req
, struct rpccli_eventlog_ClearEventLogW_state
);
72 if (state
->out_mem_ctx
) {
73 mem_ctx
= state
->out_mem_ctx
;
78 status
= state
->dispatch_recv(subreq
, mem_ctx
);
80 if (!NT_STATUS_IS_OK(status
)) {
81 tevent_req_nterror(req
, status
);
85 /* Copy out parameters */
88 state
->orig
.out
.result
= state
->tmp
.out
.result
;
90 /* Reset temporary structure */
91 ZERO_STRUCT(state
->tmp
);
93 if (DEBUGLEVEL
>= 10) {
94 NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogW
, &state
->orig
);
100 NTSTATUS
rpccli_eventlog_ClearEventLogW_recv(struct tevent_req
*req
,
104 struct rpccli_eventlog_ClearEventLogW_state
*state
= tevent_req_data(
105 req
, struct rpccli_eventlog_ClearEventLogW_state
);
108 if (tevent_req_is_nterror(req
, &status
)) {
109 tevent_req_received(req
);
113 /* Steal possbile out parameters to the callers context */
114 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
117 *result
= state
->orig
.out
.result
;
119 tevent_req_received(req
);
123 NTSTATUS
rpccli_eventlog_ClearEventLogW(struct rpc_pipe_client
*cli
,
125 struct policy_handle
*handle
/* [in] [ref] */,
126 struct lsa_String
*backupfile
/* [in] [unique] */)
128 struct eventlog_ClearEventLogW r
;
132 r
.in
.handle
= handle
;
133 r
.in
.backupfile
= backupfile
;
135 if (DEBUGLEVEL
>= 10) {
136 NDR_PRINT_IN_DEBUG(eventlog_ClearEventLogW
, &r
);
139 status
= cli
->dispatch(cli
,
142 NDR_EVENTLOG_CLEAREVENTLOGW
,
145 if (!NT_STATUS_IS_OK(status
)) {
149 if (DEBUGLEVEL
>= 10) {
150 NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogW
, &r
);
153 if (NT_STATUS_IS_ERR(status
)) {
157 /* Return variables */
163 struct rpccli_eventlog_BackupEventLogW_state
{
164 struct eventlog_BackupEventLogW orig
;
165 struct eventlog_BackupEventLogW tmp
;
166 TALLOC_CTX
*out_mem_ctx
;
167 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
170 static void rpccli_eventlog_BackupEventLogW_done(struct tevent_req
*subreq
);
172 struct tevent_req
*rpccli_eventlog_BackupEventLogW_send(TALLOC_CTX
*mem_ctx
,
173 struct tevent_context
*ev
,
174 struct rpc_pipe_client
*cli
,
175 struct policy_handle
*_handle
/* [in] [ref] */,
176 struct lsa_String
*_backup_filename
/* [in] [ref] */)
178 struct tevent_req
*req
;
179 struct rpccli_eventlog_BackupEventLogW_state
*state
;
180 struct tevent_req
*subreq
;
182 req
= tevent_req_create(mem_ctx
, &state
,
183 struct rpccli_eventlog_BackupEventLogW_state
);
187 state
->out_mem_ctx
= NULL
;
188 state
->dispatch_recv
= cli
->dispatch_recv
;
191 state
->orig
.in
.handle
= _handle
;
192 state
->orig
.in
.backup_filename
= _backup_filename
;
197 ZERO_STRUCT(state
->orig
.out
.result
);
199 if (DEBUGLEVEL
>= 10) {
200 NDR_PRINT_IN_DEBUG(eventlog_BackupEventLogW
, &state
->orig
);
203 /* make a temporary copy, that we pass to the dispatch function */
204 state
->tmp
= state
->orig
;
206 subreq
= cli
->dispatch_send(state
, ev
, cli
,
208 NDR_EVENTLOG_BACKUPEVENTLOGW
,
210 if (tevent_req_nomem(subreq
, req
)) {
211 return tevent_req_post(req
, ev
);
213 tevent_req_set_callback(subreq
, rpccli_eventlog_BackupEventLogW_done
, req
);
217 static void rpccli_eventlog_BackupEventLogW_done(struct tevent_req
*subreq
)
219 struct tevent_req
*req
= tevent_req_callback_data(
220 subreq
, struct tevent_req
);
221 struct rpccli_eventlog_BackupEventLogW_state
*state
= tevent_req_data(
222 req
, struct rpccli_eventlog_BackupEventLogW_state
);
226 if (state
->out_mem_ctx
) {
227 mem_ctx
= state
->out_mem_ctx
;
232 status
= state
->dispatch_recv(subreq
, mem_ctx
);
234 if (!NT_STATUS_IS_OK(status
)) {
235 tevent_req_nterror(req
, status
);
239 /* Copy out parameters */
242 state
->orig
.out
.result
= state
->tmp
.out
.result
;
244 /* Reset temporary structure */
245 ZERO_STRUCT(state
->tmp
);
247 if (DEBUGLEVEL
>= 10) {
248 NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogW
, &state
->orig
);
251 tevent_req_done(req
);
254 NTSTATUS
rpccli_eventlog_BackupEventLogW_recv(struct tevent_req
*req
,
258 struct rpccli_eventlog_BackupEventLogW_state
*state
= tevent_req_data(
259 req
, struct rpccli_eventlog_BackupEventLogW_state
);
262 if (tevent_req_is_nterror(req
, &status
)) {
263 tevent_req_received(req
);
267 /* Steal possbile out parameters to the callers context */
268 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
271 *result
= state
->orig
.out
.result
;
273 tevent_req_received(req
);
277 NTSTATUS
rpccli_eventlog_BackupEventLogW(struct rpc_pipe_client
*cli
,
279 struct policy_handle
*handle
/* [in] [ref] */,
280 struct lsa_String
*backup_filename
/* [in] [ref] */)
282 struct eventlog_BackupEventLogW r
;
286 r
.in
.handle
= handle
;
287 r
.in
.backup_filename
= backup_filename
;
289 if (DEBUGLEVEL
>= 10) {
290 NDR_PRINT_IN_DEBUG(eventlog_BackupEventLogW
, &r
);
293 status
= cli
->dispatch(cli
,
296 NDR_EVENTLOG_BACKUPEVENTLOGW
,
299 if (!NT_STATUS_IS_OK(status
)) {
303 if (DEBUGLEVEL
>= 10) {
304 NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogW
, &r
);
307 if (NT_STATUS_IS_ERR(status
)) {
311 /* Return variables */
317 struct rpccli_eventlog_CloseEventLog_state
{
318 struct eventlog_CloseEventLog orig
;
319 struct eventlog_CloseEventLog tmp
;
320 TALLOC_CTX
*out_mem_ctx
;
321 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
324 static void rpccli_eventlog_CloseEventLog_done(struct tevent_req
*subreq
);
326 struct tevent_req
*rpccli_eventlog_CloseEventLog_send(TALLOC_CTX
*mem_ctx
,
327 struct tevent_context
*ev
,
328 struct rpc_pipe_client
*cli
,
329 struct policy_handle
*_handle
/* [in,out] [ref] */)
331 struct tevent_req
*req
;
332 struct rpccli_eventlog_CloseEventLog_state
*state
;
333 struct tevent_req
*subreq
;
335 req
= tevent_req_create(mem_ctx
, &state
,
336 struct rpccli_eventlog_CloseEventLog_state
);
340 state
->out_mem_ctx
= NULL
;
341 state
->dispatch_recv
= cli
->dispatch_recv
;
344 state
->orig
.in
.handle
= _handle
;
347 state
->orig
.out
.handle
= _handle
;
350 ZERO_STRUCT(state
->orig
.out
.result
);
352 if (DEBUGLEVEL
>= 10) {
353 NDR_PRINT_IN_DEBUG(eventlog_CloseEventLog
, &state
->orig
);
356 state
->out_mem_ctx
= talloc_named_const(state
, 0,
357 "rpccli_eventlog_CloseEventLog_out_memory");
358 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
359 return tevent_req_post(req
, ev
);
362 /* make a temporary copy, that we pass to the dispatch function */
363 state
->tmp
= state
->orig
;
365 subreq
= cli
->dispatch_send(state
, ev
, cli
,
367 NDR_EVENTLOG_CLOSEEVENTLOG
,
369 if (tevent_req_nomem(subreq
, req
)) {
370 return tevent_req_post(req
, ev
);
372 tevent_req_set_callback(subreq
, rpccli_eventlog_CloseEventLog_done
, req
);
376 static void rpccli_eventlog_CloseEventLog_done(struct tevent_req
*subreq
)
378 struct tevent_req
*req
= tevent_req_callback_data(
379 subreq
, struct tevent_req
);
380 struct rpccli_eventlog_CloseEventLog_state
*state
= tevent_req_data(
381 req
, struct rpccli_eventlog_CloseEventLog_state
);
385 if (state
->out_mem_ctx
) {
386 mem_ctx
= state
->out_mem_ctx
;
391 status
= state
->dispatch_recv(subreq
, mem_ctx
);
393 if (!NT_STATUS_IS_OK(status
)) {
394 tevent_req_nterror(req
, status
);
398 /* Copy out parameters */
399 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
402 state
->orig
.out
.result
= state
->tmp
.out
.result
;
404 /* Reset temporary structure */
405 ZERO_STRUCT(state
->tmp
);
407 if (DEBUGLEVEL
>= 10) {
408 NDR_PRINT_OUT_DEBUG(eventlog_CloseEventLog
, &state
->orig
);
411 tevent_req_done(req
);
414 NTSTATUS
rpccli_eventlog_CloseEventLog_recv(struct tevent_req
*req
,
418 struct rpccli_eventlog_CloseEventLog_state
*state
= tevent_req_data(
419 req
, struct rpccli_eventlog_CloseEventLog_state
);
422 if (tevent_req_is_nterror(req
, &status
)) {
423 tevent_req_received(req
);
427 /* Steal possbile out parameters to the callers context */
428 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
431 *result
= state
->orig
.out
.result
;
433 tevent_req_received(req
);
437 NTSTATUS
rpccli_eventlog_CloseEventLog(struct rpc_pipe_client
*cli
,
439 struct policy_handle
*handle
/* [in,out] [ref] */)
441 struct eventlog_CloseEventLog r
;
445 r
.in
.handle
= handle
;
447 if (DEBUGLEVEL
>= 10) {
448 NDR_PRINT_IN_DEBUG(eventlog_CloseEventLog
, &r
);
451 status
= cli
->dispatch(cli
,
454 NDR_EVENTLOG_CLOSEEVENTLOG
,
457 if (!NT_STATUS_IS_OK(status
)) {
461 if (DEBUGLEVEL
>= 10) {
462 NDR_PRINT_OUT_DEBUG(eventlog_CloseEventLog
, &r
);
465 if (NT_STATUS_IS_ERR(status
)) {
469 /* Return variables */
470 *handle
= *r
.out
.handle
;
476 struct rpccli_eventlog_DeregisterEventSource_state
{
477 struct eventlog_DeregisterEventSource orig
;
478 struct eventlog_DeregisterEventSource tmp
;
479 TALLOC_CTX
*out_mem_ctx
;
480 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
483 static void rpccli_eventlog_DeregisterEventSource_done(struct tevent_req
*subreq
);
485 struct tevent_req
*rpccli_eventlog_DeregisterEventSource_send(TALLOC_CTX
*mem_ctx
,
486 struct tevent_context
*ev
,
487 struct rpc_pipe_client
*cli
,
488 struct policy_handle
*_handle
/* [in,out] [ref] */)
490 struct tevent_req
*req
;
491 struct rpccli_eventlog_DeregisterEventSource_state
*state
;
492 struct tevent_req
*subreq
;
494 req
= tevent_req_create(mem_ctx
, &state
,
495 struct rpccli_eventlog_DeregisterEventSource_state
);
499 state
->out_mem_ctx
= NULL
;
500 state
->dispatch_recv
= cli
->dispatch_recv
;
503 state
->orig
.in
.handle
= _handle
;
506 state
->orig
.out
.handle
= _handle
;
509 ZERO_STRUCT(state
->orig
.out
.result
);
511 if (DEBUGLEVEL
>= 10) {
512 NDR_PRINT_IN_DEBUG(eventlog_DeregisterEventSource
, &state
->orig
);
515 state
->out_mem_ctx
= talloc_named_const(state
, 0,
516 "rpccli_eventlog_DeregisterEventSource_out_memory");
517 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
518 return tevent_req_post(req
, ev
);
521 /* make a temporary copy, that we pass to the dispatch function */
522 state
->tmp
= state
->orig
;
524 subreq
= cli
->dispatch_send(state
, ev
, cli
,
526 NDR_EVENTLOG_DEREGISTEREVENTSOURCE
,
528 if (tevent_req_nomem(subreq
, req
)) {
529 return tevent_req_post(req
, ev
);
531 tevent_req_set_callback(subreq
, rpccli_eventlog_DeregisterEventSource_done
, req
);
535 static void rpccli_eventlog_DeregisterEventSource_done(struct tevent_req
*subreq
)
537 struct tevent_req
*req
= tevent_req_callback_data(
538 subreq
, struct tevent_req
);
539 struct rpccli_eventlog_DeregisterEventSource_state
*state
= tevent_req_data(
540 req
, struct rpccli_eventlog_DeregisterEventSource_state
);
544 if (state
->out_mem_ctx
) {
545 mem_ctx
= state
->out_mem_ctx
;
550 status
= state
->dispatch_recv(subreq
, mem_ctx
);
552 if (!NT_STATUS_IS_OK(status
)) {
553 tevent_req_nterror(req
, status
);
557 /* Copy out parameters */
558 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
561 state
->orig
.out
.result
= state
->tmp
.out
.result
;
563 /* Reset temporary structure */
564 ZERO_STRUCT(state
->tmp
);
566 if (DEBUGLEVEL
>= 10) {
567 NDR_PRINT_OUT_DEBUG(eventlog_DeregisterEventSource
, &state
->orig
);
570 tevent_req_done(req
);
573 NTSTATUS
rpccli_eventlog_DeregisterEventSource_recv(struct tevent_req
*req
,
577 struct rpccli_eventlog_DeregisterEventSource_state
*state
= tevent_req_data(
578 req
, struct rpccli_eventlog_DeregisterEventSource_state
);
581 if (tevent_req_is_nterror(req
, &status
)) {
582 tevent_req_received(req
);
586 /* Steal possbile out parameters to the callers context */
587 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
590 *result
= state
->orig
.out
.result
;
592 tevent_req_received(req
);
596 NTSTATUS
rpccli_eventlog_DeregisterEventSource(struct rpc_pipe_client
*cli
,
598 struct policy_handle
*handle
/* [in,out] [ref] */)
600 struct eventlog_DeregisterEventSource r
;
604 r
.in
.handle
= handle
;
606 if (DEBUGLEVEL
>= 10) {
607 NDR_PRINT_IN_DEBUG(eventlog_DeregisterEventSource
, &r
);
610 status
= cli
->dispatch(cli
,
613 NDR_EVENTLOG_DEREGISTEREVENTSOURCE
,
616 if (!NT_STATUS_IS_OK(status
)) {
620 if (DEBUGLEVEL
>= 10) {
621 NDR_PRINT_OUT_DEBUG(eventlog_DeregisterEventSource
, &r
);
624 if (NT_STATUS_IS_ERR(status
)) {
628 /* Return variables */
629 *handle
= *r
.out
.handle
;
635 struct rpccli_eventlog_GetNumRecords_state
{
636 struct eventlog_GetNumRecords orig
;
637 struct eventlog_GetNumRecords tmp
;
638 TALLOC_CTX
*out_mem_ctx
;
639 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
642 static void rpccli_eventlog_GetNumRecords_done(struct tevent_req
*subreq
);
644 struct tevent_req
*rpccli_eventlog_GetNumRecords_send(TALLOC_CTX
*mem_ctx
,
645 struct tevent_context
*ev
,
646 struct rpc_pipe_client
*cli
,
647 struct policy_handle
*_handle
/* [in] [ref] */,
648 uint32_t *_number
/* [out] [ref] */)
650 struct tevent_req
*req
;
651 struct rpccli_eventlog_GetNumRecords_state
*state
;
652 struct tevent_req
*subreq
;
654 req
= tevent_req_create(mem_ctx
, &state
,
655 struct rpccli_eventlog_GetNumRecords_state
);
659 state
->out_mem_ctx
= NULL
;
660 state
->dispatch_recv
= cli
->dispatch_recv
;
663 state
->orig
.in
.handle
= _handle
;
666 state
->orig
.out
.number
= _number
;
669 ZERO_STRUCT(state
->orig
.out
.result
);
671 if (DEBUGLEVEL
>= 10) {
672 NDR_PRINT_IN_DEBUG(eventlog_GetNumRecords
, &state
->orig
);
675 state
->out_mem_ctx
= talloc_named_const(state
, 0,
676 "rpccli_eventlog_GetNumRecords_out_memory");
677 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
678 return tevent_req_post(req
, ev
);
681 /* make a temporary copy, that we pass to the dispatch function */
682 state
->tmp
= state
->orig
;
684 subreq
= cli
->dispatch_send(state
, ev
, cli
,
686 NDR_EVENTLOG_GETNUMRECORDS
,
688 if (tevent_req_nomem(subreq
, req
)) {
689 return tevent_req_post(req
, ev
);
691 tevent_req_set_callback(subreq
, rpccli_eventlog_GetNumRecords_done
, req
);
695 static void rpccli_eventlog_GetNumRecords_done(struct tevent_req
*subreq
)
697 struct tevent_req
*req
= tevent_req_callback_data(
698 subreq
, struct tevent_req
);
699 struct rpccli_eventlog_GetNumRecords_state
*state
= tevent_req_data(
700 req
, struct rpccli_eventlog_GetNumRecords_state
);
704 if (state
->out_mem_ctx
) {
705 mem_ctx
= state
->out_mem_ctx
;
710 status
= state
->dispatch_recv(subreq
, mem_ctx
);
712 if (!NT_STATUS_IS_OK(status
)) {
713 tevent_req_nterror(req
, status
);
717 /* Copy out parameters */
718 *state
->orig
.out
.number
= *state
->tmp
.out
.number
;
721 state
->orig
.out
.result
= state
->tmp
.out
.result
;
723 /* Reset temporary structure */
724 ZERO_STRUCT(state
->tmp
);
726 if (DEBUGLEVEL
>= 10) {
727 NDR_PRINT_OUT_DEBUG(eventlog_GetNumRecords
, &state
->orig
);
730 tevent_req_done(req
);
733 NTSTATUS
rpccli_eventlog_GetNumRecords_recv(struct tevent_req
*req
,
737 struct rpccli_eventlog_GetNumRecords_state
*state
= tevent_req_data(
738 req
, struct rpccli_eventlog_GetNumRecords_state
);
741 if (tevent_req_is_nterror(req
, &status
)) {
742 tevent_req_received(req
);
746 /* Steal possbile out parameters to the callers context */
747 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
750 *result
= state
->orig
.out
.result
;
752 tevent_req_received(req
);
756 NTSTATUS
rpccli_eventlog_GetNumRecords(struct rpc_pipe_client
*cli
,
758 struct policy_handle
*handle
/* [in] [ref] */,
759 uint32_t *number
/* [out] [ref] */)
761 struct eventlog_GetNumRecords r
;
765 r
.in
.handle
= handle
;
767 if (DEBUGLEVEL
>= 10) {
768 NDR_PRINT_IN_DEBUG(eventlog_GetNumRecords
, &r
);
771 status
= cli
->dispatch(cli
,
774 NDR_EVENTLOG_GETNUMRECORDS
,
777 if (!NT_STATUS_IS_OK(status
)) {
781 if (DEBUGLEVEL
>= 10) {
782 NDR_PRINT_OUT_DEBUG(eventlog_GetNumRecords
, &r
);
785 if (NT_STATUS_IS_ERR(status
)) {
789 /* Return variables */
790 *number
= *r
.out
.number
;
796 struct rpccli_eventlog_GetOldestRecord_state
{
797 struct eventlog_GetOldestRecord orig
;
798 struct eventlog_GetOldestRecord tmp
;
799 TALLOC_CTX
*out_mem_ctx
;
800 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
803 static void rpccli_eventlog_GetOldestRecord_done(struct tevent_req
*subreq
);
805 struct tevent_req
*rpccli_eventlog_GetOldestRecord_send(TALLOC_CTX
*mem_ctx
,
806 struct tevent_context
*ev
,
807 struct rpc_pipe_client
*cli
,
808 struct policy_handle
*_handle
/* [in] [ref] */,
809 uint32_t *_oldest_entry
/* [out] [ref] */)
811 struct tevent_req
*req
;
812 struct rpccli_eventlog_GetOldestRecord_state
*state
;
813 struct tevent_req
*subreq
;
815 req
= tevent_req_create(mem_ctx
, &state
,
816 struct rpccli_eventlog_GetOldestRecord_state
);
820 state
->out_mem_ctx
= NULL
;
821 state
->dispatch_recv
= cli
->dispatch_recv
;
824 state
->orig
.in
.handle
= _handle
;
827 state
->orig
.out
.oldest_entry
= _oldest_entry
;
830 ZERO_STRUCT(state
->orig
.out
.result
);
832 if (DEBUGLEVEL
>= 10) {
833 NDR_PRINT_IN_DEBUG(eventlog_GetOldestRecord
, &state
->orig
);
836 state
->out_mem_ctx
= talloc_named_const(state
, 0,
837 "rpccli_eventlog_GetOldestRecord_out_memory");
838 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
839 return tevent_req_post(req
, ev
);
842 /* make a temporary copy, that we pass to the dispatch function */
843 state
->tmp
= state
->orig
;
845 subreq
= cli
->dispatch_send(state
, ev
, cli
,
847 NDR_EVENTLOG_GETOLDESTRECORD
,
849 if (tevent_req_nomem(subreq
, req
)) {
850 return tevent_req_post(req
, ev
);
852 tevent_req_set_callback(subreq
, rpccli_eventlog_GetOldestRecord_done
, req
);
856 static void rpccli_eventlog_GetOldestRecord_done(struct tevent_req
*subreq
)
858 struct tevent_req
*req
= tevent_req_callback_data(
859 subreq
, struct tevent_req
);
860 struct rpccli_eventlog_GetOldestRecord_state
*state
= tevent_req_data(
861 req
, struct rpccli_eventlog_GetOldestRecord_state
);
865 if (state
->out_mem_ctx
) {
866 mem_ctx
= state
->out_mem_ctx
;
871 status
= state
->dispatch_recv(subreq
, mem_ctx
);
873 if (!NT_STATUS_IS_OK(status
)) {
874 tevent_req_nterror(req
, status
);
878 /* Copy out parameters */
879 *state
->orig
.out
.oldest_entry
= *state
->tmp
.out
.oldest_entry
;
882 state
->orig
.out
.result
= state
->tmp
.out
.result
;
884 /* Reset temporary structure */
885 ZERO_STRUCT(state
->tmp
);
887 if (DEBUGLEVEL
>= 10) {
888 NDR_PRINT_OUT_DEBUG(eventlog_GetOldestRecord
, &state
->orig
);
891 tevent_req_done(req
);
894 NTSTATUS
rpccli_eventlog_GetOldestRecord_recv(struct tevent_req
*req
,
898 struct rpccli_eventlog_GetOldestRecord_state
*state
= tevent_req_data(
899 req
, struct rpccli_eventlog_GetOldestRecord_state
);
902 if (tevent_req_is_nterror(req
, &status
)) {
903 tevent_req_received(req
);
907 /* Steal possbile out parameters to the callers context */
908 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
911 *result
= state
->orig
.out
.result
;
913 tevent_req_received(req
);
917 NTSTATUS
rpccli_eventlog_GetOldestRecord(struct rpc_pipe_client
*cli
,
919 struct policy_handle
*handle
/* [in] [ref] */,
920 uint32_t *oldest_entry
/* [out] [ref] */)
922 struct eventlog_GetOldestRecord r
;
926 r
.in
.handle
= handle
;
928 if (DEBUGLEVEL
>= 10) {
929 NDR_PRINT_IN_DEBUG(eventlog_GetOldestRecord
, &r
);
932 status
= cli
->dispatch(cli
,
935 NDR_EVENTLOG_GETOLDESTRECORD
,
938 if (!NT_STATUS_IS_OK(status
)) {
942 if (DEBUGLEVEL
>= 10) {
943 NDR_PRINT_OUT_DEBUG(eventlog_GetOldestRecord
, &r
);
946 if (NT_STATUS_IS_ERR(status
)) {
950 /* Return variables */
951 *oldest_entry
= *r
.out
.oldest_entry
;
957 struct rpccli_eventlog_ChangeNotify_state
{
958 struct eventlog_ChangeNotify orig
;
959 struct eventlog_ChangeNotify tmp
;
960 TALLOC_CTX
*out_mem_ctx
;
961 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
964 static void rpccli_eventlog_ChangeNotify_done(struct tevent_req
*subreq
);
966 struct tevent_req
*rpccli_eventlog_ChangeNotify_send(TALLOC_CTX
*mem_ctx
,
967 struct tevent_context
*ev
,
968 struct rpc_pipe_client
*cli
)
970 struct tevent_req
*req
;
971 struct rpccli_eventlog_ChangeNotify_state
*state
;
972 struct tevent_req
*subreq
;
974 req
= tevent_req_create(mem_ctx
, &state
,
975 struct rpccli_eventlog_ChangeNotify_state
);
979 state
->out_mem_ctx
= NULL
;
980 state
->dispatch_recv
= cli
->dispatch_recv
;
987 ZERO_STRUCT(state
->orig
.out
.result
);
989 if (DEBUGLEVEL
>= 10) {
990 NDR_PRINT_IN_DEBUG(eventlog_ChangeNotify
, &state
->orig
);
993 /* make a temporary copy, that we pass to the dispatch function */
994 state
->tmp
= state
->orig
;
996 subreq
= cli
->dispatch_send(state
, ev
, cli
,
998 NDR_EVENTLOG_CHANGENOTIFY
,
1000 if (tevent_req_nomem(subreq
, req
)) {
1001 return tevent_req_post(req
, ev
);
1003 tevent_req_set_callback(subreq
, rpccli_eventlog_ChangeNotify_done
, req
);
1007 static void rpccli_eventlog_ChangeNotify_done(struct tevent_req
*subreq
)
1009 struct tevent_req
*req
= tevent_req_callback_data(
1010 subreq
, struct tevent_req
);
1011 struct rpccli_eventlog_ChangeNotify_state
*state
= tevent_req_data(
1012 req
, struct rpccli_eventlog_ChangeNotify_state
);
1014 TALLOC_CTX
*mem_ctx
;
1016 if (state
->out_mem_ctx
) {
1017 mem_ctx
= state
->out_mem_ctx
;
1022 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1023 TALLOC_FREE(subreq
);
1024 if (!NT_STATUS_IS_OK(status
)) {
1025 tevent_req_nterror(req
, status
);
1029 /* Copy out parameters */
1032 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1034 /* Reset temporary structure */
1035 ZERO_STRUCT(state
->tmp
);
1037 if (DEBUGLEVEL
>= 10) {
1038 NDR_PRINT_OUT_DEBUG(eventlog_ChangeNotify
, &state
->orig
);
1041 tevent_req_done(req
);
1044 NTSTATUS
rpccli_eventlog_ChangeNotify_recv(struct tevent_req
*req
,
1045 TALLOC_CTX
*mem_ctx
,
1048 struct rpccli_eventlog_ChangeNotify_state
*state
= tevent_req_data(
1049 req
, struct rpccli_eventlog_ChangeNotify_state
);
1052 if (tevent_req_is_nterror(req
, &status
)) {
1053 tevent_req_received(req
);
1057 /* Steal possbile out parameters to the callers context */
1058 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1061 *result
= state
->orig
.out
.result
;
1063 tevent_req_received(req
);
1064 return NT_STATUS_OK
;
1067 NTSTATUS
rpccli_eventlog_ChangeNotify(struct rpc_pipe_client
*cli
,
1068 TALLOC_CTX
*mem_ctx
)
1070 struct eventlog_ChangeNotify r
;
1075 if (DEBUGLEVEL
>= 10) {
1076 NDR_PRINT_IN_DEBUG(eventlog_ChangeNotify
, &r
);
1079 status
= cli
->dispatch(cli
,
1081 &ndr_table_eventlog
,
1082 NDR_EVENTLOG_CHANGENOTIFY
,
1085 if (!NT_STATUS_IS_OK(status
)) {
1089 if (DEBUGLEVEL
>= 10) {
1090 NDR_PRINT_OUT_DEBUG(eventlog_ChangeNotify
, &r
);
1093 if (NT_STATUS_IS_ERR(status
)) {
1097 /* Return variables */
1100 return r
.out
.result
;
1103 struct rpccli_eventlog_OpenEventLogW_state
{
1104 struct eventlog_OpenEventLogW orig
;
1105 struct eventlog_OpenEventLogW tmp
;
1106 TALLOC_CTX
*out_mem_ctx
;
1107 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1110 static void rpccli_eventlog_OpenEventLogW_done(struct tevent_req
*subreq
);
1112 struct tevent_req
*rpccli_eventlog_OpenEventLogW_send(TALLOC_CTX
*mem_ctx
,
1113 struct tevent_context
*ev
,
1114 struct rpc_pipe_client
*cli
,
1115 struct eventlog_OpenUnknown0
*_unknown0
/* [in] [unique] */,
1116 struct lsa_String
*_logname
/* [in] [ref] */,
1117 struct lsa_String
*_servername
/* [in] [ref] */,
1118 uint32_t _major_version
/* [in] */,
1119 uint32_t _minor_version
/* [in] */,
1120 struct policy_handle
*_handle
/* [out] [ref] */)
1122 struct tevent_req
*req
;
1123 struct rpccli_eventlog_OpenEventLogW_state
*state
;
1124 struct tevent_req
*subreq
;
1126 req
= tevent_req_create(mem_ctx
, &state
,
1127 struct rpccli_eventlog_OpenEventLogW_state
);
1131 state
->out_mem_ctx
= NULL
;
1132 state
->dispatch_recv
= cli
->dispatch_recv
;
1135 state
->orig
.in
.unknown0
= _unknown0
;
1136 state
->orig
.in
.logname
= _logname
;
1137 state
->orig
.in
.servername
= _servername
;
1138 state
->orig
.in
.major_version
= _major_version
;
1139 state
->orig
.in
.minor_version
= _minor_version
;
1141 /* Out parameters */
1142 state
->orig
.out
.handle
= _handle
;
1145 ZERO_STRUCT(state
->orig
.out
.result
);
1147 if (DEBUGLEVEL
>= 10) {
1148 NDR_PRINT_IN_DEBUG(eventlog_OpenEventLogW
, &state
->orig
);
1151 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1152 "rpccli_eventlog_OpenEventLogW_out_memory");
1153 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1154 return tevent_req_post(req
, ev
);
1157 /* make a temporary copy, that we pass to the dispatch function */
1158 state
->tmp
= state
->orig
;
1160 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1161 &ndr_table_eventlog
,
1162 NDR_EVENTLOG_OPENEVENTLOGW
,
1164 if (tevent_req_nomem(subreq
, req
)) {
1165 return tevent_req_post(req
, ev
);
1167 tevent_req_set_callback(subreq
, rpccli_eventlog_OpenEventLogW_done
, req
);
1171 static void rpccli_eventlog_OpenEventLogW_done(struct tevent_req
*subreq
)
1173 struct tevent_req
*req
= tevent_req_callback_data(
1174 subreq
, struct tevent_req
);
1175 struct rpccli_eventlog_OpenEventLogW_state
*state
= tevent_req_data(
1176 req
, struct rpccli_eventlog_OpenEventLogW_state
);
1178 TALLOC_CTX
*mem_ctx
;
1180 if (state
->out_mem_ctx
) {
1181 mem_ctx
= state
->out_mem_ctx
;
1186 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1187 TALLOC_FREE(subreq
);
1188 if (!NT_STATUS_IS_OK(status
)) {
1189 tevent_req_nterror(req
, status
);
1193 /* Copy out parameters */
1194 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
1197 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1199 /* Reset temporary structure */
1200 ZERO_STRUCT(state
->tmp
);
1202 if (DEBUGLEVEL
>= 10) {
1203 NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogW
, &state
->orig
);
1206 tevent_req_done(req
);
1209 NTSTATUS
rpccli_eventlog_OpenEventLogW_recv(struct tevent_req
*req
,
1210 TALLOC_CTX
*mem_ctx
,
1213 struct rpccli_eventlog_OpenEventLogW_state
*state
= tevent_req_data(
1214 req
, struct rpccli_eventlog_OpenEventLogW_state
);
1217 if (tevent_req_is_nterror(req
, &status
)) {
1218 tevent_req_received(req
);
1222 /* Steal possbile out parameters to the callers context */
1223 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1226 *result
= state
->orig
.out
.result
;
1228 tevent_req_received(req
);
1229 return NT_STATUS_OK
;
1232 NTSTATUS
rpccli_eventlog_OpenEventLogW(struct rpc_pipe_client
*cli
,
1233 TALLOC_CTX
*mem_ctx
,
1234 struct eventlog_OpenUnknown0
*unknown0
/* [in] [unique] */,
1235 struct lsa_String
*logname
/* [in] [ref] */,
1236 struct lsa_String
*servername
/* [in] [ref] */,
1237 uint32_t major_version
/* [in] */,
1238 uint32_t minor_version
/* [in] */,
1239 struct policy_handle
*handle
/* [out] [ref] */)
1241 struct eventlog_OpenEventLogW r
;
1245 r
.in
.unknown0
= unknown0
;
1246 r
.in
.logname
= logname
;
1247 r
.in
.servername
= servername
;
1248 r
.in
.major_version
= major_version
;
1249 r
.in
.minor_version
= minor_version
;
1251 if (DEBUGLEVEL
>= 10) {
1252 NDR_PRINT_IN_DEBUG(eventlog_OpenEventLogW
, &r
);
1255 status
= cli
->dispatch(cli
,
1257 &ndr_table_eventlog
,
1258 NDR_EVENTLOG_OPENEVENTLOGW
,
1261 if (!NT_STATUS_IS_OK(status
)) {
1265 if (DEBUGLEVEL
>= 10) {
1266 NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogW
, &r
);
1269 if (NT_STATUS_IS_ERR(status
)) {
1273 /* Return variables */
1274 *handle
= *r
.out
.handle
;
1277 return r
.out
.result
;
1280 struct rpccli_eventlog_RegisterEventSourceW_state
{
1281 struct eventlog_RegisterEventSourceW orig
;
1282 struct eventlog_RegisterEventSourceW tmp
;
1283 TALLOC_CTX
*out_mem_ctx
;
1284 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1287 static void rpccli_eventlog_RegisterEventSourceW_done(struct tevent_req
*subreq
);
1289 struct tevent_req
*rpccli_eventlog_RegisterEventSourceW_send(TALLOC_CTX
*mem_ctx
,
1290 struct tevent_context
*ev
,
1291 struct rpc_pipe_client
*cli
,
1292 struct eventlog_OpenUnknown0
*_unknown0
/* [in] [unique] */,
1293 struct lsa_String
*_module_name
/* [in] [ref] */,
1294 struct lsa_String
*_reg_module_name
/* [in] [ref] */,
1295 uint32_t _major_version
/* [in] */,
1296 uint32_t _minor_version
/* [in] */,
1297 struct policy_handle
*_log_handle
/* [out] [ref] */)
1299 struct tevent_req
*req
;
1300 struct rpccli_eventlog_RegisterEventSourceW_state
*state
;
1301 struct tevent_req
*subreq
;
1303 req
= tevent_req_create(mem_ctx
, &state
,
1304 struct rpccli_eventlog_RegisterEventSourceW_state
);
1308 state
->out_mem_ctx
= NULL
;
1309 state
->dispatch_recv
= cli
->dispatch_recv
;
1312 state
->orig
.in
.unknown0
= _unknown0
;
1313 state
->orig
.in
.module_name
= _module_name
;
1314 state
->orig
.in
.reg_module_name
= _reg_module_name
;
1315 state
->orig
.in
.major_version
= _major_version
;
1316 state
->orig
.in
.minor_version
= _minor_version
;
1318 /* Out parameters */
1319 state
->orig
.out
.log_handle
= _log_handle
;
1322 ZERO_STRUCT(state
->orig
.out
.result
);
1324 if (DEBUGLEVEL
>= 10) {
1325 NDR_PRINT_IN_DEBUG(eventlog_RegisterEventSourceW
, &state
->orig
);
1328 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1329 "rpccli_eventlog_RegisterEventSourceW_out_memory");
1330 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1331 return tevent_req_post(req
, ev
);
1334 /* make a temporary copy, that we pass to the dispatch function */
1335 state
->tmp
= state
->orig
;
1337 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1338 &ndr_table_eventlog
,
1339 NDR_EVENTLOG_REGISTEREVENTSOURCEW
,
1341 if (tevent_req_nomem(subreq
, req
)) {
1342 return tevent_req_post(req
, ev
);
1344 tevent_req_set_callback(subreq
, rpccli_eventlog_RegisterEventSourceW_done
, req
);
1348 static void rpccli_eventlog_RegisterEventSourceW_done(struct tevent_req
*subreq
)
1350 struct tevent_req
*req
= tevent_req_callback_data(
1351 subreq
, struct tevent_req
);
1352 struct rpccli_eventlog_RegisterEventSourceW_state
*state
= tevent_req_data(
1353 req
, struct rpccli_eventlog_RegisterEventSourceW_state
);
1355 TALLOC_CTX
*mem_ctx
;
1357 if (state
->out_mem_ctx
) {
1358 mem_ctx
= state
->out_mem_ctx
;
1363 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1364 TALLOC_FREE(subreq
);
1365 if (!NT_STATUS_IS_OK(status
)) {
1366 tevent_req_nterror(req
, status
);
1370 /* Copy out parameters */
1371 *state
->orig
.out
.log_handle
= *state
->tmp
.out
.log_handle
;
1374 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1376 /* Reset temporary structure */
1377 ZERO_STRUCT(state
->tmp
);
1379 if (DEBUGLEVEL
>= 10) {
1380 NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceW
, &state
->orig
);
1383 tevent_req_done(req
);
1386 NTSTATUS
rpccli_eventlog_RegisterEventSourceW_recv(struct tevent_req
*req
,
1387 TALLOC_CTX
*mem_ctx
,
1390 struct rpccli_eventlog_RegisterEventSourceW_state
*state
= tevent_req_data(
1391 req
, struct rpccli_eventlog_RegisterEventSourceW_state
);
1394 if (tevent_req_is_nterror(req
, &status
)) {
1395 tevent_req_received(req
);
1399 /* Steal possbile out parameters to the callers context */
1400 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1403 *result
= state
->orig
.out
.result
;
1405 tevent_req_received(req
);
1406 return NT_STATUS_OK
;
1409 NTSTATUS
rpccli_eventlog_RegisterEventSourceW(struct rpc_pipe_client
*cli
,
1410 TALLOC_CTX
*mem_ctx
,
1411 struct eventlog_OpenUnknown0
*unknown0
/* [in] [unique] */,
1412 struct lsa_String
*module_name
/* [in] [ref] */,
1413 struct lsa_String
*reg_module_name
/* [in] [ref] */,
1414 uint32_t major_version
/* [in] */,
1415 uint32_t minor_version
/* [in] */,
1416 struct policy_handle
*log_handle
/* [out] [ref] */)
1418 struct eventlog_RegisterEventSourceW r
;
1422 r
.in
.unknown0
= unknown0
;
1423 r
.in
.module_name
= module_name
;
1424 r
.in
.reg_module_name
= reg_module_name
;
1425 r
.in
.major_version
= major_version
;
1426 r
.in
.minor_version
= minor_version
;
1428 if (DEBUGLEVEL
>= 10) {
1429 NDR_PRINT_IN_DEBUG(eventlog_RegisterEventSourceW
, &r
);
1432 status
= cli
->dispatch(cli
,
1434 &ndr_table_eventlog
,
1435 NDR_EVENTLOG_REGISTEREVENTSOURCEW
,
1438 if (!NT_STATUS_IS_OK(status
)) {
1442 if (DEBUGLEVEL
>= 10) {
1443 NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceW
, &r
);
1446 if (NT_STATUS_IS_ERR(status
)) {
1450 /* Return variables */
1451 *log_handle
= *r
.out
.log_handle
;
1454 return r
.out
.result
;
1457 struct rpccli_eventlog_OpenBackupEventLogW_state
{
1458 struct eventlog_OpenBackupEventLogW orig
;
1459 struct eventlog_OpenBackupEventLogW tmp
;
1460 TALLOC_CTX
*out_mem_ctx
;
1461 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1464 static void rpccli_eventlog_OpenBackupEventLogW_done(struct tevent_req
*subreq
);
1466 struct tevent_req
*rpccli_eventlog_OpenBackupEventLogW_send(TALLOC_CTX
*mem_ctx
,
1467 struct tevent_context
*ev
,
1468 struct rpc_pipe_client
*cli
,
1469 struct eventlog_OpenUnknown0
*_unknown0
/* [in] [unique] */,
1470 struct lsa_String
*_backup_logname
/* [in] [ref] */,
1471 uint32_t _major_version
/* [in] */,
1472 uint32_t _minor_version
/* [in] */,
1473 struct policy_handle
*_handle
/* [out] [ref] */)
1475 struct tevent_req
*req
;
1476 struct rpccli_eventlog_OpenBackupEventLogW_state
*state
;
1477 struct tevent_req
*subreq
;
1479 req
= tevent_req_create(mem_ctx
, &state
,
1480 struct rpccli_eventlog_OpenBackupEventLogW_state
);
1484 state
->out_mem_ctx
= NULL
;
1485 state
->dispatch_recv
= cli
->dispatch_recv
;
1488 state
->orig
.in
.unknown0
= _unknown0
;
1489 state
->orig
.in
.backup_logname
= _backup_logname
;
1490 state
->orig
.in
.major_version
= _major_version
;
1491 state
->orig
.in
.minor_version
= _minor_version
;
1493 /* Out parameters */
1494 state
->orig
.out
.handle
= _handle
;
1497 ZERO_STRUCT(state
->orig
.out
.result
);
1499 if (DEBUGLEVEL
>= 10) {
1500 NDR_PRINT_IN_DEBUG(eventlog_OpenBackupEventLogW
, &state
->orig
);
1503 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1504 "rpccli_eventlog_OpenBackupEventLogW_out_memory");
1505 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1506 return tevent_req_post(req
, ev
);
1509 /* make a temporary copy, that we pass to the dispatch function */
1510 state
->tmp
= state
->orig
;
1512 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1513 &ndr_table_eventlog
,
1514 NDR_EVENTLOG_OPENBACKUPEVENTLOGW
,
1516 if (tevent_req_nomem(subreq
, req
)) {
1517 return tevent_req_post(req
, ev
);
1519 tevent_req_set_callback(subreq
, rpccli_eventlog_OpenBackupEventLogW_done
, req
);
1523 static void rpccli_eventlog_OpenBackupEventLogW_done(struct tevent_req
*subreq
)
1525 struct tevent_req
*req
= tevent_req_callback_data(
1526 subreq
, struct tevent_req
);
1527 struct rpccli_eventlog_OpenBackupEventLogW_state
*state
= tevent_req_data(
1528 req
, struct rpccli_eventlog_OpenBackupEventLogW_state
);
1530 TALLOC_CTX
*mem_ctx
;
1532 if (state
->out_mem_ctx
) {
1533 mem_ctx
= state
->out_mem_ctx
;
1538 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1539 TALLOC_FREE(subreq
);
1540 if (!NT_STATUS_IS_OK(status
)) {
1541 tevent_req_nterror(req
, status
);
1545 /* Copy out parameters */
1546 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
1549 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1551 /* Reset temporary structure */
1552 ZERO_STRUCT(state
->tmp
);
1554 if (DEBUGLEVEL
>= 10) {
1555 NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogW
, &state
->orig
);
1558 tevent_req_done(req
);
1561 NTSTATUS
rpccli_eventlog_OpenBackupEventLogW_recv(struct tevent_req
*req
,
1562 TALLOC_CTX
*mem_ctx
,
1565 struct rpccli_eventlog_OpenBackupEventLogW_state
*state
= tevent_req_data(
1566 req
, struct rpccli_eventlog_OpenBackupEventLogW_state
);
1569 if (tevent_req_is_nterror(req
, &status
)) {
1570 tevent_req_received(req
);
1574 /* Steal possbile out parameters to the callers context */
1575 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1578 *result
= state
->orig
.out
.result
;
1580 tevent_req_received(req
);
1581 return NT_STATUS_OK
;
1584 NTSTATUS
rpccli_eventlog_OpenBackupEventLogW(struct rpc_pipe_client
*cli
,
1585 TALLOC_CTX
*mem_ctx
,
1586 struct eventlog_OpenUnknown0
*unknown0
/* [in] [unique] */,
1587 struct lsa_String
*backup_logname
/* [in] [ref] */,
1588 uint32_t major_version
/* [in] */,
1589 uint32_t minor_version
/* [in] */,
1590 struct policy_handle
*handle
/* [out] [ref] */)
1592 struct eventlog_OpenBackupEventLogW r
;
1596 r
.in
.unknown0
= unknown0
;
1597 r
.in
.backup_logname
= backup_logname
;
1598 r
.in
.major_version
= major_version
;
1599 r
.in
.minor_version
= minor_version
;
1601 if (DEBUGLEVEL
>= 10) {
1602 NDR_PRINT_IN_DEBUG(eventlog_OpenBackupEventLogW
, &r
);
1605 status
= cli
->dispatch(cli
,
1607 &ndr_table_eventlog
,
1608 NDR_EVENTLOG_OPENBACKUPEVENTLOGW
,
1611 if (!NT_STATUS_IS_OK(status
)) {
1615 if (DEBUGLEVEL
>= 10) {
1616 NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogW
, &r
);
1619 if (NT_STATUS_IS_ERR(status
)) {
1623 /* Return variables */
1624 *handle
= *r
.out
.handle
;
1627 return r
.out
.result
;
1630 struct rpccli_eventlog_ReadEventLogW_state
{
1631 struct eventlog_ReadEventLogW orig
;
1632 struct eventlog_ReadEventLogW tmp
;
1633 TALLOC_CTX
*out_mem_ctx
;
1634 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1637 static void rpccli_eventlog_ReadEventLogW_done(struct tevent_req
*subreq
);
1639 struct tevent_req
*rpccli_eventlog_ReadEventLogW_send(TALLOC_CTX
*mem_ctx
,
1640 struct tevent_context
*ev
,
1641 struct rpc_pipe_client
*cli
,
1642 struct policy_handle
*_handle
/* [in] [ref] */,
1643 uint32_t _flags
/* [in] */,
1644 uint32_t _offset
/* [in] */,
1645 uint32_t _number_of_bytes
/* [in] [range(0,0x7FFFF)] */,
1646 uint8_t *_data
/* [out] [ref,size_is(number_of_bytes)] */,
1647 uint32_t *_sent_size
/* [out] [ref] */,
1648 uint32_t *_real_size
/* [out] [ref] */)
1650 struct tevent_req
*req
;
1651 struct rpccli_eventlog_ReadEventLogW_state
*state
;
1652 struct tevent_req
*subreq
;
1654 req
= tevent_req_create(mem_ctx
, &state
,
1655 struct rpccli_eventlog_ReadEventLogW_state
);
1659 state
->out_mem_ctx
= NULL
;
1660 state
->dispatch_recv
= cli
->dispatch_recv
;
1663 state
->orig
.in
.handle
= _handle
;
1664 state
->orig
.in
.flags
= _flags
;
1665 state
->orig
.in
.offset
= _offset
;
1666 state
->orig
.in
.number_of_bytes
= _number_of_bytes
;
1668 /* Out parameters */
1669 state
->orig
.out
.data
= _data
;
1670 state
->orig
.out
.sent_size
= _sent_size
;
1671 state
->orig
.out
.real_size
= _real_size
;
1674 ZERO_STRUCT(state
->orig
.out
.result
);
1676 if (DEBUGLEVEL
>= 10) {
1677 NDR_PRINT_IN_DEBUG(eventlog_ReadEventLogW
, &state
->orig
);
1680 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1681 "rpccli_eventlog_ReadEventLogW_out_memory");
1682 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1683 return tevent_req_post(req
, ev
);
1686 /* make a temporary copy, that we pass to the dispatch function */
1687 state
->tmp
= state
->orig
;
1689 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1690 &ndr_table_eventlog
,
1691 NDR_EVENTLOG_READEVENTLOGW
,
1693 if (tevent_req_nomem(subreq
, req
)) {
1694 return tevent_req_post(req
, ev
);
1696 tevent_req_set_callback(subreq
, rpccli_eventlog_ReadEventLogW_done
, req
);
1700 static void rpccli_eventlog_ReadEventLogW_done(struct tevent_req
*subreq
)
1702 struct tevent_req
*req
= tevent_req_callback_data(
1703 subreq
, struct tevent_req
);
1704 struct rpccli_eventlog_ReadEventLogW_state
*state
= tevent_req_data(
1705 req
, struct rpccli_eventlog_ReadEventLogW_state
);
1707 TALLOC_CTX
*mem_ctx
;
1709 if (state
->out_mem_ctx
) {
1710 mem_ctx
= state
->out_mem_ctx
;
1715 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1716 TALLOC_FREE(subreq
);
1717 if (!NT_STATUS_IS_OK(status
)) {
1718 tevent_req_nterror(req
, status
);
1722 /* Copy out parameters */
1723 memcpy(state
->orig
.out
.data
, state
->tmp
.out
.data
, state
->tmp
.in
.number_of_bytes
* sizeof(*state
->orig
.out
.data
));
1724 *state
->orig
.out
.sent_size
= *state
->tmp
.out
.sent_size
;
1725 *state
->orig
.out
.real_size
= *state
->tmp
.out
.real_size
;
1728 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1730 /* Reset temporary structure */
1731 ZERO_STRUCT(state
->tmp
);
1733 if (DEBUGLEVEL
>= 10) {
1734 NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogW
, &state
->orig
);
1737 tevent_req_done(req
);
1740 NTSTATUS
rpccli_eventlog_ReadEventLogW_recv(struct tevent_req
*req
,
1741 TALLOC_CTX
*mem_ctx
,
1744 struct rpccli_eventlog_ReadEventLogW_state
*state
= tevent_req_data(
1745 req
, struct rpccli_eventlog_ReadEventLogW_state
);
1748 if (tevent_req_is_nterror(req
, &status
)) {
1749 tevent_req_received(req
);
1753 /* Steal possbile out parameters to the callers context */
1754 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1757 *result
= state
->orig
.out
.result
;
1759 tevent_req_received(req
);
1760 return NT_STATUS_OK
;
1763 NTSTATUS
rpccli_eventlog_ReadEventLogW(struct rpc_pipe_client
*cli
,
1764 TALLOC_CTX
*mem_ctx
,
1765 struct policy_handle
*handle
/* [in] [ref] */,
1766 uint32_t flags
/* [in] */,
1767 uint32_t offset
/* [in] */,
1768 uint32_t number_of_bytes
/* [in] [range(0,0x7FFFF)] */,
1769 uint8_t *data
/* [out] [ref,size_is(number_of_bytes)] */,
1770 uint32_t *sent_size
/* [out] [ref] */,
1771 uint32_t *real_size
/* [out] [ref] */)
1773 struct eventlog_ReadEventLogW r
;
1777 r
.in
.handle
= handle
;
1779 r
.in
.offset
= offset
;
1780 r
.in
.number_of_bytes
= number_of_bytes
;
1782 if (DEBUGLEVEL
>= 10) {
1783 NDR_PRINT_IN_DEBUG(eventlog_ReadEventLogW
, &r
);
1786 status
= cli
->dispatch(cli
,
1788 &ndr_table_eventlog
,
1789 NDR_EVENTLOG_READEVENTLOGW
,
1792 if (!NT_STATUS_IS_OK(status
)) {
1796 if (DEBUGLEVEL
>= 10) {
1797 NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogW
, &r
);
1800 if (NT_STATUS_IS_ERR(status
)) {
1804 /* Return variables */
1805 memcpy(data
, r
.out
.data
, r
.in
.number_of_bytes
* sizeof(*data
));
1806 *sent_size
= *r
.out
.sent_size
;
1807 *real_size
= *r
.out
.real_size
;
1810 return r
.out
.result
;
1813 struct rpccli_eventlog_ReportEventW_state
{
1814 struct eventlog_ReportEventW orig
;
1815 struct eventlog_ReportEventW tmp
;
1816 TALLOC_CTX
*out_mem_ctx
;
1817 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1820 static void rpccli_eventlog_ReportEventW_done(struct tevent_req
*subreq
);
1822 struct tevent_req
*rpccli_eventlog_ReportEventW_send(TALLOC_CTX
*mem_ctx
,
1823 struct tevent_context
*ev
,
1824 struct rpc_pipe_client
*cli
,
1825 struct policy_handle
*_handle
/* [in] [ref] */,
1826 time_t _timestamp
/* [in] */,
1827 enum eventlogEventTypes _event_type
/* [in] */,
1828 uint16_t _event_category
/* [in] */,
1829 uint32_t _event_id
/* [in] */,
1830 uint16_t _num_of_strings
/* [in] [range(0,256)] */,
1831 uint32_t _data_size
/* [in] [range(0,0x3FFFF)] */,
1832 struct lsa_String
*_servername
/* [in] [ref] */,
1833 struct dom_sid
*_user_sid
/* [in] [unique] */,
1834 struct lsa_String
**_strings
/* [in] [unique,size_is(num_of_strings)] */,
1835 uint8_t *_data
/* [in] [unique,size_is(data_size)] */,
1836 uint16_t _flags
/* [in] */,
1837 uint32_t *_record_number
/* [in,out] [unique] */,
1838 time_t *_time_written
/* [in,out] [unique] */)
1840 struct tevent_req
*req
;
1841 struct rpccli_eventlog_ReportEventW_state
*state
;
1842 struct tevent_req
*subreq
;
1844 req
= tevent_req_create(mem_ctx
, &state
,
1845 struct rpccli_eventlog_ReportEventW_state
);
1849 state
->out_mem_ctx
= NULL
;
1850 state
->dispatch_recv
= cli
->dispatch_recv
;
1853 state
->orig
.in
.handle
= _handle
;
1854 state
->orig
.in
.timestamp
= _timestamp
;
1855 state
->orig
.in
.event_type
= _event_type
;
1856 state
->orig
.in
.event_category
= _event_category
;
1857 state
->orig
.in
.event_id
= _event_id
;
1858 state
->orig
.in
.num_of_strings
= _num_of_strings
;
1859 state
->orig
.in
.data_size
= _data_size
;
1860 state
->orig
.in
.servername
= _servername
;
1861 state
->orig
.in
.user_sid
= _user_sid
;
1862 state
->orig
.in
.strings
= _strings
;
1863 state
->orig
.in
.data
= _data
;
1864 state
->orig
.in
.flags
= _flags
;
1865 state
->orig
.in
.record_number
= _record_number
;
1866 state
->orig
.in
.time_written
= _time_written
;
1868 /* Out parameters */
1869 state
->orig
.out
.record_number
= _record_number
;
1870 state
->orig
.out
.time_written
= _time_written
;
1873 ZERO_STRUCT(state
->orig
.out
.result
);
1875 if (DEBUGLEVEL
>= 10) {
1876 NDR_PRINT_IN_DEBUG(eventlog_ReportEventW
, &state
->orig
);
1879 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1880 "rpccli_eventlog_ReportEventW_out_memory");
1881 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1882 return tevent_req_post(req
, ev
);
1885 /* make a temporary copy, that we pass to the dispatch function */
1886 state
->tmp
= state
->orig
;
1888 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1889 &ndr_table_eventlog
,
1890 NDR_EVENTLOG_REPORTEVENTW
,
1892 if (tevent_req_nomem(subreq
, req
)) {
1893 return tevent_req_post(req
, ev
);
1895 tevent_req_set_callback(subreq
, rpccli_eventlog_ReportEventW_done
, req
);
1899 static void rpccli_eventlog_ReportEventW_done(struct tevent_req
*subreq
)
1901 struct tevent_req
*req
= tevent_req_callback_data(
1902 subreq
, struct tevent_req
);
1903 struct rpccli_eventlog_ReportEventW_state
*state
= tevent_req_data(
1904 req
, struct rpccli_eventlog_ReportEventW_state
);
1906 TALLOC_CTX
*mem_ctx
;
1908 if (state
->out_mem_ctx
) {
1909 mem_ctx
= state
->out_mem_ctx
;
1914 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1915 TALLOC_FREE(subreq
);
1916 if (!NT_STATUS_IS_OK(status
)) {
1917 tevent_req_nterror(req
, status
);
1921 /* Copy out parameters */
1922 if (state
->orig
.out
.record_number
&& state
->tmp
.out
.record_number
) {
1923 *state
->orig
.out
.record_number
= *state
->tmp
.out
.record_number
;
1925 if (state
->orig
.out
.time_written
&& state
->tmp
.out
.time_written
) {
1926 *state
->orig
.out
.time_written
= *state
->tmp
.out
.time_written
;
1930 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1932 /* Reset temporary structure */
1933 ZERO_STRUCT(state
->tmp
);
1935 if (DEBUGLEVEL
>= 10) {
1936 NDR_PRINT_OUT_DEBUG(eventlog_ReportEventW
, &state
->orig
);
1939 tevent_req_done(req
);
1942 NTSTATUS
rpccli_eventlog_ReportEventW_recv(struct tevent_req
*req
,
1943 TALLOC_CTX
*mem_ctx
,
1946 struct rpccli_eventlog_ReportEventW_state
*state
= tevent_req_data(
1947 req
, struct rpccli_eventlog_ReportEventW_state
);
1950 if (tevent_req_is_nterror(req
, &status
)) {
1951 tevent_req_received(req
);
1955 /* Steal possbile out parameters to the callers context */
1956 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1959 *result
= state
->orig
.out
.result
;
1961 tevent_req_received(req
);
1962 return NT_STATUS_OK
;
1965 NTSTATUS
rpccli_eventlog_ReportEventW(struct rpc_pipe_client
*cli
,
1966 TALLOC_CTX
*mem_ctx
,
1967 struct policy_handle
*handle
/* [in] [ref] */,
1968 time_t timestamp
/* [in] */,
1969 enum eventlogEventTypes event_type
/* [in] */,
1970 uint16_t event_category
/* [in] */,
1971 uint32_t event_id
/* [in] */,
1972 uint16_t num_of_strings
/* [in] [range(0,256)] */,
1973 uint32_t data_size
/* [in] [range(0,0x3FFFF)] */,
1974 struct lsa_String
*servername
/* [in] [ref] */,
1975 struct dom_sid
*user_sid
/* [in] [unique] */,
1976 struct lsa_String
**strings
/* [in] [unique,size_is(num_of_strings)] */,
1977 uint8_t *data
/* [in] [unique,size_is(data_size)] */,
1978 uint16_t flags
/* [in] */,
1979 uint32_t *record_number
/* [in,out] [unique] */,
1980 time_t *time_written
/* [in,out] [unique] */)
1982 struct eventlog_ReportEventW r
;
1986 r
.in
.handle
= handle
;
1987 r
.in
.timestamp
= timestamp
;
1988 r
.in
.event_type
= event_type
;
1989 r
.in
.event_category
= event_category
;
1990 r
.in
.event_id
= event_id
;
1991 r
.in
.num_of_strings
= num_of_strings
;
1992 r
.in
.data_size
= data_size
;
1993 r
.in
.servername
= servername
;
1994 r
.in
.user_sid
= user_sid
;
1995 r
.in
.strings
= strings
;
1998 r
.in
.record_number
= record_number
;
1999 r
.in
.time_written
= time_written
;
2001 if (DEBUGLEVEL
>= 10) {
2002 NDR_PRINT_IN_DEBUG(eventlog_ReportEventW
, &r
);
2005 status
= cli
->dispatch(cli
,
2007 &ndr_table_eventlog
,
2008 NDR_EVENTLOG_REPORTEVENTW
,
2011 if (!NT_STATUS_IS_OK(status
)) {
2015 if (DEBUGLEVEL
>= 10) {
2016 NDR_PRINT_OUT_DEBUG(eventlog_ReportEventW
, &r
);
2019 if (NT_STATUS_IS_ERR(status
)) {
2023 /* Return variables */
2024 if (record_number
&& r
.out
.record_number
) {
2025 *record_number
= *r
.out
.record_number
;
2027 if (time_written
&& r
.out
.time_written
) {
2028 *time_written
= *r
.out
.time_written
;
2032 return r
.out
.result
;
2035 struct rpccli_eventlog_ClearEventLogA_state
{
2036 struct eventlog_ClearEventLogA orig
;
2037 struct eventlog_ClearEventLogA tmp
;
2038 TALLOC_CTX
*out_mem_ctx
;
2039 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2042 static void rpccli_eventlog_ClearEventLogA_done(struct tevent_req
*subreq
);
2044 struct tevent_req
*rpccli_eventlog_ClearEventLogA_send(TALLOC_CTX
*mem_ctx
,
2045 struct tevent_context
*ev
,
2046 struct rpc_pipe_client
*cli
)
2048 struct tevent_req
*req
;
2049 struct rpccli_eventlog_ClearEventLogA_state
*state
;
2050 struct tevent_req
*subreq
;
2052 req
= tevent_req_create(mem_ctx
, &state
,
2053 struct rpccli_eventlog_ClearEventLogA_state
);
2057 state
->out_mem_ctx
= NULL
;
2058 state
->dispatch_recv
= cli
->dispatch_recv
;
2062 /* Out parameters */
2065 ZERO_STRUCT(state
->orig
.out
.result
);
2067 if (DEBUGLEVEL
>= 10) {
2068 NDR_PRINT_IN_DEBUG(eventlog_ClearEventLogA
, &state
->orig
);
2071 /* make a temporary copy, that we pass to the dispatch function */
2072 state
->tmp
= state
->orig
;
2074 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2075 &ndr_table_eventlog
,
2076 NDR_EVENTLOG_CLEAREVENTLOGA
,
2078 if (tevent_req_nomem(subreq
, req
)) {
2079 return tevent_req_post(req
, ev
);
2081 tevent_req_set_callback(subreq
, rpccli_eventlog_ClearEventLogA_done
, req
);
2085 static void rpccli_eventlog_ClearEventLogA_done(struct tevent_req
*subreq
)
2087 struct tevent_req
*req
= tevent_req_callback_data(
2088 subreq
, struct tevent_req
);
2089 struct rpccli_eventlog_ClearEventLogA_state
*state
= tevent_req_data(
2090 req
, struct rpccli_eventlog_ClearEventLogA_state
);
2092 TALLOC_CTX
*mem_ctx
;
2094 if (state
->out_mem_ctx
) {
2095 mem_ctx
= state
->out_mem_ctx
;
2100 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2101 TALLOC_FREE(subreq
);
2102 if (!NT_STATUS_IS_OK(status
)) {
2103 tevent_req_nterror(req
, status
);
2107 /* Copy out parameters */
2110 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2112 /* Reset temporary structure */
2113 ZERO_STRUCT(state
->tmp
);
2115 if (DEBUGLEVEL
>= 10) {
2116 NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogA
, &state
->orig
);
2119 tevent_req_done(req
);
2122 NTSTATUS
rpccli_eventlog_ClearEventLogA_recv(struct tevent_req
*req
,
2123 TALLOC_CTX
*mem_ctx
,
2126 struct rpccli_eventlog_ClearEventLogA_state
*state
= tevent_req_data(
2127 req
, struct rpccli_eventlog_ClearEventLogA_state
);
2130 if (tevent_req_is_nterror(req
, &status
)) {
2131 tevent_req_received(req
);
2135 /* Steal possbile out parameters to the callers context */
2136 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2139 *result
= state
->orig
.out
.result
;
2141 tevent_req_received(req
);
2142 return NT_STATUS_OK
;
2145 NTSTATUS
rpccli_eventlog_ClearEventLogA(struct rpc_pipe_client
*cli
,
2146 TALLOC_CTX
*mem_ctx
)
2148 struct eventlog_ClearEventLogA r
;
2153 if (DEBUGLEVEL
>= 10) {
2154 NDR_PRINT_IN_DEBUG(eventlog_ClearEventLogA
, &r
);
2157 status
= cli
->dispatch(cli
,
2159 &ndr_table_eventlog
,
2160 NDR_EVENTLOG_CLEAREVENTLOGA
,
2163 if (!NT_STATUS_IS_OK(status
)) {
2167 if (DEBUGLEVEL
>= 10) {
2168 NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogA
, &r
);
2171 if (NT_STATUS_IS_ERR(status
)) {
2175 /* Return variables */
2178 return r
.out
.result
;
2181 struct rpccli_eventlog_BackupEventLogA_state
{
2182 struct eventlog_BackupEventLogA orig
;
2183 struct eventlog_BackupEventLogA tmp
;
2184 TALLOC_CTX
*out_mem_ctx
;
2185 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2188 static void rpccli_eventlog_BackupEventLogA_done(struct tevent_req
*subreq
);
2190 struct tevent_req
*rpccli_eventlog_BackupEventLogA_send(TALLOC_CTX
*mem_ctx
,
2191 struct tevent_context
*ev
,
2192 struct rpc_pipe_client
*cli
)
2194 struct tevent_req
*req
;
2195 struct rpccli_eventlog_BackupEventLogA_state
*state
;
2196 struct tevent_req
*subreq
;
2198 req
= tevent_req_create(mem_ctx
, &state
,
2199 struct rpccli_eventlog_BackupEventLogA_state
);
2203 state
->out_mem_ctx
= NULL
;
2204 state
->dispatch_recv
= cli
->dispatch_recv
;
2208 /* Out parameters */
2211 ZERO_STRUCT(state
->orig
.out
.result
);
2213 if (DEBUGLEVEL
>= 10) {
2214 NDR_PRINT_IN_DEBUG(eventlog_BackupEventLogA
, &state
->orig
);
2217 /* make a temporary copy, that we pass to the dispatch function */
2218 state
->tmp
= state
->orig
;
2220 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2221 &ndr_table_eventlog
,
2222 NDR_EVENTLOG_BACKUPEVENTLOGA
,
2224 if (tevent_req_nomem(subreq
, req
)) {
2225 return tevent_req_post(req
, ev
);
2227 tevent_req_set_callback(subreq
, rpccli_eventlog_BackupEventLogA_done
, req
);
2231 static void rpccli_eventlog_BackupEventLogA_done(struct tevent_req
*subreq
)
2233 struct tevent_req
*req
= tevent_req_callback_data(
2234 subreq
, struct tevent_req
);
2235 struct rpccli_eventlog_BackupEventLogA_state
*state
= tevent_req_data(
2236 req
, struct rpccli_eventlog_BackupEventLogA_state
);
2238 TALLOC_CTX
*mem_ctx
;
2240 if (state
->out_mem_ctx
) {
2241 mem_ctx
= state
->out_mem_ctx
;
2246 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2247 TALLOC_FREE(subreq
);
2248 if (!NT_STATUS_IS_OK(status
)) {
2249 tevent_req_nterror(req
, status
);
2253 /* Copy out parameters */
2256 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2258 /* Reset temporary structure */
2259 ZERO_STRUCT(state
->tmp
);
2261 if (DEBUGLEVEL
>= 10) {
2262 NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogA
, &state
->orig
);
2265 tevent_req_done(req
);
2268 NTSTATUS
rpccli_eventlog_BackupEventLogA_recv(struct tevent_req
*req
,
2269 TALLOC_CTX
*mem_ctx
,
2272 struct rpccli_eventlog_BackupEventLogA_state
*state
= tevent_req_data(
2273 req
, struct rpccli_eventlog_BackupEventLogA_state
);
2276 if (tevent_req_is_nterror(req
, &status
)) {
2277 tevent_req_received(req
);
2281 /* Steal possbile out parameters to the callers context */
2282 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2285 *result
= state
->orig
.out
.result
;
2287 tevent_req_received(req
);
2288 return NT_STATUS_OK
;
2291 NTSTATUS
rpccli_eventlog_BackupEventLogA(struct rpc_pipe_client
*cli
,
2292 TALLOC_CTX
*mem_ctx
)
2294 struct eventlog_BackupEventLogA r
;
2299 if (DEBUGLEVEL
>= 10) {
2300 NDR_PRINT_IN_DEBUG(eventlog_BackupEventLogA
, &r
);
2303 status
= cli
->dispatch(cli
,
2305 &ndr_table_eventlog
,
2306 NDR_EVENTLOG_BACKUPEVENTLOGA
,
2309 if (!NT_STATUS_IS_OK(status
)) {
2313 if (DEBUGLEVEL
>= 10) {
2314 NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogA
, &r
);
2317 if (NT_STATUS_IS_ERR(status
)) {
2321 /* Return variables */
2324 return r
.out
.result
;
2327 struct rpccli_eventlog_OpenEventLogA_state
{
2328 struct eventlog_OpenEventLogA orig
;
2329 struct eventlog_OpenEventLogA tmp
;
2330 TALLOC_CTX
*out_mem_ctx
;
2331 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2334 static void rpccli_eventlog_OpenEventLogA_done(struct tevent_req
*subreq
);
2336 struct tevent_req
*rpccli_eventlog_OpenEventLogA_send(TALLOC_CTX
*mem_ctx
,
2337 struct tevent_context
*ev
,
2338 struct rpc_pipe_client
*cli
)
2340 struct tevent_req
*req
;
2341 struct rpccli_eventlog_OpenEventLogA_state
*state
;
2342 struct tevent_req
*subreq
;
2344 req
= tevent_req_create(mem_ctx
, &state
,
2345 struct rpccli_eventlog_OpenEventLogA_state
);
2349 state
->out_mem_ctx
= NULL
;
2350 state
->dispatch_recv
= cli
->dispatch_recv
;
2354 /* Out parameters */
2357 ZERO_STRUCT(state
->orig
.out
.result
);
2359 if (DEBUGLEVEL
>= 10) {
2360 NDR_PRINT_IN_DEBUG(eventlog_OpenEventLogA
, &state
->orig
);
2363 /* make a temporary copy, that we pass to the dispatch function */
2364 state
->tmp
= state
->orig
;
2366 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2367 &ndr_table_eventlog
,
2368 NDR_EVENTLOG_OPENEVENTLOGA
,
2370 if (tevent_req_nomem(subreq
, req
)) {
2371 return tevent_req_post(req
, ev
);
2373 tevent_req_set_callback(subreq
, rpccli_eventlog_OpenEventLogA_done
, req
);
2377 static void rpccli_eventlog_OpenEventLogA_done(struct tevent_req
*subreq
)
2379 struct tevent_req
*req
= tevent_req_callback_data(
2380 subreq
, struct tevent_req
);
2381 struct rpccli_eventlog_OpenEventLogA_state
*state
= tevent_req_data(
2382 req
, struct rpccli_eventlog_OpenEventLogA_state
);
2384 TALLOC_CTX
*mem_ctx
;
2386 if (state
->out_mem_ctx
) {
2387 mem_ctx
= state
->out_mem_ctx
;
2392 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2393 TALLOC_FREE(subreq
);
2394 if (!NT_STATUS_IS_OK(status
)) {
2395 tevent_req_nterror(req
, status
);
2399 /* Copy out parameters */
2402 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2404 /* Reset temporary structure */
2405 ZERO_STRUCT(state
->tmp
);
2407 if (DEBUGLEVEL
>= 10) {
2408 NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogA
, &state
->orig
);
2411 tevent_req_done(req
);
2414 NTSTATUS
rpccli_eventlog_OpenEventLogA_recv(struct tevent_req
*req
,
2415 TALLOC_CTX
*mem_ctx
,
2418 struct rpccli_eventlog_OpenEventLogA_state
*state
= tevent_req_data(
2419 req
, struct rpccli_eventlog_OpenEventLogA_state
);
2422 if (tevent_req_is_nterror(req
, &status
)) {
2423 tevent_req_received(req
);
2427 /* Steal possbile out parameters to the callers context */
2428 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2431 *result
= state
->orig
.out
.result
;
2433 tevent_req_received(req
);
2434 return NT_STATUS_OK
;
2437 NTSTATUS
rpccli_eventlog_OpenEventLogA(struct rpc_pipe_client
*cli
,
2438 TALLOC_CTX
*mem_ctx
)
2440 struct eventlog_OpenEventLogA r
;
2445 if (DEBUGLEVEL
>= 10) {
2446 NDR_PRINT_IN_DEBUG(eventlog_OpenEventLogA
, &r
);
2449 status
= cli
->dispatch(cli
,
2451 &ndr_table_eventlog
,
2452 NDR_EVENTLOG_OPENEVENTLOGA
,
2455 if (!NT_STATUS_IS_OK(status
)) {
2459 if (DEBUGLEVEL
>= 10) {
2460 NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogA
, &r
);
2463 if (NT_STATUS_IS_ERR(status
)) {
2467 /* Return variables */
2470 return r
.out
.result
;
2473 struct rpccli_eventlog_RegisterEventSourceA_state
{
2474 struct eventlog_RegisterEventSourceA orig
;
2475 struct eventlog_RegisterEventSourceA tmp
;
2476 TALLOC_CTX
*out_mem_ctx
;
2477 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2480 static void rpccli_eventlog_RegisterEventSourceA_done(struct tevent_req
*subreq
);
2482 struct tevent_req
*rpccli_eventlog_RegisterEventSourceA_send(TALLOC_CTX
*mem_ctx
,
2483 struct tevent_context
*ev
,
2484 struct rpc_pipe_client
*cli
)
2486 struct tevent_req
*req
;
2487 struct rpccli_eventlog_RegisterEventSourceA_state
*state
;
2488 struct tevent_req
*subreq
;
2490 req
= tevent_req_create(mem_ctx
, &state
,
2491 struct rpccli_eventlog_RegisterEventSourceA_state
);
2495 state
->out_mem_ctx
= NULL
;
2496 state
->dispatch_recv
= cli
->dispatch_recv
;
2500 /* Out parameters */
2503 ZERO_STRUCT(state
->orig
.out
.result
);
2505 if (DEBUGLEVEL
>= 10) {
2506 NDR_PRINT_IN_DEBUG(eventlog_RegisterEventSourceA
, &state
->orig
);
2509 /* make a temporary copy, that we pass to the dispatch function */
2510 state
->tmp
= state
->orig
;
2512 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2513 &ndr_table_eventlog
,
2514 NDR_EVENTLOG_REGISTEREVENTSOURCEA
,
2516 if (tevent_req_nomem(subreq
, req
)) {
2517 return tevent_req_post(req
, ev
);
2519 tevent_req_set_callback(subreq
, rpccli_eventlog_RegisterEventSourceA_done
, req
);
2523 static void rpccli_eventlog_RegisterEventSourceA_done(struct tevent_req
*subreq
)
2525 struct tevent_req
*req
= tevent_req_callback_data(
2526 subreq
, struct tevent_req
);
2527 struct rpccli_eventlog_RegisterEventSourceA_state
*state
= tevent_req_data(
2528 req
, struct rpccli_eventlog_RegisterEventSourceA_state
);
2530 TALLOC_CTX
*mem_ctx
;
2532 if (state
->out_mem_ctx
) {
2533 mem_ctx
= state
->out_mem_ctx
;
2538 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2539 TALLOC_FREE(subreq
);
2540 if (!NT_STATUS_IS_OK(status
)) {
2541 tevent_req_nterror(req
, status
);
2545 /* Copy out parameters */
2548 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2550 /* Reset temporary structure */
2551 ZERO_STRUCT(state
->tmp
);
2553 if (DEBUGLEVEL
>= 10) {
2554 NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceA
, &state
->orig
);
2557 tevent_req_done(req
);
2560 NTSTATUS
rpccli_eventlog_RegisterEventSourceA_recv(struct tevent_req
*req
,
2561 TALLOC_CTX
*mem_ctx
,
2564 struct rpccli_eventlog_RegisterEventSourceA_state
*state
= tevent_req_data(
2565 req
, struct rpccli_eventlog_RegisterEventSourceA_state
);
2568 if (tevent_req_is_nterror(req
, &status
)) {
2569 tevent_req_received(req
);
2573 /* Steal possbile out parameters to the callers context */
2574 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2577 *result
= state
->orig
.out
.result
;
2579 tevent_req_received(req
);
2580 return NT_STATUS_OK
;
2583 NTSTATUS
rpccli_eventlog_RegisterEventSourceA(struct rpc_pipe_client
*cli
,
2584 TALLOC_CTX
*mem_ctx
)
2586 struct eventlog_RegisterEventSourceA r
;
2591 if (DEBUGLEVEL
>= 10) {
2592 NDR_PRINT_IN_DEBUG(eventlog_RegisterEventSourceA
, &r
);
2595 status
= cli
->dispatch(cli
,
2597 &ndr_table_eventlog
,
2598 NDR_EVENTLOG_REGISTEREVENTSOURCEA
,
2601 if (!NT_STATUS_IS_OK(status
)) {
2605 if (DEBUGLEVEL
>= 10) {
2606 NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceA
, &r
);
2609 if (NT_STATUS_IS_ERR(status
)) {
2613 /* Return variables */
2616 return r
.out
.result
;
2619 struct rpccli_eventlog_OpenBackupEventLogA_state
{
2620 struct eventlog_OpenBackupEventLogA orig
;
2621 struct eventlog_OpenBackupEventLogA tmp
;
2622 TALLOC_CTX
*out_mem_ctx
;
2623 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2626 static void rpccli_eventlog_OpenBackupEventLogA_done(struct tevent_req
*subreq
);
2628 struct tevent_req
*rpccli_eventlog_OpenBackupEventLogA_send(TALLOC_CTX
*mem_ctx
,
2629 struct tevent_context
*ev
,
2630 struct rpc_pipe_client
*cli
)
2632 struct tevent_req
*req
;
2633 struct rpccli_eventlog_OpenBackupEventLogA_state
*state
;
2634 struct tevent_req
*subreq
;
2636 req
= tevent_req_create(mem_ctx
, &state
,
2637 struct rpccli_eventlog_OpenBackupEventLogA_state
);
2641 state
->out_mem_ctx
= NULL
;
2642 state
->dispatch_recv
= cli
->dispatch_recv
;
2646 /* Out parameters */
2649 ZERO_STRUCT(state
->orig
.out
.result
);
2651 if (DEBUGLEVEL
>= 10) {
2652 NDR_PRINT_IN_DEBUG(eventlog_OpenBackupEventLogA
, &state
->orig
);
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_OPENBACKUPEVENTLOGA
,
2662 if (tevent_req_nomem(subreq
, req
)) {
2663 return tevent_req_post(req
, ev
);
2665 tevent_req_set_callback(subreq
, rpccli_eventlog_OpenBackupEventLogA_done
, req
);
2669 static void rpccli_eventlog_OpenBackupEventLogA_done(struct tevent_req
*subreq
)
2671 struct tevent_req
*req
= tevent_req_callback_data(
2672 subreq
, struct tevent_req
);
2673 struct rpccli_eventlog_OpenBackupEventLogA_state
*state
= tevent_req_data(
2674 req
, struct rpccli_eventlog_OpenBackupEventLogA_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 if (DEBUGLEVEL
>= 10) {
2700 NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogA
, &state
->orig
);
2703 tevent_req_done(req
);
2706 NTSTATUS
rpccli_eventlog_OpenBackupEventLogA_recv(struct tevent_req
*req
,
2707 TALLOC_CTX
*mem_ctx
,
2710 struct rpccli_eventlog_OpenBackupEventLogA_state
*state
= tevent_req_data(
2711 req
, struct rpccli_eventlog_OpenBackupEventLogA_state
);
2714 if (tevent_req_is_nterror(req
, &status
)) {
2715 tevent_req_received(req
);
2719 /* Steal possbile out parameters to the callers context */
2720 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2723 *result
= state
->orig
.out
.result
;
2725 tevent_req_received(req
);
2726 return NT_STATUS_OK
;
2729 NTSTATUS
rpccli_eventlog_OpenBackupEventLogA(struct rpc_pipe_client
*cli
,
2730 TALLOC_CTX
*mem_ctx
)
2732 struct eventlog_OpenBackupEventLogA r
;
2737 if (DEBUGLEVEL
>= 10) {
2738 NDR_PRINT_IN_DEBUG(eventlog_OpenBackupEventLogA
, &r
);
2741 status
= cli
->dispatch(cli
,
2743 &ndr_table_eventlog
,
2744 NDR_EVENTLOG_OPENBACKUPEVENTLOGA
,
2747 if (!NT_STATUS_IS_OK(status
)) {
2751 if (DEBUGLEVEL
>= 10) {
2752 NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogA
, &r
);
2755 if (NT_STATUS_IS_ERR(status
)) {
2759 /* Return variables */
2762 return r
.out
.result
;
2765 struct rpccli_eventlog_ReadEventLogA_state
{
2766 struct eventlog_ReadEventLogA orig
;
2767 struct eventlog_ReadEventLogA tmp
;
2768 TALLOC_CTX
*out_mem_ctx
;
2769 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2772 static void rpccli_eventlog_ReadEventLogA_done(struct tevent_req
*subreq
);
2774 struct tevent_req
*rpccli_eventlog_ReadEventLogA_send(TALLOC_CTX
*mem_ctx
,
2775 struct tevent_context
*ev
,
2776 struct rpc_pipe_client
*cli
)
2778 struct tevent_req
*req
;
2779 struct rpccli_eventlog_ReadEventLogA_state
*state
;
2780 struct tevent_req
*subreq
;
2782 req
= tevent_req_create(mem_ctx
, &state
,
2783 struct rpccli_eventlog_ReadEventLogA_state
);
2787 state
->out_mem_ctx
= NULL
;
2788 state
->dispatch_recv
= cli
->dispatch_recv
;
2792 /* Out parameters */
2795 ZERO_STRUCT(state
->orig
.out
.result
);
2797 if (DEBUGLEVEL
>= 10) {
2798 NDR_PRINT_IN_DEBUG(eventlog_ReadEventLogA
, &state
->orig
);
2801 /* make a temporary copy, that we pass to the dispatch function */
2802 state
->tmp
= state
->orig
;
2804 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2805 &ndr_table_eventlog
,
2806 NDR_EVENTLOG_READEVENTLOGA
,
2808 if (tevent_req_nomem(subreq
, req
)) {
2809 return tevent_req_post(req
, ev
);
2811 tevent_req_set_callback(subreq
, rpccli_eventlog_ReadEventLogA_done
, req
);
2815 static void rpccli_eventlog_ReadEventLogA_done(struct tevent_req
*subreq
)
2817 struct tevent_req
*req
= tevent_req_callback_data(
2818 subreq
, struct tevent_req
);
2819 struct rpccli_eventlog_ReadEventLogA_state
*state
= tevent_req_data(
2820 req
, struct rpccli_eventlog_ReadEventLogA_state
);
2822 TALLOC_CTX
*mem_ctx
;
2824 if (state
->out_mem_ctx
) {
2825 mem_ctx
= state
->out_mem_ctx
;
2830 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2831 TALLOC_FREE(subreq
);
2832 if (!NT_STATUS_IS_OK(status
)) {
2833 tevent_req_nterror(req
, status
);
2837 /* Copy out parameters */
2840 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2842 /* Reset temporary structure */
2843 ZERO_STRUCT(state
->tmp
);
2845 if (DEBUGLEVEL
>= 10) {
2846 NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogA
, &state
->orig
);
2849 tevent_req_done(req
);
2852 NTSTATUS
rpccli_eventlog_ReadEventLogA_recv(struct tevent_req
*req
,
2853 TALLOC_CTX
*mem_ctx
,
2856 struct rpccli_eventlog_ReadEventLogA_state
*state
= tevent_req_data(
2857 req
, struct rpccli_eventlog_ReadEventLogA_state
);
2860 if (tevent_req_is_nterror(req
, &status
)) {
2861 tevent_req_received(req
);
2865 /* Steal possbile out parameters to the callers context */
2866 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2869 *result
= state
->orig
.out
.result
;
2871 tevent_req_received(req
);
2872 return NT_STATUS_OK
;
2875 NTSTATUS
rpccli_eventlog_ReadEventLogA(struct rpc_pipe_client
*cli
,
2876 TALLOC_CTX
*mem_ctx
)
2878 struct eventlog_ReadEventLogA r
;
2883 if (DEBUGLEVEL
>= 10) {
2884 NDR_PRINT_IN_DEBUG(eventlog_ReadEventLogA
, &r
);
2887 status
= cli
->dispatch(cli
,
2889 &ndr_table_eventlog
,
2890 NDR_EVENTLOG_READEVENTLOGA
,
2893 if (!NT_STATUS_IS_OK(status
)) {
2897 if (DEBUGLEVEL
>= 10) {
2898 NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogA
, &r
);
2901 if (NT_STATUS_IS_ERR(status
)) {
2905 /* Return variables */
2908 return r
.out
.result
;
2911 struct rpccli_eventlog_ReportEventA_state
{
2912 struct eventlog_ReportEventA orig
;
2913 struct eventlog_ReportEventA tmp
;
2914 TALLOC_CTX
*out_mem_ctx
;
2915 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2918 static void rpccli_eventlog_ReportEventA_done(struct tevent_req
*subreq
);
2920 struct tevent_req
*rpccli_eventlog_ReportEventA_send(TALLOC_CTX
*mem_ctx
,
2921 struct tevent_context
*ev
,
2922 struct rpc_pipe_client
*cli
)
2924 struct tevent_req
*req
;
2925 struct rpccli_eventlog_ReportEventA_state
*state
;
2926 struct tevent_req
*subreq
;
2928 req
= tevent_req_create(mem_ctx
, &state
,
2929 struct rpccli_eventlog_ReportEventA_state
);
2933 state
->out_mem_ctx
= NULL
;
2934 state
->dispatch_recv
= cli
->dispatch_recv
;
2938 /* Out parameters */
2941 ZERO_STRUCT(state
->orig
.out
.result
);
2943 if (DEBUGLEVEL
>= 10) {
2944 NDR_PRINT_IN_DEBUG(eventlog_ReportEventA
, &state
->orig
);
2947 /* make a temporary copy, that we pass to the dispatch function */
2948 state
->tmp
= state
->orig
;
2950 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2951 &ndr_table_eventlog
,
2952 NDR_EVENTLOG_REPORTEVENTA
,
2954 if (tevent_req_nomem(subreq
, req
)) {
2955 return tevent_req_post(req
, ev
);
2957 tevent_req_set_callback(subreq
, rpccli_eventlog_ReportEventA_done
, req
);
2961 static void rpccli_eventlog_ReportEventA_done(struct tevent_req
*subreq
)
2963 struct tevent_req
*req
= tevent_req_callback_data(
2964 subreq
, struct tevent_req
);
2965 struct rpccli_eventlog_ReportEventA_state
*state
= tevent_req_data(
2966 req
, struct rpccli_eventlog_ReportEventA_state
);
2968 TALLOC_CTX
*mem_ctx
;
2970 if (state
->out_mem_ctx
) {
2971 mem_ctx
= state
->out_mem_ctx
;
2976 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2977 TALLOC_FREE(subreq
);
2978 if (!NT_STATUS_IS_OK(status
)) {
2979 tevent_req_nterror(req
, status
);
2983 /* Copy out parameters */
2986 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2988 /* Reset temporary structure */
2989 ZERO_STRUCT(state
->tmp
);
2991 if (DEBUGLEVEL
>= 10) {
2992 NDR_PRINT_OUT_DEBUG(eventlog_ReportEventA
, &state
->orig
);
2995 tevent_req_done(req
);
2998 NTSTATUS
rpccli_eventlog_ReportEventA_recv(struct tevent_req
*req
,
2999 TALLOC_CTX
*mem_ctx
,
3002 struct rpccli_eventlog_ReportEventA_state
*state
= tevent_req_data(
3003 req
, struct rpccli_eventlog_ReportEventA_state
);
3006 if (tevent_req_is_nterror(req
, &status
)) {
3007 tevent_req_received(req
);
3011 /* Steal possbile out parameters to the callers context */
3012 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3015 *result
= state
->orig
.out
.result
;
3017 tevent_req_received(req
);
3018 return NT_STATUS_OK
;
3021 NTSTATUS
rpccli_eventlog_ReportEventA(struct rpc_pipe_client
*cli
,
3022 TALLOC_CTX
*mem_ctx
)
3024 struct eventlog_ReportEventA r
;
3029 if (DEBUGLEVEL
>= 10) {
3030 NDR_PRINT_IN_DEBUG(eventlog_ReportEventA
, &r
);
3033 status
= cli
->dispatch(cli
,
3035 &ndr_table_eventlog
,
3036 NDR_EVENTLOG_REPORTEVENTA
,
3039 if (!NT_STATUS_IS_OK(status
)) {
3043 if (DEBUGLEVEL
>= 10) {
3044 NDR_PRINT_OUT_DEBUG(eventlog_ReportEventA
, &r
);
3047 if (NT_STATUS_IS_ERR(status
)) {
3051 /* Return variables */
3054 return r
.out
.result
;
3057 struct rpccli_eventlog_RegisterClusterSvc_state
{
3058 struct eventlog_RegisterClusterSvc orig
;
3059 struct eventlog_RegisterClusterSvc tmp
;
3060 TALLOC_CTX
*out_mem_ctx
;
3061 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3064 static void rpccli_eventlog_RegisterClusterSvc_done(struct tevent_req
*subreq
);
3066 struct tevent_req
*rpccli_eventlog_RegisterClusterSvc_send(TALLOC_CTX
*mem_ctx
,
3067 struct tevent_context
*ev
,
3068 struct rpc_pipe_client
*cli
)
3070 struct tevent_req
*req
;
3071 struct rpccli_eventlog_RegisterClusterSvc_state
*state
;
3072 struct tevent_req
*subreq
;
3074 req
= tevent_req_create(mem_ctx
, &state
,
3075 struct rpccli_eventlog_RegisterClusterSvc_state
);
3079 state
->out_mem_ctx
= NULL
;
3080 state
->dispatch_recv
= cli
->dispatch_recv
;
3084 /* Out parameters */
3087 ZERO_STRUCT(state
->orig
.out
.result
);
3089 if (DEBUGLEVEL
>= 10) {
3090 NDR_PRINT_IN_DEBUG(eventlog_RegisterClusterSvc
, &state
->orig
);
3093 /* make a temporary copy, that we pass to the dispatch function */
3094 state
->tmp
= state
->orig
;
3096 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3097 &ndr_table_eventlog
,
3098 NDR_EVENTLOG_REGISTERCLUSTERSVC
,
3100 if (tevent_req_nomem(subreq
, req
)) {
3101 return tevent_req_post(req
, ev
);
3103 tevent_req_set_callback(subreq
, rpccli_eventlog_RegisterClusterSvc_done
, req
);
3107 static void rpccli_eventlog_RegisterClusterSvc_done(struct tevent_req
*subreq
)
3109 struct tevent_req
*req
= tevent_req_callback_data(
3110 subreq
, struct tevent_req
);
3111 struct rpccli_eventlog_RegisterClusterSvc_state
*state
= tevent_req_data(
3112 req
, struct rpccli_eventlog_RegisterClusterSvc_state
);
3114 TALLOC_CTX
*mem_ctx
;
3116 if (state
->out_mem_ctx
) {
3117 mem_ctx
= state
->out_mem_ctx
;
3122 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3123 TALLOC_FREE(subreq
);
3124 if (!NT_STATUS_IS_OK(status
)) {
3125 tevent_req_nterror(req
, status
);
3129 /* Copy out parameters */
3132 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3134 /* Reset temporary structure */
3135 ZERO_STRUCT(state
->tmp
);
3137 if (DEBUGLEVEL
>= 10) {
3138 NDR_PRINT_OUT_DEBUG(eventlog_RegisterClusterSvc
, &state
->orig
);
3141 tevent_req_done(req
);
3144 NTSTATUS
rpccli_eventlog_RegisterClusterSvc_recv(struct tevent_req
*req
,
3145 TALLOC_CTX
*mem_ctx
,
3148 struct rpccli_eventlog_RegisterClusterSvc_state
*state
= tevent_req_data(
3149 req
, struct rpccli_eventlog_RegisterClusterSvc_state
);
3152 if (tevent_req_is_nterror(req
, &status
)) {
3153 tevent_req_received(req
);
3157 /* Steal possbile out parameters to the callers context */
3158 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3161 *result
= state
->orig
.out
.result
;
3163 tevent_req_received(req
);
3164 return NT_STATUS_OK
;
3167 NTSTATUS
rpccli_eventlog_RegisterClusterSvc(struct rpc_pipe_client
*cli
,
3168 TALLOC_CTX
*mem_ctx
)
3170 struct eventlog_RegisterClusterSvc r
;
3175 if (DEBUGLEVEL
>= 10) {
3176 NDR_PRINT_IN_DEBUG(eventlog_RegisterClusterSvc
, &r
);
3179 status
= cli
->dispatch(cli
,
3181 &ndr_table_eventlog
,
3182 NDR_EVENTLOG_REGISTERCLUSTERSVC
,
3185 if (!NT_STATUS_IS_OK(status
)) {
3189 if (DEBUGLEVEL
>= 10) {
3190 NDR_PRINT_OUT_DEBUG(eventlog_RegisterClusterSvc
, &r
);
3193 if (NT_STATUS_IS_ERR(status
)) {
3197 /* Return variables */
3200 return r
.out
.result
;
3203 struct rpccli_eventlog_DeregisterClusterSvc_state
{
3204 struct eventlog_DeregisterClusterSvc orig
;
3205 struct eventlog_DeregisterClusterSvc tmp
;
3206 TALLOC_CTX
*out_mem_ctx
;
3207 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3210 static void rpccli_eventlog_DeregisterClusterSvc_done(struct tevent_req
*subreq
);
3212 struct tevent_req
*rpccli_eventlog_DeregisterClusterSvc_send(TALLOC_CTX
*mem_ctx
,
3213 struct tevent_context
*ev
,
3214 struct rpc_pipe_client
*cli
)
3216 struct tevent_req
*req
;
3217 struct rpccli_eventlog_DeregisterClusterSvc_state
*state
;
3218 struct tevent_req
*subreq
;
3220 req
= tevent_req_create(mem_ctx
, &state
,
3221 struct rpccli_eventlog_DeregisterClusterSvc_state
);
3225 state
->out_mem_ctx
= NULL
;
3226 state
->dispatch_recv
= cli
->dispatch_recv
;
3230 /* Out parameters */
3233 ZERO_STRUCT(state
->orig
.out
.result
);
3235 if (DEBUGLEVEL
>= 10) {
3236 NDR_PRINT_IN_DEBUG(eventlog_DeregisterClusterSvc
, &state
->orig
);
3239 /* make a temporary copy, that we pass to the dispatch function */
3240 state
->tmp
= state
->orig
;
3242 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3243 &ndr_table_eventlog
,
3244 NDR_EVENTLOG_DEREGISTERCLUSTERSVC
,
3246 if (tevent_req_nomem(subreq
, req
)) {
3247 return tevent_req_post(req
, ev
);
3249 tevent_req_set_callback(subreq
, rpccli_eventlog_DeregisterClusterSvc_done
, req
);
3253 static void rpccli_eventlog_DeregisterClusterSvc_done(struct tevent_req
*subreq
)
3255 struct tevent_req
*req
= tevent_req_callback_data(
3256 subreq
, struct tevent_req
);
3257 struct rpccli_eventlog_DeregisterClusterSvc_state
*state
= tevent_req_data(
3258 req
, struct rpccli_eventlog_DeregisterClusterSvc_state
);
3260 TALLOC_CTX
*mem_ctx
;
3262 if (state
->out_mem_ctx
) {
3263 mem_ctx
= state
->out_mem_ctx
;
3268 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3269 TALLOC_FREE(subreq
);
3270 if (!NT_STATUS_IS_OK(status
)) {
3271 tevent_req_nterror(req
, status
);
3275 /* Copy out parameters */
3278 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3280 /* Reset temporary structure */
3281 ZERO_STRUCT(state
->tmp
);
3283 if (DEBUGLEVEL
>= 10) {
3284 NDR_PRINT_OUT_DEBUG(eventlog_DeregisterClusterSvc
, &state
->orig
);
3287 tevent_req_done(req
);
3290 NTSTATUS
rpccli_eventlog_DeregisterClusterSvc_recv(struct tevent_req
*req
,
3291 TALLOC_CTX
*mem_ctx
,
3294 struct rpccli_eventlog_DeregisterClusterSvc_state
*state
= tevent_req_data(
3295 req
, struct rpccli_eventlog_DeregisterClusterSvc_state
);
3298 if (tevent_req_is_nterror(req
, &status
)) {
3299 tevent_req_received(req
);
3303 /* Steal possbile out parameters to the callers context */
3304 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3307 *result
= state
->orig
.out
.result
;
3309 tevent_req_received(req
);
3310 return NT_STATUS_OK
;
3313 NTSTATUS
rpccli_eventlog_DeregisterClusterSvc(struct rpc_pipe_client
*cli
,
3314 TALLOC_CTX
*mem_ctx
)
3316 struct eventlog_DeregisterClusterSvc r
;
3321 if (DEBUGLEVEL
>= 10) {
3322 NDR_PRINT_IN_DEBUG(eventlog_DeregisterClusterSvc
, &r
);
3325 status
= cli
->dispatch(cli
,
3327 &ndr_table_eventlog
,
3328 NDR_EVENTLOG_DEREGISTERCLUSTERSVC
,
3331 if (!NT_STATUS_IS_OK(status
)) {
3335 if (DEBUGLEVEL
>= 10) {
3336 NDR_PRINT_OUT_DEBUG(eventlog_DeregisterClusterSvc
, &r
);
3339 if (NT_STATUS_IS_ERR(status
)) {
3343 /* Return variables */
3346 return r
.out
.result
;
3349 struct rpccli_eventlog_WriteClusterEvents_state
{
3350 struct eventlog_WriteClusterEvents orig
;
3351 struct eventlog_WriteClusterEvents tmp
;
3352 TALLOC_CTX
*out_mem_ctx
;
3353 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3356 static void rpccli_eventlog_WriteClusterEvents_done(struct tevent_req
*subreq
);
3358 struct tevent_req
*rpccli_eventlog_WriteClusterEvents_send(TALLOC_CTX
*mem_ctx
,
3359 struct tevent_context
*ev
,
3360 struct rpc_pipe_client
*cli
)
3362 struct tevent_req
*req
;
3363 struct rpccli_eventlog_WriteClusterEvents_state
*state
;
3364 struct tevent_req
*subreq
;
3366 req
= tevent_req_create(mem_ctx
, &state
,
3367 struct rpccli_eventlog_WriteClusterEvents_state
);
3371 state
->out_mem_ctx
= NULL
;
3372 state
->dispatch_recv
= cli
->dispatch_recv
;
3376 /* Out parameters */
3379 ZERO_STRUCT(state
->orig
.out
.result
);
3381 if (DEBUGLEVEL
>= 10) {
3382 NDR_PRINT_IN_DEBUG(eventlog_WriteClusterEvents
, &state
->orig
);
3385 /* make a temporary copy, that we pass to the dispatch function */
3386 state
->tmp
= state
->orig
;
3388 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3389 &ndr_table_eventlog
,
3390 NDR_EVENTLOG_WRITECLUSTEREVENTS
,
3392 if (tevent_req_nomem(subreq
, req
)) {
3393 return tevent_req_post(req
, ev
);
3395 tevent_req_set_callback(subreq
, rpccli_eventlog_WriteClusterEvents_done
, req
);
3399 static void rpccli_eventlog_WriteClusterEvents_done(struct tevent_req
*subreq
)
3401 struct tevent_req
*req
= tevent_req_callback_data(
3402 subreq
, struct tevent_req
);
3403 struct rpccli_eventlog_WriteClusterEvents_state
*state
= tevent_req_data(
3404 req
, struct rpccli_eventlog_WriteClusterEvents_state
);
3406 TALLOC_CTX
*mem_ctx
;
3408 if (state
->out_mem_ctx
) {
3409 mem_ctx
= state
->out_mem_ctx
;
3414 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3415 TALLOC_FREE(subreq
);
3416 if (!NT_STATUS_IS_OK(status
)) {
3417 tevent_req_nterror(req
, status
);
3421 /* Copy out parameters */
3424 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3426 /* Reset temporary structure */
3427 ZERO_STRUCT(state
->tmp
);
3429 if (DEBUGLEVEL
>= 10) {
3430 NDR_PRINT_OUT_DEBUG(eventlog_WriteClusterEvents
, &state
->orig
);
3433 tevent_req_done(req
);
3436 NTSTATUS
rpccli_eventlog_WriteClusterEvents_recv(struct tevent_req
*req
,
3437 TALLOC_CTX
*mem_ctx
,
3440 struct rpccli_eventlog_WriteClusterEvents_state
*state
= tevent_req_data(
3441 req
, struct rpccli_eventlog_WriteClusterEvents_state
);
3444 if (tevent_req_is_nterror(req
, &status
)) {
3445 tevent_req_received(req
);
3449 /* Steal possbile out parameters to the callers context */
3450 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3453 *result
= state
->orig
.out
.result
;
3455 tevent_req_received(req
);
3456 return NT_STATUS_OK
;
3459 NTSTATUS
rpccli_eventlog_WriteClusterEvents(struct rpc_pipe_client
*cli
,
3460 TALLOC_CTX
*mem_ctx
)
3462 struct eventlog_WriteClusterEvents r
;
3467 if (DEBUGLEVEL
>= 10) {
3468 NDR_PRINT_IN_DEBUG(eventlog_WriteClusterEvents
, &r
);
3471 status
= cli
->dispatch(cli
,
3473 &ndr_table_eventlog
,
3474 NDR_EVENTLOG_WRITECLUSTEREVENTS
,
3477 if (!NT_STATUS_IS_OK(status
)) {
3481 if (DEBUGLEVEL
>= 10) {
3482 NDR_PRINT_OUT_DEBUG(eventlog_WriteClusterEvents
, &r
);
3485 if (NT_STATUS_IS_ERR(status
)) {
3489 /* Return variables */
3492 return r
.out
.result
;
3495 struct rpccli_eventlog_GetLogInformation_state
{
3496 struct eventlog_GetLogInformation orig
;
3497 struct eventlog_GetLogInformation tmp
;
3498 TALLOC_CTX
*out_mem_ctx
;
3499 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3502 static void rpccli_eventlog_GetLogInformation_done(struct tevent_req
*subreq
);
3504 struct tevent_req
*rpccli_eventlog_GetLogInformation_send(TALLOC_CTX
*mem_ctx
,
3505 struct tevent_context
*ev
,
3506 struct rpc_pipe_client
*cli
,
3507 struct policy_handle
*_handle
/* [in] [ref] */,
3508 uint32_t _level
/* [in] */,
3509 uint8_t *_buffer
/* [out] [ref,size_is(buf_size)] */,
3510 uint32_t _buf_size
/* [in] [range(0,1024)] */,
3511 uint32_t *_bytes_needed
/* [out] [ref] */)
3513 struct tevent_req
*req
;
3514 struct rpccli_eventlog_GetLogInformation_state
*state
;
3515 struct tevent_req
*subreq
;
3517 req
= tevent_req_create(mem_ctx
, &state
,
3518 struct rpccli_eventlog_GetLogInformation_state
);
3522 state
->out_mem_ctx
= NULL
;
3523 state
->dispatch_recv
= cli
->dispatch_recv
;
3526 state
->orig
.in
.handle
= _handle
;
3527 state
->orig
.in
.level
= _level
;
3528 state
->orig
.in
.buf_size
= _buf_size
;
3530 /* Out parameters */
3531 state
->orig
.out
.buffer
= _buffer
;
3532 state
->orig
.out
.bytes_needed
= _bytes_needed
;
3535 ZERO_STRUCT(state
->orig
.out
.result
);
3537 if (DEBUGLEVEL
>= 10) {
3538 NDR_PRINT_IN_DEBUG(eventlog_GetLogInformation
, &state
->orig
);
3541 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3542 "rpccli_eventlog_GetLogInformation_out_memory");
3543 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3544 return tevent_req_post(req
, ev
);
3547 /* make a temporary copy, that we pass to the dispatch function */
3548 state
->tmp
= state
->orig
;
3550 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3551 &ndr_table_eventlog
,
3552 NDR_EVENTLOG_GETLOGINFORMATION
,
3554 if (tevent_req_nomem(subreq
, req
)) {
3555 return tevent_req_post(req
, ev
);
3557 tevent_req_set_callback(subreq
, rpccli_eventlog_GetLogInformation_done
, req
);
3561 static void rpccli_eventlog_GetLogInformation_done(struct tevent_req
*subreq
)
3563 struct tevent_req
*req
= tevent_req_callback_data(
3564 subreq
, struct tevent_req
);
3565 struct rpccli_eventlog_GetLogInformation_state
*state
= tevent_req_data(
3566 req
, struct rpccli_eventlog_GetLogInformation_state
);
3568 TALLOC_CTX
*mem_ctx
;
3570 if (state
->out_mem_ctx
) {
3571 mem_ctx
= state
->out_mem_ctx
;
3576 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3577 TALLOC_FREE(subreq
);
3578 if (!NT_STATUS_IS_OK(status
)) {
3579 tevent_req_nterror(req
, status
);
3583 /* Copy out parameters */
3584 memcpy(state
->orig
.out
.buffer
, state
->tmp
.out
.buffer
, state
->tmp
.in
.buf_size
* sizeof(*state
->orig
.out
.buffer
));
3585 *state
->orig
.out
.bytes_needed
= *state
->tmp
.out
.bytes_needed
;
3588 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3590 /* Reset temporary structure */
3591 ZERO_STRUCT(state
->tmp
);
3593 if (DEBUGLEVEL
>= 10) {
3594 NDR_PRINT_OUT_DEBUG(eventlog_GetLogInformation
, &state
->orig
);
3597 tevent_req_done(req
);
3600 NTSTATUS
rpccli_eventlog_GetLogInformation_recv(struct tevent_req
*req
,
3601 TALLOC_CTX
*mem_ctx
,
3604 struct rpccli_eventlog_GetLogInformation_state
*state
= tevent_req_data(
3605 req
, struct rpccli_eventlog_GetLogInformation_state
);
3608 if (tevent_req_is_nterror(req
, &status
)) {
3609 tevent_req_received(req
);
3613 /* Steal possbile out parameters to the callers context */
3614 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3617 *result
= state
->orig
.out
.result
;
3619 tevent_req_received(req
);
3620 return NT_STATUS_OK
;
3623 NTSTATUS
rpccli_eventlog_GetLogInformation(struct rpc_pipe_client
*cli
,
3624 TALLOC_CTX
*mem_ctx
,
3625 struct policy_handle
*handle
/* [in] [ref] */,
3626 uint32_t level
/* [in] */,
3627 uint8_t *buffer
/* [out] [ref,size_is(buf_size)] */,
3628 uint32_t buf_size
/* [in] [range(0,1024)] */,
3629 uint32_t *bytes_needed
/* [out] [ref] */)
3631 struct eventlog_GetLogInformation r
;
3635 r
.in
.handle
= handle
;
3637 r
.in
.buf_size
= buf_size
;
3639 if (DEBUGLEVEL
>= 10) {
3640 NDR_PRINT_IN_DEBUG(eventlog_GetLogInformation
, &r
);
3643 status
= cli
->dispatch(cli
,
3645 &ndr_table_eventlog
,
3646 NDR_EVENTLOG_GETLOGINFORMATION
,
3649 if (!NT_STATUS_IS_OK(status
)) {
3653 if (DEBUGLEVEL
>= 10) {
3654 NDR_PRINT_OUT_DEBUG(eventlog_GetLogInformation
, &r
);
3657 if (NT_STATUS_IS_ERR(status
)) {
3661 /* Return variables */
3662 memcpy(buffer
, r
.out
.buffer
, r
.in
.buf_size
* sizeof(*buffer
));
3663 *bytes_needed
= *r
.out
.bytes_needed
;
3666 return r
.out
.result
;
3669 struct rpccli_eventlog_FlushEventLog_state
{
3670 struct eventlog_FlushEventLog orig
;
3671 struct eventlog_FlushEventLog tmp
;
3672 TALLOC_CTX
*out_mem_ctx
;
3673 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3676 static void rpccli_eventlog_FlushEventLog_done(struct tevent_req
*subreq
);
3678 struct tevent_req
*rpccli_eventlog_FlushEventLog_send(TALLOC_CTX
*mem_ctx
,
3679 struct tevent_context
*ev
,
3680 struct rpc_pipe_client
*cli
,
3681 struct policy_handle
*_handle
/* [in] [ref] */)
3683 struct tevent_req
*req
;
3684 struct rpccli_eventlog_FlushEventLog_state
*state
;
3685 struct tevent_req
*subreq
;
3687 req
= tevent_req_create(mem_ctx
, &state
,
3688 struct rpccli_eventlog_FlushEventLog_state
);
3692 state
->out_mem_ctx
= NULL
;
3693 state
->dispatch_recv
= cli
->dispatch_recv
;
3696 state
->orig
.in
.handle
= _handle
;
3698 /* Out parameters */
3701 ZERO_STRUCT(state
->orig
.out
.result
);
3703 if (DEBUGLEVEL
>= 10) {
3704 NDR_PRINT_IN_DEBUG(eventlog_FlushEventLog
, &state
->orig
);
3707 /* make a temporary copy, that we pass to the dispatch function */
3708 state
->tmp
= state
->orig
;
3710 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3711 &ndr_table_eventlog
,
3712 NDR_EVENTLOG_FLUSHEVENTLOG
,
3714 if (tevent_req_nomem(subreq
, req
)) {
3715 return tevent_req_post(req
, ev
);
3717 tevent_req_set_callback(subreq
, rpccli_eventlog_FlushEventLog_done
, req
);
3721 static void rpccli_eventlog_FlushEventLog_done(struct tevent_req
*subreq
)
3723 struct tevent_req
*req
= tevent_req_callback_data(
3724 subreq
, struct tevent_req
);
3725 struct rpccli_eventlog_FlushEventLog_state
*state
= tevent_req_data(
3726 req
, struct rpccli_eventlog_FlushEventLog_state
);
3728 TALLOC_CTX
*mem_ctx
;
3730 if (state
->out_mem_ctx
) {
3731 mem_ctx
= state
->out_mem_ctx
;
3736 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3737 TALLOC_FREE(subreq
);
3738 if (!NT_STATUS_IS_OK(status
)) {
3739 tevent_req_nterror(req
, status
);
3743 /* Copy out parameters */
3746 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3748 /* Reset temporary structure */
3749 ZERO_STRUCT(state
->tmp
);
3751 if (DEBUGLEVEL
>= 10) {
3752 NDR_PRINT_OUT_DEBUG(eventlog_FlushEventLog
, &state
->orig
);
3755 tevent_req_done(req
);
3758 NTSTATUS
rpccli_eventlog_FlushEventLog_recv(struct tevent_req
*req
,
3759 TALLOC_CTX
*mem_ctx
,
3762 struct rpccli_eventlog_FlushEventLog_state
*state
= tevent_req_data(
3763 req
, struct rpccli_eventlog_FlushEventLog_state
);
3766 if (tevent_req_is_nterror(req
, &status
)) {
3767 tevent_req_received(req
);
3771 /* Steal possbile out parameters to the callers context */
3772 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3775 *result
= state
->orig
.out
.result
;
3777 tevent_req_received(req
);
3778 return NT_STATUS_OK
;
3781 NTSTATUS
rpccli_eventlog_FlushEventLog(struct rpc_pipe_client
*cli
,
3782 TALLOC_CTX
*mem_ctx
,
3783 struct policy_handle
*handle
/* [in] [ref] */)
3785 struct eventlog_FlushEventLog r
;
3789 r
.in
.handle
= handle
;
3791 if (DEBUGLEVEL
>= 10) {
3792 NDR_PRINT_IN_DEBUG(eventlog_FlushEventLog
, &r
);
3795 status
= cli
->dispatch(cli
,
3797 &ndr_table_eventlog
,
3798 NDR_EVENTLOG_FLUSHEVENTLOG
,
3801 if (!NT_STATUS_IS_OK(status
)) {
3805 if (DEBUGLEVEL
>= 10) {
3806 NDR_PRINT_OUT_DEBUG(eventlog_FlushEventLog
, &r
);
3809 if (NT_STATUS_IS_ERR(status
)) {
3813 /* Return variables */
3816 return r
.out
.result
;
3819 struct rpccli_eventlog_ReportEventAndSourceW_state
{
3820 struct eventlog_ReportEventAndSourceW orig
;
3821 struct eventlog_ReportEventAndSourceW tmp
;
3822 TALLOC_CTX
*out_mem_ctx
;
3823 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3826 static void rpccli_eventlog_ReportEventAndSourceW_done(struct tevent_req
*subreq
);
3828 struct tevent_req
*rpccli_eventlog_ReportEventAndSourceW_send(TALLOC_CTX
*mem_ctx
,
3829 struct tevent_context
*ev
,
3830 struct rpc_pipe_client
*cli
,
3831 struct policy_handle
*_handle
/* [in] [ref] */,
3832 time_t _timestamp
/* [in] */,
3833 enum eventlogEventTypes _event_type
/* [in] */,
3834 uint16_t _event_category
/* [in] */,
3835 uint32_t _event_id
/* [in] */,
3836 struct lsa_String
*_sourcename
/* [in] [ref] */,
3837 uint16_t _num_of_strings
/* [in] [range(0,256)] */,
3838 uint32_t _data_size
/* [in] [range(0,0x3FFFF)] */,
3839 struct lsa_String
*_servername
/* [in] [ref] */,
3840 struct dom_sid
*_user_sid
/* [in] [unique] */,
3841 struct lsa_String
**_strings
/* [in] [unique,size_is(num_of_strings)] */,
3842 uint8_t *_data
/* [in] [unique,size_is(data_size)] */,
3843 uint16_t _flags
/* [in] */,
3844 uint32_t *_record_number
/* [in,out] [unique] */,
3845 time_t *_time_written
/* [in,out] [unique] */)
3847 struct tevent_req
*req
;
3848 struct rpccli_eventlog_ReportEventAndSourceW_state
*state
;
3849 struct tevent_req
*subreq
;
3851 req
= tevent_req_create(mem_ctx
, &state
,
3852 struct rpccli_eventlog_ReportEventAndSourceW_state
);
3856 state
->out_mem_ctx
= NULL
;
3857 state
->dispatch_recv
= cli
->dispatch_recv
;
3860 state
->orig
.in
.handle
= _handle
;
3861 state
->orig
.in
.timestamp
= _timestamp
;
3862 state
->orig
.in
.event_type
= _event_type
;
3863 state
->orig
.in
.event_category
= _event_category
;
3864 state
->orig
.in
.event_id
= _event_id
;
3865 state
->orig
.in
.sourcename
= _sourcename
;
3866 state
->orig
.in
.num_of_strings
= _num_of_strings
;
3867 state
->orig
.in
.data_size
= _data_size
;
3868 state
->orig
.in
.servername
= _servername
;
3869 state
->orig
.in
.user_sid
= _user_sid
;
3870 state
->orig
.in
.strings
= _strings
;
3871 state
->orig
.in
.data
= _data
;
3872 state
->orig
.in
.flags
= _flags
;
3873 state
->orig
.in
.record_number
= _record_number
;
3874 state
->orig
.in
.time_written
= _time_written
;
3876 /* Out parameters */
3877 state
->orig
.out
.record_number
= _record_number
;
3878 state
->orig
.out
.time_written
= _time_written
;
3881 ZERO_STRUCT(state
->orig
.out
.result
);
3883 if (DEBUGLEVEL
>= 10) {
3884 NDR_PRINT_IN_DEBUG(eventlog_ReportEventAndSourceW
, &state
->orig
);
3887 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3888 "rpccli_eventlog_ReportEventAndSourceW_out_memory");
3889 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3890 return tevent_req_post(req
, ev
);
3893 /* make a temporary copy, that we pass to the dispatch function */
3894 state
->tmp
= state
->orig
;
3896 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3897 &ndr_table_eventlog
,
3898 NDR_EVENTLOG_REPORTEVENTANDSOURCEW
,
3900 if (tevent_req_nomem(subreq
, req
)) {
3901 return tevent_req_post(req
, ev
);
3903 tevent_req_set_callback(subreq
, rpccli_eventlog_ReportEventAndSourceW_done
, req
);
3907 static void rpccli_eventlog_ReportEventAndSourceW_done(struct tevent_req
*subreq
)
3909 struct tevent_req
*req
= tevent_req_callback_data(
3910 subreq
, struct tevent_req
);
3911 struct rpccli_eventlog_ReportEventAndSourceW_state
*state
= tevent_req_data(
3912 req
, struct rpccli_eventlog_ReportEventAndSourceW_state
);
3914 TALLOC_CTX
*mem_ctx
;
3916 if (state
->out_mem_ctx
) {
3917 mem_ctx
= state
->out_mem_ctx
;
3922 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3923 TALLOC_FREE(subreq
);
3924 if (!NT_STATUS_IS_OK(status
)) {
3925 tevent_req_nterror(req
, status
);
3929 /* Copy out parameters */
3930 if (state
->orig
.out
.record_number
&& state
->tmp
.out
.record_number
) {
3931 *state
->orig
.out
.record_number
= *state
->tmp
.out
.record_number
;
3933 if (state
->orig
.out
.time_written
&& state
->tmp
.out
.time_written
) {
3934 *state
->orig
.out
.time_written
= *state
->tmp
.out
.time_written
;
3938 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3940 /* Reset temporary structure */
3941 ZERO_STRUCT(state
->tmp
);
3943 if (DEBUGLEVEL
>= 10) {
3944 NDR_PRINT_OUT_DEBUG(eventlog_ReportEventAndSourceW
, &state
->orig
);
3947 tevent_req_done(req
);
3950 NTSTATUS
rpccli_eventlog_ReportEventAndSourceW_recv(struct tevent_req
*req
,
3951 TALLOC_CTX
*mem_ctx
,
3954 struct rpccli_eventlog_ReportEventAndSourceW_state
*state
= tevent_req_data(
3955 req
, struct rpccli_eventlog_ReportEventAndSourceW_state
);
3958 if (tevent_req_is_nterror(req
, &status
)) {
3959 tevent_req_received(req
);
3963 /* Steal possbile out parameters to the callers context */
3964 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3967 *result
= state
->orig
.out
.result
;
3969 tevent_req_received(req
);
3970 return NT_STATUS_OK
;
3973 NTSTATUS
rpccli_eventlog_ReportEventAndSourceW(struct rpc_pipe_client
*cli
,
3974 TALLOC_CTX
*mem_ctx
,
3975 struct policy_handle
*handle
/* [in] [ref] */,
3976 time_t timestamp
/* [in] */,
3977 enum eventlogEventTypes event_type
/* [in] */,
3978 uint16_t event_category
/* [in] */,
3979 uint32_t event_id
/* [in] */,
3980 struct lsa_String
*sourcename
/* [in] [ref] */,
3981 uint16_t num_of_strings
/* [in] [range(0,256)] */,
3982 uint32_t data_size
/* [in] [range(0,0x3FFFF)] */,
3983 struct lsa_String
*servername
/* [in] [ref] */,
3984 struct dom_sid
*user_sid
/* [in] [unique] */,
3985 struct lsa_String
**strings
/* [in] [unique,size_is(num_of_strings)] */,
3986 uint8_t *data
/* [in] [unique,size_is(data_size)] */,
3987 uint16_t flags
/* [in] */,
3988 uint32_t *record_number
/* [in,out] [unique] */,
3989 time_t *time_written
/* [in,out] [unique] */)
3991 struct eventlog_ReportEventAndSourceW r
;
3995 r
.in
.handle
= handle
;
3996 r
.in
.timestamp
= timestamp
;
3997 r
.in
.event_type
= event_type
;
3998 r
.in
.event_category
= event_category
;
3999 r
.in
.event_id
= event_id
;
4000 r
.in
.sourcename
= sourcename
;
4001 r
.in
.num_of_strings
= num_of_strings
;
4002 r
.in
.data_size
= data_size
;
4003 r
.in
.servername
= servername
;
4004 r
.in
.user_sid
= user_sid
;
4005 r
.in
.strings
= strings
;
4008 r
.in
.record_number
= record_number
;
4009 r
.in
.time_written
= time_written
;
4011 if (DEBUGLEVEL
>= 10) {
4012 NDR_PRINT_IN_DEBUG(eventlog_ReportEventAndSourceW
, &r
);
4015 status
= cli
->dispatch(cli
,
4017 &ndr_table_eventlog
,
4018 NDR_EVENTLOG_REPORTEVENTANDSOURCEW
,
4021 if (!NT_STATUS_IS_OK(status
)) {
4025 if (DEBUGLEVEL
>= 10) {
4026 NDR_PRINT_OUT_DEBUG(eventlog_ReportEventAndSourceW
, &r
);
4029 if (NT_STATUS_IS_ERR(status
)) {
4033 /* Return variables */
4034 if (record_number
&& r
.out
.record_number
) {
4035 *record_number
= *r
.out
.record_number
;
4037 if (time_written
&& r
.out
.time_written
) {
4038 *time_written
= *r
.out
.time_written
;
4042 return r
.out
.result
;