1 /* parser auto-generated by pidl */
4 #include "librpc/gen_ndr/ndr_eventlog.h"
6 #include "librpc/gen_ndr/ndr_lsa.h"
7 #include "librpc/gen_ndr/ndr_security.h"
8 static enum ndr_err_code
ndr_push_eventlog_OpenUnknown0(struct ndr_push
*ndr
, int ndr_flags
, const struct eventlog_OpenUnknown0
*r
)
10 if (ndr_flags
& NDR_SCALARS
) {
11 NDR_CHECK(ndr_push_align(ndr
, 2));
12 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->unknown0
));
13 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->unknown1
));
15 if (ndr_flags
& NDR_BUFFERS
) {
17 return NDR_ERR_SUCCESS
;
20 static enum ndr_err_code
ndr_pull_eventlog_OpenUnknown0(struct ndr_pull
*ndr
, int ndr_flags
, struct eventlog_OpenUnknown0
*r
)
22 if (ndr_flags
& NDR_SCALARS
) {
23 NDR_CHECK(ndr_pull_align(ndr
, 2));
24 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->unknown0
));
25 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->unknown1
));
27 if (ndr_flags
& NDR_BUFFERS
) {
29 return NDR_ERR_SUCCESS
;
32 _PUBLIC_
void ndr_print_eventlog_OpenUnknown0(struct ndr_print
*ndr
, const char *name
, const struct eventlog_OpenUnknown0
*r
)
34 ndr_print_struct(ndr
, name
, "eventlog_OpenUnknown0");
36 ndr_print_uint16(ndr
, "unknown0", r
->unknown0
);
37 ndr_print_uint16(ndr
, "unknown1", r
->unknown1
);
41 _PUBLIC_
enum ndr_err_code
ndr_push_eventlog_Record(struct ndr_push
*ndr
, int ndr_flags
, const struct eventlog_Record
*r
)
43 uint32_t cntr_strings_0
;
44 if (ndr_flags
& NDR_SCALARS
) {
45 NDR_CHECK(ndr_push_align(ndr
, 4));
46 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
47 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
48 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->record_number
));
49 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->time_generated
));
50 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->time_written
));
51 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->event_id
));
52 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->event_type
));
53 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->num_of_strings
));
54 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->event_category
));
55 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->reserved_flags
));
56 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->closing_record_number
));
57 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->stringoffset
));
58 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_length
));
59 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_offset
));
60 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->data_length
));
61 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->data_offset
));
63 uint32_t _flags_save_string
= ndr
->flags
;
64 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
65 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->source_name
));
66 ndr
->flags
= _flags_save_string
;
69 uint32_t _flags_save_string
= ndr
->flags
;
70 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
71 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->computer_name
));
72 ndr
->flags
= _flags_save_string
;
75 uint32_t _flags_save_string
= ndr
->flags
;
76 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
77 for (cntr_strings_0
= 0; cntr_strings_0
< r
->num_of_strings
; cntr_strings_0
++) {
78 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->strings
[cntr_strings_0
]));
80 ndr
->flags
= _flags_save_string
;
83 uint32_t _flags_save_string
= ndr
->flags
;
84 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
85 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->raw_data
));
86 ndr
->flags
= _flags_save_string
;
89 if (ndr_flags
& NDR_BUFFERS
) {
91 return NDR_ERR_SUCCESS
;
94 _PUBLIC_
enum ndr_err_code
ndr_pull_eventlog_Record(struct ndr_pull
*ndr
, int ndr_flags
, struct eventlog_Record
*r
)
96 uint32_t cntr_strings_0
;
97 TALLOC_CTX
*_mem_save_strings_0
;
98 if (ndr_flags
& NDR_SCALARS
) {
99 NDR_CHECK(ndr_pull_align(ndr
, 4));
100 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
101 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
102 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->record_number
));
103 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->time_generated
));
104 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->time_written
));
105 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->event_id
));
106 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->event_type
));
107 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->num_of_strings
));
108 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->event_category
));
109 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->reserved_flags
));
110 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->closing_record_number
));
111 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->stringoffset
));
112 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_length
));
113 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_offset
));
114 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->data_length
));
115 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->data_offset
));
117 uint32_t _flags_save_string
= ndr
->flags
;
118 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
119 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->source_name
));
120 ndr
->flags
= _flags_save_string
;
123 uint32_t _flags_save_string
= ndr
->flags
;
124 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
125 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->computer_name
));
126 ndr
->flags
= _flags_save_string
;
129 uint32_t _flags_save_string
= ndr
->flags
;
130 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
131 NDR_PULL_ALLOC_N(ndr
, r
->strings
, r
->num_of_strings
);
132 _mem_save_strings_0
= NDR_PULL_GET_MEM_CTX(ndr
);
133 NDR_PULL_SET_MEM_CTX(ndr
, r
->strings
, 0);
134 for (cntr_strings_0
= 0; cntr_strings_0
< r
->num_of_strings
; cntr_strings_0
++) {
135 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->strings
[cntr_strings_0
]));
137 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_strings_0
, 0);
138 ndr
->flags
= _flags_save_string
;
141 uint32_t _flags_save_string
= ndr
->flags
;
142 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
143 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->raw_data
));
144 ndr
->flags
= _flags_save_string
;
147 if (ndr_flags
& NDR_BUFFERS
) {
149 return NDR_ERR_SUCCESS
;
152 _PUBLIC_
void ndr_print_eventlog_Record(struct ndr_print
*ndr
, const char *name
, const struct eventlog_Record
*r
)
154 uint32_t cntr_strings_0
;
155 ndr_print_struct(ndr
, name
, "eventlog_Record");
157 ndr_print_uint32(ndr
, "size", r
->size
);
158 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
159 ndr_print_uint32(ndr
, "record_number", r
->record_number
);
160 ndr_print_uint32(ndr
, "time_generated", r
->time_generated
);
161 ndr_print_uint32(ndr
, "time_written", r
->time_written
);
162 ndr_print_uint32(ndr
, "event_id", r
->event_id
);
163 ndr_print_uint16(ndr
, "event_type", r
->event_type
);
164 ndr_print_uint16(ndr
, "num_of_strings", r
->num_of_strings
);
165 ndr_print_uint16(ndr
, "event_category", r
->event_category
);
166 ndr_print_uint16(ndr
, "reserved_flags", r
->reserved_flags
);
167 ndr_print_uint32(ndr
, "closing_record_number", r
->closing_record_number
);
168 ndr_print_uint32(ndr
, "stringoffset", r
->stringoffset
);
169 ndr_print_uint32(ndr
, "sid_length", r
->sid_length
);
170 ndr_print_uint32(ndr
, "sid_offset", r
->sid_offset
);
171 ndr_print_uint32(ndr
, "data_length", r
->data_length
);
172 ndr_print_uint32(ndr
, "data_offset", r
->data_offset
);
173 ndr_print_string(ndr
, "source_name", r
->source_name
);
174 ndr_print_string(ndr
, "computer_name", r
->computer_name
);
175 ndr
->print(ndr
, "%s: ARRAY(%d)", "strings", r
->num_of_strings
);
177 for (cntr_strings_0
=0;cntr_strings_0
<r
->num_of_strings
;cntr_strings_0
++) {
179 if (asprintf(&idx_0
, "[%d]", cntr_strings_0
) != -1) {
180 ndr_print_string(ndr
, "strings", r
->strings
[cntr_strings_0
]);
185 ndr_print_string(ndr
, "raw_data", r
->raw_data
);
189 static enum ndr_err_code
ndr_push_eventlog_ClearEventLogW(struct ndr_push
*ndr
, int flags
, const struct eventlog_ClearEventLogW
*r
)
191 if (flags
& NDR_IN
) {
192 if (r
->in
.handle
== NULL
) {
193 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
195 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.handle
));
196 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.backupfile
));
197 if (r
->in
.backupfile
) {
198 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.backupfile
));
201 if (flags
& NDR_OUT
) {
202 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
204 return NDR_ERR_SUCCESS
;
207 static enum ndr_err_code
ndr_pull_eventlog_ClearEventLogW(struct ndr_pull
*ndr
, int flags
, struct eventlog_ClearEventLogW
*r
)
209 uint32_t _ptr_backupfile
;
210 TALLOC_CTX
*_mem_save_handle_0
;
211 TALLOC_CTX
*_mem_save_backupfile_0
;
212 if (flags
& NDR_IN
) {
213 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
214 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
216 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
217 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
218 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.handle
));
219 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
220 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_backupfile
));
221 if (_ptr_backupfile
) {
222 NDR_PULL_ALLOC(ndr
, r
->in
.backupfile
);
224 r
->in
.backupfile
= NULL
;
226 if (r
->in
.backupfile
) {
227 _mem_save_backupfile_0
= NDR_PULL_GET_MEM_CTX(ndr
);
228 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.backupfile
, 0);
229 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.backupfile
));
230 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_backupfile_0
, 0);
233 if (flags
& NDR_OUT
) {
234 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
236 return NDR_ERR_SUCCESS
;
239 _PUBLIC_
void ndr_print_eventlog_ClearEventLogW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ClearEventLogW
*r
)
241 ndr_print_struct(ndr
, name
, "eventlog_ClearEventLogW");
243 if (flags
& NDR_SET_VALUES
) {
244 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
246 if (flags
& NDR_IN
) {
247 ndr_print_struct(ndr
, "in", "eventlog_ClearEventLogW");
249 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
251 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
253 ndr_print_ptr(ndr
, "backupfile", r
->in
.backupfile
);
255 if (r
->in
.backupfile
) {
256 ndr_print_lsa_String(ndr
, "backupfile", r
->in
.backupfile
);
261 if (flags
& NDR_OUT
) {
262 ndr_print_struct(ndr
, "out", "eventlog_ClearEventLogW");
264 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
270 static enum ndr_err_code
ndr_push_eventlog_BackupEventLogW(struct ndr_push
*ndr
, int flags
, const struct eventlog_BackupEventLogW
*r
)
272 if (flags
& NDR_IN
) {
274 if (flags
& NDR_OUT
) {
275 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
277 return NDR_ERR_SUCCESS
;
280 static enum ndr_err_code
ndr_pull_eventlog_BackupEventLogW(struct ndr_pull
*ndr
, int flags
, struct eventlog_BackupEventLogW
*r
)
282 if (flags
& NDR_IN
) {
284 if (flags
& NDR_OUT
) {
285 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
287 return NDR_ERR_SUCCESS
;
290 _PUBLIC_
void ndr_print_eventlog_BackupEventLogW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_BackupEventLogW
*r
)
292 ndr_print_struct(ndr
, name
, "eventlog_BackupEventLogW");
294 if (flags
& NDR_SET_VALUES
) {
295 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
297 if (flags
& NDR_IN
) {
298 ndr_print_struct(ndr
, "in", "eventlog_BackupEventLogW");
302 if (flags
& NDR_OUT
) {
303 ndr_print_struct(ndr
, "out", "eventlog_BackupEventLogW");
305 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
311 static enum ndr_err_code
ndr_push_eventlog_CloseEventLog(struct ndr_push
*ndr
, int flags
, const struct eventlog_CloseEventLog
*r
)
313 if (flags
& NDR_IN
) {
314 if (r
->in
.handle
== NULL
) {
315 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
317 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.handle
));
319 if (flags
& NDR_OUT
) {
320 if (r
->out
.handle
== NULL
) {
321 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
323 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.handle
));
324 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
326 return NDR_ERR_SUCCESS
;
329 static enum ndr_err_code
ndr_pull_eventlog_CloseEventLog(struct ndr_pull
*ndr
, int flags
, struct eventlog_CloseEventLog
*r
)
331 TALLOC_CTX
*_mem_save_handle_0
;
332 if (flags
& NDR_IN
) {
335 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
336 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
338 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
339 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
340 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.handle
));
341 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
342 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
343 *r
->out
.handle
= *r
->in
.handle
;
345 if (flags
& NDR_OUT
) {
346 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
347 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
349 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
350 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
351 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.handle
));
352 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
353 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
355 return NDR_ERR_SUCCESS
;
358 _PUBLIC_
void ndr_print_eventlog_CloseEventLog(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_CloseEventLog
*r
)
360 ndr_print_struct(ndr
, name
, "eventlog_CloseEventLog");
362 if (flags
& NDR_SET_VALUES
) {
363 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
365 if (flags
& NDR_IN
) {
366 ndr_print_struct(ndr
, "in", "eventlog_CloseEventLog");
368 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
370 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
374 if (flags
& NDR_OUT
) {
375 ndr_print_struct(ndr
, "out", "eventlog_CloseEventLog");
377 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
379 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
381 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
387 static enum ndr_err_code
ndr_push_eventlog_DeregisterEventSource(struct ndr_push
*ndr
, int flags
, const struct eventlog_DeregisterEventSource
*r
)
389 if (flags
& NDR_IN
) {
391 if (flags
& NDR_OUT
) {
392 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
394 return NDR_ERR_SUCCESS
;
397 static enum ndr_err_code
ndr_pull_eventlog_DeregisterEventSource(struct ndr_pull
*ndr
, int flags
, struct eventlog_DeregisterEventSource
*r
)
399 if (flags
& NDR_IN
) {
401 if (flags
& NDR_OUT
) {
402 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
404 return NDR_ERR_SUCCESS
;
407 _PUBLIC_
void ndr_print_eventlog_DeregisterEventSource(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_DeregisterEventSource
*r
)
409 ndr_print_struct(ndr
, name
, "eventlog_DeregisterEventSource");
411 if (flags
& NDR_SET_VALUES
) {
412 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
414 if (flags
& NDR_IN
) {
415 ndr_print_struct(ndr
, "in", "eventlog_DeregisterEventSource");
419 if (flags
& NDR_OUT
) {
420 ndr_print_struct(ndr
, "out", "eventlog_DeregisterEventSource");
422 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
428 static enum ndr_err_code
ndr_push_eventlog_GetNumRecords(struct ndr_push
*ndr
, int flags
, const struct eventlog_GetNumRecords
*r
)
430 if (flags
& NDR_IN
) {
431 if (r
->in
.handle
== NULL
) {
432 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
434 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.handle
));
436 if (flags
& NDR_OUT
) {
437 if (r
->out
.number
== NULL
) {
438 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
440 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.number
));
441 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
443 return NDR_ERR_SUCCESS
;
446 static enum ndr_err_code
ndr_pull_eventlog_GetNumRecords(struct ndr_pull
*ndr
, int flags
, struct eventlog_GetNumRecords
*r
)
448 TALLOC_CTX
*_mem_save_handle_0
;
449 TALLOC_CTX
*_mem_save_number_0
;
450 if (flags
& NDR_IN
) {
453 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
454 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
456 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
457 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
458 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.handle
));
459 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
460 NDR_PULL_ALLOC(ndr
, r
->out
.number
);
461 ZERO_STRUCTP(r
->out
.number
);
463 if (flags
& NDR_OUT
) {
464 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
465 NDR_PULL_ALLOC(ndr
, r
->out
.number
);
467 _mem_save_number_0
= NDR_PULL_GET_MEM_CTX(ndr
);
468 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.number
, LIBNDR_FLAG_REF_ALLOC
);
469 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.number
));
470 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_number_0
, LIBNDR_FLAG_REF_ALLOC
);
471 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
473 return NDR_ERR_SUCCESS
;
476 _PUBLIC_
void ndr_print_eventlog_GetNumRecords(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_GetNumRecords
*r
)
478 ndr_print_struct(ndr
, name
, "eventlog_GetNumRecords");
480 if (flags
& NDR_SET_VALUES
) {
481 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
483 if (flags
& NDR_IN
) {
484 ndr_print_struct(ndr
, "in", "eventlog_GetNumRecords");
486 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
488 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
492 if (flags
& NDR_OUT
) {
493 ndr_print_struct(ndr
, "out", "eventlog_GetNumRecords");
495 ndr_print_ptr(ndr
, "number", r
->out
.number
);
497 ndr_print_uint32(ndr
, "number", *r
->out
.number
);
499 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
505 static enum ndr_err_code
ndr_push_eventlog_GetOldestRecord(struct ndr_push
*ndr
, int flags
, const struct eventlog_GetOldestRecord
*r
)
507 if (flags
& NDR_IN
) {
508 if (r
->in
.handle
== NULL
) {
509 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
511 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.handle
));
513 if (flags
& NDR_OUT
) {
514 if (r
->out
.oldest_entry
== NULL
) {
515 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
517 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.oldest_entry
));
518 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
520 return NDR_ERR_SUCCESS
;
523 static enum ndr_err_code
ndr_pull_eventlog_GetOldestRecord(struct ndr_pull
*ndr
, int flags
, struct eventlog_GetOldestRecord
*r
)
525 TALLOC_CTX
*_mem_save_handle_0
;
526 TALLOC_CTX
*_mem_save_oldest_entry_0
;
527 if (flags
& NDR_IN
) {
530 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
531 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
533 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
534 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
535 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.handle
));
536 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
537 NDR_PULL_ALLOC(ndr
, r
->out
.oldest_entry
);
538 ZERO_STRUCTP(r
->out
.oldest_entry
);
540 if (flags
& NDR_OUT
) {
541 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
542 NDR_PULL_ALLOC(ndr
, r
->out
.oldest_entry
);
544 _mem_save_oldest_entry_0
= NDR_PULL_GET_MEM_CTX(ndr
);
545 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.oldest_entry
, LIBNDR_FLAG_REF_ALLOC
);
546 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.oldest_entry
));
547 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_oldest_entry_0
, LIBNDR_FLAG_REF_ALLOC
);
548 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
550 return NDR_ERR_SUCCESS
;
553 _PUBLIC_
void ndr_print_eventlog_GetOldestRecord(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_GetOldestRecord
*r
)
555 ndr_print_struct(ndr
, name
, "eventlog_GetOldestRecord");
557 if (flags
& NDR_SET_VALUES
) {
558 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
560 if (flags
& NDR_IN
) {
561 ndr_print_struct(ndr
, "in", "eventlog_GetOldestRecord");
563 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
565 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
569 if (flags
& NDR_OUT
) {
570 ndr_print_struct(ndr
, "out", "eventlog_GetOldestRecord");
572 ndr_print_ptr(ndr
, "oldest_entry", r
->out
.oldest_entry
);
574 ndr_print_uint32(ndr
, "oldest_entry", *r
->out
.oldest_entry
);
576 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
582 static enum ndr_err_code
ndr_push_eventlog_ChangeNotify(struct ndr_push
*ndr
, int flags
, const struct eventlog_ChangeNotify
*r
)
584 if (flags
& NDR_IN
) {
586 if (flags
& NDR_OUT
) {
587 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
589 return NDR_ERR_SUCCESS
;
592 static enum ndr_err_code
ndr_pull_eventlog_ChangeNotify(struct ndr_pull
*ndr
, int flags
, struct eventlog_ChangeNotify
*r
)
594 if (flags
& NDR_IN
) {
596 if (flags
& NDR_OUT
) {
597 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
599 return NDR_ERR_SUCCESS
;
602 _PUBLIC_
void ndr_print_eventlog_ChangeNotify(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ChangeNotify
*r
)
604 ndr_print_struct(ndr
, name
, "eventlog_ChangeNotify");
606 if (flags
& NDR_SET_VALUES
) {
607 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
609 if (flags
& NDR_IN
) {
610 ndr_print_struct(ndr
, "in", "eventlog_ChangeNotify");
614 if (flags
& NDR_OUT
) {
615 ndr_print_struct(ndr
, "out", "eventlog_ChangeNotify");
617 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
623 static enum ndr_err_code
ndr_push_eventlog_OpenEventLogW(struct ndr_push
*ndr
, int flags
, const struct eventlog_OpenEventLogW
*r
)
625 if (flags
& NDR_IN
) {
626 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.unknown0
));
627 if (r
->in
.unknown0
) {
628 NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr
, NDR_SCALARS
, r
->in
.unknown0
));
630 if (r
->in
.logname
== NULL
) {
631 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
633 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.logname
));
634 if (r
->in
.servername
== NULL
) {
635 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
637 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.servername
));
638 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown2
));
639 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown3
));
641 if (flags
& NDR_OUT
) {
642 if (r
->out
.handle
== NULL
) {
643 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
645 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.handle
));
646 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
648 return NDR_ERR_SUCCESS
;
651 static enum ndr_err_code
ndr_pull_eventlog_OpenEventLogW(struct ndr_pull
*ndr
, int flags
, struct eventlog_OpenEventLogW
*r
)
653 uint32_t _ptr_unknown0
;
654 TALLOC_CTX
*_mem_save_unknown0_0
;
655 TALLOC_CTX
*_mem_save_logname_0
;
656 TALLOC_CTX
*_mem_save_servername_0
;
657 TALLOC_CTX
*_mem_save_handle_0
;
658 if (flags
& NDR_IN
) {
661 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown0
));
663 NDR_PULL_ALLOC(ndr
, r
->in
.unknown0
);
665 r
->in
.unknown0
= NULL
;
667 if (r
->in
.unknown0
) {
668 _mem_save_unknown0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
669 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.unknown0
, 0);
670 NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr
, NDR_SCALARS
, r
->in
.unknown0
));
671 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown0_0
, 0);
673 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
674 NDR_PULL_ALLOC(ndr
, r
->in
.logname
);
676 _mem_save_logname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
677 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.logname
, LIBNDR_FLAG_REF_ALLOC
);
678 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.logname
));
679 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_logname_0
, LIBNDR_FLAG_REF_ALLOC
);
680 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
681 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
683 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
684 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, LIBNDR_FLAG_REF_ALLOC
);
685 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.servername
));
686 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, LIBNDR_FLAG_REF_ALLOC
);
687 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown2
));
688 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown3
));
689 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
690 ZERO_STRUCTP(r
->out
.handle
);
692 if (flags
& NDR_OUT
) {
693 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
694 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
696 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
697 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
698 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.handle
));
699 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
700 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
702 return NDR_ERR_SUCCESS
;
705 _PUBLIC_
void ndr_print_eventlog_OpenEventLogW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_OpenEventLogW
*r
)
707 ndr_print_struct(ndr
, name
, "eventlog_OpenEventLogW");
709 if (flags
& NDR_SET_VALUES
) {
710 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
712 if (flags
& NDR_IN
) {
713 ndr_print_struct(ndr
, "in", "eventlog_OpenEventLogW");
715 ndr_print_ptr(ndr
, "unknown0", r
->in
.unknown0
);
717 if (r
->in
.unknown0
) {
718 ndr_print_eventlog_OpenUnknown0(ndr
, "unknown0", r
->in
.unknown0
);
721 ndr_print_ptr(ndr
, "logname", r
->in
.logname
);
723 ndr_print_lsa_String(ndr
, "logname", r
->in
.logname
);
725 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
727 ndr_print_lsa_String(ndr
, "servername", r
->in
.servername
);
729 ndr_print_uint32(ndr
, "unknown2", r
->in
.unknown2
);
730 ndr_print_uint32(ndr
, "unknown3", r
->in
.unknown3
);
733 if (flags
& NDR_OUT
) {
734 ndr_print_struct(ndr
, "out", "eventlog_OpenEventLogW");
736 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
738 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
740 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
746 static enum ndr_err_code
ndr_push_eventlog_RegisterEventSourceW(struct ndr_push
*ndr
, int flags
, const struct eventlog_RegisterEventSourceW
*r
)
748 if (flags
& NDR_IN
) {
750 if (flags
& NDR_OUT
) {
751 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
753 return NDR_ERR_SUCCESS
;
756 static enum ndr_err_code
ndr_pull_eventlog_RegisterEventSourceW(struct ndr_pull
*ndr
, int flags
, struct eventlog_RegisterEventSourceW
*r
)
758 if (flags
& NDR_IN
) {
760 if (flags
& NDR_OUT
) {
761 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
763 return NDR_ERR_SUCCESS
;
766 _PUBLIC_
void ndr_print_eventlog_RegisterEventSourceW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_RegisterEventSourceW
*r
)
768 ndr_print_struct(ndr
, name
, "eventlog_RegisterEventSourceW");
770 if (flags
& NDR_SET_VALUES
) {
771 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
773 if (flags
& NDR_IN
) {
774 ndr_print_struct(ndr
, "in", "eventlog_RegisterEventSourceW");
778 if (flags
& NDR_OUT
) {
779 ndr_print_struct(ndr
, "out", "eventlog_RegisterEventSourceW");
781 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
787 static enum ndr_err_code
ndr_push_eventlog_OpenBackupEventLogW(struct ndr_push
*ndr
, int flags
, const struct eventlog_OpenBackupEventLogW
*r
)
789 if (flags
& NDR_IN
) {
791 if (flags
& NDR_OUT
) {
792 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
794 return NDR_ERR_SUCCESS
;
797 static enum ndr_err_code
ndr_pull_eventlog_OpenBackupEventLogW(struct ndr_pull
*ndr
, int flags
, struct eventlog_OpenBackupEventLogW
*r
)
799 if (flags
& NDR_IN
) {
801 if (flags
& NDR_OUT
) {
802 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
804 return NDR_ERR_SUCCESS
;
807 _PUBLIC_
void ndr_print_eventlog_OpenBackupEventLogW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_OpenBackupEventLogW
*r
)
809 ndr_print_struct(ndr
, name
, "eventlog_OpenBackupEventLogW");
811 if (flags
& NDR_SET_VALUES
) {
812 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
814 if (flags
& NDR_IN
) {
815 ndr_print_struct(ndr
, "in", "eventlog_OpenBackupEventLogW");
819 if (flags
& NDR_OUT
) {
820 ndr_print_struct(ndr
, "out", "eventlog_OpenBackupEventLogW");
822 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
828 static enum ndr_err_code
ndr_push_eventlog_ReadEventLogW(struct ndr_push
*ndr
, int flags
, const struct eventlog_ReadEventLogW
*r
)
830 if (flags
& NDR_IN
) {
831 if (r
->in
.handle
== NULL
) {
832 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
834 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.handle
));
835 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
836 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offset
));
837 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.number_of_bytes
));
839 if (flags
& NDR_OUT
) {
840 if (r
->out
.data
== NULL
) {
841 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
843 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.number_of_bytes
));
844 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, r
->in
.number_of_bytes
));
845 if (r
->out
.sent_size
== NULL
) {
846 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
848 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.sent_size
));
849 if (r
->out
.real_size
== NULL
) {
850 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
852 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.real_size
));
853 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
855 return NDR_ERR_SUCCESS
;
858 static enum ndr_err_code
ndr_pull_eventlog_ReadEventLogW(struct ndr_pull
*ndr
, int flags
, struct eventlog_ReadEventLogW
*r
)
860 TALLOC_CTX
*_mem_save_handle_0
;
861 TALLOC_CTX
*_mem_save_sent_size_0
;
862 TALLOC_CTX
*_mem_save_real_size_0
;
863 if (flags
& NDR_IN
) {
866 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
867 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
869 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
870 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
871 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.handle
));
872 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
873 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
874 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offset
));
875 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.number_of_bytes
));
876 if (r
->in
.number_of_bytes
< 0 || r
->in
.number_of_bytes
> 0x7FFFF) {
877 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
879 NDR_PULL_ALLOC_N(ndr
, r
->out
.data
, r
->in
.number_of_bytes
);
880 memset(r
->out
.data
, 0, (r
->in
.number_of_bytes
) * sizeof(*r
->out
.data
));
881 NDR_PULL_ALLOC(ndr
, r
->out
.sent_size
);
882 ZERO_STRUCTP(r
->out
.sent_size
);
883 NDR_PULL_ALLOC(ndr
, r
->out
.real_size
);
884 ZERO_STRUCTP(r
->out
.real_size
);
886 if (flags
& NDR_OUT
) {
887 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.data
));
888 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
889 NDR_PULL_ALLOC_N(ndr
, r
->out
.data
, ndr_get_array_size(ndr
, &r
->out
.data
));
891 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, ndr_get_array_size(ndr
, &r
->out
.data
)));
892 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
893 NDR_PULL_ALLOC(ndr
, r
->out
.sent_size
);
895 _mem_save_sent_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
896 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sent_size
, LIBNDR_FLAG_REF_ALLOC
);
897 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.sent_size
));
898 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sent_size_0
, LIBNDR_FLAG_REF_ALLOC
);
899 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
900 NDR_PULL_ALLOC(ndr
, r
->out
.real_size
);
902 _mem_save_real_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
903 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.real_size
, LIBNDR_FLAG_REF_ALLOC
);
904 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.real_size
));
905 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_real_size_0
, LIBNDR_FLAG_REF_ALLOC
);
906 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
908 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.data
, r
->in
.number_of_bytes
));
911 return NDR_ERR_SUCCESS
;
914 _PUBLIC_
void ndr_print_eventlog_ReadEventLogW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ReadEventLogW
*r
)
916 ndr_print_struct(ndr
, name
, "eventlog_ReadEventLogW");
918 if (flags
& NDR_SET_VALUES
) {
919 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
921 if (flags
& NDR_IN
) {
922 ndr_print_struct(ndr
, "in", "eventlog_ReadEventLogW");
924 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
926 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
928 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
929 ndr_print_uint32(ndr
, "offset", r
->in
.offset
);
930 ndr_print_uint32(ndr
, "number_of_bytes", r
->in
.number_of_bytes
);
933 if (flags
& NDR_OUT
) {
934 ndr_print_struct(ndr
, "out", "eventlog_ReadEventLogW");
936 ndr_print_ptr(ndr
, "data", r
->out
.data
);
938 ndr_print_array_uint8(ndr
, "data", r
->out
.data
, r
->in
.number_of_bytes
);
940 ndr_print_ptr(ndr
, "sent_size", r
->out
.sent_size
);
942 ndr_print_uint32(ndr
, "sent_size", *r
->out
.sent_size
);
944 ndr_print_ptr(ndr
, "real_size", r
->out
.real_size
);
946 ndr_print_uint32(ndr
, "real_size", *r
->out
.real_size
);
948 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
954 static enum ndr_err_code
ndr_push_eventlog_ReportEventW(struct ndr_push
*ndr
, int flags
, const struct eventlog_ReportEventW
*r
)
956 if (flags
& NDR_IN
) {
958 if (flags
& NDR_OUT
) {
959 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
961 return NDR_ERR_SUCCESS
;
964 static enum ndr_err_code
ndr_pull_eventlog_ReportEventW(struct ndr_pull
*ndr
, int flags
, struct eventlog_ReportEventW
*r
)
966 if (flags
& NDR_IN
) {
968 if (flags
& NDR_OUT
) {
969 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
971 return NDR_ERR_SUCCESS
;
974 _PUBLIC_
void ndr_print_eventlog_ReportEventW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ReportEventW
*r
)
976 ndr_print_struct(ndr
, name
, "eventlog_ReportEventW");
978 if (flags
& NDR_SET_VALUES
) {
979 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
981 if (flags
& NDR_IN
) {
982 ndr_print_struct(ndr
, "in", "eventlog_ReportEventW");
986 if (flags
& NDR_OUT
) {
987 ndr_print_struct(ndr
, "out", "eventlog_ReportEventW");
989 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
995 static enum ndr_err_code
ndr_push_eventlog_ClearEventLogA(struct ndr_push
*ndr
, int flags
, const struct eventlog_ClearEventLogA
*r
)
997 if (flags
& NDR_IN
) {
999 if (flags
& NDR_OUT
) {
1000 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1002 return NDR_ERR_SUCCESS
;
1005 static enum ndr_err_code
ndr_pull_eventlog_ClearEventLogA(struct ndr_pull
*ndr
, int flags
, struct eventlog_ClearEventLogA
*r
)
1007 if (flags
& NDR_IN
) {
1009 if (flags
& NDR_OUT
) {
1010 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1012 return NDR_ERR_SUCCESS
;
1015 _PUBLIC_
void ndr_print_eventlog_ClearEventLogA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ClearEventLogA
*r
)
1017 ndr_print_struct(ndr
, name
, "eventlog_ClearEventLogA");
1019 if (flags
& NDR_SET_VALUES
) {
1020 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1022 if (flags
& NDR_IN
) {
1023 ndr_print_struct(ndr
, "in", "eventlog_ClearEventLogA");
1027 if (flags
& NDR_OUT
) {
1028 ndr_print_struct(ndr
, "out", "eventlog_ClearEventLogA");
1030 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1036 static enum ndr_err_code
ndr_push_eventlog_BackupEventLogA(struct ndr_push
*ndr
, int flags
, const struct eventlog_BackupEventLogA
*r
)
1038 if (flags
& NDR_IN
) {
1040 if (flags
& NDR_OUT
) {
1041 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1043 return NDR_ERR_SUCCESS
;
1046 static enum ndr_err_code
ndr_pull_eventlog_BackupEventLogA(struct ndr_pull
*ndr
, int flags
, struct eventlog_BackupEventLogA
*r
)
1048 if (flags
& NDR_IN
) {
1050 if (flags
& NDR_OUT
) {
1051 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1053 return NDR_ERR_SUCCESS
;
1056 _PUBLIC_
void ndr_print_eventlog_BackupEventLogA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_BackupEventLogA
*r
)
1058 ndr_print_struct(ndr
, name
, "eventlog_BackupEventLogA");
1060 if (flags
& NDR_SET_VALUES
) {
1061 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1063 if (flags
& NDR_IN
) {
1064 ndr_print_struct(ndr
, "in", "eventlog_BackupEventLogA");
1068 if (flags
& NDR_OUT
) {
1069 ndr_print_struct(ndr
, "out", "eventlog_BackupEventLogA");
1071 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1077 static enum ndr_err_code
ndr_push_eventlog_OpenEventLogA(struct ndr_push
*ndr
, int flags
, const struct eventlog_OpenEventLogA
*r
)
1079 if (flags
& NDR_IN
) {
1081 if (flags
& NDR_OUT
) {
1082 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1084 return NDR_ERR_SUCCESS
;
1087 static enum ndr_err_code
ndr_pull_eventlog_OpenEventLogA(struct ndr_pull
*ndr
, int flags
, struct eventlog_OpenEventLogA
*r
)
1089 if (flags
& NDR_IN
) {
1091 if (flags
& NDR_OUT
) {
1092 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1094 return NDR_ERR_SUCCESS
;
1097 _PUBLIC_
void ndr_print_eventlog_OpenEventLogA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_OpenEventLogA
*r
)
1099 ndr_print_struct(ndr
, name
, "eventlog_OpenEventLogA");
1101 if (flags
& NDR_SET_VALUES
) {
1102 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1104 if (flags
& NDR_IN
) {
1105 ndr_print_struct(ndr
, "in", "eventlog_OpenEventLogA");
1109 if (flags
& NDR_OUT
) {
1110 ndr_print_struct(ndr
, "out", "eventlog_OpenEventLogA");
1112 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1118 static enum ndr_err_code
ndr_push_eventlog_RegisterEventSourceA(struct ndr_push
*ndr
, int flags
, const struct eventlog_RegisterEventSourceA
*r
)
1120 if (flags
& NDR_IN
) {
1122 if (flags
& NDR_OUT
) {
1123 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1125 return NDR_ERR_SUCCESS
;
1128 static enum ndr_err_code
ndr_pull_eventlog_RegisterEventSourceA(struct ndr_pull
*ndr
, int flags
, struct eventlog_RegisterEventSourceA
*r
)
1130 if (flags
& NDR_IN
) {
1132 if (flags
& NDR_OUT
) {
1133 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1135 return NDR_ERR_SUCCESS
;
1138 _PUBLIC_
void ndr_print_eventlog_RegisterEventSourceA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_RegisterEventSourceA
*r
)
1140 ndr_print_struct(ndr
, name
, "eventlog_RegisterEventSourceA");
1142 if (flags
& NDR_SET_VALUES
) {
1143 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1145 if (flags
& NDR_IN
) {
1146 ndr_print_struct(ndr
, "in", "eventlog_RegisterEventSourceA");
1150 if (flags
& NDR_OUT
) {
1151 ndr_print_struct(ndr
, "out", "eventlog_RegisterEventSourceA");
1153 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1159 static enum ndr_err_code
ndr_push_eventlog_OpenBackupEventLogA(struct ndr_push
*ndr
, int flags
, const struct eventlog_OpenBackupEventLogA
*r
)
1161 if (flags
& NDR_IN
) {
1163 if (flags
& NDR_OUT
) {
1164 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1166 return NDR_ERR_SUCCESS
;
1169 static enum ndr_err_code
ndr_pull_eventlog_OpenBackupEventLogA(struct ndr_pull
*ndr
, int flags
, struct eventlog_OpenBackupEventLogA
*r
)
1171 if (flags
& NDR_IN
) {
1173 if (flags
& NDR_OUT
) {
1174 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1176 return NDR_ERR_SUCCESS
;
1179 _PUBLIC_
void ndr_print_eventlog_OpenBackupEventLogA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_OpenBackupEventLogA
*r
)
1181 ndr_print_struct(ndr
, name
, "eventlog_OpenBackupEventLogA");
1183 if (flags
& NDR_SET_VALUES
) {
1184 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1186 if (flags
& NDR_IN
) {
1187 ndr_print_struct(ndr
, "in", "eventlog_OpenBackupEventLogA");
1191 if (flags
& NDR_OUT
) {
1192 ndr_print_struct(ndr
, "out", "eventlog_OpenBackupEventLogA");
1194 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1200 static enum ndr_err_code
ndr_push_eventlog_ReadEventLogA(struct ndr_push
*ndr
, int flags
, const struct eventlog_ReadEventLogA
*r
)
1202 if (flags
& NDR_IN
) {
1204 if (flags
& NDR_OUT
) {
1205 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1207 return NDR_ERR_SUCCESS
;
1210 static enum ndr_err_code
ndr_pull_eventlog_ReadEventLogA(struct ndr_pull
*ndr
, int flags
, struct eventlog_ReadEventLogA
*r
)
1212 if (flags
& NDR_IN
) {
1214 if (flags
& NDR_OUT
) {
1215 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1217 return NDR_ERR_SUCCESS
;
1220 _PUBLIC_
void ndr_print_eventlog_ReadEventLogA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ReadEventLogA
*r
)
1222 ndr_print_struct(ndr
, name
, "eventlog_ReadEventLogA");
1224 if (flags
& NDR_SET_VALUES
) {
1225 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1227 if (flags
& NDR_IN
) {
1228 ndr_print_struct(ndr
, "in", "eventlog_ReadEventLogA");
1232 if (flags
& NDR_OUT
) {
1233 ndr_print_struct(ndr
, "out", "eventlog_ReadEventLogA");
1235 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1241 static enum ndr_err_code
ndr_push_eventlog_ReportEventA(struct ndr_push
*ndr
, int flags
, const struct eventlog_ReportEventA
*r
)
1243 if (flags
& NDR_IN
) {
1245 if (flags
& NDR_OUT
) {
1246 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1248 return NDR_ERR_SUCCESS
;
1251 static enum ndr_err_code
ndr_pull_eventlog_ReportEventA(struct ndr_pull
*ndr
, int flags
, struct eventlog_ReportEventA
*r
)
1253 if (flags
& NDR_IN
) {
1255 if (flags
& NDR_OUT
) {
1256 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1258 return NDR_ERR_SUCCESS
;
1261 _PUBLIC_
void ndr_print_eventlog_ReportEventA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ReportEventA
*r
)
1263 ndr_print_struct(ndr
, name
, "eventlog_ReportEventA");
1265 if (flags
& NDR_SET_VALUES
) {
1266 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1268 if (flags
& NDR_IN
) {
1269 ndr_print_struct(ndr
, "in", "eventlog_ReportEventA");
1273 if (flags
& NDR_OUT
) {
1274 ndr_print_struct(ndr
, "out", "eventlog_ReportEventA");
1276 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1282 static enum ndr_err_code
ndr_push_eventlog_RegisterClusterSvc(struct ndr_push
*ndr
, int flags
, const struct eventlog_RegisterClusterSvc
*r
)
1284 if (flags
& NDR_IN
) {
1286 if (flags
& NDR_OUT
) {
1287 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1289 return NDR_ERR_SUCCESS
;
1292 static enum ndr_err_code
ndr_pull_eventlog_RegisterClusterSvc(struct ndr_pull
*ndr
, int flags
, struct eventlog_RegisterClusterSvc
*r
)
1294 if (flags
& NDR_IN
) {
1296 if (flags
& NDR_OUT
) {
1297 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1299 return NDR_ERR_SUCCESS
;
1302 _PUBLIC_
void ndr_print_eventlog_RegisterClusterSvc(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_RegisterClusterSvc
*r
)
1304 ndr_print_struct(ndr
, name
, "eventlog_RegisterClusterSvc");
1306 if (flags
& NDR_SET_VALUES
) {
1307 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1309 if (flags
& NDR_IN
) {
1310 ndr_print_struct(ndr
, "in", "eventlog_RegisterClusterSvc");
1314 if (flags
& NDR_OUT
) {
1315 ndr_print_struct(ndr
, "out", "eventlog_RegisterClusterSvc");
1317 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1323 static enum ndr_err_code
ndr_push_eventlog_DeregisterClusterSvc(struct ndr_push
*ndr
, int flags
, const struct eventlog_DeregisterClusterSvc
*r
)
1325 if (flags
& NDR_IN
) {
1327 if (flags
& NDR_OUT
) {
1328 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1330 return NDR_ERR_SUCCESS
;
1333 static enum ndr_err_code
ndr_pull_eventlog_DeregisterClusterSvc(struct ndr_pull
*ndr
, int flags
, struct eventlog_DeregisterClusterSvc
*r
)
1335 if (flags
& NDR_IN
) {
1337 if (flags
& NDR_OUT
) {
1338 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1340 return NDR_ERR_SUCCESS
;
1343 _PUBLIC_
void ndr_print_eventlog_DeregisterClusterSvc(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_DeregisterClusterSvc
*r
)
1345 ndr_print_struct(ndr
, name
, "eventlog_DeregisterClusterSvc");
1347 if (flags
& NDR_SET_VALUES
) {
1348 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1350 if (flags
& NDR_IN
) {
1351 ndr_print_struct(ndr
, "in", "eventlog_DeregisterClusterSvc");
1355 if (flags
& NDR_OUT
) {
1356 ndr_print_struct(ndr
, "out", "eventlog_DeregisterClusterSvc");
1358 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1364 static enum ndr_err_code
ndr_push_eventlog_WriteClusterEvents(struct ndr_push
*ndr
, int flags
, const struct eventlog_WriteClusterEvents
*r
)
1366 if (flags
& NDR_IN
) {
1368 if (flags
& NDR_OUT
) {
1369 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1371 return NDR_ERR_SUCCESS
;
1374 static enum ndr_err_code
ndr_pull_eventlog_WriteClusterEvents(struct ndr_pull
*ndr
, int flags
, struct eventlog_WriteClusterEvents
*r
)
1376 if (flags
& NDR_IN
) {
1378 if (flags
& NDR_OUT
) {
1379 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1381 return NDR_ERR_SUCCESS
;
1384 _PUBLIC_
void ndr_print_eventlog_WriteClusterEvents(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_WriteClusterEvents
*r
)
1386 ndr_print_struct(ndr
, name
, "eventlog_WriteClusterEvents");
1388 if (flags
& NDR_SET_VALUES
) {
1389 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1391 if (flags
& NDR_IN
) {
1392 ndr_print_struct(ndr
, "in", "eventlog_WriteClusterEvents");
1396 if (flags
& NDR_OUT
) {
1397 ndr_print_struct(ndr
, "out", "eventlog_WriteClusterEvents");
1399 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1405 static enum ndr_err_code
ndr_push_eventlog_GetLogIntormation(struct ndr_push
*ndr
, int flags
, const struct eventlog_GetLogIntormation
*r
)
1407 if (flags
& NDR_IN
) {
1409 if (flags
& NDR_OUT
) {
1410 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1412 return NDR_ERR_SUCCESS
;
1415 static enum ndr_err_code
ndr_pull_eventlog_GetLogIntormation(struct ndr_pull
*ndr
, int flags
, struct eventlog_GetLogIntormation
*r
)
1417 if (flags
& NDR_IN
) {
1419 if (flags
& NDR_OUT
) {
1420 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1422 return NDR_ERR_SUCCESS
;
1425 _PUBLIC_
void ndr_print_eventlog_GetLogIntormation(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_GetLogIntormation
*r
)
1427 ndr_print_struct(ndr
, name
, "eventlog_GetLogIntormation");
1429 if (flags
& NDR_SET_VALUES
) {
1430 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1432 if (flags
& NDR_IN
) {
1433 ndr_print_struct(ndr
, "in", "eventlog_GetLogIntormation");
1437 if (flags
& NDR_OUT
) {
1438 ndr_print_struct(ndr
, "out", "eventlog_GetLogIntormation");
1440 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1446 static enum ndr_err_code
ndr_push_eventlog_FlushEventLog(struct ndr_push
*ndr
, int flags
, const struct eventlog_FlushEventLog
*r
)
1448 if (flags
& NDR_IN
) {
1449 if (r
->in
.handle
== NULL
) {
1450 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1452 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.handle
));
1454 if (flags
& NDR_OUT
) {
1455 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1457 return NDR_ERR_SUCCESS
;
1460 static enum ndr_err_code
ndr_pull_eventlog_FlushEventLog(struct ndr_pull
*ndr
, int flags
, struct eventlog_FlushEventLog
*r
)
1462 TALLOC_CTX
*_mem_save_handle_0
;
1463 if (flags
& NDR_IN
) {
1464 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1465 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1467 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1468 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1469 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.handle
));
1470 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1472 if (flags
& NDR_OUT
) {
1473 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1475 return NDR_ERR_SUCCESS
;
1478 _PUBLIC_
void ndr_print_eventlog_FlushEventLog(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_FlushEventLog
*r
)
1480 ndr_print_struct(ndr
, name
, "eventlog_FlushEventLog");
1482 if (flags
& NDR_SET_VALUES
) {
1483 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1485 if (flags
& NDR_IN
) {
1486 ndr_print_struct(ndr
, "in", "eventlog_FlushEventLog");
1488 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1490 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1494 if (flags
& NDR_OUT
) {
1495 ndr_print_struct(ndr
, "out", "eventlog_FlushEventLog");
1497 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1503 static const struct ndr_interface_call eventlog_calls
[] = {
1505 "eventlog_ClearEventLogW",
1506 sizeof(struct eventlog_ClearEventLogW
),
1507 (ndr_push_flags_fn_t
) ndr_push_eventlog_ClearEventLogW
,
1508 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ClearEventLogW
,
1509 (ndr_print_function_t
) ndr_print_eventlog_ClearEventLogW
,
1513 "eventlog_BackupEventLogW",
1514 sizeof(struct eventlog_BackupEventLogW
),
1515 (ndr_push_flags_fn_t
) ndr_push_eventlog_BackupEventLogW
,
1516 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_BackupEventLogW
,
1517 (ndr_print_function_t
) ndr_print_eventlog_BackupEventLogW
,
1521 "eventlog_CloseEventLog",
1522 sizeof(struct eventlog_CloseEventLog
),
1523 (ndr_push_flags_fn_t
) ndr_push_eventlog_CloseEventLog
,
1524 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_CloseEventLog
,
1525 (ndr_print_function_t
) ndr_print_eventlog_CloseEventLog
,
1529 "eventlog_DeregisterEventSource",
1530 sizeof(struct eventlog_DeregisterEventSource
),
1531 (ndr_push_flags_fn_t
) ndr_push_eventlog_DeregisterEventSource
,
1532 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_DeregisterEventSource
,
1533 (ndr_print_function_t
) ndr_print_eventlog_DeregisterEventSource
,
1537 "eventlog_GetNumRecords",
1538 sizeof(struct eventlog_GetNumRecords
),
1539 (ndr_push_flags_fn_t
) ndr_push_eventlog_GetNumRecords
,
1540 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_GetNumRecords
,
1541 (ndr_print_function_t
) ndr_print_eventlog_GetNumRecords
,
1545 "eventlog_GetOldestRecord",
1546 sizeof(struct eventlog_GetOldestRecord
),
1547 (ndr_push_flags_fn_t
) ndr_push_eventlog_GetOldestRecord
,
1548 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_GetOldestRecord
,
1549 (ndr_print_function_t
) ndr_print_eventlog_GetOldestRecord
,
1553 "eventlog_ChangeNotify",
1554 sizeof(struct eventlog_ChangeNotify
),
1555 (ndr_push_flags_fn_t
) ndr_push_eventlog_ChangeNotify
,
1556 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ChangeNotify
,
1557 (ndr_print_function_t
) ndr_print_eventlog_ChangeNotify
,
1561 "eventlog_OpenEventLogW",
1562 sizeof(struct eventlog_OpenEventLogW
),
1563 (ndr_push_flags_fn_t
) ndr_push_eventlog_OpenEventLogW
,
1564 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_OpenEventLogW
,
1565 (ndr_print_function_t
) ndr_print_eventlog_OpenEventLogW
,
1569 "eventlog_RegisterEventSourceW",
1570 sizeof(struct eventlog_RegisterEventSourceW
),
1571 (ndr_push_flags_fn_t
) ndr_push_eventlog_RegisterEventSourceW
,
1572 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_RegisterEventSourceW
,
1573 (ndr_print_function_t
) ndr_print_eventlog_RegisterEventSourceW
,
1577 "eventlog_OpenBackupEventLogW",
1578 sizeof(struct eventlog_OpenBackupEventLogW
),
1579 (ndr_push_flags_fn_t
) ndr_push_eventlog_OpenBackupEventLogW
,
1580 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_OpenBackupEventLogW
,
1581 (ndr_print_function_t
) ndr_print_eventlog_OpenBackupEventLogW
,
1585 "eventlog_ReadEventLogW",
1586 sizeof(struct eventlog_ReadEventLogW
),
1587 (ndr_push_flags_fn_t
) ndr_push_eventlog_ReadEventLogW
,
1588 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ReadEventLogW
,
1589 (ndr_print_function_t
) ndr_print_eventlog_ReadEventLogW
,
1593 "eventlog_ReportEventW",
1594 sizeof(struct eventlog_ReportEventW
),
1595 (ndr_push_flags_fn_t
) ndr_push_eventlog_ReportEventW
,
1596 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ReportEventW
,
1597 (ndr_print_function_t
) ndr_print_eventlog_ReportEventW
,
1601 "eventlog_ClearEventLogA",
1602 sizeof(struct eventlog_ClearEventLogA
),
1603 (ndr_push_flags_fn_t
) ndr_push_eventlog_ClearEventLogA
,
1604 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ClearEventLogA
,
1605 (ndr_print_function_t
) ndr_print_eventlog_ClearEventLogA
,
1609 "eventlog_BackupEventLogA",
1610 sizeof(struct eventlog_BackupEventLogA
),
1611 (ndr_push_flags_fn_t
) ndr_push_eventlog_BackupEventLogA
,
1612 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_BackupEventLogA
,
1613 (ndr_print_function_t
) ndr_print_eventlog_BackupEventLogA
,
1617 "eventlog_OpenEventLogA",
1618 sizeof(struct eventlog_OpenEventLogA
),
1619 (ndr_push_flags_fn_t
) ndr_push_eventlog_OpenEventLogA
,
1620 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_OpenEventLogA
,
1621 (ndr_print_function_t
) ndr_print_eventlog_OpenEventLogA
,
1625 "eventlog_RegisterEventSourceA",
1626 sizeof(struct eventlog_RegisterEventSourceA
),
1627 (ndr_push_flags_fn_t
) ndr_push_eventlog_RegisterEventSourceA
,
1628 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_RegisterEventSourceA
,
1629 (ndr_print_function_t
) ndr_print_eventlog_RegisterEventSourceA
,
1633 "eventlog_OpenBackupEventLogA",
1634 sizeof(struct eventlog_OpenBackupEventLogA
),
1635 (ndr_push_flags_fn_t
) ndr_push_eventlog_OpenBackupEventLogA
,
1636 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_OpenBackupEventLogA
,
1637 (ndr_print_function_t
) ndr_print_eventlog_OpenBackupEventLogA
,
1641 "eventlog_ReadEventLogA",
1642 sizeof(struct eventlog_ReadEventLogA
),
1643 (ndr_push_flags_fn_t
) ndr_push_eventlog_ReadEventLogA
,
1644 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ReadEventLogA
,
1645 (ndr_print_function_t
) ndr_print_eventlog_ReadEventLogA
,
1649 "eventlog_ReportEventA",
1650 sizeof(struct eventlog_ReportEventA
),
1651 (ndr_push_flags_fn_t
) ndr_push_eventlog_ReportEventA
,
1652 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ReportEventA
,
1653 (ndr_print_function_t
) ndr_print_eventlog_ReportEventA
,
1657 "eventlog_RegisterClusterSvc",
1658 sizeof(struct eventlog_RegisterClusterSvc
),
1659 (ndr_push_flags_fn_t
) ndr_push_eventlog_RegisterClusterSvc
,
1660 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_RegisterClusterSvc
,
1661 (ndr_print_function_t
) ndr_print_eventlog_RegisterClusterSvc
,
1665 "eventlog_DeregisterClusterSvc",
1666 sizeof(struct eventlog_DeregisterClusterSvc
),
1667 (ndr_push_flags_fn_t
) ndr_push_eventlog_DeregisterClusterSvc
,
1668 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_DeregisterClusterSvc
,
1669 (ndr_print_function_t
) ndr_print_eventlog_DeregisterClusterSvc
,
1673 "eventlog_WriteClusterEvents",
1674 sizeof(struct eventlog_WriteClusterEvents
),
1675 (ndr_push_flags_fn_t
) ndr_push_eventlog_WriteClusterEvents
,
1676 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_WriteClusterEvents
,
1677 (ndr_print_function_t
) ndr_print_eventlog_WriteClusterEvents
,
1681 "eventlog_GetLogIntormation",
1682 sizeof(struct eventlog_GetLogIntormation
),
1683 (ndr_push_flags_fn_t
) ndr_push_eventlog_GetLogIntormation
,
1684 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_GetLogIntormation
,
1685 (ndr_print_function_t
) ndr_print_eventlog_GetLogIntormation
,
1689 "eventlog_FlushEventLog",
1690 sizeof(struct eventlog_FlushEventLog
),
1691 (ndr_push_flags_fn_t
) ndr_push_eventlog_FlushEventLog
,
1692 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_FlushEventLog
,
1693 (ndr_print_function_t
) ndr_print_eventlog_FlushEventLog
,
1696 { NULL
, 0, NULL
, NULL
, NULL
, false }
1699 static const char * const eventlog_endpoint_strings
[] = {
1700 "ncacn_np:[\\pipe\\eventlog]",
1703 static const struct ndr_interface_string_array eventlog_endpoints
= {
1705 .names
= eventlog_endpoint_strings
1708 static const char * const eventlog_authservice_strings
[] = {
1712 static const struct ndr_interface_string_array eventlog_authservices
= {
1714 .names
= eventlog_authservice_strings
1718 const struct ndr_interface_table ndr_table_eventlog
= {
1721 {0x82273fdc,0xe32a,0x18c3,{0x3f,0x78},{0x82,0x79,0x29,0xdc,0x23,0xea}},
1722 NDR_EVENTLOG_VERSION
1724 .helpstring
= NDR_EVENTLOG_HELPSTRING
,
1726 .calls
= eventlog_calls
,
1727 .endpoints
= &eventlog_endpoints
,
1728 .authservices
= &eventlog_authservices