s3: Do not reference ndr_table_<pipe> in the cli_ routines directly
[ira/wip.git] / librpc / gen_ndr / cli_eventlog.c
1 /*
2  * Unix SMB/CIFS implementation.
3  * client auto-generated by pidl. DO NOT MODIFY!
4  */
5
6 #include "includes.h"
7 #include "../librpc/gen_ndr/cli_eventlog.h"
8
9 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);
14 };
15
16 static void rpccli_eventlog_ClearEventLogW_done(struct tevent_req *subreq);
17
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] */)
23 {
24         struct tevent_req *req;
25         struct rpccli_eventlog_ClearEventLogW_state *state;
26         struct tevent_req *subreq;
27
28         req = tevent_req_create(mem_ctx, &state,
29                                 struct rpccli_eventlog_ClearEventLogW_state);
30         if (req == NULL) {
31                 return NULL;
32         }
33         state->out_mem_ctx = NULL;
34         state->dispatch_recv = cli->dispatch_recv;
35
36         /* In parameters */
37         state->orig.in.handle = _handle;
38         state->orig.in.backupfile = _backupfile;
39
40         /* Out parameters */
41
42         /* Result */
43         ZERO_STRUCT(state->orig.out.result);
44
45         /* make a temporary copy, that we pass to the dispatch function */
46         state->tmp = state->orig;
47
48         subreq = cli->dispatch_send(state, ev, cli,
49                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
50                                     NDR_EVENTLOG_CLEAREVENTLOGW,
51                                     &state->tmp);
52         if (tevent_req_nomem(subreq, req)) {
53                 return tevent_req_post(req, ev);
54         }
55         tevent_req_set_callback(subreq, rpccli_eventlog_ClearEventLogW_done, req);
56         return req;
57 }
58
59 static void rpccli_eventlog_ClearEventLogW_done(struct tevent_req *subreq)
60 {
61         struct tevent_req *req = tevent_req_callback_data(
62                 subreq, struct tevent_req);
63         struct rpccli_eventlog_ClearEventLogW_state *state = tevent_req_data(
64                 req, struct rpccli_eventlog_ClearEventLogW_state);
65         NTSTATUS status;
66         TALLOC_CTX *mem_ctx;
67
68         if (state->out_mem_ctx) {
69                 mem_ctx = state->out_mem_ctx;
70         } else {
71                 mem_ctx = state;
72         }
73
74         status = state->dispatch_recv(subreq, mem_ctx);
75         TALLOC_FREE(subreq);
76         if (!NT_STATUS_IS_OK(status)) {
77                 tevent_req_nterror(req, status);
78                 return;
79         }
80
81         /* Copy out parameters */
82
83         /* Copy result */
84         state->orig.out.result = state->tmp.out.result;
85
86         /* Reset temporary structure */
87         ZERO_STRUCT(state->tmp);
88
89         tevent_req_done(req);
90 }
91
92 NTSTATUS rpccli_eventlog_ClearEventLogW_recv(struct tevent_req *req,
93                                              TALLOC_CTX *mem_ctx,
94                                              NTSTATUS *result)
95 {
96         struct rpccli_eventlog_ClearEventLogW_state *state = tevent_req_data(
97                 req, struct rpccli_eventlog_ClearEventLogW_state);
98         NTSTATUS status;
99
100         if (tevent_req_is_nterror(req, &status)) {
101                 tevent_req_received(req);
102                 return status;
103         }
104
105         /* Steal possbile out parameters to the callers context */
106         talloc_steal(mem_ctx, state->out_mem_ctx);
107
108         /* Return result */
109         *result = state->orig.out.result;
110
111         tevent_req_received(req);
112         return NT_STATUS_OK;
113 }
114
115 NTSTATUS rpccli_eventlog_ClearEventLogW(struct rpc_pipe_client *cli,
116                                         TALLOC_CTX *mem_ctx,
117                                         struct policy_handle *handle /* [in] [ref] */,
118                                         struct lsa_String *backupfile /* [in] [unique] */)
119 {
120         struct eventlog_ClearEventLogW r;
121         NTSTATUS status;
122
123         /* In parameters */
124         r.in.handle = handle;
125         r.in.backupfile = backupfile;
126
127         status = cli->dispatch(cli,
128                                 mem_ctx,
129                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
130                                 NDR_EVENTLOG_CLEAREVENTLOGW,
131                                 &r);
132
133         if (!NT_STATUS_IS_OK(status)) {
134                 return status;
135         }
136
137         if (NT_STATUS_IS_ERR(status)) {
138                 return status;
139         }
140
141         /* Return variables */
142
143         /* Return result */
144         return r.out.result;
145 }
146
147 struct rpccli_eventlog_BackupEventLogW_state {
148         struct eventlog_BackupEventLogW orig;
149         struct eventlog_BackupEventLogW tmp;
150         TALLOC_CTX *out_mem_ctx;
151         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
152 };
153
154 static void rpccli_eventlog_BackupEventLogW_done(struct tevent_req *subreq);
155
156 struct tevent_req *rpccli_eventlog_BackupEventLogW_send(TALLOC_CTX *mem_ctx,
157                                                         struct tevent_context *ev,
158                                                         struct rpc_pipe_client *cli,
159                                                         struct policy_handle *_handle /* [in] [ref] */,
160                                                         struct lsa_String *_backup_filename /* [in] [ref] */)
161 {
162         struct tevent_req *req;
163         struct rpccli_eventlog_BackupEventLogW_state *state;
164         struct tevent_req *subreq;
165
166         req = tevent_req_create(mem_ctx, &state,
167                                 struct rpccli_eventlog_BackupEventLogW_state);
168         if (req == NULL) {
169                 return NULL;
170         }
171         state->out_mem_ctx = NULL;
172         state->dispatch_recv = cli->dispatch_recv;
173
174         /* In parameters */
175         state->orig.in.handle = _handle;
176         state->orig.in.backup_filename = _backup_filename;
177
178         /* Out parameters */
179
180         /* Result */
181         ZERO_STRUCT(state->orig.out.result);
182
183         /* make a temporary copy, that we pass to the dispatch function */
184         state->tmp = state->orig;
185
186         subreq = cli->dispatch_send(state, ev, cli,
187                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
188                                     NDR_EVENTLOG_BACKUPEVENTLOGW,
189                                     &state->tmp);
190         if (tevent_req_nomem(subreq, req)) {
191                 return tevent_req_post(req, ev);
192         }
193         tevent_req_set_callback(subreq, rpccli_eventlog_BackupEventLogW_done, req);
194         return req;
195 }
196
197 static void rpccli_eventlog_BackupEventLogW_done(struct tevent_req *subreq)
198 {
199         struct tevent_req *req = tevent_req_callback_data(
200                 subreq, struct tevent_req);
201         struct rpccli_eventlog_BackupEventLogW_state *state = tevent_req_data(
202                 req, struct rpccli_eventlog_BackupEventLogW_state);
203         NTSTATUS status;
204         TALLOC_CTX *mem_ctx;
205
206         if (state->out_mem_ctx) {
207                 mem_ctx = state->out_mem_ctx;
208         } else {
209                 mem_ctx = state;
210         }
211
212         status = state->dispatch_recv(subreq, mem_ctx);
213         TALLOC_FREE(subreq);
214         if (!NT_STATUS_IS_OK(status)) {
215                 tevent_req_nterror(req, status);
216                 return;
217         }
218
219         /* Copy out parameters */
220
221         /* Copy result */
222         state->orig.out.result = state->tmp.out.result;
223
224         /* Reset temporary structure */
225         ZERO_STRUCT(state->tmp);
226
227         tevent_req_done(req);
228 }
229
230 NTSTATUS rpccli_eventlog_BackupEventLogW_recv(struct tevent_req *req,
231                                               TALLOC_CTX *mem_ctx,
232                                               NTSTATUS *result)
233 {
234         struct rpccli_eventlog_BackupEventLogW_state *state = tevent_req_data(
235                 req, struct rpccli_eventlog_BackupEventLogW_state);
236         NTSTATUS status;
237
238         if (tevent_req_is_nterror(req, &status)) {
239                 tevent_req_received(req);
240                 return status;
241         }
242
243         /* Steal possbile out parameters to the callers context */
244         talloc_steal(mem_ctx, state->out_mem_ctx);
245
246         /* Return result */
247         *result = state->orig.out.result;
248
249         tevent_req_received(req);
250         return NT_STATUS_OK;
251 }
252
253 NTSTATUS rpccli_eventlog_BackupEventLogW(struct rpc_pipe_client *cli,
254                                          TALLOC_CTX *mem_ctx,
255                                          struct policy_handle *handle /* [in] [ref] */,
256                                          struct lsa_String *backup_filename /* [in] [ref] */)
257 {
258         struct eventlog_BackupEventLogW r;
259         NTSTATUS status;
260
261         /* In parameters */
262         r.in.handle = handle;
263         r.in.backup_filename = backup_filename;
264
265         status = cli->dispatch(cli,
266                                 mem_ctx,
267                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
268                                 NDR_EVENTLOG_BACKUPEVENTLOGW,
269                                 &r);
270
271         if (!NT_STATUS_IS_OK(status)) {
272                 return status;
273         }
274
275         if (NT_STATUS_IS_ERR(status)) {
276                 return status;
277         }
278
279         /* Return variables */
280
281         /* Return result */
282         return r.out.result;
283 }
284
285 struct rpccli_eventlog_CloseEventLog_state {
286         struct eventlog_CloseEventLog orig;
287         struct eventlog_CloseEventLog tmp;
288         TALLOC_CTX *out_mem_ctx;
289         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
290 };
291
292 static void rpccli_eventlog_CloseEventLog_done(struct tevent_req *subreq);
293
294 struct tevent_req *rpccli_eventlog_CloseEventLog_send(TALLOC_CTX *mem_ctx,
295                                                       struct tevent_context *ev,
296                                                       struct rpc_pipe_client *cli,
297                                                       struct policy_handle *_handle /* [in,out] [ref] */)
298 {
299         struct tevent_req *req;
300         struct rpccli_eventlog_CloseEventLog_state *state;
301         struct tevent_req *subreq;
302
303         req = tevent_req_create(mem_ctx, &state,
304                                 struct rpccli_eventlog_CloseEventLog_state);
305         if (req == NULL) {
306                 return NULL;
307         }
308         state->out_mem_ctx = NULL;
309         state->dispatch_recv = cli->dispatch_recv;
310
311         /* In parameters */
312         state->orig.in.handle = _handle;
313
314         /* Out parameters */
315         state->orig.out.handle = _handle;
316
317         /* Result */
318         ZERO_STRUCT(state->orig.out.result);
319
320         state->out_mem_ctx = talloc_named_const(state, 0,
321                              "rpccli_eventlog_CloseEventLog_out_memory");
322         if (tevent_req_nomem(state->out_mem_ctx, req)) {
323                 return tevent_req_post(req, ev);
324         }
325
326         /* make a temporary copy, that we pass to the dispatch function */
327         state->tmp = state->orig;
328
329         subreq = cli->dispatch_send(state, ev, cli,
330                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
331                                     NDR_EVENTLOG_CLOSEEVENTLOG,
332                                     &state->tmp);
333         if (tevent_req_nomem(subreq, req)) {
334                 return tevent_req_post(req, ev);
335         }
336         tevent_req_set_callback(subreq, rpccli_eventlog_CloseEventLog_done, req);
337         return req;
338 }
339
340 static void rpccli_eventlog_CloseEventLog_done(struct tevent_req *subreq)
341 {
342         struct tevent_req *req = tevent_req_callback_data(
343                 subreq, struct tevent_req);
344         struct rpccli_eventlog_CloseEventLog_state *state = tevent_req_data(
345                 req, struct rpccli_eventlog_CloseEventLog_state);
346         NTSTATUS status;
347         TALLOC_CTX *mem_ctx;
348
349         if (state->out_mem_ctx) {
350                 mem_ctx = state->out_mem_ctx;
351         } else {
352                 mem_ctx = state;
353         }
354
355         status = state->dispatch_recv(subreq, mem_ctx);
356         TALLOC_FREE(subreq);
357         if (!NT_STATUS_IS_OK(status)) {
358                 tevent_req_nterror(req, status);
359                 return;
360         }
361
362         /* Copy out parameters */
363         *state->orig.out.handle = *state->tmp.out.handle;
364
365         /* Copy result */
366         state->orig.out.result = state->tmp.out.result;
367
368         /* Reset temporary structure */
369         ZERO_STRUCT(state->tmp);
370
371         tevent_req_done(req);
372 }
373
374 NTSTATUS rpccli_eventlog_CloseEventLog_recv(struct tevent_req *req,
375                                             TALLOC_CTX *mem_ctx,
376                                             NTSTATUS *result)
377 {
378         struct rpccli_eventlog_CloseEventLog_state *state = tevent_req_data(
379                 req, struct rpccli_eventlog_CloseEventLog_state);
380         NTSTATUS status;
381
382         if (tevent_req_is_nterror(req, &status)) {
383                 tevent_req_received(req);
384                 return status;
385         }
386
387         /* Steal possbile out parameters to the callers context */
388         talloc_steal(mem_ctx, state->out_mem_ctx);
389
390         /* Return result */
391         *result = state->orig.out.result;
392
393         tevent_req_received(req);
394         return NT_STATUS_OK;
395 }
396
397 NTSTATUS rpccli_eventlog_CloseEventLog(struct rpc_pipe_client *cli,
398                                        TALLOC_CTX *mem_ctx,
399                                        struct policy_handle *handle /* [in,out] [ref] */)
400 {
401         struct eventlog_CloseEventLog r;
402         NTSTATUS status;
403
404         /* In parameters */
405         r.in.handle = handle;
406
407         status = cli->dispatch(cli,
408                                 mem_ctx,
409                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
410                                 NDR_EVENTLOG_CLOSEEVENTLOG,
411                                 &r);
412
413         if (!NT_STATUS_IS_OK(status)) {
414                 return status;
415         }
416
417         if (NT_STATUS_IS_ERR(status)) {
418                 return status;
419         }
420
421         /* Return variables */
422         *handle = *r.out.handle;
423
424         /* Return result */
425         return r.out.result;
426 }
427
428 struct rpccli_eventlog_DeregisterEventSource_state {
429         struct eventlog_DeregisterEventSource orig;
430         struct eventlog_DeregisterEventSource tmp;
431         TALLOC_CTX *out_mem_ctx;
432         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
433 };
434
435 static void rpccli_eventlog_DeregisterEventSource_done(struct tevent_req *subreq);
436
437 struct tevent_req *rpccli_eventlog_DeregisterEventSource_send(TALLOC_CTX *mem_ctx,
438                                                               struct tevent_context *ev,
439                                                               struct rpc_pipe_client *cli,
440                                                               struct policy_handle *_handle /* [in,out] [ref] */)
441 {
442         struct tevent_req *req;
443         struct rpccli_eventlog_DeregisterEventSource_state *state;
444         struct tevent_req *subreq;
445
446         req = tevent_req_create(mem_ctx, &state,
447                                 struct rpccli_eventlog_DeregisterEventSource_state);
448         if (req == NULL) {
449                 return NULL;
450         }
451         state->out_mem_ctx = NULL;
452         state->dispatch_recv = cli->dispatch_recv;
453
454         /* In parameters */
455         state->orig.in.handle = _handle;
456
457         /* Out parameters */
458         state->orig.out.handle = _handle;
459
460         /* Result */
461         ZERO_STRUCT(state->orig.out.result);
462
463         state->out_mem_ctx = talloc_named_const(state, 0,
464                              "rpccli_eventlog_DeregisterEventSource_out_memory");
465         if (tevent_req_nomem(state->out_mem_ctx, req)) {
466                 return tevent_req_post(req, ev);
467         }
468
469         /* make a temporary copy, that we pass to the dispatch function */
470         state->tmp = state->orig;
471
472         subreq = cli->dispatch_send(state, ev, cli,
473                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
474                                     NDR_EVENTLOG_DEREGISTEREVENTSOURCE,
475                                     &state->tmp);
476         if (tevent_req_nomem(subreq, req)) {
477                 return tevent_req_post(req, ev);
478         }
479         tevent_req_set_callback(subreq, rpccli_eventlog_DeregisterEventSource_done, req);
480         return req;
481 }
482
483 static void rpccli_eventlog_DeregisterEventSource_done(struct tevent_req *subreq)
484 {
485         struct tevent_req *req = tevent_req_callback_data(
486                 subreq, struct tevent_req);
487         struct rpccli_eventlog_DeregisterEventSource_state *state = tevent_req_data(
488                 req, struct rpccli_eventlog_DeregisterEventSource_state);
489         NTSTATUS status;
490         TALLOC_CTX *mem_ctx;
491
492         if (state->out_mem_ctx) {
493                 mem_ctx = state->out_mem_ctx;
494         } else {
495                 mem_ctx = state;
496         }
497
498         status = state->dispatch_recv(subreq, mem_ctx);
499         TALLOC_FREE(subreq);
500         if (!NT_STATUS_IS_OK(status)) {
501                 tevent_req_nterror(req, status);
502                 return;
503         }
504
505         /* Copy out parameters */
506         *state->orig.out.handle = *state->tmp.out.handle;
507
508         /* Copy result */
509         state->orig.out.result = state->tmp.out.result;
510
511         /* Reset temporary structure */
512         ZERO_STRUCT(state->tmp);
513
514         tevent_req_done(req);
515 }
516
517 NTSTATUS rpccli_eventlog_DeregisterEventSource_recv(struct tevent_req *req,
518                                                     TALLOC_CTX *mem_ctx,
519                                                     NTSTATUS *result)
520 {
521         struct rpccli_eventlog_DeregisterEventSource_state *state = tevent_req_data(
522                 req, struct rpccli_eventlog_DeregisterEventSource_state);
523         NTSTATUS status;
524
525         if (tevent_req_is_nterror(req, &status)) {
526                 tevent_req_received(req);
527                 return status;
528         }
529
530         /* Steal possbile out parameters to the callers context */
531         talloc_steal(mem_ctx, state->out_mem_ctx);
532
533         /* Return result */
534         *result = state->orig.out.result;
535
536         tevent_req_received(req);
537         return NT_STATUS_OK;
538 }
539
540 NTSTATUS rpccli_eventlog_DeregisterEventSource(struct rpc_pipe_client *cli,
541                                                TALLOC_CTX *mem_ctx,
542                                                struct policy_handle *handle /* [in,out] [ref] */)
543 {
544         struct eventlog_DeregisterEventSource r;
545         NTSTATUS status;
546
547         /* In parameters */
548         r.in.handle = handle;
549
550         status = cli->dispatch(cli,
551                                 mem_ctx,
552                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
553                                 NDR_EVENTLOG_DEREGISTEREVENTSOURCE,
554                                 &r);
555
556         if (!NT_STATUS_IS_OK(status)) {
557                 return status;
558         }
559
560         if (NT_STATUS_IS_ERR(status)) {
561                 return status;
562         }
563
564         /* Return variables */
565         *handle = *r.out.handle;
566
567         /* Return result */
568         return r.out.result;
569 }
570
571 struct rpccli_eventlog_GetNumRecords_state {
572         struct eventlog_GetNumRecords orig;
573         struct eventlog_GetNumRecords tmp;
574         TALLOC_CTX *out_mem_ctx;
575         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
576 };
577
578 static void rpccli_eventlog_GetNumRecords_done(struct tevent_req *subreq);
579
580 struct tevent_req *rpccli_eventlog_GetNumRecords_send(TALLOC_CTX *mem_ctx,
581                                                       struct tevent_context *ev,
582                                                       struct rpc_pipe_client *cli,
583                                                       struct policy_handle *_handle /* [in] [ref] */,
584                                                       uint32_t *_number /* [out] [ref] */)
585 {
586         struct tevent_req *req;
587         struct rpccli_eventlog_GetNumRecords_state *state;
588         struct tevent_req *subreq;
589
590         req = tevent_req_create(mem_ctx, &state,
591                                 struct rpccli_eventlog_GetNumRecords_state);
592         if (req == NULL) {
593                 return NULL;
594         }
595         state->out_mem_ctx = NULL;
596         state->dispatch_recv = cli->dispatch_recv;
597
598         /* In parameters */
599         state->orig.in.handle = _handle;
600
601         /* Out parameters */
602         state->orig.out.number = _number;
603
604         /* Result */
605         ZERO_STRUCT(state->orig.out.result);
606
607         state->out_mem_ctx = talloc_named_const(state, 0,
608                              "rpccli_eventlog_GetNumRecords_out_memory");
609         if (tevent_req_nomem(state->out_mem_ctx, req)) {
610                 return tevent_req_post(req, ev);
611         }
612
613         /* make a temporary copy, that we pass to the dispatch function */
614         state->tmp = state->orig;
615
616         subreq = cli->dispatch_send(state, ev, cli,
617                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
618                                     NDR_EVENTLOG_GETNUMRECORDS,
619                                     &state->tmp);
620         if (tevent_req_nomem(subreq, req)) {
621                 return tevent_req_post(req, ev);
622         }
623         tevent_req_set_callback(subreq, rpccli_eventlog_GetNumRecords_done, req);
624         return req;
625 }
626
627 static void rpccli_eventlog_GetNumRecords_done(struct tevent_req *subreq)
628 {
629         struct tevent_req *req = tevent_req_callback_data(
630                 subreq, struct tevent_req);
631         struct rpccli_eventlog_GetNumRecords_state *state = tevent_req_data(
632                 req, struct rpccli_eventlog_GetNumRecords_state);
633         NTSTATUS status;
634         TALLOC_CTX *mem_ctx;
635
636         if (state->out_mem_ctx) {
637                 mem_ctx = state->out_mem_ctx;
638         } else {
639                 mem_ctx = state;
640         }
641
642         status = state->dispatch_recv(subreq, mem_ctx);
643         TALLOC_FREE(subreq);
644         if (!NT_STATUS_IS_OK(status)) {
645                 tevent_req_nterror(req, status);
646                 return;
647         }
648
649         /* Copy out parameters */
650         *state->orig.out.number = *state->tmp.out.number;
651
652         /* Copy result */
653         state->orig.out.result = state->tmp.out.result;
654
655         /* Reset temporary structure */
656         ZERO_STRUCT(state->tmp);
657
658         tevent_req_done(req);
659 }
660
661 NTSTATUS rpccli_eventlog_GetNumRecords_recv(struct tevent_req *req,
662                                             TALLOC_CTX *mem_ctx,
663                                             NTSTATUS *result)
664 {
665         struct rpccli_eventlog_GetNumRecords_state *state = tevent_req_data(
666                 req, struct rpccli_eventlog_GetNumRecords_state);
667         NTSTATUS status;
668
669         if (tevent_req_is_nterror(req, &status)) {
670                 tevent_req_received(req);
671                 return status;
672         }
673
674         /* Steal possbile out parameters to the callers context */
675         talloc_steal(mem_ctx, state->out_mem_ctx);
676
677         /* Return result */
678         *result = state->orig.out.result;
679
680         tevent_req_received(req);
681         return NT_STATUS_OK;
682 }
683
684 NTSTATUS rpccli_eventlog_GetNumRecords(struct rpc_pipe_client *cli,
685                                        TALLOC_CTX *mem_ctx,
686                                        struct policy_handle *handle /* [in] [ref] */,
687                                        uint32_t *number /* [out] [ref] */)
688 {
689         struct eventlog_GetNumRecords r;
690         NTSTATUS status;
691
692         /* In parameters */
693         r.in.handle = handle;
694
695         status = cli->dispatch(cli,
696                                 mem_ctx,
697                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
698                                 NDR_EVENTLOG_GETNUMRECORDS,
699                                 &r);
700
701         if (!NT_STATUS_IS_OK(status)) {
702                 return status;
703         }
704
705         if (NT_STATUS_IS_ERR(status)) {
706                 return status;
707         }
708
709         /* Return variables */
710         *number = *r.out.number;
711
712         /* Return result */
713         return r.out.result;
714 }
715
716 struct rpccli_eventlog_GetOldestRecord_state {
717         struct eventlog_GetOldestRecord orig;
718         struct eventlog_GetOldestRecord tmp;
719         TALLOC_CTX *out_mem_ctx;
720         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
721 };
722
723 static void rpccli_eventlog_GetOldestRecord_done(struct tevent_req *subreq);
724
725 struct tevent_req *rpccli_eventlog_GetOldestRecord_send(TALLOC_CTX *mem_ctx,
726                                                         struct tevent_context *ev,
727                                                         struct rpc_pipe_client *cli,
728                                                         struct policy_handle *_handle /* [in] [ref] */,
729                                                         uint32_t *_oldest_entry /* [out] [ref] */)
730 {
731         struct tevent_req *req;
732         struct rpccli_eventlog_GetOldestRecord_state *state;
733         struct tevent_req *subreq;
734
735         req = tevent_req_create(mem_ctx, &state,
736                                 struct rpccli_eventlog_GetOldestRecord_state);
737         if (req == NULL) {
738                 return NULL;
739         }
740         state->out_mem_ctx = NULL;
741         state->dispatch_recv = cli->dispatch_recv;
742
743         /* In parameters */
744         state->orig.in.handle = _handle;
745
746         /* Out parameters */
747         state->orig.out.oldest_entry = _oldest_entry;
748
749         /* Result */
750         ZERO_STRUCT(state->orig.out.result);
751
752         state->out_mem_ctx = talloc_named_const(state, 0,
753                              "rpccli_eventlog_GetOldestRecord_out_memory");
754         if (tevent_req_nomem(state->out_mem_ctx, req)) {
755                 return tevent_req_post(req, ev);
756         }
757
758         /* make a temporary copy, that we pass to the dispatch function */
759         state->tmp = state->orig;
760
761         subreq = cli->dispatch_send(state, ev, cli,
762                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
763                                     NDR_EVENTLOG_GETOLDESTRECORD,
764                                     &state->tmp);
765         if (tevent_req_nomem(subreq, req)) {
766                 return tevent_req_post(req, ev);
767         }
768         tevent_req_set_callback(subreq, rpccli_eventlog_GetOldestRecord_done, req);
769         return req;
770 }
771
772 static void rpccli_eventlog_GetOldestRecord_done(struct tevent_req *subreq)
773 {
774         struct tevent_req *req = tevent_req_callback_data(
775                 subreq, struct tevent_req);
776         struct rpccli_eventlog_GetOldestRecord_state *state = tevent_req_data(
777                 req, struct rpccli_eventlog_GetOldestRecord_state);
778         NTSTATUS status;
779         TALLOC_CTX *mem_ctx;
780
781         if (state->out_mem_ctx) {
782                 mem_ctx = state->out_mem_ctx;
783         } else {
784                 mem_ctx = state;
785         }
786
787         status = state->dispatch_recv(subreq, mem_ctx);
788         TALLOC_FREE(subreq);
789         if (!NT_STATUS_IS_OK(status)) {
790                 tevent_req_nterror(req, status);
791                 return;
792         }
793
794         /* Copy out parameters */
795         *state->orig.out.oldest_entry = *state->tmp.out.oldest_entry;
796
797         /* Copy result */
798         state->orig.out.result = state->tmp.out.result;
799
800         /* Reset temporary structure */
801         ZERO_STRUCT(state->tmp);
802
803         tevent_req_done(req);
804 }
805
806 NTSTATUS rpccli_eventlog_GetOldestRecord_recv(struct tevent_req *req,
807                                               TALLOC_CTX *mem_ctx,
808                                               NTSTATUS *result)
809 {
810         struct rpccli_eventlog_GetOldestRecord_state *state = tevent_req_data(
811                 req, struct rpccli_eventlog_GetOldestRecord_state);
812         NTSTATUS status;
813
814         if (tevent_req_is_nterror(req, &status)) {
815                 tevent_req_received(req);
816                 return status;
817         }
818
819         /* Steal possbile out parameters to the callers context */
820         talloc_steal(mem_ctx, state->out_mem_ctx);
821
822         /* Return result */
823         *result = state->orig.out.result;
824
825         tevent_req_received(req);
826         return NT_STATUS_OK;
827 }
828
829 NTSTATUS rpccli_eventlog_GetOldestRecord(struct rpc_pipe_client *cli,
830                                          TALLOC_CTX *mem_ctx,
831                                          struct policy_handle *handle /* [in] [ref] */,
832                                          uint32_t *oldest_entry /* [out] [ref] */)
833 {
834         struct eventlog_GetOldestRecord r;
835         NTSTATUS status;
836
837         /* In parameters */
838         r.in.handle = handle;
839
840         status = cli->dispatch(cli,
841                                 mem_ctx,
842                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
843                                 NDR_EVENTLOG_GETOLDESTRECORD,
844                                 &r);
845
846         if (!NT_STATUS_IS_OK(status)) {
847                 return status;
848         }
849
850         if (NT_STATUS_IS_ERR(status)) {
851                 return status;
852         }
853
854         /* Return variables */
855         *oldest_entry = *r.out.oldest_entry;
856
857         /* Return result */
858         return r.out.result;
859 }
860
861 struct rpccli_eventlog_ChangeNotify_state {
862         struct eventlog_ChangeNotify orig;
863         struct eventlog_ChangeNotify tmp;
864         TALLOC_CTX *out_mem_ctx;
865         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
866 };
867
868 static void rpccli_eventlog_ChangeNotify_done(struct tevent_req *subreq);
869
870 struct tevent_req *rpccli_eventlog_ChangeNotify_send(TALLOC_CTX *mem_ctx,
871                                                      struct tevent_context *ev,
872                                                      struct rpc_pipe_client *cli)
873 {
874         struct tevent_req *req;
875         struct rpccli_eventlog_ChangeNotify_state *state;
876         struct tevent_req *subreq;
877
878         req = tevent_req_create(mem_ctx, &state,
879                                 struct rpccli_eventlog_ChangeNotify_state);
880         if (req == NULL) {
881                 return NULL;
882         }
883         state->out_mem_ctx = NULL;
884         state->dispatch_recv = cli->dispatch_recv;
885
886         /* In parameters */
887
888         /* Out parameters */
889
890         /* Result */
891         ZERO_STRUCT(state->orig.out.result);
892
893         /* make a temporary copy, that we pass to the dispatch function */
894         state->tmp = state->orig;
895
896         subreq = cli->dispatch_send(state, ev, cli,
897                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
898                                     NDR_EVENTLOG_CHANGENOTIFY,
899                                     &state->tmp);
900         if (tevent_req_nomem(subreq, req)) {
901                 return tevent_req_post(req, ev);
902         }
903         tevent_req_set_callback(subreq, rpccli_eventlog_ChangeNotify_done, req);
904         return req;
905 }
906
907 static void rpccli_eventlog_ChangeNotify_done(struct tevent_req *subreq)
908 {
909         struct tevent_req *req = tevent_req_callback_data(
910                 subreq, struct tevent_req);
911         struct rpccli_eventlog_ChangeNotify_state *state = tevent_req_data(
912                 req, struct rpccli_eventlog_ChangeNotify_state);
913         NTSTATUS status;
914         TALLOC_CTX *mem_ctx;
915
916         if (state->out_mem_ctx) {
917                 mem_ctx = state->out_mem_ctx;
918         } else {
919                 mem_ctx = state;
920         }
921
922         status = state->dispatch_recv(subreq, mem_ctx);
923         TALLOC_FREE(subreq);
924         if (!NT_STATUS_IS_OK(status)) {
925                 tevent_req_nterror(req, status);
926                 return;
927         }
928
929         /* Copy out parameters */
930
931         /* Copy result */
932         state->orig.out.result = state->tmp.out.result;
933
934         /* Reset temporary structure */
935         ZERO_STRUCT(state->tmp);
936
937         tevent_req_done(req);
938 }
939
940 NTSTATUS rpccli_eventlog_ChangeNotify_recv(struct tevent_req *req,
941                                            TALLOC_CTX *mem_ctx,
942                                            NTSTATUS *result)
943 {
944         struct rpccli_eventlog_ChangeNotify_state *state = tevent_req_data(
945                 req, struct rpccli_eventlog_ChangeNotify_state);
946         NTSTATUS status;
947
948         if (tevent_req_is_nterror(req, &status)) {
949                 tevent_req_received(req);
950                 return status;
951         }
952
953         /* Steal possbile out parameters to the callers context */
954         talloc_steal(mem_ctx, state->out_mem_ctx);
955
956         /* Return result */
957         *result = state->orig.out.result;
958
959         tevent_req_received(req);
960         return NT_STATUS_OK;
961 }
962
963 NTSTATUS rpccli_eventlog_ChangeNotify(struct rpc_pipe_client *cli,
964                                       TALLOC_CTX *mem_ctx)
965 {
966         struct eventlog_ChangeNotify r;
967         NTSTATUS status;
968
969         /* In parameters */
970
971         status = cli->dispatch(cli,
972                                 mem_ctx,
973                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
974                                 NDR_EVENTLOG_CHANGENOTIFY,
975                                 &r);
976
977         if (!NT_STATUS_IS_OK(status)) {
978                 return status;
979         }
980
981         if (NT_STATUS_IS_ERR(status)) {
982                 return status;
983         }
984
985         /* Return variables */
986
987         /* Return result */
988         return r.out.result;
989 }
990
991 struct rpccli_eventlog_OpenEventLogW_state {
992         struct eventlog_OpenEventLogW orig;
993         struct eventlog_OpenEventLogW tmp;
994         TALLOC_CTX *out_mem_ctx;
995         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
996 };
997
998 static void rpccli_eventlog_OpenEventLogW_done(struct tevent_req *subreq);
999
1000 struct tevent_req *rpccli_eventlog_OpenEventLogW_send(TALLOC_CTX *mem_ctx,
1001                                                       struct tevent_context *ev,
1002                                                       struct rpc_pipe_client *cli,
1003                                                       struct eventlog_OpenUnknown0 *_unknown0 /* [in] [unique] */,
1004                                                       struct lsa_String *_logname /* [in] [ref] */,
1005                                                       struct lsa_String *_servername /* [in] [ref] */,
1006                                                       uint32_t _major_version /* [in]  */,
1007                                                       uint32_t _minor_version /* [in]  */,
1008                                                       struct policy_handle *_handle /* [out] [ref] */)
1009 {
1010         struct tevent_req *req;
1011         struct rpccli_eventlog_OpenEventLogW_state *state;
1012         struct tevent_req *subreq;
1013
1014         req = tevent_req_create(mem_ctx, &state,
1015                                 struct rpccli_eventlog_OpenEventLogW_state);
1016         if (req == NULL) {
1017                 return NULL;
1018         }
1019         state->out_mem_ctx = NULL;
1020         state->dispatch_recv = cli->dispatch_recv;
1021
1022         /* In parameters */
1023         state->orig.in.unknown0 = _unknown0;
1024         state->orig.in.logname = _logname;
1025         state->orig.in.servername = _servername;
1026         state->orig.in.major_version = _major_version;
1027         state->orig.in.minor_version = _minor_version;
1028
1029         /* Out parameters */
1030         state->orig.out.handle = _handle;
1031
1032         /* Result */
1033         ZERO_STRUCT(state->orig.out.result);
1034
1035         state->out_mem_ctx = talloc_named_const(state, 0,
1036                              "rpccli_eventlog_OpenEventLogW_out_memory");
1037         if (tevent_req_nomem(state->out_mem_ctx, req)) {
1038                 return tevent_req_post(req, ev);
1039         }
1040
1041         /* make a temporary copy, that we pass to the dispatch function */
1042         state->tmp = state->orig;
1043
1044         subreq = cli->dispatch_send(state, ev, cli,
1045                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
1046                                     NDR_EVENTLOG_OPENEVENTLOGW,
1047                                     &state->tmp);
1048         if (tevent_req_nomem(subreq, req)) {
1049                 return tevent_req_post(req, ev);
1050         }
1051         tevent_req_set_callback(subreq, rpccli_eventlog_OpenEventLogW_done, req);
1052         return req;
1053 }
1054
1055 static void rpccli_eventlog_OpenEventLogW_done(struct tevent_req *subreq)
1056 {
1057         struct tevent_req *req = tevent_req_callback_data(
1058                 subreq, struct tevent_req);
1059         struct rpccli_eventlog_OpenEventLogW_state *state = tevent_req_data(
1060                 req, struct rpccli_eventlog_OpenEventLogW_state);
1061         NTSTATUS status;
1062         TALLOC_CTX *mem_ctx;
1063
1064         if (state->out_mem_ctx) {
1065                 mem_ctx = state->out_mem_ctx;
1066         } else {
1067                 mem_ctx = state;
1068         }
1069
1070         status = state->dispatch_recv(subreq, mem_ctx);
1071         TALLOC_FREE(subreq);
1072         if (!NT_STATUS_IS_OK(status)) {
1073                 tevent_req_nterror(req, status);
1074                 return;
1075         }
1076
1077         /* Copy out parameters */
1078         *state->orig.out.handle = *state->tmp.out.handle;
1079
1080         /* Copy result */
1081         state->orig.out.result = state->tmp.out.result;
1082
1083         /* Reset temporary structure */
1084         ZERO_STRUCT(state->tmp);
1085
1086         tevent_req_done(req);
1087 }
1088
1089 NTSTATUS rpccli_eventlog_OpenEventLogW_recv(struct tevent_req *req,
1090                                             TALLOC_CTX *mem_ctx,
1091                                             NTSTATUS *result)
1092 {
1093         struct rpccli_eventlog_OpenEventLogW_state *state = tevent_req_data(
1094                 req, struct rpccli_eventlog_OpenEventLogW_state);
1095         NTSTATUS status;
1096
1097         if (tevent_req_is_nterror(req, &status)) {
1098                 tevent_req_received(req);
1099                 return status;
1100         }
1101
1102         /* Steal possbile out parameters to the callers context */
1103         talloc_steal(mem_ctx, state->out_mem_ctx);
1104
1105         /* Return result */
1106         *result = state->orig.out.result;
1107
1108         tevent_req_received(req);
1109         return NT_STATUS_OK;
1110 }
1111
1112 NTSTATUS rpccli_eventlog_OpenEventLogW(struct rpc_pipe_client *cli,
1113                                        TALLOC_CTX *mem_ctx,
1114                                        struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */,
1115                                        struct lsa_String *logname /* [in] [ref] */,
1116                                        struct lsa_String *servername /* [in] [ref] */,
1117                                        uint32_t major_version /* [in]  */,
1118                                        uint32_t minor_version /* [in]  */,
1119                                        struct policy_handle *handle /* [out] [ref] */)
1120 {
1121         struct eventlog_OpenEventLogW r;
1122         NTSTATUS status;
1123
1124         /* In parameters */
1125         r.in.unknown0 = unknown0;
1126         r.in.logname = logname;
1127         r.in.servername = servername;
1128         r.in.major_version = major_version;
1129         r.in.minor_version = minor_version;
1130
1131         status = cli->dispatch(cli,
1132                                 mem_ctx,
1133                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
1134                                 NDR_EVENTLOG_OPENEVENTLOGW,
1135                                 &r);
1136
1137         if (!NT_STATUS_IS_OK(status)) {
1138                 return status;
1139         }
1140
1141         if (NT_STATUS_IS_ERR(status)) {
1142                 return status;
1143         }
1144
1145         /* Return variables */
1146         *handle = *r.out.handle;
1147
1148         /* Return result */
1149         return r.out.result;
1150 }
1151
1152 struct rpccli_eventlog_RegisterEventSourceW_state {
1153         struct eventlog_RegisterEventSourceW orig;
1154         struct eventlog_RegisterEventSourceW tmp;
1155         TALLOC_CTX *out_mem_ctx;
1156         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1157 };
1158
1159 static void rpccli_eventlog_RegisterEventSourceW_done(struct tevent_req *subreq);
1160
1161 struct tevent_req *rpccli_eventlog_RegisterEventSourceW_send(TALLOC_CTX *mem_ctx,
1162                                                              struct tevent_context *ev,
1163                                                              struct rpc_pipe_client *cli,
1164                                                              struct eventlog_OpenUnknown0 *_unknown0 /* [in] [unique] */,
1165                                                              struct lsa_String *_module_name /* [in] [ref] */,
1166                                                              struct lsa_String *_reg_module_name /* [in] [ref] */,
1167                                                              uint32_t _major_version /* [in]  */,
1168                                                              uint32_t _minor_version /* [in]  */,
1169                                                              struct policy_handle *_log_handle /* [out] [ref] */)
1170 {
1171         struct tevent_req *req;
1172         struct rpccli_eventlog_RegisterEventSourceW_state *state;
1173         struct tevent_req *subreq;
1174
1175         req = tevent_req_create(mem_ctx, &state,
1176                                 struct rpccli_eventlog_RegisterEventSourceW_state);
1177         if (req == NULL) {
1178                 return NULL;
1179         }
1180         state->out_mem_ctx = NULL;
1181         state->dispatch_recv = cli->dispatch_recv;
1182
1183         /* In parameters */
1184         state->orig.in.unknown0 = _unknown0;
1185         state->orig.in.module_name = _module_name;
1186         state->orig.in.reg_module_name = _reg_module_name;
1187         state->orig.in.major_version = _major_version;
1188         state->orig.in.minor_version = _minor_version;
1189
1190         /* Out parameters */
1191         state->orig.out.log_handle = _log_handle;
1192
1193         /* Result */
1194         ZERO_STRUCT(state->orig.out.result);
1195
1196         state->out_mem_ctx = talloc_named_const(state, 0,
1197                              "rpccli_eventlog_RegisterEventSourceW_out_memory");
1198         if (tevent_req_nomem(state->out_mem_ctx, req)) {
1199                 return tevent_req_post(req, ev);
1200         }
1201
1202         /* make a temporary copy, that we pass to the dispatch function */
1203         state->tmp = state->orig;
1204
1205         subreq = cli->dispatch_send(state, ev, cli,
1206                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
1207                                     NDR_EVENTLOG_REGISTEREVENTSOURCEW,
1208                                     &state->tmp);
1209         if (tevent_req_nomem(subreq, req)) {
1210                 return tevent_req_post(req, ev);
1211         }
1212         tevent_req_set_callback(subreq, rpccli_eventlog_RegisterEventSourceW_done, req);
1213         return req;
1214 }
1215
1216 static void rpccli_eventlog_RegisterEventSourceW_done(struct tevent_req *subreq)
1217 {
1218         struct tevent_req *req = tevent_req_callback_data(
1219                 subreq, struct tevent_req);
1220         struct rpccli_eventlog_RegisterEventSourceW_state *state = tevent_req_data(
1221                 req, struct rpccli_eventlog_RegisterEventSourceW_state);
1222         NTSTATUS status;
1223         TALLOC_CTX *mem_ctx;
1224
1225         if (state->out_mem_ctx) {
1226                 mem_ctx = state->out_mem_ctx;
1227         } else {
1228                 mem_ctx = state;
1229         }
1230
1231         status = state->dispatch_recv(subreq, mem_ctx);
1232         TALLOC_FREE(subreq);
1233         if (!NT_STATUS_IS_OK(status)) {
1234                 tevent_req_nterror(req, status);
1235                 return;
1236         }
1237
1238         /* Copy out parameters */
1239         *state->orig.out.log_handle = *state->tmp.out.log_handle;
1240
1241         /* Copy result */
1242         state->orig.out.result = state->tmp.out.result;
1243
1244         /* Reset temporary structure */
1245         ZERO_STRUCT(state->tmp);
1246
1247         tevent_req_done(req);
1248 }
1249
1250 NTSTATUS rpccli_eventlog_RegisterEventSourceW_recv(struct tevent_req *req,
1251                                                    TALLOC_CTX *mem_ctx,
1252                                                    NTSTATUS *result)
1253 {
1254         struct rpccli_eventlog_RegisterEventSourceW_state *state = tevent_req_data(
1255                 req, struct rpccli_eventlog_RegisterEventSourceW_state);
1256         NTSTATUS status;
1257
1258         if (tevent_req_is_nterror(req, &status)) {
1259                 tevent_req_received(req);
1260                 return status;
1261         }
1262
1263         /* Steal possbile out parameters to the callers context */
1264         talloc_steal(mem_ctx, state->out_mem_ctx);
1265
1266         /* Return result */
1267         *result = state->orig.out.result;
1268
1269         tevent_req_received(req);
1270         return NT_STATUS_OK;
1271 }
1272
1273 NTSTATUS rpccli_eventlog_RegisterEventSourceW(struct rpc_pipe_client *cli,
1274                                               TALLOC_CTX *mem_ctx,
1275                                               struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */,
1276                                               struct lsa_String *module_name /* [in] [ref] */,
1277                                               struct lsa_String *reg_module_name /* [in] [ref] */,
1278                                               uint32_t major_version /* [in]  */,
1279                                               uint32_t minor_version /* [in]  */,
1280                                               struct policy_handle *log_handle /* [out] [ref] */)
1281 {
1282         struct eventlog_RegisterEventSourceW r;
1283         NTSTATUS status;
1284
1285         /* In parameters */
1286         r.in.unknown0 = unknown0;
1287         r.in.module_name = module_name;
1288         r.in.reg_module_name = reg_module_name;
1289         r.in.major_version = major_version;
1290         r.in.minor_version = minor_version;
1291
1292         status = cli->dispatch(cli,
1293                                 mem_ctx,
1294                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
1295                                 NDR_EVENTLOG_REGISTEREVENTSOURCEW,
1296                                 &r);
1297
1298         if (!NT_STATUS_IS_OK(status)) {
1299                 return status;
1300         }
1301
1302         if (NT_STATUS_IS_ERR(status)) {
1303                 return status;
1304         }
1305
1306         /* Return variables */
1307         *log_handle = *r.out.log_handle;
1308
1309         /* Return result */
1310         return r.out.result;
1311 }
1312
1313 struct rpccli_eventlog_OpenBackupEventLogW_state {
1314         struct eventlog_OpenBackupEventLogW orig;
1315         struct eventlog_OpenBackupEventLogW tmp;
1316         TALLOC_CTX *out_mem_ctx;
1317         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1318 };
1319
1320 static void rpccli_eventlog_OpenBackupEventLogW_done(struct tevent_req *subreq);
1321
1322 struct tevent_req *rpccli_eventlog_OpenBackupEventLogW_send(TALLOC_CTX *mem_ctx,
1323                                                             struct tevent_context *ev,
1324                                                             struct rpc_pipe_client *cli,
1325                                                             struct eventlog_OpenUnknown0 *_unknown0 /* [in] [unique] */,
1326                                                             struct lsa_String *_backup_logname /* [in] [ref] */,
1327                                                             uint32_t _major_version /* [in]  */,
1328                                                             uint32_t _minor_version /* [in]  */,
1329                                                             struct policy_handle *_handle /* [out] [ref] */)
1330 {
1331         struct tevent_req *req;
1332         struct rpccli_eventlog_OpenBackupEventLogW_state *state;
1333         struct tevent_req *subreq;
1334
1335         req = tevent_req_create(mem_ctx, &state,
1336                                 struct rpccli_eventlog_OpenBackupEventLogW_state);
1337         if (req == NULL) {
1338                 return NULL;
1339         }
1340         state->out_mem_ctx = NULL;
1341         state->dispatch_recv = cli->dispatch_recv;
1342
1343         /* In parameters */
1344         state->orig.in.unknown0 = _unknown0;
1345         state->orig.in.backup_logname = _backup_logname;
1346         state->orig.in.major_version = _major_version;
1347         state->orig.in.minor_version = _minor_version;
1348
1349         /* Out parameters */
1350         state->orig.out.handle = _handle;
1351
1352         /* Result */
1353         ZERO_STRUCT(state->orig.out.result);
1354
1355         state->out_mem_ctx = talloc_named_const(state, 0,
1356                              "rpccli_eventlog_OpenBackupEventLogW_out_memory");
1357         if (tevent_req_nomem(state->out_mem_ctx, req)) {
1358                 return tevent_req_post(req, ev);
1359         }
1360
1361         /* make a temporary copy, that we pass to the dispatch function */
1362         state->tmp = state->orig;
1363
1364         subreq = cli->dispatch_send(state, ev, cli,
1365                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
1366                                     NDR_EVENTLOG_OPENBACKUPEVENTLOGW,
1367                                     &state->tmp);
1368         if (tevent_req_nomem(subreq, req)) {
1369                 return tevent_req_post(req, ev);
1370         }
1371         tevent_req_set_callback(subreq, rpccli_eventlog_OpenBackupEventLogW_done, req);
1372         return req;
1373 }
1374
1375 static void rpccli_eventlog_OpenBackupEventLogW_done(struct tevent_req *subreq)
1376 {
1377         struct tevent_req *req = tevent_req_callback_data(
1378                 subreq, struct tevent_req);
1379         struct rpccli_eventlog_OpenBackupEventLogW_state *state = tevent_req_data(
1380                 req, struct rpccli_eventlog_OpenBackupEventLogW_state);
1381         NTSTATUS status;
1382         TALLOC_CTX *mem_ctx;
1383
1384         if (state->out_mem_ctx) {
1385                 mem_ctx = state->out_mem_ctx;
1386         } else {
1387                 mem_ctx = state;
1388         }
1389
1390         status = state->dispatch_recv(subreq, mem_ctx);
1391         TALLOC_FREE(subreq);
1392         if (!NT_STATUS_IS_OK(status)) {
1393                 tevent_req_nterror(req, status);
1394                 return;
1395         }
1396
1397         /* Copy out parameters */
1398         *state->orig.out.handle = *state->tmp.out.handle;
1399
1400         /* Copy result */
1401         state->orig.out.result = state->tmp.out.result;
1402
1403         /* Reset temporary structure */
1404         ZERO_STRUCT(state->tmp);
1405
1406         tevent_req_done(req);
1407 }
1408
1409 NTSTATUS rpccli_eventlog_OpenBackupEventLogW_recv(struct tevent_req *req,
1410                                                   TALLOC_CTX *mem_ctx,
1411                                                   NTSTATUS *result)
1412 {
1413         struct rpccli_eventlog_OpenBackupEventLogW_state *state = tevent_req_data(
1414                 req, struct rpccli_eventlog_OpenBackupEventLogW_state);
1415         NTSTATUS status;
1416
1417         if (tevent_req_is_nterror(req, &status)) {
1418                 tevent_req_received(req);
1419                 return status;
1420         }
1421
1422         /* Steal possbile out parameters to the callers context */
1423         talloc_steal(mem_ctx, state->out_mem_ctx);
1424
1425         /* Return result */
1426         *result = state->orig.out.result;
1427
1428         tevent_req_received(req);
1429         return NT_STATUS_OK;
1430 }
1431
1432 NTSTATUS rpccli_eventlog_OpenBackupEventLogW(struct rpc_pipe_client *cli,
1433                                              TALLOC_CTX *mem_ctx,
1434                                              struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */,
1435                                              struct lsa_String *backup_logname /* [in] [ref] */,
1436                                              uint32_t major_version /* [in]  */,
1437                                              uint32_t minor_version /* [in]  */,
1438                                              struct policy_handle *handle /* [out] [ref] */)
1439 {
1440         struct eventlog_OpenBackupEventLogW r;
1441         NTSTATUS status;
1442
1443         /* In parameters */
1444         r.in.unknown0 = unknown0;
1445         r.in.backup_logname = backup_logname;
1446         r.in.major_version = major_version;
1447         r.in.minor_version = minor_version;
1448
1449         status = cli->dispatch(cli,
1450                                 mem_ctx,
1451                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
1452                                 NDR_EVENTLOG_OPENBACKUPEVENTLOGW,
1453                                 &r);
1454
1455         if (!NT_STATUS_IS_OK(status)) {
1456                 return status;
1457         }
1458
1459         if (NT_STATUS_IS_ERR(status)) {
1460                 return status;
1461         }
1462
1463         /* Return variables */
1464         *handle = *r.out.handle;
1465
1466         /* Return result */
1467         return r.out.result;
1468 }
1469
1470 struct rpccli_eventlog_ReadEventLogW_state {
1471         struct eventlog_ReadEventLogW orig;
1472         struct eventlog_ReadEventLogW tmp;
1473         TALLOC_CTX *out_mem_ctx;
1474         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1475 };
1476
1477 static void rpccli_eventlog_ReadEventLogW_done(struct tevent_req *subreq);
1478
1479 struct tevent_req *rpccli_eventlog_ReadEventLogW_send(TALLOC_CTX *mem_ctx,
1480                                                       struct tevent_context *ev,
1481                                                       struct rpc_pipe_client *cli,
1482                                                       struct policy_handle *_handle /* [in] [ref] */,
1483                                                       uint32_t _flags /* [in]  */,
1484                                                       uint32_t _offset /* [in]  */,
1485                                                       uint32_t _number_of_bytes /* [in] [range(0,0x7FFFF)] */,
1486                                                       uint8_t *_data /* [out] [ref,size_is(number_of_bytes)] */,
1487                                                       uint32_t *_sent_size /* [out] [ref] */,
1488                                                       uint32_t *_real_size /* [out] [ref] */)
1489 {
1490         struct tevent_req *req;
1491         struct rpccli_eventlog_ReadEventLogW_state *state;
1492         struct tevent_req *subreq;
1493
1494         req = tevent_req_create(mem_ctx, &state,
1495                                 struct rpccli_eventlog_ReadEventLogW_state);
1496         if (req == NULL) {
1497                 return NULL;
1498         }
1499         state->out_mem_ctx = NULL;
1500         state->dispatch_recv = cli->dispatch_recv;
1501
1502         /* In parameters */
1503         state->orig.in.handle = _handle;
1504         state->orig.in.flags = _flags;
1505         state->orig.in.offset = _offset;
1506         state->orig.in.number_of_bytes = _number_of_bytes;
1507
1508         /* Out parameters */
1509         state->orig.out.data = _data;
1510         state->orig.out.sent_size = _sent_size;
1511         state->orig.out.real_size = _real_size;
1512
1513         /* Result */
1514         ZERO_STRUCT(state->orig.out.result);
1515
1516         state->out_mem_ctx = talloc_named_const(state, 0,
1517                              "rpccli_eventlog_ReadEventLogW_out_memory");
1518         if (tevent_req_nomem(state->out_mem_ctx, req)) {
1519                 return tevent_req_post(req, ev);
1520         }
1521
1522         /* make a temporary copy, that we pass to the dispatch function */
1523         state->tmp = state->orig;
1524
1525         subreq = cli->dispatch_send(state, ev, cli,
1526                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
1527                                     NDR_EVENTLOG_READEVENTLOGW,
1528                                     &state->tmp);
1529         if (tevent_req_nomem(subreq, req)) {
1530                 return tevent_req_post(req, ev);
1531         }
1532         tevent_req_set_callback(subreq, rpccli_eventlog_ReadEventLogW_done, req);
1533         return req;
1534 }
1535
1536 static void rpccli_eventlog_ReadEventLogW_done(struct tevent_req *subreq)
1537 {
1538         struct tevent_req *req = tevent_req_callback_data(
1539                 subreq, struct tevent_req);
1540         struct rpccli_eventlog_ReadEventLogW_state *state = tevent_req_data(
1541                 req, struct rpccli_eventlog_ReadEventLogW_state);
1542         NTSTATUS status;
1543         TALLOC_CTX *mem_ctx;
1544
1545         if (state->out_mem_ctx) {
1546                 mem_ctx = state->out_mem_ctx;
1547         } else {
1548                 mem_ctx = state;
1549         }
1550
1551         status = state->dispatch_recv(subreq, mem_ctx);
1552         TALLOC_FREE(subreq);
1553         if (!NT_STATUS_IS_OK(status)) {
1554                 tevent_req_nterror(req, status);
1555                 return;
1556         }
1557
1558         /* Copy out parameters */
1559         memcpy(state->orig.out.data, state->tmp.out.data, state->tmp.in.number_of_bytes * sizeof(*state->orig.out.data));
1560         *state->orig.out.sent_size = *state->tmp.out.sent_size;
1561         *state->orig.out.real_size = *state->tmp.out.real_size;
1562
1563         /* Copy result */
1564         state->orig.out.result = state->tmp.out.result;
1565
1566         /* Reset temporary structure */
1567         ZERO_STRUCT(state->tmp);
1568
1569         tevent_req_done(req);
1570 }
1571
1572 NTSTATUS rpccli_eventlog_ReadEventLogW_recv(struct tevent_req *req,
1573                                             TALLOC_CTX *mem_ctx,
1574                                             NTSTATUS *result)
1575 {
1576         struct rpccli_eventlog_ReadEventLogW_state *state = tevent_req_data(
1577                 req, struct rpccli_eventlog_ReadEventLogW_state);
1578         NTSTATUS status;
1579
1580         if (tevent_req_is_nterror(req, &status)) {
1581                 tevent_req_received(req);
1582                 return status;
1583         }
1584
1585         /* Steal possbile out parameters to the callers context */
1586         talloc_steal(mem_ctx, state->out_mem_ctx);
1587
1588         /* Return result */
1589         *result = state->orig.out.result;
1590
1591         tevent_req_received(req);
1592         return NT_STATUS_OK;
1593 }
1594
1595 NTSTATUS rpccli_eventlog_ReadEventLogW(struct rpc_pipe_client *cli,
1596                                        TALLOC_CTX *mem_ctx,
1597                                        struct policy_handle *handle /* [in] [ref] */,
1598                                        uint32_t flags /* [in]  */,
1599                                        uint32_t offset /* [in]  */,
1600                                        uint32_t number_of_bytes /* [in] [range(0,0x7FFFF)] */,
1601                                        uint8_t *data /* [out] [ref,size_is(number_of_bytes)] */,
1602                                        uint32_t *sent_size /* [out] [ref] */,
1603                                        uint32_t *real_size /* [out] [ref] */)
1604 {
1605         struct eventlog_ReadEventLogW r;
1606         NTSTATUS status;
1607
1608         /* In parameters */
1609         r.in.handle = handle;
1610         r.in.flags = flags;
1611         r.in.offset = offset;
1612         r.in.number_of_bytes = number_of_bytes;
1613
1614         status = cli->dispatch(cli,
1615                                 mem_ctx,
1616                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
1617                                 NDR_EVENTLOG_READEVENTLOGW,
1618                                 &r);
1619
1620         if (!NT_STATUS_IS_OK(status)) {
1621                 return status;
1622         }
1623
1624         if (NT_STATUS_IS_ERR(status)) {
1625                 return status;
1626         }
1627
1628         /* Return variables */
1629         memcpy(data, r.out.data, r.in.number_of_bytes * sizeof(*data));
1630         *sent_size = *r.out.sent_size;
1631         *real_size = *r.out.real_size;
1632
1633         /* Return result */
1634         return r.out.result;
1635 }
1636
1637 struct rpccli_eventlog_ReportEventW_state {
1638         struct eventlog_ReportEventW orig;
1639         struct eventlog_ReportEventW tmp;
1640         TALLOC_CTX *out_mem_ctx;
1641         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1642 };
1643
1644 static void rpccli_eventlog_ReportEventW_done(struct tevent_req *subreq);
1645
1646 struct tevent_req *rpccli_eventlog_ReportEventW_send(TALLOC_CTX *mem_ctx,
1647                                                      struct tevent_context *ev,
1648                                                      struct rpc_pipe_client *cli,
1649                                                      struct policy_handle *_handle /* [in] [ref] */,
1650                                                      time_t _timestamp /* [in]  */,
1651                                                      enum eventlogEventTypes _event_type /* [in]  */,
1652                                                      uint16_t _event_category /* [in]  */,
1653                                                      uint32_t _event_id /* [in]  */,
1654                                                      uint16_t _num_of_strings /* [in] [range(0,256)] */,
1655                                                      uint32_t _data_size /* [in] [range(0,0x3FFFF)] */,
1656                                                      struct lsa_String *_servername /* [in] [ref] */,
1657                                                      struct dom_sid *_user_sid /* [in] [unique] */,
1658                                                      struct lsa_String **_strings /* [in] [unique,size_is(num_of_strings)] */,
1659                                                      uint8_t *_data /* [in] [unique,size_is(data_size)] */,
1660                                                      uint16_t _flags /* [in]  */,
1661                                                      uint32_t *_record_number /* [in,out] [unique] */,
1662                                                      time_t *_time_written /* [in,out] [unique] */)
1663 {
1664         struct tevent_req *req;
1665         struct rpccli_eventlog_ReportEventW_state *state;
1666         struct tevent_req *subreq;
1667
1668         req = tevent_req_create(mem_ctx, &state,
1669                                 struct rpccli_eventlog_ReportEventW_state);
1670         if (req == NULL) {
1671                 return NULL;
1672         }
1673         state->out_mem_ctx = NULL;
1674         state->dispatch_recv = cli->dispatch_recv;
1675
1676         /* In parameters */
1677         state->orig.in.handle = _handle;
1678         state->orig.in.timestamp = _timestamp;
1679         state->orig.in.event_type = _event_type;
1680         state->orig.in.event_category = _event_category;
1681         state->orig.in.event_id = _event_id;
1682         state->orig.in.num_of_strings = _num_of_strings;
1683         state->orig.in.data_size = _data_size;
1684         state->orig.in.servername = _servername;
1685         state->orig.in.user_sid = _user_sid;
1686         state->orig.in.strings = _strings;
1687         state->orig.in.data = _data;
1688         state->orig.in.flags = _flags;
1689         state->orig.in.record_number = _record_number;
1690         state->orig.in.time_written = _time_written;
1691
1692         /* Out parameters */
1693         state->orig.out.record_number = _record_number;
1694         state->orig.out.time_written = _time_written;
1695
1696         /* Result */
1697         ZERO_STRUCT(state->orig.out.result);
1698
1699         state->out_mem_ctx = talloc_named_const(state, 0,
1700                              "rpccli_eventlog_ReportEventW_out_memory");
1701         if (tevent_req_nomem(state->out_mem_ctx, req)) {
1702                 return tevent_req_post(req, ev);
1703         }
1704
1705         /* make a temporary copy, that we pass to the dispatch function */
1706         state->tmp = state->orig;
1707
1708         subreq = cli->dispatch_send(state, ev, cli,
1709                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
1710                                     NDR_EVENTLOG_REPORTEVENTW,
1711                                     &state->tmp);
1712         if (tevent_req_nomem(subreq, req)) {
1713                 return tevent_req_post(req, ev);
1714         }
1715         tevent_req_set_callback(subreq, rpccli_eventlog_ReportEventW_done, req);
1716         return req;
1717 }
1718
1719 static void rpccli_eventlog_ReportEventW_done(struct tevent_req *subreq)
1720 {
1721         struct tevent_req *req = tevent_req_callback_data(
1722                 subreq, struct tevent_req);
1723         struct rpccli_eventlog_ReportEventW_state *state = tevent_req_data(
1724                 req, struct rpccli_eventlog_ReportEventW_state);
1725         NTSTATUS status;
1726         TALLOC_CTX *mem_ctx;
1727
1728         if (state->out_mem_ctx) {
1729                 mem_ctx = state->out_mem_ctx;
1730         } else {
1731                 mem_ctx = state;
1732         }
1733
1734         status = state->dispatch_recv(subreq, mem_ctx);
1735         TALLOC_FREE(subreq);
1736         if (!NT_STATUS_IS_OK(status)) {
1737                 tevent_req_nterror(req, status);
1738                 return;
1739         }
1740
1741         /* Copy out parameters */
1742         if (state->orig.out.record_number && state->tmp.out.record_number) {
1743                 *state->orig.out.record_number = *state->tmp.out.record_number;
1744         }
1745         if (state->orig.out.time_written && state->tmp.out.time_written) {
1746                 *state->orig.out.time_written = *state->tmp.out.time_written;
1747         }
1748
1749         /* Copy result */
1750         state->orig.out.result = state->tmp.out.result;
1751
1752         /* Reset temporary structure */
1753         ZERO_STRUCT(state->tmp);
1754
1755         tevent_req_done(req);
1756 }
1757
1758 NTSTATUS rpccli_eventlog_ReportEventW_recv(struct tevent_req *req,
1759                                            TALLOC_CTX *mem_ctx,
1760                                            NTSTATUS *result)
1761 {
1762         struct rpccli_eventlog_ReportEventW_state *state = tevent_req_data(
1763                 req, struct rpccli_eventlog_ReportEventW_state);
1764         NTSTATUS status;
1765
1766         if (tevent_req_is_nterror(req, &status)) {
1767                 tevent_req_received(req);
1768                 return status;
1769         }
1770
1771         /* Steal possbile out parameters to the callers context */
1772         talloc_steal(mem_ctx, state->out_mem_ctx);
1773
1774         /* Return result */
1775         *result = state->orig.out.result;
1776
1777         tevent_req_received(req);
1778         return NT_STATUS_OK;
1779 }
1780
1781 NTSTATUS rpccli_eventlog_ReportEventW(struct rpc_pipe_client *cli,
1782                                       TALLOC_CTX *mem_ctx,
1783                                       struct policy_handle *handle /* [in] [ref] */,
1784                                       time_t timestamp /* [in]  */,
1785                                       enum eventlogEventTypes event_type /* [in]  */,
1786                                       uint16_t event_category /* [in]  */,
1787                                       uint32_t event_id /* [in]  */,
1788                                       uint16_t num_of_strings /* [in] [range(0,256)] */,
1789                                       uint32_t data_size /* [in] [range(0,0x3FFFF)] */,
1790                                       struct lsa_String *servername /* [in] [ref] */,
1791                                       struct dom_sid *user_sid /* [in] [unique] */,
1792                                       struct lsa_String **strings /* [in] [unique,size_is(num_of_strings)] */,
1793                                       uint8_t *data /* [in] [unique,size_is(data_size)] */,
1794                                       uint16_t flags /* [in]  */,
1795                                       uint32_t *record_number /* [in,out] [unique] */,
1796                                       time_t *time_written /* [in,out] [unique] */)
1797 {
1798         struct eventlog_ReportEventW r;
1799         NTSTATUS status;
1800
1801         /* In parameters */
1802         r.in.handle = handle;
1803         r.in.timestamp = timestamp;
1804         r.in.event_type = event_type;
1805         r.in.event_category = event_category;
1806         r.in.event_id = event_id;
1807         r.in.num_of_strings = num_of_strings;
1808         r.in.data_size = data_size;
1809         r.in.servername = servername;
1810         r.in.user_sid = user_sid;
1811         r.in.strings = strings;
1812         r.in.data = data;
1813         r.in.flags = flags;
1814         r.in.record_number = record_number;
1815         r.in.time_written = time_written;
1816
1817         status = cli->dispatch(cli,
1818                                 mem_ctx,
1819                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
1820                                 NDR_EVENTLOG_REPORTEVENTW,
1821                                 &r);
1822
1823         if (!NT_STATUS_IS_OK(status)) {
1824                 return status;
1825         }
1826
1827         if (NT_STATUS_IS_ERR(status)) {
1828                 return status;
1829         }
1830
1831         /* Return variables */
1832         if (record_number && r.out.record_number) {
1833                 *record_number = *r.out.record_number;
1834         }
1835         if (time_written && r.out.time_written) {
1836                 *time_written = *r.out.time_written;
1837         }
1838
1839         /* Return result */
1840         return r.out.result;
1841 }
1842
1843 struct rpccli_eventlog_ClearEventLogA_state {
1844         struct eventlog_ClearEventLogA orig;
1845         struct eventlog_ClearEventLogA tmp;
1846         TALLOC_CTX *out_mem_ctx;
1847         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1848 };
1849
1850 static void rpccli_eventlog_ClearEventLogA_done(struct tevent_req *subreq);
1851
1852 struct tevent_req *rpccli_eventlog_ClearEventLogA_send(TALLOC_CTX *mem_ctx,
1853                                                        struct tevent_context *ev,
1854                                                        struct rpc_pipe_client *cli)
1855 {
1856         struct tevent_req *req;
1857         struct rpccli_eventlog_ClearEventLogA_state *state;
1858         struct tevent_req *subreq;
1859
1860         req = tevent_req_create(mem_ctx, &state,
1861                                 struct rpccli_eventlog_ClearEventLogA_state);
1862         if (req == NULL) {
1863                 return NULL;
1864         }
1865         state->out_mem_ctx = NULL;
1866         state->dispatch_recv = cli->dispatch_recv;
1867
1868         /* In parameters */
1869
1870         /* Out parameters */
1871
1872         /* Result */
1873         ZERO_STRUCT(state->orig.out.result);
1874
1875         /* make a temporary copy, that we pass to the dispatch function */
1876         state->tmp = state->orig;
1877
1878         subreq = cli->dispatch_send(state, ev, cli,
1879                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
1880                                     NDR_EVENTLOG_CLEAREVENTLOGA,
1881                                     &state->tmp);
1882         if (tevent_req_nomem(subreq, req)) {
1883                 return tevent_req_post(req, ev);
1884         }
1885         tevent_req_set_callback(subreq, rpccli_eventlog_ClearEventLogA_done, req);
1886         return req;
1887 }
1888
1889 static void rpccli_eventlog_ClearEventLogA_done(struct tevent_req *subreq)
1890 {
1891         struct tevent_req *req = tevent_req_callback_data(
1892                 subreq, struct tevent_req);
1893         struct rpccli_eventlog_ClearEventLogA_state *state = tevent_req_data(
1894                 req, struct rpccli_eventlog_ClearEventLogA_state);
1895         NTSTATUS status;
1896         TALLOC_CTX *mem_ctx;
1897
1898         if (state->out_mem_ctx) {
1899                 mem_ctx = state->out_mem_ctx;
1900         } else {
1901                 mem_ctx = state;
1902         }
1903
1904         status = state->dispatch_recv(subreq, mem_ctx);
1905         TALLOC_FREE(subreq);
1906         if (!NT_STATUS_IS_OK(status)) {
1907                 tevent_req_nterror(req, status);
1908                 return;
1909         }
1910
1911         /* Copy out parameters */
1912
1913         /* Copy result */
1914         state->orig.out.result = state->tmp.out.result;
1915
1916         /* Reset temporary structure */
1917         ZERO_STRUCT(state->tmp);
1918
1919         tevent_req_done(req);
1920 }
1921
1922 NTSTATUS rpccli_eventlog_ClearEventLogA_recv(struct tevent_req *req,
1923                                              TALLOC_CTX *mem_ctx,
1924                                              NTSTATUS *result)
1925 {
1926         struct rpccli_eventlog_ClearEventLogA_state *state = tevent_req_data(
1927                 req, struct rpccli_eventlog_ClearEventLogA_state);
1928         NTSTATUS status;
1929
1930         if (tevent_req_is_nterror(req, &status)) {
1931                 tevent_req_received(req);
1932                 return status;
1933         }
1934
1935         /* Steal possbile out parameters to the callers context */
1936         talloc_steal(mem_ctx, state->out_mem_ctx);
1937
1938         /* Return result */
1939         *result = state->orig.out.result;
1940
1941         tevent_req_received(req);
1942         return NT_STATUS_OK;
1943 }
1944
1945 NTSTATUS rpccli_eventlog_ClearEventLogA(struct rpc_pipe_client *cli,
1946                                         TALLOC_CTX *mem_ctx)
1947 {
1948         struct eventlog_ClearEventLogA r;
1949         NTSTATUS status;
1950
1951         /* In parameters */
1952
1953         status = cli->dispatch(cli,
1954                                 mem_ctx,
1955                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
1956                                 NDR_EVENTLOG_CLEAREVENTLOGA,
1957                                 &r);
1958
1959         if (!NT_STATUS_IS_OK(status)) {
1960                 return status;
1961         }
1962
1963         if (NT_STATUS_IS_ERR(status)) {
1964                 return status;
1965         }
1966
1967         /* Return variables */
1968
1969         /* Return result */
1970         return r.out.result;
1971 }
1972
1973 struct rpccli_eventlog_BackupEventLogA_state {
1974         struct eventlog_BackupEventLogA orig;
1975         struct eventlog_BackupEventLogA tmp;
1976         TALLOC_CTX *out_mem_ctx;
1977         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1978 };
1979
1980 static void rpccli_eventlog_BackupEventLogA_done(struct tevent_req *subreq);
1981
1982 struct tevent_req *rpccli_eventlog_BackupEventLogA_send(TALLOC_CTX *mem_ctx,
1983                                                         struct tevent_context *ev,
1984                                                         struct rpc_pipe_client *cli)
1985 {
1986         struct tevent_req *req;
1987         struct rpccli_eventlog_BackupEventLogA_state *state;
1988         struct tevent_req *subreq;
1989
1990         req = tevent_req_create(mem_ctx, &state,
1991                                 struct rpccli_eventlog_BackupEventLogA_state);
1992         if (req == NULL) {
1993                 return NULL;
1994         }
1995         state->out_mem_ctx = NULL;
1996         state->dispatch_recv = cli->dispatch_recv;
1997
1998         /* In parameters */
1999
2000         /* Out parameters */
2001
2002         /* Result */
2003         ZERO_STRUCT(state->orig.out.result);
2004
2005         /* make a temporary copy, that we pass to the dispatch function */
2006         state->tmp = state->orig;
2007
2008         subreq = cli->dispatch_send(state, ev, cli,
2009                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
2010                                     NDR_EVENTLOG_BACKUPEVENTLOGA,
2011                                     &state->tmp);
2012         if (tevent_req_nomem(subreq, req)) {
2013                 return tevent_req_post(req, ev);
2014         }
2015         tevent_req_set_callback(subreq, rpccli_eventlog_BackupEventLogA_done, req);
2016         return req;
2017 }
2018
2019 static void rpccli_eventlog_BackupEventLogA_done(struct tevent_req *subreq)
2020 {
2021         struct tevent_req *req = tevent_req_callback_data(
2022                 subreq, struct tevent_req);
2023         struct rpccli_eventlog_BackupEventLogA_state *state = tevent_req_data(
2024                 req, struct rpccli_eventlog_BackupEventLogA_state);
2025         NTSTATUS status;
2026         TALLOC_CTX *mem_ctx;
2027
2028         if (state->out_mem_ctx) {
2029                 mem_ctx = state->out_mem_ctx;
2030         } else {
2031                 mem_ctx = state;
2032         }
2033
2034         status = state->dispatch_recv(subreq, mem_ctx);
2035         TALLOC_FREE(subreq);
2036         if (!NT_STATUS_IS_OK(status)) {
2037                 tevent_req_nterror(req, status);
2038                 return;
2039         }
2040
2041         /* Copy out parameters */
2042
2043         /* Copy result */
2044         state->orig.out.result = state->tmp.out.result;
2045
2046         /* Reset temporary structure */
2047         ZERO_STRUCT(state->tmp);
2048
2049         tevent_req_done(req);
2050 }
2051
2052 NTSTATUS rpccli_eventlog_BackupEventLogA_recv(struct tevent_req *req,
2053                                               TALLOC_CTX *mem_ctx,
2054                                               NTSTATUS *result)
2055 {
2056         struct rpccli_eventlog_BackupEventLogA_state *state = tevent_req_data(
2057                 req, struct rpccli_eventlog_BackupEventLogA_state);
2058         NTSTATUS status;
2059
2060         if (tevent_req_is_nterror(req, &status)) {
2061                 tevent_req_received(req);
2062                 return status;
2063         }
2064
2065         /* Steal possbile out parameters to the callers context */
2066         talloc_steal(mem_ctx, state->out_mem_ctx);
2067
2068         /* Return result */
2069         *result = state->orig.out.result;
2070
2071         tevent_req_received(req);
2072         return NT_STATUS_OK;
2073 }
2074
2075 NTSTATUS rpccli_eventlog_BackupEventLogA(struct rpc_pipe_client *cli,
2076                                          TALLOC_CTX *mem_ctx)
2077 {
2078         struct eventlog_BackupEventLogA r;
2079         NTSTATUS status;
2080
2081         /* In parameters */
2082
2083         status = cli->dispatch(cli,
2084                                 mem_ctx,
2085                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
2086                                 NDR_EVENTLOG_BACKUPEVENTLOGA,
2087                                 &r);
2088
2089         if (!NT_STATUS_IS_OK(status)) {
2090                 return status;
2091         }
2092
2093         if (NT_STATUS_IS_ERR(status)) {
2094                 return status;
2095         }
2096
2097         /* Return variables */
2098
2099         /* Return result */
2100         return r.out.result;
2101 }
2102
2103 struct rpccli_eventlog_OpenEventLogA_state {
2104         struct eventlog_OpenEventLogA orig;
2105         struct eventlog_OpenEventLogA tmp;
2106         TALLOC_CTX *out_mem_ctx;
2107         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2108 };
2109
2110 static void rpccli_eventlog_OpenEventLogA_done(struct tevent_req *subreq);
2111
2112 struct tevent_req *rpccli_eventlog_OpenEventLogA_send(TALLOC_CTX *mem_ctx,
2113                                                       struct tevent_context *ev,
2114                                                       struct rpc_pipe_client *cli)
2115 {
2116         struct tevent_req *req;
2117         struct rpccli_eventlog_OpenEventLogA_state *state;
2118         struct tevent_req *subreq;
2119
2120         req = tevent_req_create(mem_ctx, &state,
2121                                 struct rpccli_eventlog_OpenEventLogA_state);
2122         if (req == NULL) {
2123                 return NULL;
2124         }
2125         state->out_mem_ctx = NULL;
2126         state->dispatch_recv = cli->dispatch_recv;
2127
2128         /* In parameters */
2129
2130         /* Out parameters */
2131
2132         /* Result */
2133         ZERO_STRUCT(state->orig.out.result);
2134
2135         /* make a temporary copy, that we pass to the dispatch function */
2136         state->tmp = state->orig;
2137
2138         subreq = cli->dispatch_send(state, ev, cli,
2139                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
2140                                     NDR_EVENTLOG_OPENEVENTLOGA,
2141                                     &state->tmp);
2142         if (tevent_req_nomem(subreq, req)) {
2143                 return tevent_req_post(req, ev);
2144         }
2145         tevent_req_set_callback(subreq, rpccli_eventlog_OpenEventLogA_done, req);
2146         return req;
2147 }
2148
2149 static void rpccli_eventlog_OpenEventLogA_done(struct tevent_req *subreq)
2150 {
2151         struct tevent_req *req = tevent_req_callback_data(
2152                 subreq, struct tevent_req);
2153         struct rpccli_eventlog_OpenEventLogA_state *state = tevent_req_data(
2154                 req, struct rpccli_eventlog_OpenEventLogA_state);
2155         NTSTATUS status;
2156         TALLOC_CTX *mem_ctx;
2157
2158         if (state->out_mem_ctx) {
2159                 mem_ctx = state->out_mem_ctx;
2160         } else {
2161                 mem_ctx = state;
2162         }
2163
2164         status = state->dispatch_recv(subreq, mem_ctx);
2165         TALLOC_FREE(subreq);
2166         if (!NT_STATUS_IS_OK(status)) {
2167                 tevent_req_nterror(req, status);
2168                 return;
2169         }
2170
2171         /* Copy out parameters */
2172
2173         /* Copy result */
2174         state->orig.out.result = state->tmp.out.result;
2175
2176         /* Reset temporary structure */
2177         ZERO_STRUCT(state->tmp);
2178
2179         tevent_req_done(req);
2180 }
2181
2182 NTSTATUS rpccli_eventlog_OpenEventLogA_recv(struct tevent_req *req,
2183                                             TALLOC_CTX *mem_ctx,
2184                                             NTSTATUS *result)
2185 {
2186         struct rpccli_eventlog_OpenEventLogA_state *state = tevent_req_data(
2187                 req, struct rpccli_eventlog_OpenEventLogA_state);
2188         NTSTATUS status;
2189
2190         if (tevent_req_is_nterror(req, &status)) {
2191                 tevent_req_received(req);
2192                 return status;
2193         }
2194
2195         /* Steal possbile out parameters to the callers context */
2196         talloc_steal(mem_ctx, state->out_mem_ctx);
2197
2198         /* Return result */
2199         *result = state->orig.out.result;
2200
2201         tevent_req_received(req);
2202         return NT_STATUS_OK;
2203 }
2204
2205 NTSTATUS rpccli_eventlog_OpenEventLogA(struct rpc_pipe_client *cli,
2206                                        TALLOC_CTX *mem_ctx)
2207 {
2208         struct eventlog_OpenEventLogA r;
2209         NTSTATUS status;
2210
2211         /* In parameters */
2212
2213         status = cli->dispatch(cli,
2214                                 mem_ctx,
2215                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
2216                                 NDR_EVENTLOG_OPENEVENTLOGA,
2217                                 &r);
2218
2219         if (!NT_STATUS_IS_OK(status)) {
2220                 return status;
2221         }
2222
2223         if (NT_STATUS_IS_ERR(status)) {
2224                 return status;
2225         }
2226
2227         /* Return variables */
2228
2229         /* Return result */
2230         return r.out.result;
2231 }
2232
2233 struct rpccli_eventlog_RegisterEventSourceA_state {
2234         struct eventlog_RegisterEventSourceA orig;
2235         struct eventlog_RegisterEventSourceA tmp;
2236         TALLOC_CTX *out_mem_ctx;
2237         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2238 };
2239
2240 static void rpccli_eventlog_RegisterEventSourceA_done(struct tevent_req *subreq);
2241
2242 struct tevent_req *rpccli_eventlog_RegisterEventSourceA_send(TALLOC_CTX *mem_ctx,
2243                                                              struct tevent_context *ev,
2244                                                              struct rpc_pipe_client *cli)
2245 {
2246         struct tevent_req *req;
2247         struct rpccli_eventlog_RegisterEventSourceA_state *state;
2248         struct tevent_req *subreq;
2249
2250         req = tevent_req_create(mem_ctx, &state,
2251                                 struct rpccli_eventlog_RegisterEventSourceA_state);
2252         if (req == NULL) {
2253                 return NULL;
2254         }
2255         state->out_mem_ctx = NULL;
2256         state->dispatch_recv = cli->dispatch_recv;
2257
2258         /* In parameters */
2259
2260         /* Out parameters */
2261
2262         /* Result */
2263         ZERO_STRUCT(state->orig.out.result);
2264
2265         /* make a temporary copy, that we pass to the dispatch function */
2266         state->tmp = state->orig;
2267
2268         subreq = cli->dispatch_send(state, ev, cli,
2269                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
2270                                     NDR_EVENTLOG_REGISTEREVENTSOURCEA,
2271                                     &state->tmp);
2272         if (tevent_req_nomem(subreq, req)) {
2273                 return tevent_req_post(req, ev);
2274         }
2275         tevent_req_set_callback(subreq, rpccli_eventlog_RegisterEventSourceA_done, req);
2276         return req;
2277 }
2278
2279 static void rpccli_eventlog_RegisterEventSourceA_done(struct tevent_req *subreq)
2280 {
2281         struct tevent_req *req = tevent_req_callback_data(
2282                 subreq, struct tevent_req);
2283         struct rpccli_eventlog_RegisterEventSourceA_state *state = tevent_req_data(
2284                 req, struct rpccli_eventlog_RegisterEventSourceA_state);
2285         NTSTATUS status;
2286         TALLOC_CTX *mem_ctx;
2287
2288         if (state->out_mem_ctx) {
2289                 mem_ctx = state->out_mem_ctx;
2290         } else {
2291                 mem_ctx = state;
2292         }
2293
2294         status = state->dispatch_recv(subreq, mem_ctx);
2295         TALLOC_FREE(subreq);
2296         if (!NT_STATUS_IS_OK(status)) {
2297                 tevent_req_nterror(req, status);
2298                 return;
2299         }
2300
2301         /* Copy out parameters */
2302
2303         /* Copy result */
2304         state->orig.out.result = state->tmp.out.result;
2305
2306         /* Reset temporary structure */
2307         ZERO_STRUCT(state->tmp);
2308
2309         tevent_req_done(req);
2310 }
2311
2312 NTSTATUS rpccli_eventlog_RegisterEventSourceA_recv(struct tevent_req *req,
2313                                                    TALLOC_CTX *mem_ctx,
2314                                                    NTSTATUS *result)
2315 {
2316         struct rpccli_eventlog_RegisterEventSourceA_state *state = tevent_req_data(
2317                 req, struct rpccli_eventlog_RegisterEventSourceA_state);
2318         NTSTATUS status;
2319
2320         if (tevent_req_is_nterror(req, &status)) {
2321                 tevent_req_received(req);
2322                 return status;
2323         }
2324
2325         /* Steal possbile out parameters to the callers context */
2326         talloc_steal(mem_ctx, state->out_mem_ctx);
2327
2328         /* Return result */
2329         *result = state->orig.out.result;
2330
2331         tevent_req_received(req);
2332         return NT_STATUS_OK;
2333 }
2334
2335 NTSTATUS rpccli_eventlog_RegisterEventSourceA(struct rpc_pipe_client *cli,
2336                                               TALLOC_CTX *mem_ctx)
2337 {
2338         struct eventlog_RegisterEventSourceA r;
2339         NTSTATUS status;
2340
2341         /* In parameters */
2342
2343         status = cli->dispatch(cli,
2344                                 mem_ctx,
2345                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
2346                                 NDR_EVENTLOG_REGISTEREVENTSOURCEA,
2347                                 &r);
2348
2349         if (!NT_STATUS_IS_OK(status)) {
2350                 return status;
2351         }
2352
2353         if (NT_STATUS_IS_ERR(status)) {
2354                 return status;
2355         }
2356
2357         /* Return variables */
2358
2359         /* Return result */
2360         return r.out.result;
2361 }
2362
2363 struct rpccli_eventlog_OpenBackupEventLogA_state {
2364         struct eventlog_OpenBackupEventLogA orig;
2365         struct eventlog_OpenBackupEventLogA tmp;
2366         TALLOC_CTX *out_mem_ctx;
2367         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2368 };
2369
2370 static void rpccli_eventlog_OpenBackupEventLogA_done(struct tevent_req *subreq);
2371
2372 struct tevent_req *rpccli_eventlog_OpenBackupEventLogA_send(TALLOC_CTX *mem_ctx,
2373                                                             struct tevent_context *ev,
2374                                                             struct rpc_pipe_client *cli)
2375 {
2376         struct tevent_req *req;
2377         struct rpccli_eventlog_OpenBackupEventLogA_state *state;
2378         struct tevent_req *subreq;
2379
2380         req = tevent_req_create(mem_ctx, &state,
2381                                 struct rpccli_eventlog_OpenBackupEventLogA_state);
2382         if (req == NULL) {
2383                 return NULL;
2384         }
2385         state->out_mem_ctx = NULL;
2386         state->dispatch_recv = cli->dispatch_recv;
2387
2388         /* In parameters */
2389
2390         /* Out parameters */
2391
2392         /* Result */
2393         ZERO_STRUCT(state->orig.out.result);
2394
2395         /* make a temporary copy, that we pass to the dispatch function */
2396         state->tmp = state->orig;
2397
2398         subreq = cli->dispatch_send(state, ev, cli,
2399                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
2400                                     NDR_EVENTLOG_OPENBACKUPEVENTLOGA,
2401                                     &state->tmp);
2402         if (tevent_req_nomem(subreq, req)) {
2403                 return tevent_req_post(req, ev);
2404         }
2405         tevent_req_set_callback(subreq, rpccli_eventlog_OpenBackupEventLogA_done, req);
2406         return req;
2407 }
2408
2409 static void rpccli_eventlog_OpenBackupEventLogA_done(struct tevent_req *subreq)
2410 {
2411         struct tevent_req *req = tevent_req_callback_data(
2412                 subreq, struct tevent_req);
2413         struct rpccli_eventlog_OpenBackupEventLogA_state *state = tevent_req_data(
2414                 req, struct rpccli_eventlog_OpenBackupEventLogA_state);
2415         NTSTATUS status;
2416         TALLOC_CTX *mem_ctx;
2417
2418         if (state->out_mem_ctx) {
2419                 mem_ctx = state->out_mem_ctx;
2420         } else {
2421                 mem_ctx = state;
2422         }
2423
2424         status = state->dispatch_recv(subreq, mem_ctx);
2425         TALLOC_FREE(subreq);
2426         if (!NT_STATUS_IS_OK(status)) {
2427                 tevent_req_nterror(req, status);
2428                 return;
2429         }
2430
2431         /* Copy out parameters */
2432
2433         /* Copy result */
2434         state->orig.out.result = state->tmp.out.result;
2435
2436         /* Reset temporary structure */
2437         ZERO_STRUCT(state->tmp);
2438
2439         tevent_req_done(req);
2440 }
2441
2442 NTSTATUS rpccli_eventlog_OpenBackupEventLogA_recv(struct tevent_req *req,
2443                                                   TALLOC_CTX *mem_ctx,
2444                                                   NTSTATUS *result)
2445 {
2446         struct rpccli_eventlog_OpenBackupEventLogA_state *state = tevent_req_data(
2447                 req, struct rpccli_eventlog_OpenBackupEventLogA_state);
2448         NTSTATUS status;
2449
2450         if (tevent_req_is_nterror(req, &status)) {
2451                 tevent_req_received(req);
2452                 return status;
2453         }
2454
2455         /* Steal possbile out parameters to the callers context */
2456         talloc_steal(mem_ctx, state->out_mem_ctx);
2457
2458         /* Return result */
2459         *result = state->orig.out.result;
2460
2461         tevent_req_received(req);
2462         return NT_STATUS_OK;
2463 }
2464
2465 NTSTATUS rpccli_eventlog_OpenBackupEventLogA(struct rpc_pipe_client *cli,
2466                                              TALLOC_CTX *mem_ctx)
2467 {
2468         struct eventlog_OpenBackupEventLogA r;
2469         NTSTATUS status;
2470
2471         /* In parameters */
2472
2473         status = cli->dispatch(cli,
2474                                 mem_ctx,
2475                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
2476                                 NDR_EVENTLOG_OPENBACKUPEVENTLOGA,
2477                                 &r);
2478
2479         if (!NT_STATUS_IS_OK(status)) {
2480                 return status;
2481         }
2482
2483         if (NT_STATUS_IS_ERR(status)) {
2484                 return status;
2485         }
2486
2487         /* Return variables */
2488
2489         /* Return result */
2490         return r.out.result;
2491 }
2492
2493 struct rpccli_eventlog_ReadEventLogA_state {
2494         struct eventlog_ReadEventLogA orig;
2495         struct eventlog_ReadEventLogA tmp;
2496         TALLOC_CTX *out_mem_ctx;
2497         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2498 };
2499
2500 static void rpccli_eventlog_ReadEventLogA_done(struct tevent_req *subreq);
2501
2502 struct tevent_req *rpccli_eventlog_ReadEventLogA_send(TALLOC_CTX *mem_ctx,
2503                                                       struct tevent_context *ev,
2504                                                       struct rpc_pipe_client *cli)
2505 {
2506         struct tevent_req *req;
2507         struct rpccli_eventlog_ReadEventLogA_state *state;
2508         struct tevent_req *subreq;
2509
2510         req = tevent_req_create(mem_ctx, &state,
2511                                 struct rpccli_eventlog_ReadEventLogA_state);
2512         if (req == NULL) {
2513                 return NULL;
2514         }
2515         state->out_mem_ctx = NULL;
2516         state->dispatch_recv = cli->dispatch_recv;
2517
2518         /* In parameters */
2519
2520         /* Out parameters */
2521
2522         /* Result */
2523         ZERO_STRUCT(state->orig.out.result);
2524
2525         /* make a temporary copy, that we pass to the dispatch function */
2526         state->tmp = state->orig;
2527
2528         subreq = cli->dispatch_send(state, ev, cli,
2529                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
2530                                     NDR_EVENTLOG_READEVENTLOGA,
2531                                     &state->tmp);
2532         if (tevent_req_nomem(subreq, req)) {
2533                 return tevent_req_post(req, ev);
2534         }
2535         tevent_req_set_callback(subreq, rpccli_eventlog_ReadEventLogA_done, req);
2536         return req;
2537 }
2538
2539 static void rpccli_eventlog_ReadEventLogA_done(struct tevent_req *subreq)
2540 {
2541         struct tevent_req *req = tevent_req_callback_data(
2542                 subreq, struct tevent_req);
2543         struct rpccli_eventlog_ReadEventLogA_state *state = tevent_req_data(
2544                 req, struct rpccli_eventlog_ReadEventLogA_state);
2545         NTSTATUS status;
2546         TALLOC_CTX *mem_ctx;
2547
2548         if (state->out_mem_ctx) {
2549                 mem_ctx = state->out_mem_ctx;
2550         } else {
2551                 mem_ctx = state;
2552         }
2553
2554         status = state->dispatch_recv(subreq, mem_ctx);
2555         TALLOC_FREE(subreq);
2556         if (!NT_STATUS_IS_OK(status)) {
2557                 tevent_req_nterror(req, status);
2558                 return;
2559         }
2560
2561         /* Copy out parameters */
2562
2563         /* Copy result */
2564         state->orig.out.result = state->tmp.out.result;
2565
2566         /* Reset temporary structure */
2567         ZERO_STRUCT(state->tmp);
2568
2569         tevent_req_done(req);
2570 }
2571
2572 NTSTATUS rpccli_eventlog_ReadEventLogA_recv(struct tevent_req *req,
2573                                             TALLOC_CTX *mem_ctx,
2574                                             NTSTATUS *result)
2575 {
2576         struct rpccli_eventlog_ReadEventLogA_state *state = tevent_req_data(
2577                 req, struct rpccli_eventlog_ReadEventLogA_state);
2578         NTSTATUS status;
2579
2580         if (tevent_req_is_nterror(req, &status)) {
2581                 tevent_req_received(req);
2582                 return status;
2583         }
2584
2585         /* Steal possbile out parameters to the callers context */
2586         talloc_steal(mem_ctx, state->out_mem_ctx);
2587
2588         /* Return result */
2589         *result = state->orig.out.result;
2590
2591         tevent_req_received(req);
2592         return NT_STATUS_OK;
2593 }
2594
2595 NTSTATUS rpccli_eventlog_ReadEventLogA(struct rpc_pipe_client *cli,
2596                                        TALLOC_CTX *mem_ctx)
2597 {
2598         struct eventlog_ReadEventLogA r;
2599         NTSTATUS status;
2600
2601         /* In parameters */
2602
2603         status = cli->dispatch(cli,
2604                                 mem_ctx,
2605                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
2606                                 NDR_EVENTLOG_READEVENTLOGA,
2607                                 &r);
2608
2609         if (!NT_STATUS_IS_OK(status)) {
2610                 return status;
2611         }
2612
2613         if (NT_STATUS_IS_ERR(status)) {
2614                 return status;
2615         }
2616
2617         /* Return variables */
2618
2619         /* Return result */
2620         return r.out.result;
2621 }
2622
2623 struct rpccli_eventlog_ReportEventA_state {
2624         struct eventlog_ReportEventA orig;
2625         struct eventlog_ReportEventA tmp;
2626         TALLOC_CTX *out_mem_ctx;
2627         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2628 };
2629
2630 static void rpccli_eventlog_ReportEventA_done(struct tevent_req *subreq);
2631
2632 struct tevent_req *rpccli_eventlog_ReportEventA_send(TALLOC_CTX *mem_ctx,
2633                                                      struct tevent_context *ev,
2634                                                      struct rpc_pipe_client *cli)
2635 {
2636         struct tevent_req *req;
2637         struct rpccli_eventlog_ReportEventA_state *state;
2638         struct tevent_req *subreq;
2639
2640         req = tevent_req_create(mem_ctx, &state,
2641                                 struct rpccli_eventlog_ReportEventA_state);
2642         if (req == NULL) {
2643                 return NULL;
2644         }
2645         state->out_mem_ctx = NULL;
2646         state->dispatch_recv = cli->dispatch_recv;
2647
2648         /* In parameters */
2649
2650         /* Out parameters */
2651
2652         /* Result */
2653         ZERO_STRUCT(state->orig.out.result);
2654
2655         /* make a temporary copy, that we pass to the dispatch function */
2656         state->tmp = state->orig;
2657
2658         subreq = cli->dispatch_send(state, ev, cli,
2659                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
2660                                     NDR_EVENTLOG_REPORTEVENTA,
2661                                     &state->tmp);
2662         if (tevent_req_nomem(subreq, req)) {
2663                 return tevent_req_post(req, ev);
2664         }
2665         tevent_req_set_callback(subreq, rpccli_eventlog_ReportEventA_done, req);
2666         return req;
2667 }
2668
2669 static void rpccli_eventlog_ReportEventA_done(struct tevent_req *subreq)
2670 {
2671         struct tevent_req *req = tevent_req_callback_data(
2672                 subreq, struct tevent_req);
2673         struct rpccli_eventlog_ReportEventA_state *state = tevent_req_data(
2674                 req, struct rpccli_eventlog_ReportEventA_state);
2675         NTSTATUS status;
2676         TALLOC_CTX *mem_ctx;
2677
2678         if (state->out_mem_ctx) {
2679                 mem_ctx = state->out_mem_ctx;
2680         } else {
2681                 mem_ctx = state;
2682         }
2683
2684         status = state->dispatch_recv(subreq, mem_ctx);
2685         TALLOC_FREE(subreq);
2686         if (!NT_STATUS_IS_OK(status)) {
2687                 tevent_req_nterror(req, status);
2688                 return;
2689         }
2690
2691         /* Copy out parameters */
2692
2693         /* Copy result */
2694         state->orig.out.result = state->tmp.out.result;
2695
2696         /* Reset temporary structure */
2697         ZERO_STRUCT(state->tmp);
2698
2699         tevent_req_done(req);
2700 }
2701
2702 NTSTATUS rpccli_eventlog_ReportEventA_recv(struct tevent_req *req,
2703                                            TALLOC_CTX *mem_ctx,
2704                                            NTSTATUS *result)
2705 {
2706         struct rpccli_eventlog_ReportEventA_state *state = tevent_req_data(
2707                 req, struct rpccli_eventlog_ReportEventA_state);
2708         NTSTATUS status;
2709
2710         if (tevent_req_is_nterror(req, &status)) {
2711                 tevent_req_received(req);
2712                 return status;
2713         }
2714
2715         /* Steal possbile out parameters to the callers context */
2716         talloc_steal(mem_ctx, state->out_mem_ctx);
2717
2718         /* Return result */
2719         *result = state->orig.out.result;
2720
2721         tevent_req_received(req);
2722         return NT_STATUS_OK;
2723 }
2724
2725 NTSTATUS rpccli_eventlog_ReportEventA(struct rpc_pipe_client *cli,
2726                                       TALLOC_CTX *mem_ctx)
2727 {
2728         struct eventlog_ReportEventA r;
2729         NTSTATUS status;
2730
2731         /* In parameters */
2732
2733         status = cli->dispatch(cli,
2734                                 mem_ctx,
2735                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
2736                                 NDR_EVENTLOG_REPORTEVENTA,
2737                                 &r);
2738
2739         if (!NT_STATUS_IS_OK(status)) {
2740                 return status;
2741         }
2742
2743         if (NT_STATUS_IS_ERR(status)) {
2744                 return status;
2745         }
2746
2747         /* Return variables */
2748
2749         /* Return result */
2750         return r.out.result;
2751 }
2752
2753 struct rpccli_eventlog_RegisterClusterSvc_state {
2754         struct eventlog_RegisterClusterSvc orig;
2755         struct eventlog_RegisterClusterSvc tmp;
2756         TALLOC_CTX *out_mem_ctx;
2757         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2758 };
2759
2760 static void rpccli_eventlog_RegisterClusterSvc_done(struct tevent_req *subreq);
2761
2762 struct tevent_req *rpccli_eventlog_RegisterClusterSvc_send(TALLOC_CTX *mem_ctx,
2763                                                            struct tevent_context *ev,
2764                                                            struct rpc_pipe_client *cli)
2765 {
2766         struct tevent_req *req;
2767         struct rpccli_eventlog_RegisterClusterSvc_state *state;
2768         struct tevent_req *subreq;
2769
2770         req = tevent_req_create(mem_ctx, &state,
2771                                 struct rpccli_eventlog_RegisterClusterSvc_state);
2772         if (req == NULL) {
2773                 return NULL;
2774         }
2775         state->out_mem_ctx = NULL;
2776         state->dispatch_recv = cli->dispatch_recv;
2777
2778         /* In parameters */
2779
2780         /* Out parameters */
2781
2782         /* Result */
2783         ZERO_STRUCT(state->orig.out.result);
2784
2785         /* make a temporary copy, that we pass to the dispatch function */
2786         state->tmp = state->orig;
2787
2788         subreq = cli->dispatch_send(state, ev, cli,
2789                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
2790                                     NDR_EVENTLOG_REGISTERCLUSTERSVC,
2791                                     &state->tmp);
2792         if (tevent_req_nomem(subreq, req)) {
2793                 return tevent_req_post(req, ev);
2794         }
2795         tevent_req_set_callback(subreq, rpccli_eventlog_RegisterClusterSvc_done, req);
2796         return req;
2797 }
2798
2799 static void rpccli_eventlog_RegisterClusterSvc_done(struct tevent_req *subreq)
2800 {
2801         struct tevent_req *req = tevent_req_callback_data(
2802                 subreq, struct tevent_req);
2803         struct rpccli_eventlog_RegisterClusterSvc_state *state = tevent_req_data(
2804                 req, struct rpccli_eventlog_RegisterClusterSvc_state);
2805         NTSTATUS status;
2806         TALLOC_CTX *mem_ctx;
2807
2808         if (state->out_mem_ctx) {
2809                 mem_ctx = state->out_mem_ctx;
2810         } else {
2811                 mem_ctx = state;
2812         }
2813
2814         status = state->dispatch_recv(subreq, mem_ctx);
2815         TALLOC_FREE(subreq);
2816         if (!NT_STATUS_IS_OK(status)) {
2817                 tevent_req_nterror(req, status);
2818                 return;
2819         }
2820
2821         /* Copy out parameters */
2822
2823         /* Copy result */
2824         state->orig.out.result = state->tmp.out.result;
2825
2826         /* Reset temporary structure */
2827         ZERO_STRUCT(state->tmp);
2828
2829         tevent_req_done(req);
2830 }
2831
2832 NTSTATUS rpccli_eventlog_RegisterClusterSvc_recv(struct tevent_req *req,
2833                                                  TALLOC_CTX *mem_ctx,
2834                                                  NTSTATUS *result)
2835 {
2836         struct rpccli_eventlog_RegisterClusterSvc_state *state = tevent_req_data(
2837                 req, struct rpccli_eventlog_RegisterClusterSvc_state);
2838         NTSTATUS status;
2839
2840         if (tevent_req_is_nterror(req, &status)) {
2841                 tevent_req_received(req);
2842                 return status;
2843         }
2844
2845         /* Steal possbile out parameters to the callers context */
2846         talloc_steal(mem_ctx, state->out_mem_ctx);
2847
2848         /* Return result */
2849         *result = state->orig.out.result;
2850
2851         tevent_req_received(req);
2852         return NT_STATUS_OK;
2853 }
2854
2855 NTSTATUS rpccli_eventlog_RegisterClusterSvc(struct rpc_pipe_client *cli,
2856                                             TALLOC_CTX *mem_ctx)
2857 {
2858         struct eventlog_RegisterClusterSvc r;
2859         NTSTATUS status;
2860
2861         /* In parameters */
2862
2863         status = cli->dispatch(cli,
2864                                 mem_ctx,
2865                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
2866                                 NDR_EVENTLOG_REGISTERCLUSTERSVC,
2867                                 &r);
2868
2869         if (!NT_STATUS_IS_OK(status)) {
2870                 return status;
2871         }
2872
2873         if (NT_STATUS_IS_ERR(status)) {
2874                 return status;
2875         }
2876
2877         /* Return variables */
2878
2879         /* Return result */
2880         return r.out.result;
2881 }
2882
2883 struct rpccli_eventlog_DeregisterClusterSvc_state {
2884         struct eventlog_DeregisterClusterSvc orig;
2885         struct eventlog_DeregisterClusterSvc tmp;
2886         TALLOC_CTX *out_mem_ctx;
2887         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2888 };
2889
2890 static void rpccli_eventlog_DeregisterClusterSvc_done(struct tevent_req *subreq);
2891
2892 struct tevent_req *rpccli_eventlog_DeregisterClusterSvc_send(TALLOC_CTX *mem_ctx,
2893                                                              struct tevent_context *ev,
2894                                                              struct rpc_pipe_client *cli)
2895 {
2896         struct tevent_req *req;
2897         struct rpccli_eventlog_DeregisterClusterSvc_state *state;
2898         struct tevent_req *subreq;
2899
2900         req = tevent_req_create(mem_ctx, &state,
2901                                 struct rpccli_eventlog_DeregisterClusterSvc_state);
2902         if (req == NULL) {
2903                 return NULL;
2904         }
2905         state->out_mem_ctx = NULL;
2906         state->dispatch_recv = cli->dispatch_recv;
2907
2908         /* In parameters */
2909
2910         /* Out parameters */
2911
2912         /* Result */
2913         ZERO_STRUCT(state->orig.out.result);
2914
2915         /* make a temporary copy, that we pass to the dispatch function */
2916         state->tmp = state->orig;
2917
2918         subreq = cli->dispatch_send(state, ev, cli,
2919                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
2920                                     NDR_EVENTLOG_DEREGISTERCLUSTERSVC,
2921                                     &state->tmp);
2922         if (tevent_req_nomem(subreq, req)) {
2923                 return tevent_req_post(req, ev);
2924         }
2925         tevent_req_set_callback(subreq, rpccli_eventlog_DeregisterClusterSvc_done, req);
2926         return req;
2927 }
2928
2929 static void rpccli_eventlog_DeregisterClusterSvc_done(struct tevent_req *subreq)
2930 {
2931         struct tevent_req *req = tevent_req_callback_data(
2932                 subreq, struct tevent_req);
2933         struct rpccli_eventlog_DeregisterClusterSvc_state *state = tevent_req_data(
2934                 req, struct rpccli_eventlog_DeregisterClusterSvc_state);
2935         NTSTATUS status;
2936         TALLOC_CTX *mem_ctx;
2937
2938         if (state->out_mem_ctx) {
2939                 mem_ctx = state->out_mem_ctx;
2940         } else {
2941                 mem_ctx = state;
2942         }
2943
2944         status = state->dispatch_recv(subreq, mem_ctx);
2945         TALLOC_FREE(subreq);
2946         if (!NT_STATUS_IS_OK(status)) {
2947                 tevent_req_nterror(req, status);
2948                 return;
2949         }
2950
2951         /* Copy out parameters */
2952
2953         /* Copy result */
2954         state->orig.out.result = state->tmp.out.result;
2955
2956         /* Reset temporary structure */
2957         ZERO_STRUCT(state->tmp);
2958
2959         tevent_req_done(req);
2960 }
2961
2962 NTSTATUS rpccli_eventlog_DeregisterClusterSvc_recv(struct tevent_req *req,
2963                                                    TALLOC_CTX *mem_ctx,
2964                                                    NTSTATUS *result)
2965 {
2966         struct rpccli_eventlog_DeregisterClusterSvc_state *state = tevent_req_data(
2967                 req, struct rpccli_eventlog_DeregisterClusterSvc_state);
2968         NTSTATUS status;
2969
2970         if (tevent_req_is_nterror(req, &status)) {
2971                 tevent_req_received(req);
2972                 return status;
2973         }
2974
2975         /* Steal possbile out parameters to the callers context */
2976         talloc_steal(mem_ctx, state->out_mem_ctx);
2977
2978         /* Return result */
2979         *result = state->orig.out.result;
2980
2981         tevent_req_received(req);
2982         return NT_STATUS_OK;
2983 }
2984
2985 NTSTATUS rpccli_eventlog_DeregisterClusterSvc(struct rpc_pipe_client *cli,
2986                                               TALLOC_CTX *mem_ctx)
2987 {
2988         struct eventlog_DeregisterClusterSvc r;
2989         NTSTATUS status;
2990
2991         /* In parameters */
2992
2993         status = cli->dispatch(cli,
2994                                 mem_ctx,
2995                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
2996                                 NDR_EVENTLOG_DEREGISTERCLUSTERSVC,
2997                                 &r);
2998
2999         if (!NT_STATUS_IS_OK(status)) {
3000                 return status;
3001         }
3002
3003         if (NT_STATUS_IS_ERR(status)) {
3004                 return status;
3005         }
3006
3007         /* Return variables */
3008
3009         /* Return result */
3010         return r.out.result;
3011 }
3012
3013 struct rpccli_eventlog_WriteClusterEvents_state {
3014         struct eventlog_WriteClusterEvents orig;
3015         struct eventlog_WriteClusterEvents tmp;
3016         TALLOC_CTX *out_mem_ctx;
3017         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3018 };
3019
3020 static void rpccli_eventlog_WriteClusterEvents_done(struct tevent_req *subreq);
3021
3022 struct tevent_req *rpccli_eventlog_WriteClusterEvents_send(TALLOC_CTX *mem_ctx,
3023                                                            struct tevent_context *ev,
3024                                                            struct rpc_pipe_client *cli)
3025 {
3026         struct tevent_req *req;
3027         struct rpccli_eventlog_WriteClusterEvents_state *state;
3028         struct tevent_req *subreq;
3029
3030         req = tevent_req_create(mem_ctx, &state,
3031                                 struct rpccli_eventlog_WriteClusterEvents_state);
3032         if (req == NULL) {
3033                 return NULL;
3034         }
3035         state->out_mem_ctx = NULL;
3036         state->dispatch_recv = cli->dispatch_recv;
3037
3038         /* In parameters */
3039
3040         /* Out parameters */
3041
3042         /* Result */
3043         ZERO_STRUCT(state->orig.out.result);
3044
3045         /* make a temporary copy, that we pass to the dispatch function */
3046         state->tmp = state->orig;
3047
3048         subreq = cli->dispatch_send(state, ev, cli,
3049                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
3050                                     NDR_EVENTLOG_WRITECLUSTEREVENTS,
3051                                     &state->tmp);
3052         if (tevent_req_nomem(subreq, req)) {
3053                 return tevent_req_post(req, ev);
3054         }
3055         tevent_req_set_callback(subreq, rpccli_eventlog_WriteClusterEvents_done, req);
3056         return req;
3057 }
3058
3059 static void rpccli_eventlog_WriteClusterEvents_done(struct tevent_req *subreq)
3060 {
3061         struct tevent_req *req = tevent_req_callback_data(
3062                 subreq, struct tevent_req);
3063         struct rpccli_eventlog_WriteClusterEvents_state *state = tevent_req_data(
3064                 req, struct rpccli_eventlog_WriteClusterEvents_state);
3065         NTSTATUS status;
3066         TALLOC_CTX *mem_ctx;
3067
3068         if (state->out_mem_ctx) {
3069                 mem_ctx = state->out_mem_ctx;
3070         } else {
3071                 mem_ctx = state;
3072         }
3073
3074         status = state->dispatch_recv(subreq, mem_ctx);
3075         TALLOC_FREE(subreq);
3076         if (!NT_STATUS_IS_OK(status)) {
3077                 tevent_req_nterror(req, status);
3078                 return;
3079         }
3080
3081         /* Copy out parameters */
3082
3083         /* Copy result */
3084         state->orig.out.result = state->tmp.out.result;
3085
3086         /* Reset temporary structure */
3087         ZERO_STRUCT(state->tmp);
3088
3089         tevent_req_done(req);
3090 }
3091
3092 NTSTATUS rpccli_eventlog_WriteClusterEvents_recv(struct tevent_req *req,
3093                                                  TALLOC_CTX *mem_ctx,
3094                                                  NTSTATUS *result)
3095 {
3096         struct rpccli_eventlog_WriteClusterEvents_state *state = tevent_req_data(
3097                 req, struct rpccli_eventlog_WriteClusterEvents_state);
3098         NTSTATUS status;
3099
3100         if (tevent_req_is_nterror(req, &status)) {
3101                 tevent_req_received(req);
3102                 return status;
3103         }
3104
3105         /* Steal possbile out parameters to the callers context */
3106         talloc_steal(mem_ctx, state->out_mem_ctx);
3107
3108         /* Return result */
3109         *result = state->orig.out.result;
3110
3111         tevent_req_received(req);
3112         return NT_STATUS_OK;
3113 }
3114
3115 NTSTATUS rpccli_eventlog_WriteClusterEvents(struct rpc_pipe_client *cli,
3116                                             TALLOC_CTX *mem_ctx)
3117 {
3118         struct eventlog_WriteClusterEvents r;
3119         NTSTATUS status;
3120
3121         /* In parameters */
3122
3123         status = cli->dispatch(cli,
3124                                 mem_ctx,
3125                                 NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
3126                                 NDR_EVENTLOG_WRITECLUSTEREVENTS,
3127                                 &r);
3128
3129         if (!NT_STATUS_IS_OK(status)) {
3130                 return status;
3131         }
3132
3133         if (NT_STATUS_IS_ERR(status)) {
3134                 return status;
3135         }
3136
3137         /* Return variables */
3138
3139         /* Return result */
3140         return r.out.result;
3141 }
3142
3143 struct rpccli_eventlog_GetLogInformation_state {
3144         struct eventlog_GetLogInformation orig;
3145         struct eventlog_GetLogInformation tmp;
3146         TALLOC_CTX *out_mem_ctx;
3147         NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3148 };
3149
3150 static void rpccli_eventlog_GetLogInformation_done(struct tevent_req *subreq);
3151
3152 struct tevent_req *rpccli_eventlog_GetLogInformation_send(TALLOC_CTX *mem_ctx,
3153                                                           struct tevent_context *ev,
3154                                                           struct rpc_pipe_client *cli,
3155                                                           struct policy_handle *_handle /* [in] [ref] */,
3156                                                           uint32_t _level /* [in]  */,
3157                                                           uint8_t *_buffer /* [out] [ref,size_is(buf_size)] */,
3158                                                           uint32_t _buf_size /* [in] [range(0,1024)] */,
3159                                                           uint32_t *_bytes_needed /* [out] [ref] */)
3160 {
3161         struct tevent_req *req;
3162         struct rpccli_eventlog_GetLogInformation_state *state;
3163         struct tevent_req *subreq;
3164
3165         req = tevent_req_create(mem_ctx, &state,
3166                                 struct rpccli_eventlog_GetLogInformation_state);
3167         if (req == NULL) {
3168                 return NULL;
3169         }
3170         state->out_mem_ctx = NULL;
3171         state->dispatch_recv = cli->dispatch_recv;
3172
3173         /* In parameters */
3174         state->orig.in.handle = _handle;
3175         state->orig.in.level = _level;
3176         state->orig.in.buf_size = _buf_size;
3177
3178         /* Out parameters */
3179         state->orig.out.buffer = _buffer;
3180         state->orig.out.bytes_needed = _bytes_needed;
3181
3182         /* Result */
3183         ZERO_STRUCT(state->orig.out.result);
3184
3185         state->out_mem_ctx = talloc_named_const(state, 0,
3186                              "rpccli_eventlog_GetLogInformation_out_memory");
3187         if (tevent_req_nomem(state->out_mem_ctx, req)) {
3188                 return tevent_req_post(req, ev);
3189         }
3190
3191         /* make a temporary copy, that we pass to the dispatch function */
3192         state->tmp = state->orig;
3193
3194         subreq = cli->dispatch_send(state, ev, cli,
3195                                     NDR_EVENTLOG_UUID, NDR_EVENTLOG_VERSION,
3196                                     NDR_EVENTLOG_GETLOGINFORMATION,
3197                                     &state->tmp);
3198         if (tevent_req_nomem(subreq, req)) {
3199                 return tevent_req_post(req, ev);
3200         }
3201         tevent_req_set_callback(subreq, rpccli_eventlog_GetLogInformation_done, req);
3202         return req;
3203 }
3204
3205 static void rpccli_eventlog_GetLogInformation_done(struct tevent_req *subreq)
3206 {
3207         struct tevent_req *req = tevent_req_callback_data(
3208                 subreq, struct tevent_req);
3209         struct rpccli_eventlog_GetLogInformation_state *state = tevent_req_data(
3210                 req, struct rpccli_eventlog_GetLogInformation_state);
3211         NTSTATUS status;
3212         TALLOC_CTX *mem_ctx;
3213
3214         if (state->out_mem_ctx) {
3215                 mem_ctx = state->out_mem_ctx;
3216         } else {
3217                 mem_ctx = state;
3218         }
3219
3220         status = state->dispatch_recv(subreq, mem_ctx);
3221         TALLOC_FREE(subreq);
3222         if (!NT_STATUS_IS_OK(status)) {
3223                 tevent_req_nterror(req, status);
3224                 return;
3225         }
3226
3227         /* Copy out parameters */
3228         memcpy(state->orig.out.buffer, state->tmp.out.buffer, state->tmp.in.buf_size * sizeof(*state->orig.out.buffer));
3229         *state->orig.out.bytes_needed = *state->tmp.out.bytes_needed;
3230
3231         /* Copy result */
3232         state->orig.out.result = state->tmp.out.result;
3233
3234         /* Reset temporary structure */
3235         ZERO_STRUCT(state->tmp);
3236
3237         tevent_req_done(req);
3238 }
3239
3240 NTSTATUS rpccli_eventlog_GetLogInformation_recv(struct tevent_req *req,
3241                                                 TALLOC_CTX *mem_ctx,
3242                                                 NTSTATUS *result)
3243 {
3244         struct rpccli_eventlog_GetLogInformation_state *state = tevent_req_data(
3245                 req, struct rpccli_eventlog_GetLogInformation_state);
3246         NTSTATUS status;
3247
3248         if (tevent_req_is_nterror(req, &status)) {
3249                 tevent_req_received(req);
3250                 return status;
3251         }
3252