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_eventlogReadFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
10 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
11 return NDR_ERR_SUCCESS
;
14 static enum ndr_err_code
ndr_pull_eventlogReadFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
17 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
19 return NDR_ERR_SUCCESS
;
22 _PUBLIC_
void ndr_print_eventlogReadFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
24 ndr_print_uint32(ndr
, name
, r
);
26 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "EVENTLOG_SEQUENTIAL_READ", EVENTLOG_SEQUENTIAL_READ
, r
);
27 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "EVENTLOG_SEEK_READ", EVENTLOG_SEEK_READ
, r
);
28 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "EVENTLOG_FORWARDS_READ", EVENTLOG_FORWARDS_READ
, r
);
29 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "EVENTLOG_BACKWARDS_READ", EVENTLOG_BACKWARDS_READ
, r
);
33 _PUBLIC_
enum ndr_err_code
ndr_push_eventlogEventTypes(struct ndr_push
*ndr
, int ndr_flags
, enum eventlogEventTypes r
)
35 NDR_CHECK(ndr_push_enum_uint1632(ndr
, NDR_SCALARS
, r
));
36 return NDR_ERR_SUCCESS
;
39 _PUBLIC_
enum ndr_err_code
ndr_pull_eventlogEventTypes(struct ndr_pull
*ndr
, int ndr_flags
, enum eventlogEventTypes
*r
)
42 NDR_CHECK(ndr_pull_enum_uint1632(ndr
, NDR_SCALARS
, &v
));
44 return NDR_ERR_SUCCESS
;
47 _PUBLIC_
void ndr_print_eventlogEventTypes(struct ndr_print
*ndr
, const char *name
, enum eventlogEventTypes r
)
49 const char *val
= NULL
;
52 case EVENTLOG_SUCCESS
: val
= "EVENTLOG_SUCCESS"; break;
53 case EVENTLOG_ERROR_TYPE
: val
= "EVENTLOG_ERROR_TYPE"; break;
54 case EVENTLOG_WARNING_TYPE
: val
= "EVENTLOG_WARNING_TYPE"; break;
55 case EVENTLOG_INFORMATION_TYPE
: val
= "EVENTLOG_INFORMATION_TYPE"; break;
56 case EVENTLOG_AUDIT_SUCCESS
: val
= "EVENTLOG_AUDIT_SUCCESS"; break;
57 case EVENTLOG_AUDIT_FAILURE
: val
= "EVENTLOG_AUDIT_FAILURE"; break;
59 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
62 static enum ndr_err_code
ndr_push_eventlog_OpenUnknown0(struct ndr_push
*ndr
, int ndr_flags
, const struct eventlog_OpenUnknown0
*r
)
64 if (ndr_flags
& NDR_SCALARS
) {
65 NDR_CHECK(ndr_push_align(ndr
, 2));
66 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->unknown0
));
67 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->unknown1
));
68 NDR_CHECK(ndr_push_trailer_align(ndr
, 2));
70 if (ndr_flags
& NDR_BUFFERS
) {
72 return NDR_ERR_SUCCESS
;
75 static enum ndr_err_code
ndr_pull_eventlog_OpenUnknown0(struct ndr_pull
*ndr
, int ndr_flags
, struct eventlog_OpenUnknown0
*r
)
77 if (ndr_flags
& NDR_SCALARS
) {
78 NDR_CHECK(ndr_pull_align(ndr
, 2));
79 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->unknown0
));
80 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->unknown1
));
81 NDR_CHECK(ndr_pull_trailer_align(ndr
, 2));
83 if (ndr_flags
& NDR_BUFFERS
) {
85 return NDR_ERR_SUCCESS
;
88 _PUBLIC_
void ndr_print_eventlog_OpenUnknown0(struct ndr_print
*ndr
, const char *name
, const struct eventlog_OpenUnknown0
*r
)
90 ndr_print_struct(ndr
, name
, "eventlog_OpenUnknown0");
92 ndr_print_uint16(ndr
, "unknown0", r
->unknown0
);
93 ndr_print_uint16(ndr
, "unknown1", r
->unknown1
);
97 _PUBLIC_
enum ndr_err_code
ndr_push_eventlog_Record_tdb(struct ndr_push
*ndr
, int ndr_flags
, const struct eventlog_Record_tdb
*r
)
99 uint32_t cntr_strings_0
;
101 uint32_t _flags_save_STRUCT
= ndr
->flags
;
102 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_NOALIGN
|LIBNDR_PRINT_ARRAY_HEX
);
103 if (ndr_flags
& NDR_SCALARS
) {
104 NDR_CHECK(ndr_push_align(ndr
, 4));
105 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
106 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, "eLfL", 4, sizeof(uint8_t), CH_DOS
));
107 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->record_number
));
108 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, r
->time_generated
));
109 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, r
->time_written
));
110 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->event_id
));
111 NDR_CHECK(ndr_push_eventlogEventTypes(ndr
, NDR_SCALARS
, r
->event_type
));
112 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->num_of_strings
));
113 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->event_category
));
114 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->reserved_flags
));
115 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->closing_record_number
));
116 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->stringoffset
));
117 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid
.length
));
118 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_offset
));
119 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->data
.length
));
120 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->data_offset
));
121 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2 * strlen_m_term(r
->source_name
)));
123 uint32_t _flags_save_string
= ndr
->flags
;
124 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
|LIBNDR_FLAG_ALIGN2
);
125 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->source_name
));
126 ndr
->flags
= _flags_save_string
;
128 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2 * strlen_m_term(r
->computer_name
)));
130 uint32_t _flags_save_string
= ndr
->flags
;
131 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
|LIBNDR_FLAG_ALIGN2
);
132 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->computer_name
));
133 ndr
->flags
= _flags_save_string
;
135 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_padding
));
136 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->sid
));
137 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2 * ndr_size_string_array(r
->strings
, r
->num_of_strings
, LIBNDR_FLAG_STR_NULLTERM
)));
139 uint32_t _flags_save_string
= ndr
->flags
;
140 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
|LIBNDR_FLAG_ALIGN2
);
141 for (cntr_strings_0
= 0; cntr_strings_0
< r
->num_of_strings
; cntr_strings_0
++) {
142 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->strings
[cntr_strings_0
]));
144 ndr
->flags
= _flags_save_string
;
146 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->data
));
147 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->padding
));
148 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
150 if (ndr_flags
& NDR_BUFFERS
) {
152 ndr
->flags
= _flags_save_STRUCT
;
154 return NDR_ERR_SUCCESS
;
157 _PUBLIC_
enum ndr_err_code
ndr_pull_eventlog_Record_tdb(struct ndr_pull
*ndr
, int ndr_flags
, struct eventlog_Record_tdb
*r
)
159 uint32_t size_reserved_0
= 0;
160 uint32_t size_strings_0
= 0;
161 uint32_t cntr_strings_0
;
162 TALLOC_CTX
*_mem_save_strings_0
;
164 uint32_t _flags_save_STRUCT
= ndr
->flags
;
165 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_NOALIGN
|LIBNDR_PRINT_ARRAY_HEX
);
166 if (ndr_flags
& NDR_SCALARS
) {
167 NDR_CHECK(ndr_pull_align(ndr
, 4));
168 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
170 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->reserved
, size_reserved_0
, sizeof(uint8_t), CH_DOS
));
171 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->record_number
));
172 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, &r
->time_generated
));
173 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, &r
->time_written
));
174 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->event_id
));
175 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr
, NDR_SCALARS
, &r
->event_type
));
176 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->num_of_strings
));
177 if (r
->num_of_strings
> 256) {
178 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
180 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->event_category
));
181 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->reserved_flags
));
182 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->closing_record_number
));
183 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->stringoffset
));
184 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_length
));
185 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_offset
));
186 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->data_length
));
187 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->data_offset
));
188 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->source_name_len
));
190 uint32_t _flags_save_string
= ndr
->flags
;
191 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
|LIBNDR_FLAG_ALIGN2
);
192 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->source_name
));
193 ndr
->flags
= _flags_save_string
;
195 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->computer_name_len
));
197 uint32_t _flags_save_string
= ndr
->flags
;
198 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
|LIBNDR_FLAG_ALIGN2
);
199 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->computer_name
));
200 ndr
->flags
= _flags_save_string
;
202 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_padding
));
203 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->sid
));
204 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->strings_len
));
206 uint32_t _flags_save_string
= ndr
->flags
;
207 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
|LIBNDR_FLAG_ALIGN2
);
208 size_strings_0
= r
->num_of_strings
;
209 NDR_PULL_ALLOC_N(ndr
, r
->strings
, size_strings_0
);
210 _mem_save_strings_0
= NDR_PULL_GET_MEM_CTX(ndr
);
211 NDR_PULL_SET_MEM_CTX(ndr
, r
->strings
, 0);
212 for (cntr_strings_0
= 0; cntr_strings_0
< size_strings_0
; cntr_strings_0
++) {
213 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->strings
[cntr_strings_0
]));
215 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_strings_0
, 0);
216 ndr
->flags
= _flags_save_string
;
218 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->data
));
219 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->padding
));
220 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
222 if (ndr_flags
& NDR_BUFFERS
) {
224 ndr
->flags
= _flags_save_STRUCT
;
226 return NDR_ERR_SUCCESS
;
229 _PUBLIC_
void ndr_print_eventlog_Record_tdb(struct ndr_print
*ndr
, const char *name
, const struct eventlog_Record_tdb
*r
)
231 uint32_t cntr_strings_0
;
232 ndr_print_struct(ndr
, name
, "eventlog_Record_tdb");
234 uint32_t _flags_save_STRUCT
= ndr
->flags
;
235 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_NOALIGN
|LIBNDR_PRINT_ARRAY_HEX
);
237 ndr_print_uint32(ndr
, "size", r
->size
);
238 ndr_print_string(ndr
, "reserved", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?"eLfL":r
->reserved
);
239 ndr_print_uint32(ndr
, "record_number", r
->record_number
);
240 ndr_print_time_t(ndr
, "time_generated", r
->time_generated
);
241 ndr_print_time_t(ndr
, "time_written", r
->time_written
);
242 ndr_print_uint32(ndr
, "event_id", r
->event_id
);
243 ndr_print_eventlogEventTypes(ndr
, "event_type", r
->event_type
);
244 ndr_print_uint16(ndr
, "num_of_strings", r
->num_of_strings
);
245 ndr_print_uint16(ndr
, "event_category", r
->event_category
);
246 ndr_print_uint16(ndr
, "reserved_flags", r
->reserved_flags
);
247 ndr_print_uint32(ndr
, "closing_record_number", r
->closing_record_number
);
248 ndr_print_uint32(ndr
, "stringoffset", r
->stringoffset
);
249 ndr_print_uint32(ndr
, "sid_length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?r
->sid
.length
:r
->sid_length
);
250 ndr_print_uint32(ndr
, "sid_offset", r
->sid_offset
);
251 ndr_print_uint32(ndr
, "data_length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?r
->data
.length
:r
->data_length
);
252 ndr_print_uint32(ndr
, "data_offset", r
->data_offset
);
253 ndr_print_uint32(ndr
, "source_name_len", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m_term(r
->source_name
):r
->source_name_len
);
254 ndr_print_string(ndr
, "source_name", r
->source_name
);
255 ndr_print_uint32(ndr
, "computer_name_len", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m_term(r
->computer_name
):r
->computer_name_len
);
256 ndr_print_string(ndr
, "computer_name", r
->computer_name
);
257 ndr_print_uint32(ndr
, "sid_padding", r
->sid_padding
);
258 ndr_print_DATA_BLOB(ndr
, "sid", r
->sid
);
259 ndr_print_uint32(ndr
, "strings_len", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * ndr_size_string_array(r
->strings
, r
->num_of_strings
, LIBNDR_FLAG_STR_NULLTERM
):r
->strings_len
);
260 ndr
->print(ndr
, "%s: ARRAY(%d)", "strings", (int)r
->num_of_strings
);
262 for (cntr_strings_0
=0;cntr_strings_0
<r
->num_of_strings
;cntr_strings_0
++) {
264 if (asprintf(&idx_0
, "[%d]", cntr_strings_0
) != -1) {
265 ndr_print_string(ndr
, "strings", r
->strings
[cntr_strings_0
]);
270 ndr_print_DATA_BLOB(ndr
, "data", r
->data
);
271 ndr_print_uint32(ndr
, "padding", r
->padding
);
273 ndr
->flags
= _flags_save_STRUCT
;
277 static enum ndr_err_code
ndr_push_EVENTLOG_HEADER_FLAGS(struct ndr_push
*ndr
, int ndr_flags
, enum EVENTLOG_HEADER_FLAGS r
)
279 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
280 return NDR_ERR_SUCCESS
;
283 static enum ndr_err_code
ndr_pull_EVENTLOG_HEADER_FLAGS(struct ndr_pull
*ndr
, int ndr_flags
, enum EVENTLOG_HEADER_FLAGS
*r
)
286 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
288 return NDR_ERR_SUCCESS
;
291 _PUBLIC_
void ndr_print_EVENTLOG_HEADER_FLAGS(struct ndr_print
*ndr
, const char *name
, enum EVENTLOG_HEADER_FLAGS r
)
293 const char *val
= NULL
;
296 case ELF_LOGFILE_HEADER_DIRTY
: val
= "ELF_LOGFILE_HEADER_DIRTY"; break;
297 case ELF_LOGFILE_HEADER_WRAP
: val
= "ELF_LOGFILE_HEADER_WRAP"; break;
298 case ELF_LOGFILE_LOGFULL_WRITTEN
: val
= "ELF_LOGFILE_LOGFULL_WRITTEN"; break;
299 case ELF_LOGFILE_ARCHIVE_SET
: val
= "ELF_LOGFILE_ARCHIVE_SET"; break;
301 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
304 _PUBLIC_
enum ndr_err_code
ndr_push_EVENTLOGHEADER(struct ndr_push
*ndr
, int ndr_flags
, const struct EVENTLOGHEADER
*r
)
306 if (ndr_flags
& NDR_SCALARS
) {
307 NDR_CHECK(ndr_push_align(ndr
, 4));
308 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x30));
309 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, "LfLe", 4, sizeof(uint8_t), CH_DOS
));
310 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 1));
311 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 1));
312 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->StartOffset
));
313 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->EndOffset
));
314 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->CurrentRecordNumber
));
315 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->OldestRecordNumber
));
316 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->MaxSize
));
317 NDR_CHECK(ndr_push_EVENTLOG_HEADER_FLAGS(ndr
, NDR_SCALARS
, r
->Flags
));
318 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->Retention
));
319 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x30));
320 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
322 if (ndr_flags
& NDR_BUFFERS
) {
324 return NDR_ERR_SUCCESS
;
327 _PUBLIC_
enum ndr_err_code
ndr_pull_EVENTLOGHEADER(struct ndr_pull
*ndr
, int ndr_flags
, struct EVENTLOGHEADER
*r
)
329 uint32_t size_Signature_0
= 0;
330 if (ndr_flags
& NDR_SCALARS
) {
331 NDR_CHECK(ndr_pull_align(ndr
, 4));
332 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->HeaderSize
));
333 size_Signature_0
= 4;
334 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->Signature
, size_Signature_0
, sizeof(uint8_t), CH_DOS
));
335 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->MajorVersion
));
336 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->MinorVersion
));
337 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->StartOffset
));
338 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->EndOffset
));
339 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->CurrentRecordNumber
));
340 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->OldestRecordNumber
));
341 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->MaxSize
));
342 NDR_CHECK(ndr_pull_EVENTLOG_HEADER_FLAGS(ndr
, NDR_SCALARS
, &r
->Flags
));
343 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->Retention
));
344 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->EndHeaderSize
));
345 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
347 if (ndr_flags
& NDR_BUFFERS
) {
349 return NDR_ERR_SUCCESS
;
352 _PUBLIC_
void ndr_print_EVENTLOGHEADER(struct ndr_print
*ndr
, const char *name
, const struct EVENTLOGHEADER
*r
)
354 ndr_print_struct(ndr
, name
, "EVENTLOGHEADER");
356 ndr_print_uint32(ndr
, "HeaderSize", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x30:r
->HeaderSize
);
357 ndr_print_string(ndr
, "Signature", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?"LfLe":r
->Signature
);
358 ndr_print_uint32(ndr
, "MajorVersion", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?1:r
->MajorVersion
);
359 ndr_print_uint32(ndr
, "MinorVersion", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?1:r
->MinorVersion
);
360 ndr_print_uint32(ndr
, "StartOffset", r
->StartOffset
);
361 ndr_print_uint32(ndr
, "EndOffset", r
->EndOffset
);
362 ndr_print_uint32(ndr
, "CurrentRecordNumber", r
->CurrentRecordNumber
);
363 ndr_print_uint32(ndr
, "OldestRecordNumber", r
->OldestRecordNumber
);
364 ndr_print_uint32(ndr
, "MaxSize", r
->MaxSize
);
365 ndr_print_EVENTLOG_HEADER_FLAGS(ndr
, "Flags", r
->Flags
);
366 ndr_print_uint32(ndr
, "Retention", r
->Retention
);
367 ndr_print_uint32(ndr
, "EndHeaderSize", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x30:r
->EndHeaderSize
);
371 _PUBLIC_
enum ndr_err_code
ndr_push_EVENTLOGRECORD(struct ndr_push
*ndr
, int ndr_flags
, const struct EVENTLOGRECORD
*r
)
373 uint32_t cntr_Strings_0
;
374 if (ndr_flags
& NDR_SCALARS
) {
375 NDR_CHECK(ndr_push_align(ndr
, 4));
376 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->Length
));
377 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, "LfLe", 4, sizeof(uint8_t), CH_DOS
));
378 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->RecordNumber
));
379 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, r
->TimeGenerated
));
380 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, r
->TimeWritten
));
381 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->EventID
));
382 NDR_CHECK(ndr_push_eventlogEventTypes(ndr
, NDR_SCALARS
, r
->EventType
));
383 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->NumStrings
));
384 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->EventCategory
));
385 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->ReservedFlags
));
386 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->ClosingRecordNumber
));
387 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 56 + 2 * (strlen_m_term(r
->SourceName
) + strlen_m_term(r
->Computername
)) + ndr_size_dom_sid0(&r
->UserSid
, ndr
->flags
)));
388 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_dom_sid0(&r
->UserSid
, ndr
->flags
)));
389 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 56 + 2 * (strlen_m_term(r
->SourceName
) + strlen_m_term(r
->Computername
))));
390 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->DataLength
));
391 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 56 + 2 * (strlen_m_term(r
->SourceName
) + strlen_m_term(r
->Computername
)) + ndr_size_dom_sid0(&r
->UserSid
, ndr
->flags
) + (2 * ndr_size_string_array(r
->Strings
, r
->NumStrings
, LIBNDR_FLAG_STR_NULLTERM
))));
393 uint32_t _flags_save_string
= ndr
->flags
;
394 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
|LIBNDR_FLAG_ALIGN2
);
395 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->SourceName
));
396 ndr
->flags
= _flags_save_string
;
399 uint32_t _flags_save_string
= ndr
->flags
;
400 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
|LIBNDR_FLAG_ALIGN2
);
401 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->Computername
));
402 ndr
->flags
= _flags_save_string
;
405 uint32_t _flags_save_dom_sid0
= ndr
->flags
;
406 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
408 struct ndr_push
*_ndr_UserSid
;
409 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_UserSid
, 0, ndr_size_dom_sid0(&r
->UserSid
, ndr
->flags
)));
410 NDR_CHECK(ndr_push_dom_sid0(_ndr_UserSid
, NDR_SCALARS
|NDR_BUFFERS
, &r
->UserSid
));
411 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_UserSid
, 0, ndr_size_dom_sid0(&r
->UserSid
, ndr
->flags
)));
413 ndr
->flags
= _flags_save_dom_sid0
;
416 uint32_t _flags_save_string
= ndr
->flags
;
417 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
|LIBNDR_FLAG_ALIGN2
);
418 for (cntr_Strings_0
= 0; cntr_Strings_0
< r
->NumStrings
; cntr_Strings_0
++) {
419 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->Strings
[cntr_Strings_0
]));
421 ndr
->flags
= _flags_save_string
;
424 uint32_t _flags_save_uint8
= ndr
->flags
;
425 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
426 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->Data
, r
->DataLength
));
427 ndr
->flags
= _flags_save_uint8
;
430 uint32_t _flags_save_string
= ndr
->flags
;
431 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
432 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->Pad
));
433 ndr
->flags
= _flags_save_string
;
435 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->Length
));
436 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
438 if (ndr_flags
& NDR_BUFFERS
) {
440 uint32_t _flags_save_dom_sid0
= ndr
->flags
;
441 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
442 ndr
->flags
= _flags_save_dom_sid0
;
445 return NDR_ERR_SUCCESS
;
448 _PUBLIC_
enum ndr_err_code
ndr_pull_EVENTLOGRECORD(struct ndr_pull
*ndr
, int ndr_flags
, struct EVENTLOGRECORD
*r
)
450 uint32_t size_Reserved_0
= 0;
451 uint32_t size_Strings_0
= 0;
452 uint32_t cntr_Strings_0
;
453 TALLOC_CTX
*_mem_save_Strings_0
;
454 uint32_t size_Data_0
= 0;
455 if (ndr_flags
& NDR_SCALARS
) {
456 NDR_CHECK(ndr_pull_align(ndr
, 4));
457 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->Length
));
459 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->Reserved
, size_Reserved_0
, sizeof(uint8_t), CH_DOS
));
460 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->RecordNumber
));
461 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, &r
->TimeGenerated
));
462 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, &r
->TimeWritten
));
463 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->EventID
));
464 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr
, NDR_SCALARS
, &r
->EventType
));
465 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->NumStrings
));
466 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->EventCategory
));
467 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->ReservedFlags
));
468 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->ClosingRecordNumber
));
469 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->StringOffset
));
470 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->UserSidLength
));
471 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->UserSidOffset
));
472 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->DataLength
));
473 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->DataOffset
));
475 uint32_t _flags_save_string
= ndr
->flags
;
476 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
|LIBNDR_FLAG_ALIGN2
);
477 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->SourceName
));
478 ndr
->flags
= _flags_save_string
;
481 uint32_t _flags_save_string
= ndr
->flags
;
482 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
|LIBNDR_FLAG_ALIGN2
);
483 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->Computername
));
484 ndr
->flags
= _flags_save_string
;
487 uint32_t _flags_save_dom_sid0
= ndr
->flags
;
488 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
490 struct ndr_pull
*_ndr_UserSid
;
491 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_UserSid
, 0, r
->UserSidLength
));
492 NDR_CHECK(ndr_pull_dom_sid0(_ndr_UserSid
, NDR_SCALARS
|NDR_BUFFERS
, &r
->UserSid
));
493 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_UserSid
, 0, r
->UserSidLength
));
495 ndr
->flags
= _flags_save_dom_sid0
;
498 uint32_t _flags_save_string
= ndr
->flags
;
499 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
|LIBNDR_FLAG_ALIGN2
);
500 size_Strings_0
= r
->NumStrings
;
501 NDR_PULL_ALLOC_N(ndr
, r
->Strings
, size_Strings_0
);
502 _mem_save_Strings_0
= NDR_PULL_GET_MEM_CTX(ndr
);
503 NDR_PULL_SET_MEM_CTX(ndr
, r
->Strings
, 0);
504 for (cntr_Strings_0
= 0; cntr_Strings_0
< size_Strings_0
; cntr_Strings_0
++) {
505 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->Strings
[cntr_Strings_0
]));
507 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Strings_0
, 0);
508 ndr
->flags
= _flags_save_string
;
511 uint32_t _flags_save_uint8
= ndr
->flags
;
512 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
513 size_Data_0
= r
->DataLength
;
514 NDR_PULL_ALLOC_N(ndr
, r
->Data
, size_Data_0
);
515 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->Data
, size_Data_0
));
516 ndr
->flags
= _flags_save_uint8
;
519 uint32_t _flags_save_string
= ndr
->flags
;
520 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
521 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->Pad
));
522 ndr
->flags
= _flags_save_string
;
524 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->Length2
));
525 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
527 if (ndr_flags
& NDR_BUFFERS
) {
529 uint32_t _flags_save_dom_sid0
= ndr
->flags
;
530 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
531 ndr
->flags
= _flags_save_dom_sid0
;
534 return NDR_ERR_SUCCESS
;
537 _PUBLIC_
void ndr_print_EVENTLOGRECORD(struct ndr_print
*ndr
, const char *name
, const struct EVENTLOGRECORD
*r
)
539 uint32_t cntr_Strings_0
;
540 ndr_print_struct(ndr
, name
, "EVENTLOGRECORD");
542 ndr_print_uint32(ndr
, "Length", r
->Length
);
543 ndr_print_string(ndr
, "Reserved", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?"LfLe":r
->Reserved
);
544 ndr_print_uint32(ndr
, "RecordNumber", r
->RecordNumber
);
545 ndr_print_time_t(ndr
, "TimeGenerated", r
->TimeGenerated
);
546 ndr_print_time_t(ndr
, "TimeWritten", r
->TimeWritten
);
547 ndr_print_uint32(ndr
, "EventID", r
->EventID
);
548 ndr_print_eventlogEventTypes(ndr
, "EventType", r
->EventType
);
549 ndr_print_uint16(ndr
, "NumStrings", r
->NumStrings
);
550 ndr_print_uint16(ndr
, "EventCategory", r
->EventCategory
);
551 ndr_print_uint16(ndr
, "ReservedFlags", r
->ReservedFlags
);
552 ndr_print_uint32(ndr
, "ClosingRecordNumber", r
->ClosingRecordNumber
);
553 ndr_print_uint32(ndr
, "StringOffset", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?56 + 2 * (strlen_m_term(r
->SourceName
) + strlen_m_term(r
->Computername
)) + r
->UserSidLength
:r
->StringOffset
);
554 ndr_print_uint32(ndr
, "UserSidLength", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_dom_sid0(&r
->UserSid
, ndr
->flags
):r
->UserSidLength
);
555 ndr_print_uint32(ndr
, "UserSidOffset", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?56 + 2 * (strlen_m_term(r
->SourceName
) + strlen_m_term(r
->Computername
)):r
->UserSidOffset
);
556 ndr_print_uint32(ndr
, "DataLength", r
->DataLength
);
557 ndr_print_uint32(ndr
, "DataOffset", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?56 + 2 * (strlen_m_term(r
->SourceName
) + strlen_m_term(r
->Computername
)) + r
->UserSidLength
+ (2 * ndr_size_string_array(r
->Strings
, r
->NumStrings
, LIBNDR_FLAG_STR_NULLTERM
)):r
->DataOffset
);
558 ndr_print_string(ndr
, "SourceName", r
->SourceName
);
559 ndr_print_string(ndr
, "Computername", r
->Computername
);
560 ndr_print_dom_sid0(ndr
, "UserSid", &r
->UserSid
);
561 ndr
->print(ndr
, "%s: ARRAY(%d)", "Strings", (int)r
->NumStrings
);
563 for (cntr_Strings_0
=0;cntr_Strings_0
<r
->NumStrings
;cntr_Strings_0
++) {
565 if (asprintf(&idx_0
, "[%d]", cntr_Strings_0
) != -1) {
566 ndr_print_string(ndr
, "Strings", r
->Strings
[cntr_Strings_0
]);
571 ndr_print_array_uint8(ndr
, "Data", r
->Data
, r
->DataLength
);
572 ndr_print_string(ndr
, "Pad", r
->Pad
);
573 ndr_print_uint32(ndr
, "Length2", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?r
->Length
:r
->Length2
);
577 _PUBLIC_
size_t ndr_size_EVENTLOGRECORD(const struct EVENTLOGRECORD
*r
, struct smb_iconv_convenience
*ic
, int flags
)
579 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_EVENTLOGRECORD
, ic
);
582 _PUBLIC_
enum ndr_err_code
ndr_push_EVENTLOGEOF(struct ndr_push
*ndr
, int ndr_flags
, const struct EVENTLOGEOF
*r
)
584 if (ndr_flags
& NDR_SCALARS
) {
585 NDR_CHECK(ndr_push_align(ndr
, 4));
586 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x28));
587 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x11111111));
588 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x22222222));
589 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x33333333));
590 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x44444444));
591 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->BeginRecord
));
592 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->EndRecord
));
593 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->CurrentRecordNumber
));
594 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->OldestRecordNumber
));
595 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x28));
596 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
598 if (ndr_flags
& NDR_BUFFERS
) {
600 return NDR_ERR_SUCCESS
;
603 _PUBLIC_
enum ndr_err_code
ndr_pull_EVENTLOGEOF(struct ndr_pull
*ndr
, int ndr_flags
, struct EVENTLOGEOF
*r
)
605 if (ndr_flags
& NDR_SCALARS
) {
606 NDR_CHECK(ndr_pull_align(ndr
, 4));
607 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->RecordSizeBeginning
));
608 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->One
));
609 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->Two
));
610 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->Three
));
611 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->Four
));
612 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->BeginRecord
));
613 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->EndRecord
));
614 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->CurrentRecordNumber
));
615 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->OldestRecordNumber
));
616 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->RecordSizeEnd
));
617 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
619 if (ndr_flags
& NDR_BUFFERS
) {
621 return NDR_ERR_SUCCESS
;
624 _PUBLIC_
void ndr_print_EVENTLOGEOF(struct ndr_print
*ndr
, const char *name
, const struct EVENTLOGEOF
*r
)
626 ndr_print_struct(ndr
, name
, "EVENTLOGEOF");
628 ndr_print_uint32(ndr
, "RecordSizeBeginning", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x28:r
->RecordSizeBeginning
);
629 ndr_print_uint32(ndr
, "One", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x11111111:r
->One
);
630 ndr_print_uint32(ndr
, "Two", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x22222222:r
->Two
);
631 ndr_print_uint32(ndr
, "Three", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x33333333:r
->Three
);
632 ndr_print_uint32(ndr
, "Four", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x44444444:r
->Four
);
633 ndr_print_uint32(ndr
, "BeginRecord", r
->BeginRecord
);
634 ndr_print_uint32(ndr
, "EndRecord", r
->EndRecord
);
635 ndr_print_uint32(ndr
, "CurrentRecordNumber", r
->CurrentRecordNumber
);
636 ndr_print_uint32(ndr
, "OldestRecordNumber", r
->OldestRecordNumber
);
637 ndr_print_uint32(ndr
, "RecordSizeEnd", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x28:r
->RecordSizeEnd
);
641 _PUBLIC_
enum ndr_err_code
ndr_push_EVENTLOG_EVT_FILE(struct ndr_push
*ndr
, int ndr_flags
, const struct EVENTLOG_EVT_FILE
*r
)
643 uint32_t cntr_records_0
;
644 if (ndr_flags
& NDR_SCALARS
) {
645 NDR_CHECK(ndr_push_align(ndr
, 4));
646 NDR_CHECK(ndr_push_EVENTLOGHEADER(ndr
, NDR_SCALARS
, &r
->hdr
));
647 for (cntr_records_0
= 0; cntr_records_0
< r
->hdr
.CurrentRecordNumber
- r
->hdr
.OldestRecordNumber
; cntr_records_0
++) {
648 NDR_CHECK(ndr_push_EVENTLOGRECORD(ndr
, NDR_SCALARS
, &r
->records
[cntr_records_0
]));
650 NDR_CHECK(ndr_push_EVENTLOGEOF(ndr
, NDR_SCALARS
, &r
->eof
));
651 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
653 if (ndr_flags
& NDR_BUFFERS
) {
654 for (cntr_records_0
= 0; cntr_records_0
< r
->hdr
.CurrentRecordNumber
- r
->hdr
.OldestRecordNumber
; cntr_records_0
++) {
655 NDR_CHECK(ndr_push_EVENTLOGRECORD(ndr
, NDR_BUFFERS
, &r
->records
[cntr_records_0
]));
658 return NDR_ERR_SUCCESS
;
661 _PUBLIC_
enum ndr_err_code
ndr_pull_EVENTLOG_EVT_FILE(struct ndr_pull
*ndr
, int ndr_flags
, struct EVENTLOG_EVT_FILE
*r
)
663 uint32_t size_records_0
= 0;
664 uint32_t cntr_records_0
;
665 TALLOC_CTX
*_mem_save_records_0
;
666 if (ndr_flags
& NDR_SCALARS
) {
667 NDR_CHECK(ndr_pull_align(ndr
, 4));
668 NDR_CHECK(ndr_pull_EVENTLOGHEADER(ndr
, NDR_SCALARS
, &r
->hdr
));
669 size_records_0
= r
->hdr
.CurrentRecordNumber
- r
->hdr
.OldestRecordNumber
;
670 NDR_PULL_ALLOC_N(ndr
, r
->records
, size_records_0
);
671 _mem_save_records_0
= NDR_PULL_GET_MEM_CTX(ndr
);
672 NDR_PULL_SET_MEM_CTX(ndr
, r
->records
, 0);
673 for (cntr_records_0
= 0; cntr_records_0
< size_records_0
; cntr_records_0
++) {
674 NDR_CHECK(ndr_pull_EVENTLOGRECORD(ndr
, NDR_SCALARS
, &r
->records
[cntr_records_0
]));
676 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_records_0
, 0);
677 NDR_CHECK(ndr_pull_EVENTLOGEOF(ndr
, NDR_SCALARS
, &r
->eof
));
678 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
680 if (ndr_flags
& NDR_BUFFERS
) {
681 size_records_0
= r
->hdr
.CurrentRecordNumber
- r
->hdr
.OldestRecordNumber
;
682 _mem_save_records_0
= NDR_PULL_GET_MEM_CTX(ndr
);
683 NDR_PULL_SET_MEM_CTX(ndr
, r
->records
, 0);
684 for (cntr_records_0
= 0; cntr_records_0
< size_records_0
; cntr_records_0
++) {
685 NDR_CHECK(ndr_pull_EVENTLOGRECORD(ndr
, NDR_BUFFERS
, &r
->records
[cntr_records_0
]));
687 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_records_0
, 0);
689 return NDR_ERR_SUCCESS
;
692 _PUBLIC_
void ndr_print_EVENTLOG_EVT_FILE(struct ndr_print
*ndr
, const char *name
, const struct EVENTLOG_EVT_FILE
*r
)
694 uint32_t cntr_records_0
;
695 ndr_print_struct(ndr
, name
, "EVENTLOG_EVT_FILE");
697 ndr_print_EVENTLOGHEADER(ndr
, "hdr", &r
->hdr
);
698 ndr
->print(ndr
, "%s: ARRAY(%d)", "records", (int)r
->hdr
.CurrentRecordNumber
- r
->hdr
.OldestRecordNumber
);
700 for (cntr_records_0
=0;cntr_records_0
<r
->hdr
.CurrentRecordNumber
- r
->hdr
.OldestRecordNumber
;cntr_records_0
++) {
702 if (asprintf(&idx_0
, "[%d]", cntr_records_0
) != -1) {
703 ndr_print_EVENTLOGRECORD(ndr
, "records", &r
->records
[cntr_records_0
]);
708 ndr_print_EVENTLOGEOF(ndr
, "eof", &r
->eof
);
712 _PUBLIC_
enum ndr_err_code
ndr_push_EVENTLOG_FULL_INFORMATION(struct ndr_push
*ndr
, int ndr_flags
, const struct EVENTLOG_FULL_INFORMATION
*r
)
714 if (ndr_flags
& NDR_SCALARS
) {
715 NDR_CHECK(ndr_push_align(ndr
, 4));
716 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->full
));
717 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
719 if (ndr_flags
& NDR_BUFFERS
) {
721 return NDR_ERR_SUCCESS
;
724 _PUBLIC_
enum ndr_err_code
ndr_pull_EVENTLOG_FULL_INFORMATION(struct ndr_pull
*ndr
, int ndr_flags
, struct EVENTLOG_FULL_INFORMATION
*r
)
726 if (ndr_flags
& NDR_SCALARS
) {
727 NDR_CHECK(ndr_pull_align(ndr
, 4));
728 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->full
));
729 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
731 if (ndr_flags
& NDR_BUFFERS
) {
733 return NDR_ERR_SUCCESS
;
736 _PUBLIC_
void ndr_print_EVENTLOG_FULL_INFORMATION(struct ndr_print
*ndr
, const char *name
, const struct EVENTLOG_FULL_INFORMATION
*r
)
738 ndr_print_struct(ndr
, name
, "EVENTLOG_FULL_INFORMATION");
740 ndr_print_uint32(ndr
, "full", r
->full
);
744 static enum ndr_err_code
ndr_push_eventlog_ClearEventLogW(struct ndr_push
*ndr
, int flags
, const struct eventlog_ClearEventLogW
*r
)
746 if (flags
& NDR_IN
) {
747 if (r
->in
.handle
== NULL
) {
748 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
750 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
751 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.backupfile
));
752 if (r
->in
.backupfile
) {
753 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.backupfile
));
756 if (flags
& NDR_OUT
) {
757 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
759 return NDR_ERR_SUCCESS
;
762 static enum ndr_err_code
ndr_pull_eventlog_ClearEventLogW(struct ndr_pull
*ndr
, int flags
, struct eventlog_ClearEventLogW
*r
)
764 uint32_t _ptr_backupfile
;
765 TALLOC_CTX
*_mem_save_handle_0
;
766 TALLOC_CTX
*_mem_save_backupfile_0
;
767 if (flags
& NDR_IN
) {
768 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
769 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
771 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
772 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
773 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
774 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
775 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_backupfile
));
776 if (_ptr_backupfile
) {
777 NDR_PULL_ALLOC(ndr
, r
->in
.backupfile
);
779 r
->in
.backupfile
= NULL
;
781 if (r
->in
.backupfile
) {
782 _mem_save_backupfile_0
= NDR_PULL_GET_MEM_CTX(ndr
);
783 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.backupfile
, 0);
784 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.backupfile
));
785 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_backupfile_0
, 0);
788 if (flags
& NDR_OUT
) {
789 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
791 return NDR_ERR_SUCCESS
;
794 _PUBLIC_
void ndr_print_eventlog_ClearEventLogW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ClearEventLogW
*r
)
796 ndr_print_struct(ndr
, name
, "eventlog_ClearEventLogW");
798 if (flags
& NDR_SET_VALUES
) {
799 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
801 if (flags
& NDR_IN
) {
802 ndr_print_struct(ndr
, "in", "eventlog_ClearEventLogW");
804 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
806 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
808 ndr_print_ptr(ndr
, "backupfile", r
->in
.backupfile
);
810 if (r
->in
.backupfile
) {
811 ndr_print_lsa_String(ndr
, "backupfile", r
->in
.backupfile
);
816 if (flags
& NDR_OUT
) {
817 ndr_print_struct(ndr
, "out", "eventlog_ClearEventLogW");
819 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
825 static enum ndr_err_code
ndr_push_eventlog_BackupEventLogW(struct ndr_push
*ndr
, int flags
, const struct eventlog_BackupEventLogW
*r
)
827 if (flags
& NDR_IN
) {
828 if (r
->in
.handle
== NULL
) {
829 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
831 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
832 if (r
->in
.backup_filename
== NULL
) {
833 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
835 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.backup_filename
));
837 if (flags
& NDR_OUT
) {
838 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
840 return NDR_ERR_SUCCESS
;
843 static enum ndr_err_code
ndr_pull_eventlog_BackupEventLogW(struct ndr_pull
*ndr
, int flags
, struct eventlog_BackupEventLogW
*r
)
845 TALLOC_CTX
*_mem_save_handle_0
;
846 TALLOC_CTX
*_mem_save_backup_filename_0
;
847 if (flags
& NDR_IN
) {
848 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
849 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
851 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
852 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
853 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
854 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
855 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
856 NDR_PULL_ALLOC(ndr
, r
->in
.backup_filename
);
858 _mem_save_backup_filename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
859 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.backup_filename
, LIBNDR_FLAG_REF_ALLOC
);
860 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.backup_filename
));
861 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_backup_filename_0
, LIBNDR_FLAG_REF_ALLOC
);
863 if (flags
& NDR_OUT
) {
864 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
866 return NDR_ERR_SUCCESS
;
869 _PUBLIC_
void ndr_print_eventlog_BackupEventLogW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_BackupEventLogW
*r
)
871 ndr_print_struct(ndr
, name
, "eventlog_BackupEventLogW");
873 if (flags
& NDR_SET_VALUES
) {
874 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
876 if (flags
& NDR_IN
) {
877 ndr_print_struct(ndr
, "in", "eventlog_BackupEventLogW");
879 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
881 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
883 ndr_print_ptr(ndr
, "backup_filename", r
->in
.backup_filename
);
885 ndr_print_lsa_String(ndr
, "backup_filename", r
->in
.backup_filename
);
889 if (flags
& NDR_OUT
) {
890 ndr_print_struct(ndr
, "out", "eventlog_BackupEventLogW");
892 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
898 static enum ndr_err_code
ndr_push_eventlog_CloseEventLog(struct ndr_push
*ndr
, int flags
, const struct eventlog_CloseEventLog
*r
)
900 if (flags
& NDR_IN
) {
901 if (r
->in
.handle
== NULL
) {
902 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
904 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
906 if (flags
& NDR_OUT
) {
907 if (r
->out
.handle
== NULL
) {
908 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
910 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
911 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
913 return NDR_ERR_SUCCESS
;
916 static enum ndr_err_code
ndr_pull_eventlog_CloseEventLog(struct ndr_pull
*ndr
, int flags
, struct eventlog_CloseEventLog
*r
)
918 TALLOC_CTX
*_mem_save_handle_0
;
919 if (flags
& NDR_IN
) {
922 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
923 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
925 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
926 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
927 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
928 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
929 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
930 *r
->out
.handle
= *r
->in
.handle
;
932 if (flags
& NDR_OUT
) {
933 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
934 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
936 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
937 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
938 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
939 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
940 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
942 return NDR_ERR_SUCCESS
;
945 _PUBLIC_
void ndr_print_eventlog_CloseEventLog(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_CloseEventLog
*r
)
947 ndr_print_struct(ndr
, name
, "eventlog_CloseEventLog");
949 if (flags
& NDR_SET_VALUES
) {
950 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
952 if (flags
& NDR_IN
) {
953 ndr_print_struct(ndr
, "in", "eventlog_CloseEventLog");
955 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
957 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
961 if (flags
& NDR_OUT
) {
962 ndr_print_struct(ndr
, "out", "eventlog_CloseEventLog");
964 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
966 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
968 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
974 static enum ndr_err_code
ndr_push_eventlog_DeregisterEventSource(struct ndr_push
*ndr
, int flags
, const struct eventlog_DeregisterEventSource
*r
)
976 if (flags
& NDR_IN
) {
977 if (r
->in
.handle
== NULL
) {
978 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
980 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
982 if (flags
& NDR_OUT
) {
983 if (r
->out
.handle
== NULL
) {
984 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
986 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
987 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
989 return NDR_ERR_SUCCESS
;
992 static enum ndr_err_code
ndr_pull_eventlog_DeregisterEventSource(struct ndr_pull
*ndr
, int flags
, struct eventlog_DeregisterEventSource
*r
)
994 TALLOC_CTX
*_mem_save_handle_0
;
995 if (flags
& NDR_IN
) {
998 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
999 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1001 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1002 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1003 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1004 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1005 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
1006 *r
->out
.handle
= *r
->in
.handle
;
1008 if (flags
& NDR_OUT
) {
1009 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1010 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
1012 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1013 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1014 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
1015 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1016 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1018 return NDR_ERR_SUCCESS
;
1021 _PUBLIC_
void ndr_print_eventlog_DeregisterEventSource(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_DeregisterEventSource
*r
)
1023 ndr_print_struct(ndr
, name
, "eventlog_DeregisterEventSource");
1025 if (flags
& NDR_SET_VALUES
) {
1026 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1028 if (flags
& NDR_IN
) {
1029 ndr_print_struct(ndr
, "in", "eventlog_DeregisterEventSource");
1031 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1033 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1037 if (flags
& NDR_OUT
) {
1038 ndr_print_struct(ndr
, "out", "eventlog_DeregisterEventSource");
1040 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
1042 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
1044 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1050 static enum ndr_err_code
ndr_push_eventlog_GetNumRecords(struct ndr_push
*ndr
, int flags
, const struct eventlog_GetNumRecords
*r
)
1052 if (flags
& NDR_IN
) {
1053 if (r
->in
.handle
== NULL
) {
1054 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1056 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1058 if (flags
& NDR_OUT
) {
1059 if (r
->out
.number
== NULL
) {
1060 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1062 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.number
));
1063 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1065 return NDR_ERR_SUCCESS
;
1068 static enum ndr_err_code
ndr_pull_eventlog_GetNumRecords(struct ndr_pull
*ndr
, int flags
, struct eventlog_GetNumRecords
*r
)
1070 TALLOC_CTX
*_mem_save_handle_0
;
1071 TALLOC_CTX
*_mem_save_number_0
;
1072 if (flags
& NDR_IN
) {
1073 ZERO_STRUCT(r
->out
);
1075 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1076 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1078 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1079 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1080 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1081 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1082 NDR_PULL_ALLOC(ndr
, r
->out
.number
);
1083 ZERO_STRUCTP(r
->out
.number
);
1085 if (flags
& NDR_OUT
) {
1086 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1087 NDR_PULL_ALLOC(ndr
, r
->out
.number
);
1089 _mem_save_number_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1090 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.number
, LIBNDR_FLAG_REF_ALLOC
);
1091 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.number
));
1092 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_number_0
, LIBNDR_FLAG_REF_ALLOC
);
1093 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1095 return NDR_ERR_SUCCESS
;
1098 _PUBLIC_
void ndr_print_eventlog_GetNumRecords(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_GetNumRecords
*r
)
1100 ndr_print_struct(ndr
, name
, "eventlog_GetNumRecords");
1102 if (flags
& NDR_SET_VALUES
) {
1103 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1105 if (flags
& NDR_IN
) {
1106 ndr_print_struct(ndr
, "in", "eventlog_GetNumRecords");
1108 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1110 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1114 if (flags
& NDR_OUT
) {
1115 ndr_print_struct(ndr
, "out", "eventlog_GetNumRecords");
1117 ndr_print_ptr(ndr
, "number", r
->out
.number
);
1119 ndr_print_uint32(ndr
, "number", *r
->out
.number
);
1121 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1127 static enum ndr_err_code
ndr_push_eventlog_GetOldestRecord(struct ndr_push
*ndr
, int flags
, const struct eventlog_GetOldestRecord
*r
)
1129 if (flags
& NDR_IN
) {
1130 if (r
->in
.handle
== NULL
) {
1131 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1133 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1135 if (flags
& NDR_OUT
) {
1136 if (r
->out
.oldest_entry
== NULL
) {
1137 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1139 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.oldest_entry
));
1140 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1142 return NDR_ERR_SUCCESS
;
1145 static enum ndr_err_code
ndr_pull_eventlog_GetOldestRecord(struct ndr_pull
*ndr
, int flags
, struct eventlog_GetOldestRecord
*r
)
1147 TALLOC_CTX
*_mem_save_handle_0
;
1148 TALLOC_CTX
*_mem_save_oldest_entry_0
;
1149 if (flags
& NDR_IN
) {
1150 ZERO_STRUCT(r
->out
);
1152 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1153 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1155 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1156 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1157 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1158 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1159 NDR_PULL_ALLOC(ndr
, r
->out
.oldest_entry
);
1160 ZERO_STRUCTP(r
->out
.oldest_entry
);
1162 if (flags
& NDR_OUT
) {
1163 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1164 NDR_PULL_ALLOC(ndr
, r
->out
.oldest_entry
);
1166 _mem_save_oldest_entry_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1167 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.oldest_entry
, LIBNDR_FLAG_REF_ALLOC
);
1168 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.oldest_entry
));
1169 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_oldest_entry_0
, LIBNDR_FLAG_REF_ALLOC
);
1170 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1172 return NDR_ERR_SUCCESS
;
1175 _PUBLIC_
void ndr_print_eventlog_GetOldestRecord(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_GetOldestRecord
*r
)
1177 ndr_print_struct(ndr
, name
, "eventlog_GetOldestRecord");
1179 if (flags
& NDR_SET_VALUES
) {
1180 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1182 if (flags
& NDR_IN
) {
1183 ndr_print_struct(ndr
, "in", "eventlog_GetOldestRecord");
1185 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1187 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1191 if (flags
& NDR_OUT
) {
1192 ndr_print_struct(ndr
, "out", "eventlog_GetOldestRecord");
1194 ndr_print_ptr(ndr
, "oldest_entry", r
->out
.oldest_entry
);
1196 ndr_print_uint32(ndr
, "oldest_entry", *r
->out
.oldest_entry
);
1198 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1204 static enum ndr_err_code
ndr_push_eventlog_ChangeNotify(struct ndr_push
*ndr
, int flags
, const struct eventlog_ChangeNotify
*r
)
1206 if (flags
& NDR_IN
) {
1208 if (flags
& NDR_OUT
) {
1209 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1211 return NDR_ERR_SUCCESS
;
1214 static enum ndr_err_code
ndr_pull_eventlog_ChangeNotify(struct ndr_pull
*ndr
, int flags
, struct eventlog_ChangeNotify
*r
)
1216 if (flags
& NDR_IN
) {
1218 if (flags
& NDR_OUT
) {
1219 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1221 return NDR_ERR_SUCCESS
;
1224 _PUBLIC_
void ndr_print_eventlog_ChangeNotify(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ChangeNotify
*r
)
1226 ndr_print_struct(ndr
, name
, "eventlog_ChangeNotify");
1228 if (flags
& NDR_SET_VALUES
) {
1229 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1231 if (flags
& NDR_IN
) {
1232 ndr_print_struct(ndr
, "in", "eventlog_ChangeNotify");
1236 if (flags
& NDR_OUT
) {
1237 ndr_print_struct(ndr
, "out", "eventlog_ChangeNotify");
1239 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1245 static enum ndr_err_code
ndr_push_eventlog_OpenEventLogW(struct ndr_push
*ndr
, int flags
, const struct eventlog_OpenEventLogW
*r
)
1247 if (flags
& NDR_IN
) {
1248 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.unknown0
));
1249 if (r
->in
.unknown0
) {
1250 NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr
, NDR_SCALARS
, r
->in
.unknown0
));
1252 if (r
->in
.logname
== NULL
) {
1253 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1255 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.logname
));
1256 if (r
->in
.servername
== NULL
) {
1257 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1259 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.servername
));
1260 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.major_version
));
1261 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.minor_version
));
1263 if (flags
& NDR_OUT
) {
1264 if (r
->out
.handle
== NULL
) {
1265 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1267 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
1268 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1270 return NDR_ERR_SUCCESS
;
1273 static enum ndr_err_code
ndr_pull_eventlog_OpenEventLogW(struct ndr_pull
*ndr
, int flags
, struct eventlog_OpenEventLogW
*r
)
1275 uint32_t _ptr_unknown0
;
1276 TALLOC_CTX
*_mem_save_unknown0_0
;
1277 TALLOC_CTX
*_mem_save_logname_0
;
1278 TALLOC_CTX
*_mem_save_servername_0
;
1279 TALLOC_CTX
*_mem_save_handle_0
;
1280 if (flags
& NDR_IN
) {
1281 ZERO_STRUCT(r
->out
);
1283 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown0
));
1284 if (_ptr_unknown0
) {
1285 NDR_PULL_ALLOC(ndr
, r
->in
.unknown0
);
1287 r
->in
.unknown0
= NULL
;
1289 if (r
->in
.unknown0
) {
1290 _mem_save_unknown0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1291 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.unknown0
, 0);
1292 NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr
, NDR_SCALARS
, r
->in
.unknown0
));
1293 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown0_0
, 0);
1295 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1296 NDR_PULL_ALLOC(ndr
, r
->in
.logname
);
1298 _mem_save_logname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1299 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.logname
, LIBNDR_FLAG_REF_ALLOC
);
1300 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.logname
));
1301 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_logname_0
, LIBNDR_FLAG_REF_ALLOC
);
1302 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1303 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
1305 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1306 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, LIBNDR_FLAG_REF_ALLOC
);
1307 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.servername
));
1308 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, LIBNDR_FLAG_REF_ALLOC
);
1309 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.major_version
));
1310 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.minor_version
));
1311 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
1312 ZERO_STRUCTP(r
->out
.handle
);
1314 if (flags
& NDR_OUT
) {
1315 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1316 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
1318 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1319 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1320 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
1321 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1322 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1324 return NDR_ERR_SUCCESS
;
1327 _PUBLIC_
void ndr_print_eventlog_OpenEventLogW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_OpenEventLogW
*r
)
1329 ndr_print_struct(ndr
, name
, "eventlog_OpenEventLogW");
1331 if (flags
& NDR_SET_VALUES
) {
1332 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1334 if (flags
& NDR_IN
) {
1335 ndr_print_struct(ndr
, "in", "eventlog_OpenEventLogW");
1337 ndr_print_ptr(ndr
, "unknown0", r
->in
.unknown0
);
1339 if (r
->in
.unknown0
) {
1340 ndr_print_eventlog_OpenUnknown0(ndr
, "unknown0", r
->in
.unknown0
);
1343 ndr_print_ptr(ndr
, "logname", r
->in
.logname
);
1345 ndr_print_lsa_String(ndr
, "logname", r
->in
.logname
);
1347 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
1349 ndr_print_lsa_String(ndr
, "servername", r
->in
.servername
);
1351 ndr_print_uint32(ndr
, "major_version", r
->in
.major_version
);
1352 ndr_print_uint32(ndr
, "minor_version", r
->in
.minor_version
);
1355 if (flags
& NDR_OUT
) {
1356 ndr_print_struct(ndr
, "out", "eventlog_OpenEventLogW");
1358 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
1360 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
1362 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1368 static enum ndr_err_code
ndr_push_eventlog_RegisterEventSourceW(struct ndr_push
*ndr
, int flags
, const struct eventlog_RegisterEventSourceW
*r
)
1370 if (flags
& NDR_IN
) {
1371 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.unknown0
));
1372 if (r
->in
.unknown0
) {
1373 NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr
, NDR_SCALARS
, r
->in
.unknown0
));
1375 if (r
->in
.module_name
== NULL
) {
1376 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1378 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.module_name
));
1379 if (r
->in
.reg_module_name
== NULL
) {
1380 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1382 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.reg_module_name
));
1383 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.major_version
));
1384 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.minor_version
));
1386 if (flags
& NDR_OUT
) {
1387 if (r
->out
.log_handle
== NULL
) {
1388 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1390 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.log_handle
));
1391 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1393 return NDR_ERR_SUCCESS
;
1396 static enum ndr_err_code
ndr_pull_eventlog_RegisterEventSourceW(struct ndr_pull
*ndr
, int flags
, struct eventlog_RegisterEventSourceW
*r
)
1398 uint32_t _ptr_unknown0
;
1399 TALLOC_CTX
*_mem_save_unknown0_0
;
1400 TALLOC_CTX
*_mem_save_module_name_0
;
1401 TALLOC_CTX
*_mem_save_reg_module_name_0
;
1402 TALLOC_CTX
*_mem_save_log_handle_0
;
1403 if (flags
& NDR_IN
) {
1404 ZERO_STRUCT(r
->out
);
1406 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown0
));
1407 if (_ptr_unknown0
) {
1408 NDR_PULL_ALLOC(ndr
, r
->in
.unknown0
);
1410 r
->in
.unknown0
= NULL
;
1412 if (r
->in
.unknown0
) {
1413 _mem_save_unknown0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1414 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.unknown0
, 0);
1415 NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr
, NDR_SCALARS
, r
->in
.unknown0
));
1416 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown0_0
, 0);
1418 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1419 NDR_PULL_ALLOC(ndr
, r
->in
.module_name
);
1421 _mem_save_module_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1422 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.module_name
, LIBNDR_FLAG_REF_ALLOC
);
1423 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.module_name
));
1424 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_module_name_0
, LIBNDR_FLAG_REF_ALLOC
);
1425 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1426 NDR_PULL_ALLOC(ndr
, r
->in
.reg_module_name
);
1428 _mem_save_reg_module_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1429 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.reg_module_name
, LIBNDR_FLAG_REF_ALLOC
);
1430 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.reg_module_name
));
1431 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_reg_module_name_0
, LIBNDR_FLAG_REF_ALLOC
);
1432 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.major_version
));
1433 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.minor_version
));
1434 NDR_PULL_ALLOC(ndr
, r
->out
.log_handle
);
1435 ZERO_STRUCTP(r
->out
.log_handle
);
1437 if (flags
& NDR_OUT
) {
1438 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1439 NDR_PULL_ALLOC(ndr
, r
->out
.log_handle
);
1441 _mem_save_log_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1442 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.log_handle
, LIBNDR_FLAG_REF_ALLOC
);
1443 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.log_handle
));
1444 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_log_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1445 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1447 return NDR_ERR_SUCCESS
;
1450 _PUBLIC_
void ndr_print_eventlog_RegisterEventSourceW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_RegisterEventSourceW
*r
)
1452 ndr_print_struct(ndr
, name
, "eventlog_RegisterEventSourceW");
1454 if (flags
& NDR_SET_VALUES
) {
1455 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1457 if (flags
& NDR_IN
) {
1458 ndr_print_struct(ndr
, "in", "eventlog_RegisterEventSourceW");
1460 ndr_print_ptr(ndr
, "unknown0", r
->in
.unknown0
);
1462 if (r
->in
.unknown0
) {
1463 ndr_print_eventlog_OpenUnknown0(ndr
, "unknown0", r
->in
.unknown0
);
1466 ndr_print_ptr(ndr
, "module_name", r
->in
.module_name
);
1468 ndr_print_lsa_String(ndr
, "module_name", r
->in
.module_name
);
1470 ndr_print_ptr(ndr
, "reg_module_name", r
->in
.reg_module_name
);
1472 ndr_print_lsa_String(ndr
, "reg_module_name", r
->in
.reg_module_name
);
1474 ndr_print_uint32(ndr
, "major_version", r
->in
.major_version
);
1475 ndr_print_uint32(ndr
, "minor_version", r
->in
.minor_version
);
1478 if (flags
& NDR_OUT
) {
1479 ndr_print_struct(ndr
, "out", "eventlog_RegisterEventSourceW");
1481 ndr_print_ptr(ndr
, "log_handle", r
->out
.log_handle
);
1483 ndr_print_policy_handle(ndr
, "log_handle", r
->out
.log_handle
);
1485 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1491 static enum ndr_err_code
ndr_push_eventlog_OpenBackupEventLogW(struct ndr_push
*ndr
, int flags
, const struct eventlog_OpenBackupEventLogW
*r
)
1493 if (flags
& NDR_IN
) {
1494 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.unknown0
));
1495 if (r
->in
.unknown0
) {
1496 NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr
, NDR_SCALARS
, r
->in
.unknown0
));
1498 if (r
->in
.backup_logname
== NULL
) {
1499 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1501 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.backup_logname
));
1502 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.major_version
));
1503 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.minor_version
));
1505 if (flags
& NDR_OUT
) {
1506 if (r
->out
.handle
== NULL
) {
1507 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1509 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
1510 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1512 return NDR_ERR_SUCCESS
;
1515 static enum ndr_err_code
ndr_pull_eventlog_OpenBackupEventLogW(struct ndr_pull
*ndr
, int flags
, struct eventlog_OpenBackupEventLogW
*r
)
1517 uint32_t _ptr_unknown0
;
1518 TALLOC_CTX
*_mem_save_unknown0_0
;
1519 TALLOC_CTX
*_mem_save_backup_logname_0
;
1520 TALLOC_CTX
*_mem_save_handle_0
;
1521 if (flags
& NDR_IN
) {
1522 ZERO_STRUCT(r
->out
);
1524 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown0
));
1525 if (_ptr_unknown0
) {
1526 NDR_PULL_ALLOC(ndr
, r
->in
.unknown0
);
1528 r
->in
.unknown0
= NULL
;
1530 if (r
->in
.unknown0
) {
1531 _mem_save_unknown0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1532 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.unknown0
, 0);
1533 NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr
, NDR_SCALARS
, r
->in
.unknown0
));
1534 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown0_0
, 0);
1536 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1537 NDR_PULL_ALLOC(ndr
, r
->in
.backup_logname
);
1539 _mem_save_backup_logname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1540 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.backup_logname
, LIBNDR_FLAG_REF_ALLOC
);
1541 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.backup_logname
));
1542 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_backup_logname_0
, LIBNDR_FLAG_REF_ALLOC
);
1543 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.major_version
));
1544 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.minor_version
));
1545 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
1546 ZERO_STRUCTP(r
->out
.handle
);
1548 if (flags
& NDR_OUT
) {
1549 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1550 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
1552 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1553 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1554 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
1555 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1556 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1558 return NDR_ERR_SUCCESS
;
1561 _PUBLIC_
void ndr_print_eventlog_OpenBackupEventLogW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_OpenBackupEventLogW
*r
)
1563 ndr_print_struct(ndr
, name
, "eventlog_OpenBackupEventLogW");
1565 if (flags
& NDR_SET_VALUES
) {
1566 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1568 if (flags
& NDR_IN
) {
1569 ndr_print_struct(ndr
, "in", "eventlog_OpenBackupEventLogW");
1571 ndr_print_ptr(ndr
, "unknown0", r
->in
.unknown0
);
1573 if (r
->in
.unknown0
) {
1574 ndr_print_eventlog_OpenUnknown0(ndr
, "unknown0", r
->in
.unknown0
);
1577 ndr_print_ptr(ndr
, "backup_logname", r
->in
.backup_logname
);
1579 ndr_print_lsa_String(ndr
, "backup_logname", r
->in
.backup_logname
);
1581 ndr_print_uint32(ndr
, "major_version", r
->in
.major_version
);
1582 ndr_print_uint32(ndr
, "minor_version", r
->in
.minor_version
);
1585 if (flags
& NDR_OUT
) {
1586 ndr_print_struct(ndr
, "out", "eventlog_OpenBackupEventLogW");
1588 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
1590 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
1592 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1598 static enum ndr_err_code
ndr_push_eventlog_ReadEventLogW(struct ndr_push
*ndr
, int flags
, const struct eventlog_ReadEventLogW
*r
)
1600 if (flags
& NDR_IN
) {
1601 if (r
->in
.handle
== NULL
) {
1602 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1604 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1605 NDR_CHECK(ndr_push_eventlogReadFlags(ndr
, NDR_SCALARS
, r
->in
.flags
));
1606 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offset
));
1607 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.number_of_bytes
));
1609 if (flags
& NDR_OUT
) {
1610 if (r
->out
.data
== NULL
) {
1611 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1613 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.number_of_bytes
));
1614 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, r
->in
.number_of_bytes
));
1615 if (r
->out
.sent_size
== NULL
) {
1616 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1618 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.sent_size
));
1619 if (r
->out
.real_size
== NULL
) {
1620 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1622 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.real_size
));
1623 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1625 return NDR_ERR_SUCCESS
;
1628 static enum ndr_err_code
ndr_pull_eventlog_ReadEventLogW(struct ndr_pull
*ndr
, int flags
, struct eventlog_ReadEventLogW
*r
)
1630 uint32_t size_data_1
= 0;
1631 TALLOC_CTX
*_mem_save_handle_0
;
1632 TALLOC_CTX
*_mem_save_sent_size_0
;
1633 TALLOC_CTX
*_mem_save_real_size_0
;
1634 if (flags
& NDR_IN
) {
1635 ZERO_STRUCT(r
->out
);
1637 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1638 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1640 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1641 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1642 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1643 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1644 NDR_CHECK(ndr_pull_eventlogReadFlags(ndr
, NDR_SCALARS
, &r
->in
.flags
));
1645 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offset
));
1646 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.number_of_bytes
));
1647 if (r
->in
.number_of_bytes
> 0x7FFFF) {
1648 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1650 NDR_PULL_ALLOC_N(ndr
, r
->out
.data
, r
->in
.number_of_bytes
);
1651 memset(r
->out
.data
, 0, (r
->in
.number_of_bytes
) * sizeof(*r
->out
.data
));
1652 NDR_PULL_ALLOC(ndr
, r
->out
.sent_size
);
1653 ZERO_STRUCTP(r
->out
.sent_size
);
1654 NDR_PULL_ALLOC(ndr
, r
->out
.real_size
);
1655 ZERO_STRUCTP(r
->out
.real_size
);
1657 if (flags
& NDR_OUT
) {
1658 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.data
));
1659 size_data_1
= ndr_get_array_size(ndr
, &r
->out
.data
);
1660 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1661 NDR_PULL_ALLOC_N(ndr
, r
->out
.data
, size_data_1
);
1663 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, size_data_1
));
1664 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1665 NDR_PULL_ALLOC(ndr
, r
->out
.sent_size
);
1667 _mem_save_sent_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1668 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sent_size
, LIBNDR_FLAG_REF_ALLOC
);
1669 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.sent_size
));
1670 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sent_size_0
, LIBNDR_FLAG_REF_ALLOC
);
1671 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1672 NDR_PULL_ALLOC(ndr
, r
->out
.real_size
);
1674 _mem_save_real_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1675 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.real_size
, LIBNDR_FLAG_REF_ALLOC
);
1676 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.real_size
));
1677 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_real_size_0
, LIBNDR_FLAG_REF_ALLOC
);
1678 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1680 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.data
, r
->in
.number_of_bytes
));
1683 return NDR_ERR_SUCCESS
;
1686 _PUBLIC_
void ndr_print_eventlog_ReadEventLogW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ReadEventLogW
*r
)
1688 ndr_print_struct(ndr
, name
, "eventlog_ReadEventLogW");
1690 if (flags
& NDR_SET_VALUES
) {
1691 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1693 if (flags
& NDR_IN
) {
1694 ndr_print_struct(ndr
, "in", "eventlog_ReadEventLogW");
1696 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1698 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1700 ndr_print_eventlogReadFlags(ndr
, "flags", r
->in
.flags
);
1701 ndr_print_uint32(ndr
, "offset", r
->in
.offset
);
1702 ndr_print_uint32(ndr
, "number_of_bytes", r
->in
.number_of_bytes
);
1705 if (flags
& NDR_OUT
) {
1706 ndr_print_struct(ndr
, "out", "eventlog_ReadEventLogW");
1708 ndr_print_ptr(ndr
, "data", r
->out
.data
);
1710 ndr_print_array_uint8(ndr
, "data", r
->out
.data
, r
->in
.number_of_bytes
);
1712 ndr_print_ptr(ndr
, "sent_size", r
->out
.sent_size
);
1714 ndr_print_uint32(ndr
, "sent_size", *r
->out
.sent_size
);
1716 ndr_print_ptr(ndr
, "real_size", r
->out
.real_size
);
1718 ndr_print_uint32(ndr
, "real_size", *r
->out
.real_size
);
1720 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1726 static enum ndr_err_code
ndr_push_eventlog_ReportEventW(struct ndr_push
*ndr
, int flags
, const struct eventlog_ReportEventW
*r
)
1728 uint32_t cntr_strings_1
;
1729 if (flags
& NDR_IN
) {
1730 if (r
->in
.handle
== NULL
) {
1731 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1733 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1734 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, r
->in
.timestamp
));
1735 NDR_CHECK(ndr_push_eventlogEventTypes(ndr
, NDR_SCALARS
, r
->in
.event_type
));
1736 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.event_category
));
1737 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.event_id
));
1738 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.num_of_strings
));
1739 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.data_size
));
1740 if (r
->in
.servername
== NULL
) {
1741 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1743 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.servername
));
1744 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.user_sid
));
1745 if (r
->in
.user_sid
) {
1746 NDR_CHECK(ndr_push_dom_sid(ndr
, NDR_SCALARS
, r
->in
.user_sid
));
1748 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.strings
));
1749 if (r
->in
.strings
) {
1750 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.num_of_strings
));
1751 for (cntr_strings_1
= 0; cntr_strings_1
< r
->in
.num_of_strings
; cntr_strings_1
++) {
1753 for (cntr_strings_1
= 0; cntr_strings_1
< r
->in
.num_of_strings
; cntr_strings_1
++) {
1754 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.strings
[cntr_strings_1
]));
1755 if (r
->in
.strings
[cntr_strings_1
]) {
1756 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.strings
[cntr_strings_1
]));
1760 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.data
));
1762 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.data_size
));
1763 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.data
, r
->in
.data_size
));
1765 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.flags
));
1766 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.record_number
));
1767 if (r
->in
.record_number
) {
1768 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.record_number
));
1770 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.time_written
));
1771 if (r
->in
.time_written
) {
1772 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, *r
->in
.time_written
));
1775 if (flags
& NDR_OUT
) {
1776 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.record_number
));
1777 if (r
->out
.record_number
) {
1778 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.record_number
));
1780 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.time_written
));
1781 if (r
->out
.time_written
) {
1782 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, *r
->out
.time_written
));
1784 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1786 return NDR_ERR_SUCCESS
;
1789 static enum ndr_err_code
ndr_pull_eventlog_ReportEventW(struct ndr_pull
*ndr
, int flags
, struct eventlog_ReportEventW
*r
)
1791 uint32_t _ptr_user_sid
;
1792 uint32_t _ptr_strings
;
1793 uint32_t size_strings_1
= 0;
1794 uint32_t cntr_strings_1
;
1796 uint32_t size_data_1
= 0;
1797 uint32_t _ptr_record_number
;
1798 uint32_t _ptr_time_written
;
1799 TALLOC_CTX
*_mem_save_handle_0
;
1800 TALLOC_CTX
*_mem_save_servername_0
;
1801 TALLOC_CTX
*_mem_save_user_sid_0
;
1802 TALLOC_CTX
*_mem_save_strings_0
;
1803 TALLOC_CTX
*_mem_save_strings_1
;
1804 TALLOC_CTX
*_mem_save_strings_2
;
1805 TALLOC_CTX
*_mem_save_data_0
;
1806 TALLOC_CTX
*_mem_save_record_number_0
;
1807 TALLOC_CTX
*_mem_save_time_written_0
;
1808 if (flags
& NDR_IN
) {
1809 ZERO_STRUCT(r
->out
);
1811 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1812 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1814 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1815 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1816 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1817 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1818 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, &r
->in
.timestamp
));
1819 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr
, NDR_SCALARS
, &r
->in
.event_type
));
1820 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.event_category
));
1821 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.event_id
));
1822 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.num_of_strings
));
1823 if (r
->in
.num_of_strings
> 256) {
1824 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1826 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.data_size
));
1827 if (r
->in
.data_size
> 0x3FFFF) {
1828 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1830 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1831 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
1833 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1834 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, LIBNDR_FLAG_REF_ALLOC
);
1835 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.servername
));
1836 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, LIBNDR_FLAG_REF_ALLOC
);
1837 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_sid
));
1838 if (_ptr_user_sid
) {
1839 NDR_PULL_ALLOC(ndr
, r
->in
.user_sid
);
1841 r
->in
.user_sid
= NULL
;
1843 if (r
->in
.user_sid
) {
1844 _mem_save_user_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1845 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_sid
, 0);
1846 NDR_CHECK(ndr_pull_dom_sid(ndr
, NDR_SCALARS
, r
->in
.user_sid
));
1847 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_sid_0
, 0);
1849 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_strings
));
1851 NDR_PULL_ALLOC(ndr
, r
->in
.strings
);
1853 r
->in
.strings
= NULL
;
1855 if (r
->in
.strings
) {
1856 _mem_save_strings_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1857 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.strings
, 0);
1858 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.strings
));
1859 size_strings_1
= ndr_get_array_size(ndr
, &r
->in
.strings
);
1860 NDR_PULL_ALLOC_N(ndr
, r
->in
.strings
, size_strings_1
);
1861 _mem_save_strings_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1862 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.strings
, 0);
1863 for (cntr_strings_1
= 0; cntr_strings_1
< size_strings_1
; cntr_strings_1
++) {
1865 for (cntr_strings_1
= 0; cntr_strings_1
< size_strings_1
; cntr_strings_1
++) {
1866 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_strings
));
1868 NDR_PULL_ALLOC(ndr
, r
->in
.strings
[cntr_strings_1
]);
1870 r
->in
.strings
[cntr_strings_1
] = NULL
;
1872 if (r
->in
.strings
[cntr_strings_1
]) {
1873 _mem_save_strings_2
= NDR_PULL_GET_MEM_CTX(ndr
);
1874 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.strings
[cntr_strings_1
], 0);
1875 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.strings
[cntr_strings_1
]));
1876 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_strings_2
, 0);
1879 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_strings_1
, 0);
1880 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_strings_0
, 0);
1882 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
1884 NDR_PULL_ALLOC(ndr
, r
->in
.data
);
1889 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1890 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.data
, 0);
1891 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.data
));
1892 size_data_1
= ndr_get_array_size(ndr
, &r
->in
.data
);
1893 NDR_PULL_ALLOC_N(ndr
, r
->in
.data
, size_data_1
);
1894 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.data
, size_data_1
));
1895 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
1897 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.flags
));
1898 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_record_number
));
1899 if (_ptr_record_number
) {
1900 NDR_PULL_ALLOC(ndr
, r
->in
.record_number
);
1902 r
->in
.record_number
= NULL
;
1904 if (r
->in
.record_number
) {
1905 _mem_save_record_number_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1906 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.record_number
, 0);
1907 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.record_number
));
1908 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_record_number_0
, 0);
1910 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_time_written
));
1911 if (_ptr_time_written
) {
1912 NDR_PULL_ALLOC(ndr
, r
->in
.time_written
);
1914 r
->in
.time_written
= NULL
;
1916 if (r
->in
.time_written
) {
1917 _mem_save_time_written_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1918 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.time_written
, 0);
1919 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, r
->in
.time_written
));
1920 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_time_written_0
, 0);
1922 if (r
->in
.strings
) {
1923 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.strings
, r
->in
.num_of_strings
));
1926 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.data
, r
->in
.data_size
));
1929 if (flags
& NDR_OUT
) {
1930 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_record_number
));
1931 if (_ptr_record_number
) {
1932 NDR_PULL_ALLOC(ndr
, r
->out
.record_number
);
1934 r
->out
.record_number
= NULL
;
1936 if (r
->out
.record_number
) {
1937 _mem_save_record_number_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1938 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.record_number
, 0);
1939 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.record_number
));
1940 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_record_number_0
, 0);
1942 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_time_written
));
1943 if (_ptr_time_written
) {
1944 NDR_PULL_ALLOC(ndr
, r
->out
.time_written
);
1946 r
->out
.time_written
= NULL
;
1948 if (r
->out
.time_written
) {
1949 _mem_save_time_written_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1950 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.time_written
, 0);
1951 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, r
->out
.time_written
));
1952 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_time_written_0
, 0);
1954 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1956 return NDR_ERR_SUCCESS
;
1959 _PUBLIC_
void ndr_print_eventlog_ReportEventW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ReportEventW
*r
)
1961 uint32_t cntr_strings_1
;
1962 ndr_print_struct(ndr
, name
, "eventlog_ReportEventW");
1964 if (flags
& NDR_SET_VALUES
) {
1965 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1967 if (flags
& NDR_IN
) {
1968 ndr_print_struct(ndr
, "in", "eventlog_ReportEventW");
1970 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1972 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1974 ndr_print_time_t(ndr
, "timestamp", r
->in
.timestamp
);
1975 ndr_print_eventlogEventTypes(ndr
, "event_type", r
->in
.event_type
);
1976 ndr_print_uint16(ndr
, "event_category", r
->in
.event_category
);
1977 ndr_print_uint32(ndr
, "event_id", r
->in
.event_id
);
1978 ndr_print_uint16(ndr
, "num_of_strings", r
->in
.num_of_strings
);
1979 ndr_print_uint32(ndr
, "data_size", r
->in
.data_size
);
1980 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
1982 ndr_print_lsa_String(ndr
, "servername", r
->in
.servername
);
1984 ndr_print_ptr(ndr
, "user_sid", r
->in
.user_sid
);
1986 if (r
->in
.user_sid
) {
1987 ndr_print_dom_sid(ndr
, "user_sid", r
->in
.user_sid
);
1990 ndr_print_ptr(ndr
, "strings", r
->in
.strings
);
1992 if (r
->in
.strings
) {
1993 ndr
->print(ndr
, "%s: ARRAY(%d)", "strings", (int)r
->in
.num_of_strings
);
1995 for (cntr_strings_1
=0;cntr_strings_1
<r
->in
.num_of_strings
;cntr_strings_1
++) {
1997 if (asprintf(&idx_1
, "[%d]", cntr_strings_1
) != -1) {
1998 ndr_print_ptr(ndr
, "strings", r
->in
.strings
[cntr_strings_1
]);
2000 if (r
->in
.strings
[cntr_strings_1
]) {
2001 ndr_print_lsa_String(ndr
, "strings", r
->in
.strings
[cntr_strings_1
]);
2010 ndr_print_ptr(ndr
, "data", r
->in
.data
);
2013 ndr_print_array_uint8(ndr
, "data", r
->in
.data
, r
->in
.data_size
);
2016 ndr_print_uint16(ndr
, "flags", r
->in
.flags
);
2017 ndr_print_ptr(ndr
, "record_number", r
->in
.record_number
);
2019 if (r
->in
.record_number
) {
2020 ndr_print_uint32(ndr
, "record_number", *r
->in
.record_number
);
2023 ndr_print_ptr(ndr
, "time_written", r
->in
.time_written
);
2025 if (r
->in
.time_written
) {
2026 ndr_print_time_t(ndr
, "time_written", *r
->in
.time_written
);
2031 if (flags
& NDR_OUT
) {
2032 ndr_print_struct(ndr
, "out", "eventlog_ReportEventW");
2034 ndr_print_ptr(ndr
, "record_number", r
->out
.record_number
);
2036 if (r
->out
.record_number
) {
2037 ndr_print_uint32(ndr
, "record_number", *r
->out
.record_number
);
2040 ndr_print_ptr(ndr
, "time_written", r
->out
.time_written
);
2042 if (r
->out
.time_written
) {
2043 ndr_print_time_t(ndr
, "time_written", *r
->out
.time_written
);
2046 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2052 static enum ndr_err_code
ndr_push_eventlog_ClearEventLogA(struct ndr_push
*ndr
, int flags
, const struct eventlog_ClearEventLogA
*r
)
2054 if (flags
& NDR_IN
) {
2056 if (flags
& NDR_OUT
) {
2057 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2059 return NDR_ERR_SUCCESS
;
2062 static enum ndr_err_code
ndr_pull_eventlog_ClearEventLogA(struct ndr_pull
*ndr
, int flags
, struct eventlog_ClearEventLogA
*r
)
2064 if (flags
& NDR_IN
) {
2066 if (flags
& NDR_OUT
) {
2067 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2069 return NDR_ERR_SUCCESS
;
2072 _PUBLIC_
void ndr_print_eventlog_ClearEventLogA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ClearEventLogA
*r
)
2074 ndr_print_struct(ndr
, name
, "eventlog_ClearEventLogA");
2076 if (flags
& NDR_SET_VALUES
) {
2077 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2079 if (flags
& NDR_IN
) {
2080 ndr_print_struct(ndr
, "in", "eventlog_ClearEventLogA");
2084 if (flags
& NDR_OUT
) {
2085 ndr_print_struct(ndr
, "out", "eventlog_ClearEventLogA");
2087 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2093 static enum ndr_err_code
ndr_push_eventlog_BackupEventLogA(struct ndr_push
*ndr
, int flags
, const struct eventlog_BackupEventLogA
*r
)
2095 if (flags
& NDR_IN
) {
2097 if (flags
& NDR_OUT
) {
2098 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2100 return NDR_ERR_SUCCESS
;
2103 static enum ndr_err_code
ndr_pull_eventlog_BackupEventLogA(struct ndr_pull
*ndr
, int flags
, struct eventlog_BackupEventLogA
*r
)
2105 if (flags
& NDR_IN
) {
2107 if (flags
& NDR_OUT
) {
2108 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2110 return NDR_ERR_SUCCESS
;
2113 _PUBLIC_
void ndr_print_eventlog_BackupEventLogA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_BackupEventLogA
*r
)
2115 ndr_print_struct(ndr
, name
, "eventlog_BackupEventLogA");
2117 if (flags
& NDR_SET_VALUES
) {
2118 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2120 if (flags
& NDR_IN
) {
2121 ndr_print_struct(ndr
, "in", "eventlog_BackupEventLogA");
2125 if (flags
& NDR_OUT
) {
2126 ndr_print_struct(ndr
, "out", "eventlog_BackupEventLogA");
2128 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2134 static enum ndr_err_code
ndr_push_eventlog_OpenEventLogA(struct ndr_push
*ndr
, int flags
, const struct eventlog_OpenEventLogA
*r
)
2136 if (flags
& NDR_IN
) {
2138 if (flags
& NDR_OUT
) {
2139 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2141 return NDR_ERR_SUCCESS
;
2144 static enum ndr_err_code
ndr_pull_eventlog_OpenEventLogA(struct ndr_pull
*ndr
, int flags
, struct eventlog_OpenEventLogA
*r
)
2146 if (flags
& NDR_IN
) {
2148 if (flags
& NDR_OUT
) {
2149 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2151 return NDR_ERR_SUCCESS
;
2154 _PUBLIC_
void ndr_print_eventlog_OpenEventLogA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_OpenEventLogA
*r
)
2156 ndr_print_struct(ndr
, name
, "eventlog_OpenEventLogA");
2158 if (flags
& NDR_SET_VALUES
) {
2159 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2161 if (flags
& NDR_IN
) {
2162 ndr_print_struct(ndr
, "in", "eventlog_OpenEventLogA");
2166 if (flags
& NDR_OUT
) {
2167 ndr_print_struct(ndr
, "out", "eventlog_OpenEventLogA");
2169 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2175 static enum ndr_err_code
ndr_push_eventlog_RegisterEventSourceA(struct ndr_push
*ndr
, int flags
, const struct eventlog_RegisterEventSourceA
*r
)
2177 if (flags
& NDR_IN
) {
2179 if (flags
& NDR_OUT
) {
2180 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2182 return NDR_ERR_SUCCESS
;
2185 static enum ndr_err_code
ndr_pull_eventlog_RegisterEventSourceA(struct ndr_pull
*ndr
, int flags
, struct eventlog_RegisterEventSourceA
*r
)
2187 if (flags
& NDR_IN
) {
2189 if (flags
& NDR_OUT
) {
2190 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2192 return NDR_ERR_SUCCESS
;
2195 _PUBLIC_
void ndr_print_eventlog_RegisterEventSourceA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_RegisterEventSourceA
*r
)
2197 ndr_print_struct(ndr
, name
, "eventlog_RegisterEventSourceA");
2199 if (flags
& NDR_SET_VALUES
) {
2200 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2202 if (flags
& NDR_IN
) {
2203 ndr_print_struct(ndr
, "in", "eventlog_RegisterEventSourceA");
2207 if (flags
& NDR_OUT
) {
2208 ndr_print_struct(ndr
, "out", "eventlog_RegisterEventSourceA");
2210 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2216 static enum ndr_err_code
ndr_push_eventlog_OpenBackupEventLogA(struct ndr_push
*ndr
, int flags
, const struct eventlog_OpenBackupEventLogA
*r
)
2218 if (flags
& NDR_IN
) {
2220 if (flags
& NDR_OUT
) {
2221 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2223 return NDR_ERR_SUCCESS
;
2226 static enum ndr_err_code
ndr_pull_eventlog_OpenBackupEventLogA(struct ndr_pull
*ndr
, int flags
, struct eventlog_OpenBackupEventLogA
*r
)
2228 if (flags
& NDR_IN
) {
2230 if (flags
& NDR_OUT
) {
2231 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2233 return NDR_ERR_SUCCESS
;
2236 _PUBLIC_
void ndr_print_eventlog_OpenBackupEventLogA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_OpenBackupEventLogA
*r
)
2238 ndr_print_struct(ndr
, name
, "eventlog_OpenBackupEventLogA");
2240 if (flags
& NDR_SET_VALUES
) {
2241 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2243 if (flags
& NDR_IN
) {
2244 ndr_print_struct(ndr
, "in", "eventlog_OpenBackupEventLogA");
2248 if (flags
& NDR_OUT
) {
2249 ndr_print_struct(ndr
, "out", "eventlog_OpenBackupEventLogA");
2251 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2257 static enum ndr_err_code
ndr_push_eventlog_ReadEventLogA(struct ndr_push
*ndr
, int flags
, const struct eventlog_ReadEventLogA
*r
)
2259 if (flags
& NDR_IN
) {
2261 if (flags
& NDR_OUT
) {
2262 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2264 return NDR_ERR_SUCCESS
;
2267 static enum ndr_err_code
ndr_pull_eventlog_ReadEventLogA(struct ndr_pull
*ndr
, int flags
, struct eventlog_ReadEventLogA
*r
)
2269 if (flags
& NDR_IN
) {
2271 if (flags
& NDR_OUT
) {
2272 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2274 return NDR_ERR_SUCCESS
;
2277 _PUBLIC_
void ndr_print_eventlog_ReadEventLogA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ReadEventLogA
*r
)
2279 ndr_print_struct(ndr
, name
, "eventlog_ReadEventLogA");
2281 if (flags
& NDR_SET_VALUES
) {
2282 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2284 if (flags
& NDR_IN
) {
2285 ndr_print_struct(ndr
, "in", "eventlog_ReadEventLogA");
2289 if (flags
& NDR_OUT
) {
2290 ndr_print_struct(ndr
, "out", "eventlog_ReadEventLogA");
2292 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2298 static enum ndr_err_code
ndr_push_eventlog_ReportEventA(struct ndr_push
*ndr
, int flags
, const struct eventlog_ReportEventA
*r
)
2300 if (flags
& NDR_IN
) {
2302 if (flags
& NDR_OUT
) {
2303 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2305 return NDR_ERR_SUCCESS
;
2308 static enum ndr_err_code
ndr_pull_eventlog_ReportEventA(struct ndr_pull
*ndr
, int flags
, struct eventlog_ReportEventA
*r
)
2310 if (flags
& NDR_IN
) {
2312 if (flags
& NDR_OUT
) {
2313 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2315 return NDR_ERR_SUCCESS
;
2318 _PUBLIC_
void ndr_print_eventlog_ReportEventA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ReportEventA
*r
)
2320 ndr_print_struct(ndr
, name
, "eventlog_ReportEventA");
2322 if (flags
& NDR_SET_VALUES
) {
2323 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2325 if (flags
& NDR_IN
) {
2326 ndr_print_struct(ndr
, "in", "eventlog_ReportEventA");
2330 if (flags
& NDR_OUT
) {
2331 ndr_print_struct(ndr
, "out", "eventlog_ReportEventA");
2333 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2339 static enum ndr_err_code
ndr_push_eventlog_RegisterClusterSvc(struct ndr_push
*ndr
, int flags
, const struct eventlog_RegisterClusterSvc
*r
)
2341 if (flags
& NDR_IN
) {
2343 if (flags
& NDR_OUT
) {
2344 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2346 return NDR_ERR_SUCCESS
;
2349 static enum ndr_err_code
ndr_pull_eventlog_RegisterClusterSvc(struct ndr_pull
*ndr
, int flags
, struct eventlog_RegisterClusterSvc
*r
)
2351 if (flags
& NDR_IN
) {
2353 if (flags
& NDR_OUT
) {
2354 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2356 return NDR_ERR_SUCCESS
;
2359 _PUBLIC_
void ndr_print_eventlog_RegisterClusterSvc(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_RegisterClusterSvc
*r
)
2361 ndr_print_struct(ndr
, name
, "eventlog_RegisterClusterSvc");
2363 if (flags
& NDR_SET_VALUES
) {
2364 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2366 if (flags
& NDR_IN
) {
2367 ndr_print_struct(ndr
, "in", "eventlog_RegisterClusterSvc");
2371 if (flags
& NDR_OUT
) {
2372 ndr_print_struct(ndr
, "out", "eventlog_RegisterClusterSvc");
2374 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2380 static enum ndr_err_code
ndr_push_eventlog_DeregisterClusterSvc(struct ndr_push
*ndr
, int flags
, const struct eventlog_DeregisterClusterSvc
*r
)
2382 if (flags
& NDR_IN
) {
2384 if (flags
& NDR_OUT
) {
2385 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2387 return NDR_ERR_SUCCESS
;
2390 static enum ndr_err_code
ndr_pull_eventlog_DeregisterClusterSvc(struct ndr_pull
*ndr
, int flags
, struct eventlog_DeregisterClusterSvc
*r
)
2392 if (flags
& NDR_IN
) {
2394 if (flags
& NDR_OUT
) {
2395 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2397 return NDR_ERR_SUCCESS
;
2400 _PUBLIC_
void ndr_print_eventlog_DeregisterClusterSvc(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_DeregisterClusterSvc
*r
)
2402 ndr_print_struct(ndr
, name
, "eventlog_DeregisterClusterSvc");
2404 if (flags
& NDR_SET_VALUES
) {
2405 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2407 if (flags
& NDR_IN
) {
2408 ndr_print_struct(ndr
, "in", "eventlog_DeregisterClusterSvc");
2412 if (flags
& NDR_OUT
) {
2413 ndr_print_struct(ndr
, "out", "eventlog_DeregisterClusterSvc");
2415 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2421 static enum ndr_err_code
ndr_push_eventlog_WriteClusterEvents(struct ndr_push
*ndr
, int flags
, const struct eventlog_WriteClusterEvents
*r
)
2423 if (flags
& NDR_IN
) {
2425 if (flags
& NDR_OUT
) {
2426 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2428 return NDR_ERR_SUCCESS
;
2431 static enum ndr_err_code
ndr_pull_eventlog_WriteClusterEvents(struct ndr_pull
*ndr
, int flags
, struct eventlog_WriteClusterEvents
*r
)
2433 if (flags
& NDR_IN
) {
2435 if (flags
& NDR_OUT
) {
2436 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2438 return NDR_ERR_SUCCESS
;
2441 _PUBLIC_
void ndr_print_eventlog_WriteClusterEvents(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_WriteClusterEvents
*r
)
2443 ndr_print_struct(ndr
, name
, "eventlog_WriteClusterEvents");
2445 if (flags
& NDR_SET_VALUES
) {
2446 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2448 if (flags
& NDR_IN
) {
2449 ndr_print_struct(ndr
, "in", "eventlog_WriteClusterEvents");
2453 if (flags
& NDR_OUT
) {
2454 ndr_print_struct(ndr
, "out", "eventlog_WriteClusterEvents");
2456 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2462 static enum ndr_err_code
ndr_push_eventlog_GetLogInformation(struct ndr_push
*ndr
, int flags
, const struct eventlog_GetLogInformation
*r
)
2464 if (flags
& NDR_IN
) {
2465 if (r
->in
.handle
== NULL
) {
2466 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2468 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2469 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
2470 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.buf_size
));
2472 if (flags
& NDR_OUT
) {
2473 if (r
->out
.buffer
== NULL
) {
2474 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2476 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.buf_size
));
2477 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, r
->in
.buf_size
));
2478 if (r
->out
.bytes_needed
== NULL
) {
2479 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2481 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.bytes_needed
));
2482 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2484 return NDR_ERR_SUCCESS
;
2487 static enum ndr_err_code
ndr_pull_eventlog_GetLogInformation(struct ndr_pull
*ndr
, int flags
, struct eventlog_GetLogInformation
*r
)
2489 uint32_t size_buffer_1
= 0;
2490 TALLOC_CTX
*_mem_save_handle_0
;
2491 TALLOC_CTX
*_mem_save_bytes_needed_0
;
2492 if (flags
& NDR_IN
) {
2493 ZERO_STRUCT(r
->out
);
2495 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2496 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
2498 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2499 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
2500 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2501 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2502 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
2503 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.buf_size
));
2504 if (r
->in
.buf_size
> 1024) {
2505 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2507 NDR_PULL_ALLOC_N(ndr
, r
->out
.buffer
, r
->in
.buf_size
);
2508 memset(r
->out
.buffer
, 0, (r
->in
.buf_size
) * sizeof(*r
->out
.buffer
));
2509 NDR_PULL_ALLOC(ndr
, r
->out
.bytes_needed
);
2510 ZERO_STRUCTP(r
->out
.bytes_needed
);
2512 if (flags
& NDR_OUT
) {
2513 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.buffer
));
2514 size_buffer_1
= ndr_get_array_size(ndr
, &r
->out
.buffer
);
2515 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2516 NDR_PULL_ALLOC_N(ndr
, r
->out
.buffer
, size_buffer_1
);
2518 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, size_buffer_1
));
2519 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2520 NDR_PULL_ALLOC(ndr
, r
->out
.bytes_needed
);
2522 _mem_save_bytes_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2523 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.bytes_needed
, LIBNDR_FLAG_REF_ALLOC
);
2524 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.bytes_needed
));
2525 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bytes_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
2526 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2527 if (r
->out
.buffer
) {
2528 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.buffer
, r
->in
.buf_size
));
2531 return NDR_ERR_SUCCESS
;
2534 _PUBLIC_
void ndr_print_eventlog_GetLogInformation(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_GetLogInformation
*r
)
2536 ndr_print_struct(ndr
, name
, "eventlog_GetLogInformation");
2538 if (flags
& NDR_SET_VALUES
) {
2539 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2541 if (flags
& NDR_IN
) {
2542 ndr_print_struct(ndr
, "in", "eventlog_GetLogInformation");
2544 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
2546 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
2548 ndr_print_uint32(ndr
, "level", r
->in
.level
);
2549 ndr_print_uint32(ndr
, "buf_size", r
->in
.buf_size
);
2552 if (flags
& NDR_OUT
) {
2553 ndr_print_struct(ndr
, "out", "eventlog_GetLogInformation");
2555 ndr_print_ptr(ndr
, "buffer", r
->out
.buffer
);
2557 ndr_print_array_uint8(ndr
, "buffer", r
->out
.buffer
, r
->in
.buf_size
);
2559 ndr_print_ptr(ndr
, "bytes_needed", r
->out
.bytes_needed
);
2561 ndr_print_uint32(ndr
, "bytes_needed", *r
->out
.bytes_needed
);
2563 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2569 static enum ndr_err_code
ndr_push_eventlog_FlushEventLog(struct ndr_push
*ndr
, int flags
, const struct eventlog_FlushEventLog
*r
)
2571 if (flags
& NDR_IN
) {
2572 if (r
->in
.handle
== NULL
) {
2573 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2575 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2577 if (flags
& NDR_OUT
) {
2578 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2580 return NDR_ERR_SUCCESS
;
2583 static enum ndr_err_code
ndr_pull_eventlog_FlushEventLog(struct ndr_pull
*ndr
, int flags
, struct eventlog_FlushEventLog
*r
)
2585 TALLOC_CTX
*_mem_save_handle_0
;
2586 if (flags
& NDR_IN
) {
2587 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2588 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
2590 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2591 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
2592 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2593 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2595 if (flags
& NDR_OUT
) {
2596 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2598 return NDR_ERR_SUCCESS
;
2601 _PUBLIC_
void ndr_print_eventlog_FlushEventLog(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_FlushEventLog
*r
)
2603 ndr_print_struct(ndr
, name
, "eventlog_FlushEventLog");
2605 if (flags
& NDR_SET_VALUES
) {
2606 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2608 if (flags
& NDR_IN
) {
2609 ndr_print_struct(ndr
, "in", "eventlog_FlushEventLog");
2611 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
2613 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
2617 if (flags
& NDR_OUT
) {
2618 ndr_print_struct(ndr
, "out", "eventlog_FlushEventLog");
2620 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2626 static enum ndr_err_code
ndr_push_eventlog_ReportEventAndSourceW(struct ndr_push
*ndr
, int flags
, const struct eventlog_ReportEventAndSourceW
*r
)
2628 uint32_t cntr_strings_1
;
2629 if (flags
& NDR_IN
) {
2630 if (r
->in
.handle
== NULL
) {
2631 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2633 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2634 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, r
->in
.timestamp
));
2635 NDR_CHECK(ndr_push_eventlogEventTypes(ndr
, NDR_SCALARS
, r
->in
.event_type
));
2636 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.event_category
));
2637 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.event_id
));
2638 if (r
->in
.sourcename
== NULL
) {
2639 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2641 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sourcename
));
2642 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.num_of_strings
));
2643 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.data_size
));
2644 if (r
->in
.servername
== NULL
) {
2645 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2647 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.servername
));
2648 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.user_sid
));
2649 if (r
->in
.user_sid
) {
2650 NDR_CHECK(ndr_push_dom_sid(ndr
, NDR_SCALARS
, r
->in
.user_sid
));
2652 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.strings
));
2653 if (r
->in
.strings
) {
2654 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.num_of_strings
));
2655 for (cntr_strings_1
= 0; cntr_strings_1
< r
->in
.num_of_strings
; cntr_strings_1
++) {
2657 for (cntr_strings_1
= 0; cntr_strings_1
< r
->in
.num_of_strings
; cntr_strings_1
++) {
2658 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.strings
[cntr_strings_1
]));
2659 if (r
->in
.strings
[cntr_strings_1
]) {
2660 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.strings
[cntr_strings_1
]));
2664 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.data
));
2666 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.data_size
));
2667 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.data
, r
->in
.data_size
));
2669 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.flags
));
2670 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.record_number
));
2671 if (r
->in
.record_number
) {
2672 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.record_number
));
2674 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.time_written
));
2675 if (r
->in
.time_written
) {
2676 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, *r
->in
.time_written
));
2679 if (flags
& NDR_OUT
) {
2680 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.record_number
));
2681 if (r
->out
.record_number
) {
2682 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.record_number
));
2684 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.time_written
));
2685 if (r
->out
.time_written
) {
2686 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, *r
->out
.time_written
));
2688 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2690 return NDR_ERR_SUCCESS
;
2693 static enum ndr_err_code
ndr_pull_eventlog_ReportEventAndSourceW(struct ndr_pull
*ndr
, int flags
, struct eventlog_ReportEventAndSourceW
*r
)
2695 uint32_t _ptr_user_sid
;
2696 uint32_t _ptr_strings
;
2697 uint32_t size_strings_1
= 0;
2698 uint32_t cntr_strings_1
;
2700 uint32_t size_data_1
= 0;
2701 uint32_t _ptr_record_number
;
2702 uint32_t _ptr_time_written
;
2703 TALLOC_CTX
*_mem_save_handle_0
;
2704 TALLOC_CTX
*_mem_save_sourcename_0
;
2705 TALLOC_CTX
*_mem_save_servername_0
;
2706 TALLOC_CTX
*_mem_save_user_sid_0
;
2707 TALLOC_CTX
*_mem_save_strings_0
;
2708 TALLOC_CTX
*_mem_save_strings_1
;
2709 TALLOC_CTX
*_mem_save_strings_2
;
2710 TALLOC_CTX
*_mem_save_data_0
;
2711 TALLOC_CTX
*_mem_save_record_number_0
;
2712 TALLOC_CTX
*_mem_save_time_written_0
;
2713 if (flags
& NDR_IN
) {
2714 ZERO_STRUCT(r
->out
);
2716 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2717 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
2719 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2720 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
2721 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2722 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2723 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, &r
->in
.timestamp
));
2724 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr
, NDR_SCALARS
, &r
->in
.event_type
));
2725 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.event_category
));
2726 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.event_id
));
2727 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2728 NDR_PULL_ALLOC(ndr
, r
->in
.sourcename
);
2730 _mem_save_sourcename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2731 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sourcename
, LIBNDR_FLAG_REF_ALLOC
);
2732 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sourcename
));
2733 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sourcename_0
, LIBNDR_FLAG_REF_ALLOC
);
2734 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.num_of_strings
));
2735 if (r
->in
.num_of_strings
> 256) {
2736 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2738 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.data_size
));
2739 if (r
->in
.data_size
> 0x3FFFF) {
2740 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2742 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2743 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
2745 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2746 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, LIBNDR_FLAG_REF_ALLOC
);
2747 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.servername
));
2748 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, LIBNDR_FLAG_REF_ALLOC
);
2749 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_sid
));
2750 if (_ptr_user_sid
) {
2751 NDR_PULL_ALLOC(ndr
, r
->in
.user_sid
);
2753 r
->in
.user_sid
= NULL
;
2755 if (r
->in
.user_sid
) {
2756 _mem_save_user_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2757 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_sid
, 0);
2758 NDR_CHECK(ndr_pull_dom_sid(ndr
, NDR_SCALARS
, r
->in
.user_sid
));
2759 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_sid_0
, 0);
2761 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_strings
));
2763 NDR_PULL_ALLOC(ndr
, r
->in
.strings
);
2765 r
->in
.strings
= NULL
;
2767 if (r
->in
.strings
) {
2768 _mem_save_strings_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2769 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.strings
, 0);
2770 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.strings
));
2771 size_strings_1
= ndr_get_array_size(ndr
, &r
->in
.strings
);
2772 NDR_PULL_ALLOC_N(ndr
, r
->in
.strings
, size_strings_1
);
2773 _mem_save_strings_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2774 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.strings
, 0);
2775 for (cntr_strings_1
= 0; cntr_strings_1
< size_strings_1
; cntr_strings_1
++) {
2777 for (cntr_strings_1
= 0; cntr_strings_1
< size_strings_1
; cntr_strings_1
++) {
2778 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_strings
));
2780 NDR_PULL_ALLOC(ndr
, r
->in
.strings
[cntr_strings_1
]);
2782 r
->in
.strings
[cntr_strings_1
] = NULL
;
2784 if (r
->in
.strings
[cntr_strings_1
]) {
2785 _mem_save_strings_2
= NDR_PULL_GET_MEM_CTX(ndr
);
2786 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.strings
[cntr_strings_1
], 0);
2787 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.strings
[cntr_strings_1
]));
2788 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_strings_2
, 0);
2791 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_strings_1
, 0);
2792 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_strings_0
, 0);
2794 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
2796 NDR_PULL_ALLOC(ndr
, r
->in
.data
);
2801 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2802 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.data
, 0);
2803 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.data
));
2804 size_data_1
= ndr_get_array_size(ndr
, &r
->in
.data
);
2805 NDR_PULL_ALLOC_N(ndr
, r
->in
.data
, size_data_1
);
2806 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.data
, size_data_1
));
2807 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
2809 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.flags
));
2810 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_record_number
));
2811 if (_ptr_record_number
) {
2812 NDR_PULL_ALLOC(ndr
, r
->in
.record_number
);
2814 r
->in
.record_number
= NULL
;
2816 if (r
->in
.record_number
) {
2817 _mem_save_record_number_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2818 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.record_number
, 0);
2819 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.record_number
));
2820 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_record_number_0
, 0);
2822 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_time_written
));
2823 if (_ptr_time_written
) {
2824 NDR_PULL_ALLOC(ndr
, r
->in
.time_written
);
2826 r
->in
.time_written
= NULL
;
2828 if (r
->in
.time_written
) {
2829 _mem_save_time_written_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2830 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.time_written
, 0);
2831 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, r
->in
.time_written
));
2832 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_time_written_0
, 0);
2834 if (r
->in
.strings
) {
2835 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.strings
, r
->in
.num_of_strings
));
2838 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.data
, r
->in
.data_size
));
2841 if (flags
& NDR_OUT
) {
2842 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_record_number
));
2843 if (_ptr_record_number
) {
2844 NDR_PULL_ALLOC(ndr
, r
->out
.record_number
);
2846 r
->out
.record_number
= NULL
;
2848 if (r
->out
.record_number
) {
2849 _mem_save_record_number_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2850 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.record_number
, 0);
2851 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.record_number
));
2852 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_record_number_0
, 0);
2854 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_time_written
));
2855 if (_ptr_time_written
) {
2856 NDR_PULL_ALLOC(ndr
, r
->out
.time_written
);
2858 r
->out
.time_written
= NULL
;
2860 if (r
->out
.time_written
) {
2861 _mem_save_time_written_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2862 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.time_written
, 0);
2863 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, r
->out
.time_written
));
2864 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_time_written_0
, 0);
2866 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2868 return NDR_ERR_SUCCESS
;
2871 _PUBLIC_
void ndr_print_eventlog_ReportEventAndSourceW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ReportEventAndSourceW
*r
)
2873 uint32_t cntr_strings_1
;
2874 ndr_print_struct(ndr
, name
, "eventlog_ReportEventAndSourceW");
2876 if (flags
& NDR_SET_VALUES
) {
2877 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2879 if (flags
& NDR_IN
) {
2880 ndr_print_struct(ndr
, "in", "eventlog_ReportEventAndSourceW");
2882 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
2884 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
2886 ndr_print_time_t(ndr
, "timestamp", r
->in
.timestamp
);
2887 ndr_print_eventlogEventTypes(ndr
, "event_type", r
->in
.event_type
);
2888 ndr_print_uint16(ndr
, "event_category", r
->in
.event_category
);
2889 ndr_print_uint32(ndr
, "event_id", r
->in
.event_id
);
2890 ndr_print_ptr(ndr
, "sourcename", r
->in
.sourcename
);
2892 ndr_print_lsa_String(ndr
, "sourcename", r
->in
.sourcename
);
2894 ndr_print_uint16(ndr
, "num_of_strings", r
->in
.num_of_strings
);
2895 ndr_print_uint32(ndr
, "data_size", r
->in
.data_size
);
2896 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
2898 ndr_print_lsa_String(ndr
, "servername", r
->in
.servername
);
2900 ndr_print_ptr(ndr
, "user_sid", r
->in
.user_sid
);
2902 if (r
->in
.user_sid
) {
2903 ndr_print_dom_sid(ndr
, "user_sid", r
->in
.user_sid
);
2906 ndr_print_ptr(ndr
, "strings", r
->in
.strings
);
2908 if (r
->in
.strings
) {
2909 ndr
->print(ndr
, "%s: ARRAY(%d)", "strings", (int)r
->in
.num_of_strings
);
2911 for (cntr_strings_1
=0;cntr_strings_1
<r
->in
.num_of_strings
;cntr_strings_1
++) {
2913 if (asprintf(&idx_1
, "[%d]", cntr_strings_1
) != -1) {
2914 ndr_print_ptr(ndr
, "strings", r
->in
.strings
[cntr_strings_1
]);
2916 if (r
->in
.strings
[cntr_strings_1
]) {
2917 ndr_print_lsa_String(ndr
, "strings", r
->in
.strings
[cntr_strings_1
]);
2926 ndr_print_ptr(ndr
, "data", r
->in
.data
);
2929 ndr_print_array_uint8(ndr
, "data", r
->in
.data
, r
->in
.data_size
);
2932 ndr_print_uint16(ndr
, "flags", r
->in
.flags
);
2933 ndr_print_ptr(ndr
, "record_number", r
->in
.record_number
);
2935 if (r
->in
.record_number
) {
2936 ndr_print_uint32(ndr
, "record_number", *r
->in
.record_number
);
2939 ndr_print_ptr(ndr
, "time_written", r
->in
.time_written
);
2941 if (r
->in
.time_written
) {
2942 ndr_print_time_t(ndr
, "time_written", *r
->in
.time_written
);
2947 if (flags
& NDR_OUT
) {
2948 ndr_print_struct(ndr
, "out", "eventlog_ReportEventAndSourceW");
2950 ndr_print_ptr(ndr
, "record_number", r
->out
.record_number
);
2952 if (r
->out
.record_number
) {
2953 ndr_print_uint32(ndr
, "record_number", *r
->out
.record_number
);
2956 ndr_print_ptr(ndr
, "time_written", r
->out
.time_written
);
2958 if (r
->out
.time_written
) {
2959 ndr_print_time_t(ndr
, "time_written", *r
->out
.time_written
);
2962 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2968 static const struct ndr_interface_call eventlog_calls
[] = {
2970 "eventlog_ClearEventLogW",
2971 sizeof(struct eventlog_ClearEventLogW
),
2972 (ndr_push_flags_fn_t
) ndr_push_eventlog_ClearEventLogW
,
2973 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ClearEventLogW
,
2974 (ndr_print_function_t
) ndr_print_eventlog_ClearEventLogW
,
2978 "eventlog_BackupEventLogW",
2979 sizeof(struct eventlog_BackupEventLogW
),
2980 (ndr_push_flags_fn_t
) ndr_push_eventlog_BackupEventLogW
,
2981 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_BackupEventLogW
,
2982 (ndr_print_function_t
) ndr_print_eventlog_BackupEventLogW
,
2986 "eventlog_CloseEventLog",
2987 sizeof(struct eventlog_CloseEventLog
),
2988 (ndr_push_flags_fn_t
) ndr_push_eventlog_CloseEventLog
,
2989 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_CloseEventLog
,
2990 (ndr_print_function_t
) ndr_print_eventlog_CloseEventLog
,
2994 "eventlog_DeregisterEventSource",
2995 sizeof(struct eventlog_DeregisterEventSource
),
2996 (ndr_push_flags_fn_t
) ndr_push_eventlog_DeregisterEventSource
,
2997 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_DeregisterEventSource
,
2998 (ndr_print_function_t
) ndr_print_eventlog_DeregisterEventSource
,
3002 "eventlog_GetNumRecords",
3003 sizeof(struct eventlog_GetNumRecords
),
3004 (ndr_push_flags_fn_t
) ndr_push_eventlog_GetNumRecords
,
3005 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_GetNumRecords
,
3006 (ndr_print_function_t
) ndr_print_eventlog_GetNumRecords
,
3010 "eventlog_GetOldestRecord",
3011 sizeof(struct eventlog_GetOldestRecord
),
3012 (ndr_push_flags_fn_t
) ndr_push_eventlog_GetOldestRecord
,
3013 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_GetOldestRecord
,
3014 (ndr_print_function_t
) ndr_print_eventlog_GetOldestRecord
,
3018 "eventlog_ChangeNotify",
3019 sizeof(struct eventlog_ChangeNotify
),
3020 (ndr_push_flags_fn_t
) ndr_push_eventlog_ChangeNotify
,
3021 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ChangeNotify
,
3022 (ndr_print_function_t
) ndr_print_eventlog_ChangeNotify
,
3026 "eventlog_OpenEventLogW",
3027 sizeof(struct eventlog_OpenEventLogW
),
3028 (ndr_push_flags_fn_t
) ndr_push_eventlog_OpenEventLogW
,
3029 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_OpenEventLogW
,
3030 (ndr_print_function_t
) ndr_print_eventlog_OpenEventLogW
,
3034 "eventlog_RegisterEventSourceW",
3035 sizeof(struct eventlog_RegisterEventSourceW
),
3036 (ndr_push_flags_fn_t
) ndr_push_eventlog_RegisterEventSourceW
,
3037 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_RegisterEventSourceW
,
3038 (ndr_print_function_t
) ndr_print_eventlog_RegisterEventSourceW
,
3042 "eventlog_OpenBackupEventLogW",
3043 sizeof(struct eventlog_OpenBackupEventLogW
),
3044 (ndr_push_flags_fn_t
) ndr_push_eventlog_OpenBackupEventLogW
,
3045 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_OpenBackupEventLogW
,
3046 (ndr_print_function_t
) ndr_print_eventlog_OpenBackupEventLogW
,
3050 "eventlog_ReadEventLogW",
3051 sizeof(struct eventlog_ReadEventLogW
),
3052 (ndr_push_flags_fn_t
) ndr_push_eventlog_ReadEventLogW
,
3053 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ReadEventLogW
,
3054 (ndr_print_function_t
) ndr_print_eventlog_ReadEventLogW
,
3058 "eventlog_ReportEventW",
3059 sizeof(struct eventlog_ReportEventW
),
3060 (ndr_push_flags_fn_t
) ndr_push_eventlog_ReportEventW
,
3061 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ReportEventW
,
3062 (ndr_print_function_t
) ndr_print_eventlog_ReportEventW
,
3066 "eventlog_ClearEventLogA",
3067 sizeof(struct eventlog_ClearEventLogA
),
3068 (ndr_push_flags_fn_t
) ndr_push_eventlog_ClearEventLogA
,
3069 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ClearEventLogA
,
3070 (ndr_print_function_t
) ndr_print_eventlog_ClearEventLogA
,
3074 "eventlog_BackupEventLogA",
3075 sizeof(struct eventlog_BackupEventLogA
),
3076 (ndr_push_flags_fn_t
) ndr_push_eventlog_BackupEventLogA
,
3077 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_BackupEventLogA
,
3078 (ndr_print_function_t
) ndr_print_eventlog_BackupEventLogA
,
3082 "eventlog_OpenEventLogA",
3083 sizeof(struct eventlog_OpenEventLogA
),
3084 (ndr_push_flags_fn_t
) ndr_push_eventlog_OpenEventLogA
,
3085 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_OpenEventLogA
,
3086 (ndr_print_function_t
) ndr_print_eventlog_OpenEventLogA
,
3090 "eventlog_RegisterEventSourceA",
3091 sizeof(struct eventlog_RegisterEventSourceA
),
3092 (ndr_push_flags_fn_t
) ndr_push_eventlog_RegisterEventSourceA
,
3093 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_RegisterEventSourceA
,
3094 (ndr_print_function_t
) ndr_print_eventlog_RegisterEventSourceA
,
3098 "eventlog_OpenBackupEventLogA",
3099 sizeof(struct eventlog_OpenBackupEventLogA
),
3100 (ndr_push_flags_fn_t
) ndr_push_eventlog_OpenBackupEventLogA
,
3101 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_OpenBackupEventLogA
,
3102 (ndr_print_function_t
) ndr_print_eventlog_OpenBackupEventLogA
,
3106 "eventlog_ReadEventLogA",
3107 sizeof(struct eventlog_ReadEventLogA
),
3108 (ndr_push_flags_fn_t
) ndr_push_eventlog_ReadEventLogA
,
3109 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ReadEventLogA
,
3110 (ndr_print_function_t
) ndr_print_eventlog_ReadEventLogA
,
3114 "eventlog_ReportEventA",
3115 sizeof(struct eventlog_ReportEventA
),
3116 (ndr_push_flags_fn_t
) ndr_push_eventlog_ReportEventA
,
3117 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ReportEventA
,
3118 (ndr_print_function_t
) ndr_print_eventlog_ReportEventA
,
3122 "eventlog_RegisterClusterSvc",
3123 sizeof(struct eventlog_RegisterClusterSvc
),
3124 (ndr_push_flags_fn_t
) ndr_push_eventlog_RegisterClusterSvc
,
3125 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_RegisterClusterSvc
,
3126 (ndr_print_function_t
) ndr_print_eventlog_RegisterClusterSvc
,
3130 "eventlog_DeregisterClusterSvc",
3131 sizeof(struct eventlog_DeregisterClusterSvc
),
3132 (ndr_push_flags_fn_t
) ndr_push_eventlog_DeregisterClusterSvc
,
3133 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_DeregisterClusterSvc
,
3134 (ndr_print_function_t
) ndr_print_eventlog_DeregisterClusterSvc
,
3138 "eventlog_WriteClusterEvents",
3139 sizeof(struct eventlog_WriteClusterEvents
),
3140 (ndr_push_flags_fn_t
) ndr_push_eventlog_WriteClusterEvents
,
3141 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_WriteClusterEvents
,
3142 (ndr_print_function_t
) ndr_print_eventlog_WriteClusterEvents
,
3146 "eventlog_GetLogInformation",
3147 sizeof(struct eventlog_GetLogInformation
),
3148 (ndr_push_flags_fn_t
) ndr_push_eventlog_GetLogInformation
,
3149 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_GetLogInformation
,
3150 (ndr_print_function_t
) ndr_print_eventlog_GetLogInformation
,
3154 "eventlog_FlushEventLog",
3155 sizeof(struct eventlog_FlushEventLog
),
3156 (ndr_push_flags_fn_t
) ndr_push_eventlog_FlushEventLog
,
3157 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_FlushEventLog
,
3158 (ndr_print_function_t
) ndr_print_eventlog_FlushEventLog
,
3162 "eventlog_ReportEventAndSourceW",
3163 sizeof(struct eventlog_ReportEventAndSourceW
),
3164 (ndr_push_flags_fn_t
) ndr_push_eventlog_ReportEventAndSourceW
,
3165 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ReportEventAndSourceW
,
3166 (ndr_print_function_t
) ndr_print_eventlog_ReportEventAndSourceW
,
3169 { NULL
, 0, NULL
, NULL
, NULL
, false }
3172 static const char * const eventlog_endpoint_strings
[] = {
3173 "ncacn_np:[\\pipe\\eventlog]",
3176 static const struct ndr_interface_string_array eventlog_endpoints
= {
3178 .names
= eventlog_endpoint_strings
3181 static const char * const eventlog_authservice_strings
[] = {
3185 static const struct ndr_interface_string_array eventlog_authservices
= {
3187 .names
= eventlog_authservice_strings
3191 const struct ndr_interface_table ndr_table_eventlog
= {
3194 {0x82273fdc,0xe32a,0x18c3,{0x3f,0x78},{0x82,0x79,0x29,0xdc,0x23,0xea}},
3195 NDR_EVENTLOG_VERSION
3197 .helpstring
= NDR_EVENTLOG_HELPSTRING
,
3199 .calls
= eventlog_calls
,
3200 .endpoints
= &eventlog_endpoints
,
3201 .authservices
= &eventlog_authservices