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_uint16(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_uint16(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
));
69 if (ndr_flags
& NDR_BUFFERS
) {
71 return NDR_ERR_SUCCESS
;
74 static enum ndr_err_code
ndr_pull_eventlog_OpenUnknown0(struct ndr_pull
*ndr
, int ndr_flags
, struct eventlog_OpenUnknown0
*r
)
76 if (ndr_flags
& NDR_SCALARS
) {
77 NDR_CHECK(ndr_pull_align(ndr
, 2));
78 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->unknown0
));
79 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->unknown1
));
81 if (ndr_flags
& NDR_BUFFERS
) {
83 return NDR_ERR_SUCCESS
;
86 _PUBLIC_
void ndr_print_eventlog_OpenUnknown0(struct ndr_print
*ndr
, const char *name
, const struct eventlog_OpenUnknown0
*r
)
88 ndr_print_struct(ndr
, name
, "eventlog_OpenUnknown0");
90 ndr_print_uint16(ndr
, "unknown0", r
->unknown0
);
91 ndr_print_uint16(ndr
, "unknown1", r
->unknown1
);
95 _PUBLIC_
enum ndr_err_code
ndr_push_eventlog_Record_tdb(struct ndr_push
*ndr
, int ndr_flags
, const struct eventlog_Record_tdb
*r
)
97 uint32_t cntr_strings_0
;
99 uint32_t _flags_save_STRUCT
= ndr
->flags
;
100 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_NOALIGN
|LIBNDR_PRINT_ARRAY_HEX
);
101 if (ndr_flags
& NDR_SCALARS
) {
102 NDR_CHECK(ndr_push_align(ndr
, 4));
103 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
104 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, "eLfL", 4, sizeof(uint8_t), CH_DOS
));
105 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->record_number
));
106 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, r
->time_generated
));
107 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, r
->time_written
));
108 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->event_id
));
109 NDR_CHECK(ndr_push_eventlogEventTypes(ndr
, NDR_SCALARS
, r
->event_type
));
110 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->num_of_strings
));
111 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->event_category
));
112 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->reserved_flags
));
113 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->closing_record_number
));
114 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->stringoffset
));
115 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid
.length
));
116 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_offset
));
117 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->data
.length
));
118 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->data_offset
));
119 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2 * strlen_m_term(r
->source_name
)));
121 uint32_t _flags_save_string
= ndr
->flags
;
122 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
123 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->source_name
));
124 ndr
->flags
= _flags_save_string
;
126 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2 * strlen_m_term(r
->computer_name
)));
128 uint32_t _flags_save_string
= ndr
->flags
;
129 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
130 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->computer_name
));
131 ndr
->flags
= _flags_save_string
;
133 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_padding
));
134 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->sid
));
135 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2 * ndr_size_string_array(r
->strings
, r
->num_of_strings
, LIBNDR_FLAG_STR_NULLTERM
)));
137 uint32_t _flags_save_string
= ndr
->flags
;
138 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
139 for (cntr_strings_0
= 0; cntr_strings_0
< r
->num_of_strings
; cntr_strings_0
++) {
140 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->strings
[cntr_strings_0
]));
142 ndr
->flags
= _flags_save_string
;
144 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->data
));
145 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->padding
));
147 if (ndr_flags
& NDR_BUFFERS
) {
149 ndr
->flags
= _flags_save_STRUCT
;
151 return NDR_ERR_SUCCESS
;
154 _PUBLIC_
enum ndr_err_code
ndr_pull_eventlog_Record_tdb(struct ndr_pull
*ndr
, int ndr_flags
, struct eventlog_Record_tdb
*r
)
156 uint32_t cntr_strings_0
;
157 TALLOC_CTX
*_mem_save_strings_0
;
159 uint32_t _flags_save_STRUCT
= ndr
->flags
;
160 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_NOALIGN
|LIBNDR_PRINT_ARRAY_HEX
);
161 if (ndr_flags
& NDR_SCALARS
) {
162 NDR_CHECK(ndr_pull_align(ndr
, 4));
163 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
164 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->reserved
, 4, sizeof(uint8_t), CH_DOS
));
165 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->record_number
));
166 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, &r
->time_generated
));
167 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, &r
->time_written
));
168 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->event_id
));
169 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr
, NDR_SCALARS
, &r
->event_type
));
170 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->num_of_strings
));
171 if (r
->num_of_strings
> 256) {
172 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
174 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->event_category
));
175 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->reserved_flags
));
176 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->closing_record_number
));
177 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->stringoffset
));
178 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_length
));
179 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_offset
));
180 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->data_length
));
181 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->data_offset
));
182 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->source_name_len
));
184 uint32_t _flags_save_string
= ndr
->flags
;
185 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
186 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->source_name
));
187 ndr
->flags
= _flags_save_string
;
189 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->computer_name_len
));
191 uint32_t _flags_save_string
= ndr
->flags
;
192 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
193 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->computer_name
));
194 ndr
->flags
= _flags_save_string
;
196 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_padding
));
197 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->sid
));
198 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->strings_len
));
200 uint32_t _flags_save_string
= ndr
->flags
;
201 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
202 NDR_PULL_ALLOC_N(ndr
, r
->strings
, r
->num_of_strings
);
203 _mem_save_strings_0
= NDR_PULL_GET_MEM_CTX(ndr
);
204 NDR_PULL_SET_MEM_CTX(ndr
, r
->strings
, 0);
205 for (cntr_strings_0
= 0; cntr_strings_0
< r
->num_of_strings
; cntr_strings_0
++) {
206 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->strings
[cntr_strings_0
]));
208 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_strings_0
, 0);
209 ndr
->flags
= _flags_save_string
;
211 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->data
));
212 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->padding
));
214 if (ndr_flags
& NDR_BUFFERS
) {
216 ndr
->flags
= _flags_save_STRUCT
;
218 return NDR_ERR_SUCCESS
;
221 _PUBLIC_
void ndr_print_eventlog_Record_tdb(struct ndr_print
*ndr
, const char *name
, const struct eventlog_Record_tdb
*r
)
223 uint32_t cntr_strings_0
;
224 ndr_print_struct(ndr
, name
, "eventlog_Record_tdb");
226 uint32_t _flags_save_STRUCT
= ndr
->flags
;
227 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_NOALIGN
|LIBNDR_PRINT_ARRAY_HEX
);
229 ndr_print_uint32(ndr
, "size", r
->size
);
230 ndr_print_string(ndr
, "reserved", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?"eLfL":r
->reserved
);
231 ndr_print_uint32(ndr
, "record_number", r
->record_number
);
232 ndr_print_time_t(ndr
, "time_generated", r
->time_generated
);
233 ndr_print_time_t(ndr
, "time_written", r
->time_written
);
234 ndr_print_uint32(ndr
, "event_id", r
->event_id
);
235 ndr_print_eventlogEventTypes(ndr
, "event_type", r
->event_type
);
236 ndr_print_uint16(ndr
, "num_of_strings", r
->num_of_strings
);
237 ndr_print_uint16(ndr
, "event_category", r
->event_category
);
238 ndr_print_uint16(ndr
, "reserved_flags", r
->reserved_flags
);
239 ndr_print_uint32(ndr
, "closing_record_number", r
->closing_record_number
);
240 ndr_print_uint32(ndr
, "stringoffset", r
->stringoffset
);
241 ndr_print_uint32(ndr
, "sid_length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?r
->sid
.length
:r
->sid_length
);
242 ndr_print_uint32(ndr
, "sid_offset", r
->sid_offset
);
243 ndr_print_uint32(ndr
, "data_length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?r
->data
.length
:r
->data_length
);
244 ndr_print_uint32(ndr
, "data_offset", r
->data_offset
);
245 ndr_print_uint32(ndr
, "source_name_len", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m_term(r
->source_name
):r
->source_name_len
);
246 ndr_print_string(ndr
, "source_name", r
->source_name
);
247 ndr_print_uint32(ndr
, "computer_name_len", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m_term(r
->computer_name
):r
->computer_name_len
);
248 ndr_print_string(ndr
, "computer_name", r
->computer_name
);
249 ndr_print_uint32(ndr
, "sid_padding", r
->sid_padding
);
250 ndr_print_DATA_BLOB(ndr
, "sid", r
->sid
);
251 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
);
252 ndr
->print(ndr
, "%s: ARRAY(%d)", "strings", (int)r
->num_of_strings
);
254 for (cntr_strings_0
=0;cntr_strings_0
<r
->num_of_strings
;cntr_strings_0
++) {
256 if (asprintf(&idx_0
, "[%d]", cntr_strings_0
) != -1) {
257 ndr_print_string(ndr
, "strings", r
->strings
[cntr_strings_0
]);
262 ndr_print_DATA_BLOB(ndr
, "data", r
->data
);
263 ndr_print_uint32(ndr
, "padding", r
->padding
);
265 ndr
->flags
= _flags_save_STRUCT
;
269 static enum ndr_err_code
ndr_push_EVENTLOG_HEADER_FLAGS(struct ndr_push
*ndr
, int ndr_flags
, enum EVENTLOG_HEADER_FLAGS r
)
271 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
272 return NDR_ERR_SUCCESS
;
275 static enum ndr_err_code
ndr_pull_EVENTLOG_HEADER_FLAGS(struct ndr_pull
*ndr
, int ndr_flags
, enum EVENTLOG_HEADER_FLAGS
*r
)
278 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
280 return NDR_ERR_SUCCESS
;
283 _PUBLIC_
void ndr_print_EVENTLOG_HEADER_FLAGS(struct ndr_print
*ndr
, const char *name
, enum EVENTLOG_HEADER_FLAGS r
)
285 const char *val
= NULL
;
288 case ELF_LOGFILE_HEADER_DIRTY
: val
= "ELF_LOGFILE_HEADER_DIRTY"; break;
289 case ELF_LOGFILE_HEADER_WRAP
: val
= "ELF_LOGFILE_HEADER_WRAP"; break;
290 case ELF_LOGFILE_LOGFULL_WRITTEN
: val
= "ELF_LOGFILE_LOGFULL_WRITTEN"; break;
291 case ELF_LOGFILE_ARCHIVE_SET
: val
= "ELF_LOGFILE_ARCHIVE_SET"; break;
293 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
296 _PUBLIC_
enum ndr_err_code
ndr_push_EVENTLOGHEADER(struct ndr_push
*ndr
, int ndr_flags
, const struct EVENTLOGHEADER
*r
)
298 if (ndr_flags
& NDR_SCALARS
) {
299 NDR_CHECK(ndr_push_align(ndr
, 4));
300 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x30));
301 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, "LfLe", 4, sizeof(uint8_t), CH_DOS
));
302 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 1));
303 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 1));
304 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->StartOffset
));
305 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->EndOffset
));
306 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->CurrentRecordNumber
));
307 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->OldestRecordNumber
));
308 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->MaxSize
));
309 NDR_CHECK(ndr_push_EVENTLOG_HEADER_FLAGS(ndr
, NDR_SCALARS
, r
->Flags
));
310 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->Retention
));
311 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x30));
313 if (ndr_flags
& NDR_BUFFERS
) {
315 return NDR_ERR_SUCCESS
;
318 _PUBLIC_
enum ndr_err_code
ndr_pull_EVENTLOGHEADER(struct ndr_pull
*ndr
, int ndr_flags
, struct EVENTLOGHEADER
*r
)
320 if (ndr_flags
& NDR_SCALARS
) {
321 NDR_CHECK(ndr_pull_align(ndr
, 4));
322 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->HeaderSize
));
323 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->Signature
, 4, sizeof(uint8_t), CH_DOS
));
324 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->MajorVersion
));
325 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->MinorVersion
));
326 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->StartOffset
));
327 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->EndOffset
));
328 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->CurrentRecordNumber
));
329 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->OldestRecordNumber
));
330 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->MaxSize
));
331 NDR_CHECK(ndr_pull_EVENTLOG_HEADER_FLAGS(ndr
, NDR_SCALARS
, &r
->Flags
));
332 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->Retention
));
333 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->EndHeaderSize
));
335 if (ndr_flags
& NDR_BUFFERS
) {
337 return NDR_ERR_SUCCESS
;
340 _PUBLIC_
void ndr_print_EVENTLOGHEADER(struct ndr_print
*ndr
, const char *name
, const struct EVENTLOGHEADER
*r
)
342 ndr_print_struct(ndr
, name
, "EVENTLOGHEADER");
344 ndr_print_uint32(ndr
, "HeaderSize", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x30:r
->HeaderSize
);
345 ndr_print_string(ndr
, "Signature", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?"LfLe":r
->Signature
);
346 ndr_print_uint32(ndr
, "MajorVersion", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?1:r
->MajorVersion
);
347 ndr_print_uint32(ndr
, "MinorVersion", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?1:r
->MinorVersion
);
348 ndr_print_uint32(ndr
, "StartOffset", r
->StartOffset
);
349 ndr_print_uint32(ndr
, "EndOffset", r
->EndOffset
);
350 ndr_print_uint32(ndr
, "CurrentRecordNumber", r
->CurrentRecordNumber
);
351 ndr_print_uint32(ndr
, "OldestRecordNumber", r
->OldestRecordNumber
);
352 ndr_print_uint32(ndr
, "MaxSize", r
->MaxSize
);
353 ndr_print_EVENTLOG_HEADER_FLAGS(ndr
, "Flags", r
->Flags
);
354 ndr_print_uint32(ndr
, "Retention", r
->Retention
);
355 ndr_print_uint32(ndr
, "EndHeaderSize", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x30:r
->EndHeaderSize
);
359 _PUBLIC_
enum ndr_err_code
ndr_push_EVENTLOGRECORD(struct ndr_push
*ndr
, int ndr_flags
, const struct EVENTLOGRECORD
*r
)
361 uint32_t cntr_Strings_0
;
362 if (ndr_flags
& NDR_SCALARS
) {
363 NDR_CHECK(ndr_push_align(ndr
, 4));
364 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->Length
));
365 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, "LfLe", 4, sizeof(uint8_t), CH_DOS
));
366 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->RecordNumber
));
367 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, r
->TimeGenerated
));
368 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, r
->TimeWritten
));
369 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->EventID
));
370 NDR_CHECK(ndr_push_eventlogEventTypes(ndr
, NDR_SCALARS
, r
->EventType
));
371 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->NumStrings
));
372 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->EventCategory
));
373 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->ReservedFlags
));
374 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->ClosingRecordNumber
));
375 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
)));
376 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_dom_sid0(&r
->UserSid
, ndr
->flags
)));
377 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 56 + 2 * (strlen_m_term(r
->SourceName
) + strlen_m_term(r
->Computername
))));
378 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->DataLength
));
379 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
))));
381 uint32_t _flags_save_string
= ndr
->flags
;
382 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
383 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->SourceName
));
384 ndr
->flags
= _flags_save_string
;
387 uint32_t _flags_save_string
= ndr
->flags
;
388 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
389 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->Computername
));
390 ndr
->flags
= _flags_save_string
;
393 uint32_t _flags_save_dom_sid0
= ndr
->flags
;
394 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
396 struct ndr_push
*_ndr_UserSid
;
397 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_UserSid
, 0, ndr_size_dom_sid0(&r
->UserSid
, ndr
->flags
)));
398 NDR_CHECK(ndr_push_dom_sid0(_ndr_UserSid
, NDR_SCALARS
|NDR_BUFFERS
, &r
->UserSid
));
399 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_UserSid
, 0, ndr_size_dom_sid0(&r
->UserSid
, ndr
->flags
)));
401 ndr
->flags
= _flags_save_dom_sid0
;
404 uint32_t _flags_save_string
= ndr
->flags
;
405 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
406 for (cntr_Strings_0
= 0; cntr_Strings_0
< r
->NumStrings
; cntr_Strings_0
++) {
407 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->Strings
[cntr_Strings_0
]));
409 ndr
->flags
= _flags_save_string
;
412 uint32_t _flags_save_uint8
= ndr
->flags
;
413 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
414 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->Data
, r
->DataLength
));
415 ndr
->flags
= _flags_save_uint8
;
418 uint32_t _flags_save_string
= ndr
->flags
;
419 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
420 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->Pad
));
421 ndr
->flags
= _flags_save_string
;
423 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->Length
));
425 if (ndr_flags
& NDR_BUFFERS
) {
427 uint32_t _flags_save_dom_sid0
= ndr
->flags
;
428 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
429 ndr
->flags
= _flags_save_dom_sid0
;
432 return NDR_ERR_SUCCESS
;
435 _PUBLIC_
enum ndr_err_code
ndr_pull_EVENTLOGRECORD(struct ndr_pull
*ndr
, int ndr_flags
, struct EVENTLOGRECORD
*r
)
437 uint32_t cntr_Strings_0
;
438 TALLOC_CTX
*_mem_save_Strings_0
;
439 if (ndr_flags
& NDR_SCALARS
) {
440 NDR_CHECK(ndr_pull_align(ndr
, 4));
441 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->Length
));
442 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->Reserved
, 4, sizeof(uint8_t), CH_DOS
));
443 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->RecordNumber
));
444 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, &r
->TimeGenerated
));
445 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, &r
->TimeWritten
));
446 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->EventID
));
447 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr
, NDR_SCALARS
, &r
->EventType
));
448 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->NumStrings
));
449 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->EventCategory
));
450 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->ReservedFlags
));
451 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->ClosingRecordNumber
));
452 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->StringOffset
));
453 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->UserSidLength
));
454 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->UserSidOffset
));
455 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->DataLength
));
456 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->DataOffset
));
458 uint32_t _flags_save_string
= ndr
->flags
;
459 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
460 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->SourceName
));
461 ndr
->flags
= _flags_save_string
;
464 uint32_t _flags_save_string
= ndr
->flags
;
465 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
466 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->Computername
));
467 ndr
->flags
= _flags_save_string
;
470 uint32_t _flags_save_dom_sid0
= ndr
->flags
;
471 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
473 struct ndr_pull
*_ndr_UserSid
;
474 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_UserSid
, 0, r
->UserSidLength
));
475 NDR_CHECK(ndr_pull_dom_sid0(_ndr_UserSid
, NDR_SCALARS
|NDR_BUFFERS
, &r
->UserSid
));
476 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_UserSid
, 0, r
->UserSidLength
));
478 ndr
->flags
= _flags_save_dom_sid0
;
481 uint32_t _flags_save_string
= ndr
->flags
;
482 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
483 NDR_PULL_ALLOC_N(ndr
, r
->Strings
, r
->NumStrings
);
484 _mem_save_Strings_0
= NDR_PULL_GET_MEM_CTX(ndr
);
485 NDR_PULL_SET_MEM_CTX(ndr
, r
->Strings
, 0);
486 for (cntr_Strings_0
= 0; cntr_Strings_0
< r
->NumStrings
; cntr_Strings_0
++) {
487 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->Strings
[cntr_Strings_0
]));
489 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Strings_0
, 0);
490 ndr
->flags
= _flags_save_string
;
493 uint32_t _flags_save_uint8
= ndr
->flags
;
494 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
495 NDR_PULL_ALLOC_N(ndr
, r
->Data
, r
->DataLength
);
496 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->Data
, r
->DataLength
));
497 ndr
->flags
= _flags_save_uint8
;
500 uint32_t _flags_save_string
= ndr
->flags
;
501 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
502 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->Pad
));
503 ndr
->flags
= _flags_save_string
;
505 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->Length2
));
507 if (ndr_flags
& NDR_BUFFERS
) {
509 uint32_t _flags_save_dom_sid0
= ndr
->flags
;
510 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
511 ndr
->flags
= _flags_save_dom_sid0
;
514 return NDR_ERR_SUCCESS
;
517 _PUBLIC_
void ndr_print_EVENTLOGRECORD(struct ndr_print
*ndr
, const char *name
, const struct EVENTLOGRECORD
*r
)
519 uint32_t cntr_Strings_0
;
520 ndr_print_struct(ndr
, name
, "EVENTLOGRECORD");
522 ndr_print_uint32(ndr
, "Length", r
->Length
);
523 ndr_print_string(ndr
, "Reserved", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?"LfLe":r
->Reserved
);
524 ndr_print_uint32(ndr
, "RecordNumber", r
->RecordNumber
);
525 ndr_print_time_t(ndr
, "TimeGenerated", r
->TimeGenerated
);
526 ndr_print_time_t(ndr
, "TimeWritten", r
->TimeWritten
);
527 ndr_print_uint32(ndr
, "EventID", r
->EventID
);
528 ndr_print_eventlogEventTypes(ndr
, "EventType", r
->EventType
);
529 ndr_print_uint16(ndr
, "NumStrings", r
->NumStrings
);
530 ndr_print_uint16(ndr
, "EventCategory", r
->EventCategory
);
531 ndr_print_uint16(ndr
, "ReservedFlags", r
->ReservedFlags
);
532 ndr_print_uint32(ndr
, "ClosingRecordNumber", r
->ClosingRecordNumber
);
533 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
);
534 ndr_print_uint32(ndr
, "UserSidLength", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_dom_sid0(&r
->UserSid
, ndr
->flags
):r
->UserSidLength
);
535 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
);
536 ndr_print_uint32(ndr
, "DataLength", r
->DataLength
);
537 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
);
538 ndr_print_string(ndr
, "SourceName", r
->SourceName
);
539 ndr_print_string(ndr
, "Computername", r
->Computername
);
540 ndr_print_dom_sid0(ndr
, "UserSid", &r
->UserSid
);
541 ndr
->print(ndr
, "%s: ARRAY(%d)", "Strings", (int)r
->NumStrings
);
543 for (cntr_Strings_0
=0;cntr_Strings_0
<r
->NumStrings
;cntr_Strings_0
++) {
545 if (asprintf(&idx_0
, "[%d]", cntr_Strings_0
) != -1) {
546 ndr_print_string(ndr
, "Strings", r
->Strings
[cntr_Strings_0
]);
551 ndr_print_array_uint8(ndr
, "Data", r
->Data
, r
->DataLength
);
552 ndr_print_string(ndr
, "Pad", r
->Pad
);
553 ndr_print_uint32(ndr
, "Length2", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?r
->Length
:r
->Length2
);
557 _PUBLIC_
size_t ndr_size_EVENTLOGRECORD(const struct EVENTLOGRECORD
*r
, struct smb_iconv_convenience
*ic
, int flags
)
559 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_EVENTLOGRECORD
, ic
);
562 _PUBLIC_
enum ndr_err_code
ndr_push_EVENTLOGEOF(struct ndr_push
*ndr
, int ndr_flags
, const struct EVENTLOGEOF
*r
)
564 if (ndr_flags
& NDR_SCALARS
) {
565 NDR_CHECK(ndr_push_align(ndr
, 4));
566 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x28));
567 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x11111111));
568 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x22222222));
569 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x33333333));
570 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x44444444));
571 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->BeginRecord
));
572 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->EndRecord
));
573 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->CurrentRecordNumber
));
574 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->OldestRecordNumber
));
575 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x28));
577 if (ndr_flags
& NDR_BUFFERS
) {
579 return NDR_ERR_SUCCESS
;
582 _PUBLIC_
enum ndr_err_code
ndr_pull_EVENTLOGEOF(struct ndr_pull
*ndr
, int ndr_flags
, struct EVENTLOGEOF
*r
)
584 if (ndr_flags
& NDR_SCALARS
) {
585 NDR_CHECK(ndr_pull_align(ndr
, 4));
586 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->RecordSizeBeginning
));
587 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->One
));
588 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->Two
));
589 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->Three
));
590 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->Four
));
591 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->BeginRecord
));
592 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->EndRecord
));
593 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->CurrentRecordNumber
));
594 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->OldestRecordNumber
));
595 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->RecordSizeEnd
));
597 if (ndr_flags
& NDR_BUFFERS
) {
599 return NDR_ERR_SUCCESS
;
602 _PUBLIC_
void ndr_print_EVENTLOGEOF(struct ndr_print
*ndr
, const char *name
, const struct EVENTLOGEOF
*r
)
604 ndr_print_struct(ndr
, name
, "EVENTLOGEOF");
606 ndr_print_uint32(ndr
, "RecordSizeBeginning", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x28:r
->RecordSizeBeginning
);
607 ndr_print_uint32(ndr
, "One", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x11111111:r
->One
);
608 ndr_print_uint32(ndr
, "Two", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x22222222:r
->Two
);
609 ndr_print_uint32(ndr
, "Three", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x33333333:r
->Three
);
610 ndr_print_uint32(ndr
, "Four", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x44444444:r
->Four
);
611 ndr_print_uint32(ndr
, "BeginRecord", r
->BeginRecord
);
612 ndr_print_uint32(ndr
, "EndRecord", r
->EndRecord
);
613 ndr_print_uint32(ndr
, "CurrentRecordNumber", r
->CurrentRecordNumber
);
614 ndr_print_uint32(ndr
, "OldestRecordNumber", r
->OldestRecordNumber
);
615 ndr_print_uint32(ndr
, "RecordSizeEnd", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x28:r
->RecordSizeEnd
);
619 _PUBLIC_
enum ndr_err_code
ndr_push_EVENTLOG_EVT_FILE(struct ndr_push
*ndr
, int ndr_flags
, const struct EVENTLOG_EVT_FILE
*r
)
621 uint32_t cntr_records_0
;
622 if (ndr_flags
& NDR_SCALARS
) {
623 NDR_CHECK(ndr_push_align(ndr
, 4));
624 NDR_CHECK(ndr_push_EVENTLOGHEADER(ndr
, NDR_SCALARS
, &r
->hdr
));
625 for (cntr_records_0
= 0; cntr_records_0
< r
->hdr
.CurrentRecordNumber
- r
->hdr
.OldestRecordNumber
; cntr_records_0
++) {
626 NDR_CHECK(ndr_push_EVENTLOGRECORD(ndr
, NDR_SCALARS
, &r
->records
[cntr_records_0
]));
628 NDR_CHECK(ndr_push_EVENTLOGEOF(ndr
, NDR_SCALARS
, &r
->eof
));
630 if (ndr_flags
& NDR_BUFFERS
) {
631 for (cntr_records_0
= 0; cntr_records_0
< r
->hdr
.CurrentRecordNumber
- r
->hdr
.OldestRecordNumber
; cntr_records_0
++) {
632 NDR_CHECK(ndr_push_EVENTLOGRECORD(ndr
, NDR_BUFFERS
, &r
->records
[cntr_records_0
]));
635 return NDR_ERR_SUCCESS
;
638 _PUBLIC_
enum ndr_err_code
ndr_pull_EVENTLOG_EVT_FILE(struct ndr_pull
*ndr
, int ndr_flags
, struct EVENTLOG_EVT_FILE
*r
)
640 uint32_t cntr_records_0
;
641 TALLOC_CTX
*_mem_save_records_0
;
642 if (ndr_flags
& NDR_SCALARS
) {
643 NDR_CHECK(ndr_pull_align(ndr
, 4));
644 NDR_CHECK(ndr_pull_EVENTLOGHEADER(ndr
, NDR_SCALARS
, &r
->hdr
));
645 NDR_PULL_ALLOC_N(ndr
, r
->records
, r
->hdr
.CurrentRecordNumber
- r
->hdr
.OldestRecordNumber
);
646 _mem_save_records_0
= NDR_PULL_GET_MEM_CTX(ndr
);
647 NDR_PULL_SET_MEM_CTX(ndr
, r
->records
, 0);
648 for (cntr_records_0
= 0; cntr_records_0
< r
->hdr
.CurrentRecordNumber
- r
->hdr
.OldestRecordNumber
; cntr_records_0
++) {
649 NDR_CHECK(ndr_pull_EVENTLOGRECORD(ndr
, NDR_SCALARS
, &r
->records
[cntr_records_0
]));
651 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_records_0
, 0);
652 NDR_CHECK(ndr_pull_EVENTLOGEOF(ndr
, NDR_SCALARS
, &r
->eof
));
654 if (ndr_flags
& NDR_BUFFERS
) {
655 _mem_save_records_0
= NDR_PULL_GET_MEM_CTX(ndr
);
656 NDR_PULL_SET_MEM_CTX(ndr
, r
->records
, 0);
657 for (cntr_records_0
= 0; cntr_records_0
< r
->hdr
.CurrentRecordNumber
- r
->hdr
.OldestRecordNumber
; cntr_records_0
++) {
658 NDR_CHECK(ndr_pull_EVENTLOGRECORD(ndr
, NDR_BUFFERS
, &r
->records
[cntr_records_0
]));
660 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_records_0
, 0);
662 return NDR_ERR_SUCCESS
;
665 _PUBLIC_
void ndr_print_EVENTLOG_EVT_FILE(struct ndr_print
*ndr
, const char *name
, const struct EVENTLOG_EVT_FILE
*r
)
667 uint32_t cntr_records_0
;
668 ndr_print_struct(ndr
, name
, "EVENTLOG_EVT_FILE");
670 ndr_print_EVENTLOGHEADER(ndr
, "hdr", &r
->hdr
);
671 ndr
->print(ndr
, "%s: ARRAY(%d)", "records", (int)r
->hdr
.CurrentRecordNumber
- r
->hdr
.OldestRecordNumber
);
673 for (cntr_records_0
=0;cntr_records_0
<r
->hdr
.CurrentRecordNumber
- r
->hdr
.OldestRecordNumber
;cntr_records_0
++) {
675 if (asprintf(&idx_0
, "[%d]", cntr_records_0
) != -1) {
676 ndr_print_EVENTLOGRECORD(ndr
, "records", &r
->records
[cntr_records_0
]);
681 ndr_print_EVENTLOGEOF(ndr
, "eof", &r
->eof
);
685 static enum ndr_err_code
ndr_push_eventlog_ClearEventLogW(struct ndr_push
*ndr
, int flags
, const struct eventlog_ClearEventLogW
*r
)
687 if (flags
& NDR_IN
) {
688 if (r
->in
.handle
== NULL
) {
689 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
691 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
692 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.backupfile
));
693 if (r
->in
.backupfile
) {
694 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.backupfile
));
697 if (flags
& NDR_OUT
) {
698 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
700 return NDR_ERR_SUCCESS
;
703 static enum ndr_err_code
ndr_pull_eventlog_ClearEventLogW(struct ndr_pull
*ndr
, int flags
, struct eventlog_ClearEventLogW
*r
)
705 uint32_t _ptr_backupfile
;
706 TALLOC_CTX
*_mem_save_handle_0
;
707 TALLOC_CTX
*_mem_save_backupfile_0
;
708 if (flags
& NDR_IN
) {
709 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
710 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
712 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
713 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
714 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
715 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
716 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_backupfile
));
717 if (_ptr_backupfile
) {
718 NDR_PULL_ALLOC(ndr
, r
->in
.backupfile
);
720 r
->in
.backupfile
= NULL
;
722 if (r
->in
.backupfile
) {
723 _mem_save_backupfile_0
= NDR_PULL_GET_MEM_CTX(ndr
);
724 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.backupfile
, 0);
725 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.backupfile
));
726 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_backupfile_0
, 0);
729 if (flags
& NDR_OUT
) {
730 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
732 return NDR_ERR_SUCCESS
;
735 _PUBLIC_
void ndr_print_eventlog_ClearEventLogW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ClearEventLogW
*r
)
737 ndr_print_struct(ndr
, name
, "eventlog_ClearEventLogW");
739 if (flags
& NDR_SET_VALUES
) {
740 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
742 if (flags
& NDR_IN
) {
743 ndr_print_struct(ndr
, "in", "eventlog_ClearEventLogW");
745 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
747 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
749 ndr_print_ptr(ndr
, "backupfile", r
->in
.backupfile
);
751 if (r
->in
.backupfile
) {
752 ndr_print_lsa_String(ndr
, "backupfile", r
->in
.backupfile
);
757 if (flags
& NDR_OUT
) {
758 ndr_print_struct(ndr
, "out", "eventlog_ClearEventLogW");
760 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
766 static enum ndr_err_code
ndr_push_eventlog_BackupEventLogW(struct ndr_push
*ndr
, int flags
, const struct eventlog_BackupEventLogW
*r
)
768 if (flags
& NDR_IN
) {
769 if (r
->in
.handle
== NULL
) {
770 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
772 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
773 if (r
->in
.backup_filename
== NULL
) {
774 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
776 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.backup_filename
));
778 if (flags
& NDR_OUT
) {
779 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
781 return NDR_ERR_SUCCESS
;
784 static enum ndr_err_code
ndr_pull_eventlog_BackupEventLogW(struct ndr_pull
*ndr
, int flags
, struct eventlog_BackupEventLogW
*r
)
786 TALLOC_CTX
*_mem_save_handle_0
;
787 TALLOC_CTX
*_mem_save_backup_filename_0
;
788 if (flags
& NDR_IN
) {
789 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
790 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
792 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
793 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
794 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
795 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
796 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
797 NDR_PULL_ALLOC(ndr
, r
->in
.backup_filename
);
799 _mem_save_backup_filename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
800 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.backup_filename
, LIBNDR_FLAG_REF_ALLOC
);
801 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.backup_filename
));
802 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_backup_filename_0
, LIBNDR_FLAG_REF_ALLOC
);
804 if (flags
& NDR_OUT
) {
805 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
807 return NDR_ERR_SUCCESS
;
810 _PUBLIC_
void ndr_print_eventlog_BackupEventLogW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_BackupEventLogW
*r
)
812 ndr_print_struct(ndr
, name
, "eventlog_BackupEventLogW");
814 if (flags
& NDR_SET_VALUES
) {
815 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
817 if (flags
& NDR_IN
) {
818 ndr_print_struct(ndr
, "in", "eventlog_BackupEventLogW");
820 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
822 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
824 ndr_print_ptr(ndr
, "backup_filename", r
->in
.backup_filename
);
826 ndr_print_lsa_String(ndr
, "backup_filename", r
->in
.backup_filename
);
830 if (flags
& NDR_OUT
) {
831 ndr_print_struct(ndr
, "out", "eventlog_BackupEventLogW");
833 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
839 static enum ndr_err_code
ndr_push_eventlog_CloseEventLog(struct ndr_push
*ndr
, int flags
, const struct eventlog_CloseEventLog
*r
)
841 if (flags
& NDR_IN
) {
842 if (r
->in
.handle
== NULL
) {
843 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
845 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
847 if (flags
& NDR_OUT
) {
848 if (r
->out
.handle
== NULL
) {
849 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
851 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
852 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
854 return NDR_ERR_SUCCESS
;
857 static enum ndr_err_code
ndr_pull_eventlog_CloseEventLog(struct ndr_pull
*ndr
, int flags
, struct eventlog_CloseEventLog
*r
)
859 TALLOC_CTX
*_mem_save_handle_0
;
860 if (flags
& NDR_IN
) {
863 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
864 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
866 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
867 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
868 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
869 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
870 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
871 *r
->out
.handle
= *r
->in
.handle
;
873 if (flags
& NDR_OUT
) {
874 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
875 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
877 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
878 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
879 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
880 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
881 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
883 return NDR_ERR_SUCCESS
;
886 _PUBLIC_
void ndr_print_eventlog_CloseEventLog(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_CloseEventLog
*r
)
888 ndr_print_struct(ndr
, name
, "eventlog_CloseEventLog");
890 if (flags
& NDR_SET_VALUES
) {
891 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
893 if (flags
& NDR_IN
) {
894 ndr_print_struct(ndr
, "in", "eventlog_CloseEventLog");
896 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
898 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
902 if (flags
& NDR_OUT
) {
903 ndr_print_struct(ndr
, "out", "eventlog_CloseEventLog");
905 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
907 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
909 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
915 static enum ndr_err_code
ndr_push_eventlog_DeregisterEventSource(struct ndr_push
*ndr
, int flags
, const struct eventlog_DeregisterEventSource
*r
)
917 if (flags
& NDR_IN
) {
918 if (r
->in
.handle
== NULL
) {
919 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
921 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
923 if (flags
& NDR_OUT
) {
924 if (r
->out
.handle
== NULL
) {
925 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
927 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
928 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
930 return NDR_ERR_SUCCESS
;
933 static enum ndr_err_code
ndr_pull_eventlog_DeregisterEventSource(struct ndr_pull
*ndr
, int flags
, struct eventlog_DeregisterEventSource
*r
)
935 TALLOC_CTX
*_mem_save_handle_0
;
936 if (flags
& NDR_IN
) {
939 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
940 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
942 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
943 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
944 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
945 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
946 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
947 *r
->out
.handle
= *r
->in
.handle
;
949 if (flags
& NDR_OUT
) {
950 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
951 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
953 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
954 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
955 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
956 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
957 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
959 return NDR_ERR_SUCCESS
;
962 _PUBLIC_
void ndr_print_eventlog_DeregisterEventSource(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_DeregisterEventSource
*r
)
964 ndr_print_struct(ndr
, name
, "eventlog_DeregisterEventSource");
966 if (flags
& NDR_SET_VALUES
) {
967 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
969 if (flags
& NDR_IN
) {
970 ndr_print_struct(ndr
, "in", "eventlog_DeregisterEventSource");
972 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
974 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
978 if (flags
& NDR_OUT
) {
979 ndr_print_struct(ndr
, "out", "eventlog_DeregisterEventSource");
981 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
983 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
985 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
991 static enum ndr_err_code
ndr_push_eventlog_GetNumRecords(struct ndr_push
*ndr
, int flags
, const struct eventlog_GetNumRecords
*r
)
993 if (flags
& NDR_IN
) {
994 if (r
->in
.handle
== NULL
) {
995 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
997 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
999 if (flags
& NDR_OUT
) {
1000 if (r
->out
.number
== NULL
) {
1001 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1003 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.number
));
1004 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1006 return NDR_ERR_SUCCESS
;
1009 static enum ndr_err_code
ndr_pull_eventlog_GetNumRecords(struct ndr_pull
*ndr
, int flags
, struct eventlog_GetNumRecords
*r
)
1011 TALLOC_CTX
*_mem_save_handle_0
;
1012 TALLOC_CTX
*_mem_save_number_0
;
1013 if (flags
& NDR_IN
) {
1014 ZERO_STRUCT(r
->out
);
1016 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1017 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1019 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1020 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1021 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1022 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1023 NDR_PULL_ALLOC(ndr
, r
->out
.number
);
1024 ZERO_STRUCTP(r
->out
.number
);
1026 if (flags
& NDR_OUT
) {
1027 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1028 NDR_PULL_ALLOC(ndr
, r
->out
.number
);
1030 _mem_save_number_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1031 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.number
, LIBNDR_FLAG_REF_ALLOC
);
1032 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.number
));
1033 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_number_0
, LIBNDR_FLAG_REF_ALLOC
);
1034 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1036 return NDR_ERR_SUCCESS
;
1039 _PUBLIC_
void ndr_print_eventlog_GetNumRecords(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_GetNumRecords
*r
)
1041 ndr_print_struct(ndr
, name
, "eventlog_GetNumRecords");
1043 if (flags
& NDR_SET_VALUES
) {
1044 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1046 if (flags
& NDR_IN
) {
1047 ndr_print_struct(ndr
, "in", "eventlog_GetNumRecords");
1049 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1051 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1055 if (flags
& NDR_OUT
) {
1056 ndr_print_struct(ndr
, "out", "eventlog_GetNumRecords");
1058 ndr_print_ptr(ndr
, "number", r
->out
.number
);
1060 ndr_print_uint32(ndr
, "number", *r
->out
.number
);
1062 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1068 static enum ndr_err_code
ndr_push_eventlog_GetOldestRecord(struct ndr_push
*ndr
, int flags
, const struct eventlog_GetOldestRecord
*r
)
1070 if (flags
& NDR_IN
) {
1071 if (r
->in
.handle
== NULL
) {
1072 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1074 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1076 if (flags
& NDR_OUT
) {
1077 if (r
->out
.oldest_entry
== NULL
) {
1078 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1080 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.oldest_entry
));
1081 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1083 return NDR_ERR_SUCCESS
;
1086 static enum ndr_err_code
ndr_pull_eventlog_GetOldestRecord(struct ndr_pull
*ndr
, int flags
, struct eventlog_GetOldestRecord
*r
)
1088 TALLOC_CTX
*_mem_save_handle_0
;
1089 TALLOC_CTX
*_mem_save_oldest_entry_0
;
1090 if (flags
& NDR_IN
) {
1091 ZERO_STRUCT(r
->out
);
1093 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1094 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1096 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1097 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1098 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1099 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1100 NDR_PULL_ALLOC(ndr
, r
->out
.oldest_entry
);
1101 ZERO_STRUCTP(r
->out
.oldest_entry
);
1103 if (flags
& NDR_OUT
) {
1104 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1105 NDR_PULL_ALLOC(ndr
, r
->out
.oldest_entry
);
1107 _mem_save_oldest_entry_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1108 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.oldest_entry
, LIBNDR_FLAG_REF_ALLOC
);
1109 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.oldest_entry
));
1110 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_oldest_entry_0
, LIBNDR_FLAG_REF_ALLOC
);
1111 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1113 return NDR_ERR_SUCCESS
;
1116 _PUBLIC_
void ndr_print_eventlog_GetOldestRecord(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_GetOldestRecord
*r
)
1118 ndr_print_struct(ndr
, name
, "eventlog_GetOldestRecord");
1120 if (flags
& NDR_SET_VALUES
) {
1121 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1123 if (flags
& NDR_IN
) {
1124 ndr_print_struct(ndr
, "in", "eventlog_GetOldestRecord");
1126 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1128 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1132 if (flags
& NDR_OUT
) {
1133 ndr_print_struct(ndr
, "out", "eventlog_GetOldestRecord");
1135 ndr_print_ptr(ndr
, "oldest_entry", r
->out
.oldest_entry
);
1137 ndr_print_uint32(ndr
, "oldest_entry", *r
->out
.oldest_entry
);
1139 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1145 static enum ndr_err_code
ndr_push_eventlog_ChangeNotify(struct ndr_push
*ndr
, int flags
, const struct eventlog_ChangeNotify
*r
)
1147 if (flags
& NDR_IN
) {
1149 if (flags
& NDR_OUT
) {
1150 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1152 return NDR_ERR_SUCCESS
;
1155 static enum ndr_err_code
ndr_pull_eventlog_ChangeNotify(struct ndr_pull
*ndr
, int flags
, struct eventlog_ChangeNotify
*r
)
1157 if (flags
& NDR_IN
) {
1159 if (flags
& NDR_OUT
) {
1160 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1162 return NDR_ERR_SUCCESS
;
1165 _PUBLIC_
void ndr_print_eventlog_ChangeNotify(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ChangeNotify
*r
)
1167 ndr_print_struct(ndr
, name
, "eventlog_ChangeNotify");
1169 if (flags
& NDR_SET_VALUES
) {
1170 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1172 if (flags
& NDR_IN
) {
1173 ndr_print_struct(ndr
, "in", "eventlog_ChangeNotify");
1177 if (flags
& NDR_OUT
) {
1178 ndr_print_struct(ndr
, "out", "eventlog_ChangeNotify");
1180 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1186 static enum ndr_err_code
ndr_push_eventlog_OpenEventLogW(struct ndr_push
*ndr
, int flags
, const struct eventlog_OpenEventLogW
*r
)
1188 if (flags
& NDR_IN
) {
1189 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.unknown0
));
1190 if (r
->in
.unknown0
) {
1191 NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr
, NDR_SCALARS
, r
->in
.unknown0
));
1193 if (r
->in
.logname
== NULL
) {
1194 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1196 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.logname
));
1197 if (r
->in
.servername
== NULL
) {
1198 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1200 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.servername
));
1201 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.major_version
));
1202 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.minor_version
));
1204 if (flags
& NDR_OUT
) {
1205 if (r
->out
.handle
== NULL
) {
1206 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1208 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
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_OpenEventLogW(struct ndr_pull
*ndr
, int flags
, struct eventlog_OpenEventLogW
*r
)
1216 uint32_t _ptr_unknown0
;
1217 TALLOC_CTX
*_mem_save_unknown0_0
;
1218 TALLOC_CTX
*_mem_save_logname_0
;
1219 TALLOC_CTX
*_mem_save_servername_0
;
1220 TALLOC_CTX
*_mem_save_handle_0
;
1221 if (flags
& NDR_IN
) {
1222 ZERO_STRUCT(r
->out
);
1224 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown0
));
1225 if (_ptr_unknown0
) {
1226 NDR_PULL_ALLOC(ndr
, r
->in
.unknown0
);
1228 r
->in
.unknown0
= NULL
;
1230 if (r
->in
.unknown0
) {
1231 _mem_save_unknown0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1232 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.unknown0
, 0);
1233 NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr
, NDR_SCALARS
, r
->in
.unknown0
));
1234 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown0_0
, 0);
1236 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1237 NDR_PULL_ALLOC(ndr
, r
->in
.logname
);
1239 _mem_save_logname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1240 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.logname
, LIBNDR_FLAG_REF_ALLOC
);
1241 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.logname
));
1242 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_logname_0
, LIBNDR_FLAG_REF_ALLOC
);
1243 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1244 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
1246 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1247 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, LIBNDR_FLAG_REF_ALLOC
);
1248 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.servername
));
1249 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, LIBNDR_FLAG_REF_ALLOC
);
1250 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.major_version
));
1251 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.minor_version
));
1252 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
1253 ZERO_STRUCTP(r
->out
.handle
);
1255 if (flags
& NDR_OUT
) {
1256 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1257 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
1259 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1260 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1261 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
1262 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1263 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1265 return NDR_ERR_SUCCESS
;
1268 _PUBLIC_
void ndr_print_eventlog_OpenEventLogW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_OpenEventLogW
*r
)
1270 ndr_print_struct(ndr
, name
, "eventlog_OpenEventLogW");
1272 if (flags
& NDR_SET_VALUES
) {
1273 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1275 if (flags
& NDR_IN
) {
1276 ndr_print_struct(ndr
, "in", "eventlog_OpenEventLogW");
1278 ndr_print_ptr(ndr
, "unknown0", r
->in
.unknown0
);
1280 if (r
->in
.unknown0
) {
1281 ndr_print_eventlog_OpenUnknown0(ndr
, "unknown0", r
->in
.unknown0
);
1284 ndr_print_ptr(ndr
, "logname", r
->in
.logname
);
1286 ndr_print_lsa_String(ndr
, "logname", r
->in
.logname
);
1288 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
1290 ndr_print_lsa_String(ndr
, "servername", r
->in
.servername
);
1292 ndr_print_uint32(ndr
, "major_version", r
->in
.major_version
);
1293 ndr_print_uint32(ndr
, "minor_version", r
->in
.minor_version
);
1296 if (flags
& NDR_OUT
) {
1297 ndr_print_struct(ndr
, "out", "eventlog_OpenEventLogW");
1299 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
1301 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
1303 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1309 static enum ndr_err_code
ndr_push_eventlog_RegisterEventSourceW(struct ndr_push
*ndr
, int flags
, const struct eventlog_RegisterEventSourceW
*r
)
1311 if (flags
& NDR_IN
) {
1312 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.unknown0
));
1313 if (r
->in
.unknown0
) {
1314 NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr
, NDR_SCALARS
, r
->in
.unknown0
));
1316 if (r
->in
.module_name
== NULL
) {
1317 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1319 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.module_name
));
1320 if (r
->in
.reg_module_name
== NULL
) {
1321 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1323 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.reg_module_name
));
1324 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.major_version
));
1325 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.minor_version
));
1327 if (flags
& NDR_OUT
) {
1328 if (r
->out
.log_handle
== NULL
) {
1329 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1331 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.log_handle
));
1332 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1334 return NDR_ERR_SUCCESS
;
1337 static enum ndr_err_code
ndr_pull_eventlog_RegisterEventSourceW(struct ndr_pull
*ndr
, int flags
, struct eventlog_RegisterEventSourceW
*r
)
1339 uint32_t _ptr_unknown0
;
1340 TALLOC_CTX
*_mem_save_unknown0_0
;
1341 TALLOC_CTX
*_mem_save_module_name_0
;
1342 TALLOC_CTX
*_mem_save_reg_module_name_0
;
1343 TALLOC_CTX
*_mem_save_log_handle_0
;
1344 if (flags
& NDR_IN
) {
1345 ZERO_STRUCT(r
->out
);
1347 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown0
));
1348 if (_ptr_unknown0
) {
1349 NDR_PULL_ALLOC(ndr
, r
->in
.unknown0
);
1351 r
->in
.unknown0
= NULL
;
1353 if (r
->in
.unknown0
) {
1354 _mem_save_unknown0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1355 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.unknown0
, 0);
1356 NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr
, NDR_SCALARS
, r
->in
.unknown0
));
1357 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown0_0
, 0);
1359 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1360 NDR_PULL_ALLOC(ndr
, r
->in
.module_name
);
1362 _mem_save_module_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1363 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.module_name
, LIBNDR_FLAG_REF_ALLOC
);
1364 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.module_name
));
1365 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_module_name_0
, LIBNDR_FLAG_REF_ALLOC
);
1366 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1367 NDR_PULL_ALLOC(ndr
, r
->in
.reg_module_name
);
1369 _mem_save_reg_module_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1370 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.reg_module_name
, LIBNDR_FLAG_REF_ALLOC
);
1371 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.reg_module_name
));
1372 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_reg_module_name_0
, LIBNDR_FLAG_REF_ALLOC
);
1373 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.major_version
));
1374 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.minor_version
));
1375 NDR_PULL_ALLOC(ndr
, r
->out
.log_handle
);
1376 ZERO_STRUCTP(r
->out
.log_handle
);
1378 if (flags
& NDR_OUT
) {
1379 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1380 NDR_PULL_ALLOC(ndr
, r
->out
.log_handle
);
1382 _mem_save_log_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1383 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.log_handle
, LIBNDR_FLAG_REF_ALLOC
);
1384 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.log_handle
));
1385 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_log_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1386 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1388 return NDR_ERR_SUCCESS
;
1391 _PUBLIC_
void ndr_print_eventlog_RegisterEventSourceW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_RegisterEventSourceW
*r
)
1393 ndr_print_struct(ndr
, name
, "eventlog_RegisterEventSourceW");
1395 if (flags
& NDR_SET_VALUES
) {
1396 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1398 if (flags
& NDR_IN
) {
1399 ndr_print_struct(ndr
, "in", "eventlog_RegisterEventSourceW");
1401 ndr_print_ptr(ndr
, "unknown0", r
->in
.unknown0
);
1403 if (r
->in
.unknown0
) {
1404 ndr_print_eventlog_OpenUnknown0(ndr
, "unknown0", r
->in
.unknown0
);
1407 ndr_print_ptr(ndr
, "module_name", r
->in
.module_name
);
1409 ndr_print_lsa_String(ndr
, "module_name", r
->in
.module_name
);
1411 ndr_print_ptr(ndr
, "reg_module_name", r
->in
.reg_module_name
);
1413 ndr_print_lsa_String(ndr
, "reg_module_name", r
->in
.reg_module_name
);
1415 ndr_print_uint32(ndr
, "major_version", r
->in
.major_version
);
1416 ndr_print_uint32(ndr
, "minor_version", r
->in
.minor_version
);
1419 if (flags
& NDR_OUT
) {
1420 ndr_print_struct(ndr
, "out", "eventlog_RegisterEventSourceW");
1422 ndr_print_ptr(ndr
, "log_handle", r
->out
.log_handle
);
1424 ndr_print_policy_handle(ndr
, "log_handle", r
->out
.log_handle
);
1426 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1432 static enum ndr_err_code
ndr_push_eventlog_OpenBackupEventLogW(struct ndr_push
*ndr
, int flags
, const struct eventlog_OpenBackupEventLogW
*r
)
1434 if (flags
& NDR_IN
) {
1435 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.unknown0
));
1436 if (r
->in
.unknown0
) {
1437 NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr
, NDR_SCALARS
, r
->in
.unknown0
));
1439 if (r
->in
.backup_logname
== NULL
) {
1440 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1442 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.backup_logname
));
1443 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.major_version
));
1444 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.minor_version
));
1446 if (flags
& NDR_OUT
) {
1447 if (r
->out
.handle
== NULL
) {
1448 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1450 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
1451 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1453 return NDR_ERR_SUCCESS
;
1456 static enum ndr_err_code
ndr_pull_eventlog_OpenBackupEventLogW(struct ndr_pull
*ndr
, int flags
, struct eventlog_OpenBackupEventLogW
*r
)
1458 uint32_t _ptr_unknown0
;
1459 TALLOC_CTX
*_mem_save_unknown0_0
;
1460 TALLOC_CTX
*_mem_save_backup_logname_0
;
1461 TALLOC_CTX
*_mem_save_handle_0
;
1462 if (flags
& NDR_IN
) {
1463 ZERO_STRUCT(r
->out
);
1465 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown0
));
1466 if (_ptr_unknown0
) {
1467 NDR_PULL_ALLOC(ndr
, r
->in
.unknown0
);
1469 r
->in
.unknown0
= NULL
;
1471 if (r
->in
.unknown0
) {
1472 _mem_save_unknown0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1473 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.unknown0
, 0);
1474 NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr
, NDR_SCALARS
, r
->in
.unknown0
));
1475 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown0_0
, 0);
1477 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1478 NDR_PULL_ALLOC(ndr
, r
->in
.backup_logname
);
1480 _mem_save_backup_logname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1481 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.backup_logname
, LIBNDR_FLAG_REF_ALLOC
);
1482 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.backup_logname
));
1483 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_backup_logname_0
, LIBNDR_FLAG_REF_ALLOC
);
1484 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.major_version
));
1485 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.minor_version
));
1486 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
1487 ZERO_STRUCTP(r
->out
.handle
);
1489 if (flags
& NDR_OUT
) {
1490 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1491 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
1493 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1494 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1495 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
1496 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1497 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1499 return NDR_ERR_SUCCESS
;
1502 _PUBLIC_
void ndr_print_eventlog_OpenBackupEventLogW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_OpenBackupEventLogW
*r
)
1504 ndr_print_struct(ndr
, name
, "eventlog_OpenBackupEventLogW");
1506 if (flags
& NDR_SET_VALUES
) {
1507 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1509 if (flags
& NDR_IN
) {
1510 ndr_print_struct(ndr
, "in", "eventlog_OpenBackupEventLogW");
1512 ndr_print_ptr(ndr
, "unknown0", r
->in
.unknown0
);
1514 if (r
->in
.unknown0
) {
1515 ndr_print_eventlog_OpenUnknown0(ndr
, "unknown0", r
->in
.unknown0
);
1518 ndr_print_ptr(ndr
, "backup_logname", r
->in
.backup_logname
);
1520 ndr_print_lsa_String(ndr
, "backup_logname", r
->in
.backup_logname
);
1522 ndr_print_uint32(ndr
, "major_version", r
->in
.major_version
);
1523 ndr_print_uint32(ndr
, "minor_version", r
->in
.minor_version
);
1526 if (flags
& NDR_OUT
) {
1527 ndr_print_struct(ndr
, "out", "eventlog_OpenBackupEventLogW");
1529 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
1531 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
1533 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1539 static enum ndr_err_code
ndr_push_eventlog_ReadEventLogW(struct ndr_push
*ndr
, int flags
, const struct eventlog_ReadEventLogW
*r
)
1541 if (flags
& NDR_IN
) {
1542 if (r
->in
.handle
== NULL
) {
1543 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1545 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1546 NDR_CHECK(ndr_push_eventlogReadFlags(ndr
, NDR_SCALARS
, r
->in
.flags
));
1547 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offset
));
1548 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.number_of_bytes
));
1550 if (flags
& NDR_OUT
) {
1551 if (r
->out
.data
== NULL
) {
1552 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1554 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.number_of_bytes
));
1555 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, r
->in
.number_of_bytes
));
1556 if (r
->out
.sent_size
== NULL
) {
1557 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1559 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.sent_size
));
1560 if (r
->out
.real_size
== NULL
) {
1561 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1563 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.real_size
));
1564 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1566 return NDR_ERR_SUCCESS
;
1569 static enum ndr_err_code
ndr_pull_eventlog_ReadEventLogW(struct ndr_pull
*ndr
, int flags
, struct eventlog_ReadEventLogW
*r
)
1571 TALLOC_CTX
*_mem_save_handle_0
;
1572 TALLOC_CTX
*_mem_save_sent_size_0
;
1573 TALLOC_CTX
*_mem_save_real_size_0
;
1574 if (flags
& NDR_IN
) {
1575 ZERO_STRUCT(r
->out
);
1577 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1578 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1580 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1581 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1582 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1583 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1584 NDR_CHECK(ndr_pull_eventlogReadFlags(ndr
, NDR_SCALARS
, &r
->in
.flags
));
1585 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offset
));
1586 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.number_of_bytes
));
1587 if (r
->in
.number_of_bytes
> 0x7FFFF) {
1588 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1590 NDR_PULL_ALLOC_N(ndr
, r
->out
.data
, r
->in
.number_of_bytes
);
1591 memset(r
->out
.data
, 0, (r
->in
.number_of_bytes
) * sizeof(*r
->out
.data
));
1592 NDR_PULL_ALLOC(ndr
, r
->out
.sent_size
);
1593 ZERO_STRUCTP(r
->out
.sent_size
);
1594 NDR_PULL_ALLOC(ndr
, r
->out
.real_size
);
1595 ZERO_STRUCTP(r
->out
.real_size
);
1597 if (flags
& NDR_OUT
) {
1598 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.data
));
1599 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1600 NDR_PULL_ALLOC_N(ndr
, r
->out
.data
, ndr_get_array_size(ndr
, &r
->out
.data
));
1602 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, ndr_get_array_size(ndr
, &r
->out
.data
)));
1603 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1604 NDR_PULL_ALLOC(ndr
, r
->out
.sent_size
);
1606 _mem_save_sent_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1607 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sent_size
, LIBNDR_FLAG_REF_ALLOC
);
1608 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.sent_size
));
1609 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sent_size_0
, LIBNDR_FLAG_REF_ALLOC
);
1610 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1611 NDR_PULL_ALLOC(ndr
, r
->out
.real_size
);
1613 _mem_save_real_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1614 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.real_size
, LIBNDR_FLAG_REF_ALLOC
);
1615 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.real_size
));
1616 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_real_size_0
, LIBNDR_FLAG_REF_ALLOC
);
1617 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1619 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.data
, r
->in
.number_of_bytes
));
1622 return NDR_ERR_SUCCESS
;
1625 _PUBLIC_
void ndr_print_eventlog_ReadEventLogW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ReadEventLogW
*r
)
1627 ndr_print_struct(ndr
, name
, "eventlog_ReadEventLogW");
1629 if (flags
& NDR_SET_VALUES
) {
1630 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1632 if (flags
& NDR_IN
) {
1633 ndr_print_struct(ndr
, "in", "eventlog_ReadEventLogW");
1635 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1637 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1639 ndr_print_eventlogReadFlags(ndr
, "flags", r
->in
.flags
);
1640 ndr_print_uint32(ndr
, "offset", r
->in
.offset
);
1641 ndr_print_uint32(ndr
, "number_of_bytes", r
->in
.number_of_bytes
);
1644 if (flags
& NDR_OUT
) {
1645 ndr_print_struct(ndr
, "out", "eventlog_ReadEventLogW");
1647 ndr_print_ptr(ndr
, "data", r
->out
.data
);
1649 ndr_print_array_uint8(ndr
, "data", r
->out
.data
, r
->in
.number_of_bytes
);
1651 ndr_print_ptr(ndr
, "sent_size", r
->out
.sent_size
);
1653 ndr_print_uint32(ndr
, "sent_size", *r
->out
.sent_size
);
1655 ndr_print_ptr(ndr
, "real_size", r
->out
.real_size
);
1657 ndr_print_uint32(ndr
, "real_size", *r
->out
.real_size
);
1659 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1665 static enum ndr_err_code
ndr_push_eventlog_ReportEventW(struct ndr_push
*ndr
, int flags
, const struct eventlog_ReportEventW
*r
)
1667 uint32_t cntr_strings_1
;
1668 if (flags
& NDR_IN
) {
1669 if (r
->in
.handle
== NULL
) {
1670 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1672 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1673 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, r
->in
.timestamp
));
1674 NDR_CHECK(ndr_push_eventlogEventTypes(ndr
, NDR_SCALARS
, r
->in
.event_type
));
1675 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.event_category
));
1676 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.event_id
));
1677 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.num_of_strings
));
1678 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.data_size
));
1679 if (r
->in
.servername
== NULL
) {
1680 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1682 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.servername
));
1683 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.user_sid
));
1684 if (r
->in
.user_sid
) {
1685 NDR_CHECK(ndr_push_dom_sid(ndr
, NDR_SCALARS
, r
->in
.user_sid
));
1687 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.strings
));
1688 if (r
->in
.strings
) {
1689 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_of_strings
));
1690 for (cntr_strings_1
= 0; cntr_strings_1
< r
->in
.num_of_strings
; cntr_strings_1
++) {
1692 for (cntr_strings_1
= 0; cntr_strings_1
< r
->in
.num_of_strings
; cntr_strings_1
++) {
1693 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.strings
[cntr_strings_1
]));
1694 if (r
->in
.strings
[cntr_strings_1
]) {
1695 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.strings
[cntr_strings_1
]));
1699 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.data
));
1701 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.data_size
));
1702 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.data
, r
->in
.data_size
));
1704 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.flags
));
1705 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.record_number
));
1706 if (r
->in
.record_number
) {
1707 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.record_number
));
1709 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.time_written
));
1710 if (r
->in
.time_written
) {
1711 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, *r
->in
.time_written
));
1714 if (flags
& NDR_OUT
) {
1715 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.record_number
));
1716 if (r
->out
.record_number
) {
1717 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.record_number
));
1719 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.time_written
));
1720 if (r
->out
.time_written
) {
1721 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, *r
->out
.time_written
));
1723 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1725 return NDR_ERR_SUCCESS
;
1728 static enum ndr_err_code
ndr_pull_eventlog_ReportEventW(struct ndr_pull
*ndr
, int flags
, struct eventlog_ReportEventW
*r
)
1730 uint32_t _ptr_user_sid
;
1731 uint32_t _ptr_strings
;
1732 uint32_t cntr_strings_1
;
1734 uint32_t _ptr_record_number
;
1735 uint32_t _ptr_time_written
;
1736 TALLOC_CTX
*_mem_save_handle_0
;
1737 TALLOC_CTX
*_mem_save_servername_0
;
1738 TALLOC_CTX
*_mem_save_user_sid_0
;
1739 TALLOC_CTX
*_mem_save_strings_0
;
1740 TALLOC_CTX
*_mem_save_strings_1
;
1741 TALLOC_CTX
*_mem_save_strings_2
;
1742 TALLOC_CTX
*_mem_save_data_0
;
1743 TALLOC_CTX
*_mem_save_record_number_0
;
1744 TALLOC_CTX
*_mem_save_time_written_0
;
1745 if (flags
& NDR_IN
) {
1746 ZERO_STRUCT(r
->out
);
1748 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1749 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1751 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1752 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1753 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1754 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1755 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, &r
->in
.timestamp
));
1756 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr
, NDR_SCALARS
, &r
->in
.event_type
));
1757 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.event_category
));
1758 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.event_id
));
1759 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.num_of_strings
));
1760 if (r
->in
.num_of_strings
> 256) {
1761 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1763 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.data_size
));
1764 if (r
->in
.data_size
> 0x3FFFF) {
1765 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1767 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1768 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
1770 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1771 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, LIBNDR_FLAG_REF_ALLOC
);
1772 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.servername
));
1773 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, LIBNDR_FLAG_REF_ALLOC
);
1774 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_sid
));
1775 if (_ptr_user_sid
) {
1776 NDR_PULL_ALLOC(ndr
, r
->in
.user_sid
);
1778 r
->in
.user_sid
= NULL
;
1780 if (r
->in
.user_sid
) {
1781 _mem_save_user_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1782 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_sid
, 0);
1783 NDR_CHECK(ndr_pull_dom_sid(ndr
, NDR_SCALARS
, r
->in
.user_sid
));
1784 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_sid_0
, 0);
1786 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_strings
));
1788 NDR_PULL_ALLOC(ndr
, r
->in
.strings
);
1790 r
->in
.strings
= NULL
;
1792 if (r
->in
.strings
) {
1793 _mem_save_strings_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1794 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.strings
, 0);
1795 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.strings
));
1796 NDR_PULL_ALLOC_N(ndr
, r
->in
.strings
, ndr_get_array_size(ndr
, &r
->in
.strings
));
1797 _mem_save_strings_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1798 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.strings
, 0);
1799 for (cntr_strings_1
= 0; cntr_strings_1
< r
->in
.num_of_strings
; cntr_strings_1
++) {
1801 for (cntr_strings_1
= 0; cntr_strings_1
< r
->in
.num_of_strings
; cntr_strings_1
++) {
1802 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_strings
));
1804 NDR_PULL_ALLOC(ndr
, r
->in
.strings
[cntr_strings_1
]);
1806 r
->in
.strings
[cntr_strings_1
] = NULL
;
1808 if (r
->in
.strings
[cntr_strings_1
]) {
1809 _mem_save_strings_2
= NDR_PULL_GET_MEM_CTX(ndr
);
1810 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.strings
[cntr_strings_1
], 0);
1811 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.strings
[cntr_strings_1
]));
1812 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_strings_2
, 0);
1815 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_strings_1
, 0);
1816 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_strings_0
, 0);
1818 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
1820 NDR_PULL_ALLOC(ndr
, r
->in
.data
);
1825 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1826 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.data
, 0);
1827 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.data
));
1828 NDR_PULL_ALLOC_N(ndr
, r
->in
.data
, ndr_get_array_size(ndr
, &r
->in
.data
));
1829 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.data
, ndr_get_array_size(ndr
, &r
->in
.data
)));
1830 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
1832 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.flags
));
1833 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_record_number
));
1834 if (_ptr_record_number
) {
1835 NDR_PULL_ALLOC(ndr
, r
->in
.record_number
);
1837 r
->in
.record_number
= NULL
;
1839 if (r
->in
.record_number
) {
1840 _mem_save_record_number_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1841 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.record_number
, 0);
1842 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.record_number
));
1843 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_record_number_0
, 0);
1845 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_time_written
));
1846 if (_ptr_time_written
) {
1847 NDR_PULL_ALLOC(ndr
, r
->in
.time_written
);
1849 r
->in
.time_written
= NULL
;
1851 if (r
->in
.time_written
) {
1852 _mem_save_time_written_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1853 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.time_written
, 0);
1854 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, r
->in
.time_written
));
1855 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_time_written_0
, 0);
1857 if (r
->in
.strings
) {
1858 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.strings
, r
->in
.num_of_strings
));
1861 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.data
, r
->in
.data_size
));
1864 if (flags
& NDR_OUT
) {
1865 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_record_number
));
1866 if (_ptr_record_number
) {
1867 NDR_PULL_ALLOC(ndr
, r
->out
.record_number
);
1869 r
->out
.record_number
= NULL
;
1871 if (r
->out
.record_number
) {
1872 _mem_save_record_number_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1873 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.record_number
, 0);
1874 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.record_number
));
1875 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_record_number_0
, 0);
1877 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_time_written
));
1878 if (_ptr_time_written
) {
1879 NDR_PULL_ALLOC(ndr
, r
->out
.time_written
);
1881 r
->out
.time_written
= NULL
;
1883 if (r
->out
.time_written
) {
1884 _mem_save_time_written_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1885 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.time_written
, 0);
1886 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, r
->out
.time_written
));
1887 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_time_written_0
, 0);
1889 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
1891 return NDR_ERR_SUCCESS
;
1894 _PUBLIC_
void ndr_print_eventlog_ReportEventW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ReportEventW
*r
)
1896 uint32_t cntr_strings_1
;
1897 ndr_print_struct(ndr
, name
, "eventlog_ReportEventW");
1899 if (flags
& NDR_SET_VALUES
) {
1900 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1902 if (flags
& NDR_IN
) {
1903 ndr_print_struct(ndr
, "in", "eventlog_ReportEventW");
1905 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1907 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1909 ndr_print_time_t(ndr
, "timestamp", r
->in
.timestamp
);
1910 ndr_print_eventlogEventTypes(ndr
, "event_type", r
->in
.event_type
);
1911 ndr_print_uint16(ndr
, "event_category", r
->in
.event_category
);
1912 ndr_print_uint32(ndr
, "event_id", r
->in
.event_id
);
1913 ndr_print_uint16(ndr
, "num_of_strings", r
->in
.num_of_strings
);
1914 ndr_print_uint32(ndr
, "data_size", r
->in
.data_size
);
1915 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
1917 ndr_print_lsa_String(ndr
, "servername", r
->in
.servername
);
1919 ndr_print_ptr(ndr
, "user_sid", r
->in
.user_sid
);
1921 if (r
->in
.user_sid
) {
1922 ndr_print_dom_sid(ndr
, "user_sid", r
->in
.user_sid
);
1925 ndr_print_ptr(ndr
, "strings", r
->in
.strings
);
1927 if (r
->in
.strings
) {
1928 ndr
->print(ndr
, "%s: ARRAY(%d)", "strings", (int)r
->in
.num_of_strings
);
1930 for (cntr_strings_1
=0;cntr_strings_1
<r
->in
.num_of_strings
;cntr_strings_1
++) {
1932 if (asprintf(&idx_1
, "[%d]", cntr_strings_1
) != -1) {
1933 ndr_print_ptr(ndr
, "strings", r
->in
.strings
[cntr_strings_1
]);
1935 if (r
->in
.strings
[cntr_strings_1
]) {
1936 ndr_print_lsa_String(ndr
, "strings", r
->in
.strings
[cntr_strings_1
]);
1945 ndr_print_ptr(ndr
, "data", r
->in
.data
);
1948 ndr_print_array_uint8(ndr
, "data", r
->in
.data
, r
->in
.data_size
);
1951 ndr_print_uint16(ndr
, "flags", r
->in
.flags
);
1952 ndr_print_ptr(ndr
, "record_number", r
->in
.record_number
);
1954 if (r
->in
.record_number
) {
1955 ndr_print_uint32(ndr
, "record_number", *r
->in
.record_number
);
1958 ndr_print_ptr(ndr
, "time_written", r
->in
.time_written
);
1960 if (r
->in
.time_written
) {
1961 ndr_print_time_t(ndr
, "time_written", *r
->in
.time_written
);
1966 if (flags
& NDR_OUT
) {
1967 ndr_print_struct(ndr
, "out", "eventlog_ReportEventW");
1969 ndr_print_ptr(ndr
, "record_number", r
->out
.record_number
);
1971 if (r
->out
.record_number
) {
1972 ndr_print_uint32(ndr
, "record_number", *r
->out
.record_number
);
1975 ndr_print_ptr(ndr
, "time_written", r
->out
.time_written
);
1977 if (r
->out
.time_written
) {
1978 ndr_print_time_t(ndr
, "time_written", *r
->out
.time_written
);
1981 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
1987 static enum ndr_err_code
ndr_push_eventlog_ClearEventLogA(struct ndr_push
*ndr
, int flags
, const struct eventlog_ClearEventLogA
*r
)
1989 if (flags
& NDR_IN
) {
1991 if (flags
& NDR_OUT
) {
1992 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
1994 return NDR_ERR_SUCCESS
;
1997 static enum ndr_err_code
ndr_pull_eventlog_ClearEventLogA(struct ndr_pull
*ndr
, int flags
, struct eventlog_ClearEventLogA
*r
)
1999 if (flags
& NDR_IN
) {
2001 if (flags
& NDR_OUT
) {
2002 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2004 return NDR_ERR_SUCCESS
;
2007 _PUBLIC_
void ndr_print_eventlog_ClearEventLogA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ClearEventLogA
*r
)
2009 ndr_print_struct(ndr
, name
, "eventlog_ClearEventLogA");
2011 if (flags
& NDR_SET_VALUES
) {
2012 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2014 if (flags
& NDR_IN
) {
2015 ndr_print_struct(ndr
, "in", "eventlog_ClearEventLogA");
2019 if (flags
& NDR_OUT
) {
2020 ndr_print_struct(ndr
, "out", "eventlog_ClearEventLogA");
2022 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2028 static enum ndr_err_code
ndr_push_eventlog_BackupEventLogA(struct ndr_push
*ndr
, int flags
, const struct eventlog_BackupEventLogA
*r
)
2030 if (flags
& NDR_IN
) {
2032 if (flags
& NDR_OUT
) {
2033 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2035 return NDR_ERR_SUCCESS
;
2038 static enum ndr_err_code
ndr_pull_eventlog_BackupEventLogA(struct ndr_pull
*ndr
, int flags
, struct eventlog_BackupEventLogA
*r
)
2040 if (flags
& NDR_IN
) {
2042 if (flags
& NDR_OUT
) {
2043 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2045 return NDR_ERR_SUCCESS
;
2048 _PUBLIC_
void ndr_print_eventlog_BackupEventLogA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_BackupEventLogA
*r
)
2050 ndr_print_struct(ndr
, name
, "eventlog_BackupEventLogA");
2052 if (flags
& NDR_SET_VALUES
) {
2053 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2055 if (flags
& NDR_IN
) {
2056 ndr_print_struct(ndr
, "in", "eventlog_BackupEventLogA");
2060 if (flags
& NDR_OUT
) {
2061 ndr_print_struct(ndr
, "out", "eventlog_BackupEventLogA");
2063 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2069 static enum ndr_err_code
ndr_push_eventlog_OpenEventLogA(struct ndr_push
*ndr
, int flags
, const struct eventlog_OpenEventLogA
*r
)
2071 if (flags
& NDR_IN
) {
2073 if (flags
& NDR_OUT
) {
2074 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2076 return NDR_ERR_SUCCESS
;
2079 static enum ndr_err_code
ndr_pull_eventlog_OpenEventLogA(struct ndr_pull
*ndr
, int flags
, struct eventlog_OpenEventLogA
*r
)
2081 if (flags
& NDR_IN
) {
2083 if (flags
& NDR_OUT
) {
2084 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2086 return NDR_ERR_SUCCESS
;
2089 _PUBLIC_
void ndr_print_eventlog_OpenEventLogA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_OpenEventLogA
*r
)
2091 ndr_print_struct(ndr
, name
, "eventlog_OpenEventLogA");
2093 if (flags
& NDR_SET_VALUES
) {
2094 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2096 if (flags
& NDR_IN
) {
2097 ndr_print_struct(ndr
, "in", "eventlog_OpenEventLogA");
2101 if (flags
& NDR_OUT
) {
2102 ndr_print_struct(ndr
, "out", "eventlog_OpenEventLogA");
2104 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2110 static enum ndr_err_code
ndr_push_eventlog_RegisterEventSourceA(struct ndr_push
*ndr
, int flags
, const struct eventlog_RegisterEventSourceA
*r
)
2112 if (flags
& NDR_IN
) {
2114 if (flags
& NDR_OUT
) {
2115 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2117 return NDR_ERR_SUCCESS
;
2120 static enum ndr_err_code
ndr_pull_eventlog_RegisterEventSourceA(struct ndr_pull
*ndr
, int flags
, struct eventlog_RegisterEventSourceA
*r
)
2122 if (flags
& NDR_IN
) {
2124 if (flags
& NDR_OUT
) {
2125 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2127 return NDR_ERR_SUCCESS
;
2130 _PUBLIC_
void ndr_print_eventlog_RegisterEventSourceA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_RegisterEventSourceA
*r
)
2132 ndr_print_struct(ndr
, name
, "eventlog_RegisterEventSourceA");
2134 if (flags
& NDR_SET_VALUES
) {
2135 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2137 if (flags
& NDR_IN
) {
2138 ndr_print_struct(ndr
, "in", "eventlog_RegisterEventSourceA");
2142 if (flags
& NDR_OUT
) {
2143 ndr_print_struct(ndr
, "out", "eventlog_RegisterEventSourceA");
2145 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2151 static enum ndr_err_code
ndr_push_eventlog_OpenBackupEventLogA(struct ndr_push
*ndr
, int flags
, const struct eventlog_OpenBackupEventLogA
*r
)
2153 if (flags
& NDR_IN
) {
2155 if (flags
& NDR_OUT
) {
2156 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2158 return NDR_ERR_SUCCESS
;
2161 static enum ndr_err_code
ndr_pull_eventlog_OpenBackupEventLogA(struct ndr_pull
*ndr
, int flags
, struct eventlog_OpenBackupEventLogA
*r
)
2163 if (flags
& NDR_IN
) {
2165 if (flags
& NDR_OUT
) {
2166 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2168 return NDR_ERR_SUCCESS
;
2171 _PUBLIC_
void ndr_print_eventlog_OpenBackupEventLogA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_OpenBackupEventLogA
*r
)
2173 ndr_print_struct(ndr
, name
, "eventlog_OpenBackupEventLogA");
2175 if (flags
& NDR_SET_VALUES
) {
2176 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2178 if (flags
& NDR_IN
) {
2179 ndr_print_struct(ndr
, "in", "eventlog_OpenBackupEventLogA");
2183 if (flags
& NDR_OUT
) {
2184 ndr_print_struct(ndr
, "out", "eventlog_OpenBackupEventLogA");
2186 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2192 static enum ndr_err_code
ndr_push_eventlog_ReadEventLogA(struct ndr_push
*ndr
, int flags
, const struct eventlog_ReadEventLogA
*r
)
2194 if (flags
& NDR_IN
) {
2196 if (flags
& NDR_OUT
) {
2197 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2199 return NDR_ERR_SUCCESS
;
2202 static enum ndr_err_code
ndr_pull_eventlog_ReadEventLogA(struct ndr_pull
*ndr
, int flags
, struct eventlog_ReadEventLogA
*r
)
2204 if (flags
& NDR_IN
) {
2206 if (flags
& NDR_OUT
) {
2207 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2209 return NDR_ERR_SUCCESS
;
2212 _PUBLIC_
void ndr_print_eventlog_ReadEventLogA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ReadEventLogA
*r
)
2214 ndr_print_struct(ndr
, name
, "eventlog_ReadEventLogA");
2216 if (flags
& NDR_SET_VALUES
) {
2217 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2219 if (flags
& NDR_IN
) {
2220 ndr_print_struct(ndr
, "in", "eventlog_ReadEventLogA");
2224 if (flags
& NDR_OUT
) {
2225 ndr_print_struct(ndr
, "out", "eventlog_ReadEventLogA");
2227 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2233 static enum ndr_err_code
ndr_push_eventlog_ReportEventA(struct ndr_push
*ndr
, int flags
, const struct eventlog_ReportEventA
*r
)
2235 if (flags
& NDR_IN
) {
2237 if (flags
& NDR_OUT
) {
2238 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2240 return NDR_ERR_SUCCESS
;
2243 static enum ndr_err_code
ndr_pull_eventlog_ReportEventA(struct ndr_pull
*ndr
, int flags
, struct eventlog_ReportEventA
*r
)
2245 if (flags
& NDR_IN
) {
2247 if (flags
& NDR_OUT
) {
2248 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2250 return NDR_ERR_SUCCESS
;
2253 _PUBLIC_
void ndr_print_eventlog_ReportEventA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ReportEventA
*r
)
2255 ndr_print_struct(ndr
, name
, "eventlog_ReportEventA");
2257 if (flags
& NDR_SET_VALUES
) {
2258 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2260 if (flags
& NDR_IN
) {
2261 ndr_print_struct(ndr
, "in", "eventlog_ReportEventA");
2265 if (flags
& NDR_OUT
) {
2266 ndr_print_struct(ndr
, "out", "eventlog_ReportEventA");
2268 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2274 static enum ndr_err_code
ndr_push_eventlog_RegisterClusterSvc(struct ndr_push
*ndr
, int flags
, const struct eventlog_RegisterClusterSvc
*r
)
2276 if (flags
& NDR_IN
) {
2278 if (flags
& NDR_OUT
) {
2279 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2281 return NDR_ERR_SUCCESS
;
2284 static enum ndr_err_code
ndr_pull_eventlog_RegisterClusterSvc(struct ndr_pull
*ndr
, int flags
, struct eventlog_RegisterClusterSvc
*r
)
2286 if (flags
& NDR_IN
) {
2288 if (flags
& NDR_OUT
) {
2289 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2291 return NDR_ERR_SUCCESS
;
2294 _PUBLIC_
void ndr_print_eventlog_RegisterClusterSvc(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_RegisterClusterSvc
*r
)
2296 ndr_print_struct(ndr
, name
, "eventlog_RegisterClusterSvc");
2298 if (flags
& NDR_SET_VALUES
) {
2299 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2301 if (flags
& NDR_IN
) {
2302 ndr_print_struct(ndr
, "in", "eventlog_RegisterClusterSvc");
2306 if (flags
& NDR_OUT
) {
2307 ndr_print_struct(ndr
, "out", "eventlog_RegisterClusterSvc");
2309 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2315 static enum ndr_err_code
ndr_push_eventlog_DeregisterClusterSvc(struct ndr_push
*ndr
, int flags
, const struct eventlog_DeregisterClusterSvc
*r
)
2317 if (flags
& NDR_IN
) {
2319 if (flags
& NDR_OUT
) {
2320 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2322 return NDR_ERR_SUCCESS
;
2325 static enum ndr_err_code
ndr_pull_eventlog_DeregisterClusterSvc(struct ndr_pull
*ndr
, int flags
, struct eventlog_DeregisterClusterSvc
*r
)
2327 if (flags
& NDR_IN
) {
2329 if (flags
& NDR_OUT
) {
2330 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2332 return NDR_ERR_SUCCESS
;
2335 _PUBLIC_
void ndr_print_eventlog_DeregisterClusterSvc(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_DeregisterClusterSvc
*r
)
2337 ndr_print_struct(ndr
, name
, "eventlog_DeregisterClusterSvc");
2339 if (flags
& NDR_SET_VALUES
) {
2340 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2342 if (flags
& NDR_IN
) {
2343 ndr_print_struct(ndr
, "in", "eventlog_DeregisterClusterSvc");
2347 if (flags
& NDR_OUT
) {
2348 ndr_print_struct(ndr
, "out", "eventlog_DeregisterClusterSvc");
2350 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2356 static enum ndr_err_code
ndr_push_eventlog_WriteClusterEvents(struct ndr_push
*ndr
, int flags
, const struct eventlog_WriteClusterEvents
*r
)
2358 if (flags
& NDR_IN
) {
2360 if (flags
& NDR_OUT
) {
2361 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2363 return NDR_ERR_SUCCESS
;
2366 static enum ndr_err_code
ndr_pull_eventlog_WriteClusterEvents(struct ndr_pull
*ndr
, int flags
, struct eventlog_WriteClusterEvents
*r
)
2368 if (flags
& NDR_IN
) {
2370 if (flags
& NDR_OUT
) {
2371 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2373 return NDR_ERR_SUCCESS
;
2376 _PUBLIC_
void ndr_print_eventlog_WriteClusterEvents(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_WriteClusterEvents
*r
)
2378 ndr_print_struct(ndr
, name
, "eventlog_WriteClusterEvents");
2380 if (flags
& NDR_SET_VALUES
) {
2381 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2383 if (flags
& NDR_IN
) {
2384 ndr_print_struct(ndr
, "in", "eventlog_WriteClusterEvents");
2388 if (flags
& NDR_OUT
) {
2389 ndr_print_struct(ndr
, "out", "eventlog_WriteClusterEvents");
2391 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2397 static enum ndr_err_code
ndr_push_eventlog_GetLogInformation(struct ndr_push
*ndr
, int flags
, const struct eventlog_GetLogInformation
*r
)
2399 if (flags
& NDR_IN
) {
2400 if (r
->in
.handle
== NULL
) {
2401 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2403 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2404 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
2405 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.buf_size
));
2407 if (flags
& NDR_OUT
) {
2408 if (r
->out
.buffer
== NULL
) {
2409 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2411 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.buf_size
));
2412 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, r
->in
.buf_size
));
2413 if (r
->out
.bytes_needed
== NULL
) {
2414 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2416 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.bytes_needed
));
2417 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2419 return NDR_ERR_SUCCESS
;
2422 static enum ndr_err_code
ndr_pull_eventlog_GetLogInformation(struct ndr_pull
*ndr
, int flags
, struct eventlog_GetLogInformation
*r
)
2424 TALLOC_CTX
*_mem_save_handle_0
;
2425 TALLOC_CTX
*_mem_save_bytes_needed_0
;
2426 if (flags
& NDR_IN
) {
2427 ZERO_STRUCT(r
->out
);
2429 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2430 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
2432 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2433 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
2434 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2435 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2436 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
2437 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.buf_size
));
2438 if (r
->in
.buf_size
> 1024) {
2439 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2441 NDR_PULL_ALLOC_N(ndr
, r
->out
.buffer
, r
->in
.buf_size
);
2442 memset(r
->out
.buffer
, 0, (r
->in
.buf_size
) * sizeof(*r
->out
.buffer
));
2443 NDR_PULL_ALLOC(ndr
, r
->out
.bytes_needed
);
2444 ZERO_STRUCTP(r
->out
.bytes_needed
);
2446 if (flags
& NDR_OUT
) {
2447 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.buffer
));
2448 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2449 NDR_PULL_ALLOC_N(ndr
, r
->out
.buffer
, ndr_get_array_size(ndr
, &r
->out
.buffer
));
2451 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, ndr_get_array_size(ndr
, &r
->out
.buffer
)));
2452 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2453 NDR_PULL_ALLOC(ndr
, r
->out
.bytes_needed
);
2455 _mem_save_bytes_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2456 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.bytes_needed
, LIBNDR_FLAG_REF_ALLOC
);
2457 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.bytes_needed
));
2458 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_bytes_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
2459 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2460 if (r
->out
.buffer
) {
2461 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.buffer
, r
->in
.buf_size
));
2464 return NDR_ERR_SUCCESS
;
2467 _PUBLIC_
void ndr_print_eventlog_GetLogInformation(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_GetLogInformation
*r
)
2469 ndr_print_struct(ndr
, name
, "eventlog_GetLogInformation");
2471 if (flags
& NDR_SET_VALUES
) {
2472 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2474 if (flags
& NDR_IN
) {
2475 ndr_print_struct(ndr
, "in", "eventlog_GetLogInformation");
2477 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
2479 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
2481 ndr_print_uint32(ndr
, "level", r
->in
.level
);
2482 ndr_print_uint32(ndr
, "buf_size", r
->in
.buf_size
);
2485 if (flags
& NDR_OUT
) {
2486 ndr_print_struct(ndr
, "out", "eventlog_GetLogInformation");
2488 ndr_print_ptr(ndr
, "buffer", r
->out
.buffer
);
2490 ndr_print_array_uint8(ndr
, "buffer", r
->out
.buffer
, r
->in
.buf_size
);
2492 ndr_print_ptr(ndr
, "bytes_needed", r
->out
.bytes_needed
);
2494 ndr_print_uint32(ndr
, "bytes_needed", *r
->out
.bytes_needed
);
2496 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2502 static enum ndr_err_code
ndr_push_eventlog_FlushEventLog(struct ndr_push
*ndr
, int flags
, const struct eventlog_FlushEventLog
*r
)
2504 if (flags
& NDR_IN
) {
2505 if (r
->in
.handle
== NULL
) {
2506 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2508 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2510 if (flags
& NDR_OUT
) {
2511 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2513 return NDR_ERR_SUCCESS
;
2516 static enum ndr_err_code
ndr_pull_eventlog_FlushEventLog(struct ndr_pull
*ndr
, int flags
, struct eventlog_FlushEventLog
*r
)
2518 TALLOC_CTX
*_mem_save_handle_0
;
2519 if (flags
& NDR_IN
) {
2520 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2521 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
2523 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2524 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
2525 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2526 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2528 if (flags
& NDR_OUT
) {
2529 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2531 return NDR_ERR_SUCCESS
;
2534 _PUBLIC_
void ndr_print_eventlog_FlushEventLog(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_FlushEventLog
*r
)
2536 ndr_print_struct(ndr
, name
, "eventlog_FlushEventLog");
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_FlushEventLog");
2544 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
2546 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
2550 if (flags
& NDR_OUT
) {
2551 ndr_print_struct(ndr
, "out", "eventlog_FlushEventLog");
2553 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2559 static enum ndr_err_code
ndr_push_eventlog_ReportEventAndSourceW(struct ndr_push
*ndr
, int flags
, const struct eventlog_ReportEventAndSourceW
*r
)
2561 uint32_t cntr_strings_1
;
2562 if (flags
& NDR_IN
) {
2563 if (r
->in
.handle
== NULL
) {
2564 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2566 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2567 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, r
->in
.timestamp
));
2568 NDR_CHECK(ndr_push_eventlogEventTypes(ndr
, NDR_SCALARS
, r
->in
.event_type
));
2569 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.event_category
));
2570 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.event_id
));
2571 if (r
->in
.sourcename
== NULL
) {
2572 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2574 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sourcename
));
2575 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.num_of_strings
));
2576 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.data_size
));
2577 if (r
->in
.servername
== NULL
) {
2578 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2580 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.servername
));
2581 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.user_sid
));
2582 if (r
->in
.user_sid
) {
2583 NDR_CHECK(ndr_push_dom_sid(ndr
, NDR_SCALARS
, r
->in
.user_sid
));
2585 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.strings
));
2586 if (r
->in
.strings
) {
2587 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_of_strings
));
2588 for (cntr_strings_1
= 0; cntr_strings_1
< r
->in
.num_of_strings
; cntr_strings_1
++) {
2590 for (cntr_strings_1
= 0; cntr_strings_1
< r
->in
.num_of_strings
; cntr_strings_1
++) {
2591 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.strings
[cntr_strings_1
]));
2592 if (r
->in
.strings
[cntr_strings_1
]) {
2593 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.strings
[cntr_strings_1
]));
2597 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.data
));
2599 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.data_size
));
2600 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.data
, r
->in
.data_size
));
2602 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.flags
));
2603 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.record_number
));
2604 if (r
->in
.record_number
) {
2605 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.record_number
));
2607 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.time_written
));
2608 if (r
->in
.time_written
) {
2609 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, *r
->in
.time_written
));
2612 if (flags
& NDR_OUT
) {
2613 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.record_number
));
2614 if (r
->out
.record_number
) {
2615 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.record_number
));
2617 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.time_written
));
2618 if (r
->out
.time_written
) {
2619 NDR_CHECK(ndr_push_time_t(ndr
, NDR_SCALARS
, *r
->out
.time_written
));
2621 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
2623 return NDR_ERR_SUCCESS
;
2626 static enum ndr_err_code
ndr_pull_eventlog_ReportEventAndSourceW(struct ndr_pull
*ndr
, int flags
, struct eventlog_ReportEventAndSourceW
*r
)
2628 uint32_t _ptr_user_sid
;
2629 uint32_t _ptr_strings
;
2630 uint32_t cntr_strings_1
;
2632 uint32_t _ptr_record_number
;
2633 uint32_t _ptr_time_written
;
2634 TALLOC_CTX
*_mem_save_handle_0
;
2635 TALLOC_CTX
*_mem_save_sourcename_0
;
2636 TALLOC_CTX
*_mem_save_servername_0
;
2637 TALLOC_CTX
*_mem_save_user_sid_0
;
2638 TALLOC_CTX
*_mem_save_strings_0
;
2639 TALLOC_CTX
*_mem_save_strings_1
;
2640 TALLOC_CTX
*_mem_save_strings_2
;
2641 TALLOC_CTX
*_mem_save_data_0
;
2642 TALLOC_CTX
*_mem_save_record_number_0
;
2643 TALLOC_CTX
*_mem_save_time_written_0
;
2644 if (flags
& NDR_IN
) {
2645 ZERO_STRUCT(r
->out
);
2647 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2648 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
2650 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2651 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
2652 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2653 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2654 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, &r
->in
.timestamp
));
2655 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr
, NDR_SCALARS
, &r
->in
.event_type
));
2656 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.event_category
));
2657 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.event_id
));
2658 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2659 NDR_PULL_ALLOC(ndr
, r
->in
.sourcename
);
2661 _mem_save_sourcename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2662 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sourcename
, LIBNDR_FLAG_REF_ALLOC
);
2663 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sourcename
));
2664 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sourcename_0
, LIBNDR_FLAG_REF_ALLOC
);
2665 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.num_of_strings
));
2666 if (r
->in
.num_of_strings
> 256) {
2667 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2669 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.data_size
));
2670 if (r
->in
.data_size
> 0x3FFFF) {
2671 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2673 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2674 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
2676 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2677 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, LIBNDR_FLAG_REF_ALLOC
);
2678 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.servername
));
2679 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, LIBNDR_FLAG_REF_ALLOC
);
2680 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_sid
));
2681 if (_ptr_user_sid
) {
2682 NDR_PULL_ALLOC(ndr
, r
->in
.user_sid
);
2684 r
->in
.user_sid
= NULL
;
2686 if (r
->in
.user_sid
) {
2687 _mem_save_user_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2688 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.user_sid
, 0);
2689 NDR_CHECK(ndr_pull_dom_sid(ndr
, NDR_SCALARS
, r
->in
.user_sid
));
2690 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_sid_0
, 0);
2692 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_strings
));
2694 NDR_PULL_ALLOC(ndr
, r
->in
.strings
);
2696 r
->in
.strings
= NULL
;
2698 if (r
->in
.strings
) {
2699 _mem_save_strings_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2700 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.strings
, 0);
2701 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.strings
));
2702 NDR_PULL_ALLOC_N(ndr
, r
->in
.strings
, ndr_get_array_size(ndr
, &r
->in
.strings
));
2703 _mem_save_strings_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2704 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.strings
, 0);
2705 for (cntr_strings_1
= 0; cntr_strings_1
< r
->in
.num_of_strings
; cntr_strings_1
++) {
2707 for (cntr_strings_1
= 0; cntr_strings_1
< r
->in
.num_of_strings
; cntr_strings_1
++) {
2708 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_strings
));
2710 NDR_PULL_ALLOC(ndr
, r
->in
.strings
[cntr_strings_1
]);
2712 r
->in
.strings
[cntr_strings_1
] = NULL
;
2714 if (r
->in
.strings
[cntr_strings_1
]) {
2715 _mem_save_strings_2
= NDR_PULL_GET_MEM_CTX(ndr
);
2716 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.strings
[cntr_strings_1
], 0);
2717 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.strings
[cntr_strings_1
]));
2718 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_strings_2
, 0);
2721 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_strings_1
, 0);
2722 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_strings_0
, 0);
2724 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
2726 NDR_PULL_ALLOC(ndr
, r
->in
.data
);
2731 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2732 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.data
, 0);
2733 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.data
));
2734 NDR_PULL_ALLOC_N(ndr
, r
->in
.data
, ndr_get_array_size(ndr
, &r
->in
.data
));
2735 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.data
, ndr_get_array_size(ndr
, &r
->in
.data
)));
2736 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
2738 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.flags
));
2739 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_record_number
));
2740 if (_ptr_record_number
) {
2741 NDR_PULL_ALLOC(ndr
, r
->in
.record_number
);
2743 r
->in
.record_number
= NULL
;
2745 if (r
->in
.record_number
) {
2746 _mem_save_record_number_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2747 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.record_number
, 0);
2748 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.record_number
));
2749 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_record_number_0
, 0);
2751 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_time_written
));
2752 if (_ptr_time_written
) {
2753 NDR_PULL_ALLOC(ndr
, r
->in
.time_written
);
2755 r
->in
.time_written
= NULL
;
2757 if (r
->in
.time_written
) {
2758 _mem_save_time_written_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2759 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.time_written
, 0);
2760 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, r
->in
.time_written
));
2761 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_time_written_0
, 0);
2763 if (r
->in
.strings
) {
2764 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.strings
, r
->in
.num_of_strings
));
2767 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.data
, r
->in
.data_size
));
2770 if (flags
& NDR_OUT
) {
2771 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_record_number
));
2772 if (_ptr_record_number
) {
2773 NDR_PULL_ALLOC(ndr
, r
->out
.record_number
);
2775 r
->out
.record_number
= NULL
;
2777 if (r
->out
.record_number
) {
2778 _mem_save_record_number_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2779 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.record_number
, 0);
2780 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.record_number
));
2781 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_record_number_0
, 0);
2783 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_time_written
));
2784 if (_ptr_time_written
) {
2785 NDR_PULL_ALLOC(ndr
, r
->out
.time_written
);
2787 r
->out
.time_written
= NULL
;
2789 if (r
->out
.time_written
) {
2790 _mem_save_time_written_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2791 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.time_written
, 0);
2792 NDR_CHECK(ndr_pull_time_t(ndr
, NDR_SCALARS
, r
->out
.time_written
));
2793 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_time_written_0
, 0);
2795 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
2797 return NDR_ERR_SUCCESS
;
2800 _PUBLIC_
void ndr_print_eventlog_ReportEventAndSourceW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct eventlog_ReportEventAndSourceW
*r
)
2802 uint32_t cntr_strings_1
;
2803 ndr_print_struct(ndr
, name
, "eventlog_ReportEventAndSourceW");
2805 if (flags
& NDR_SET_VALUES
) {
2806 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2808 if (flags
& NDR_IN
) {
2809 ndr_print_struct(ndr
, "in", "eventlog_ReportEventAndSourceW");
2811 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
2813 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
2815 ndr_print_time_t(ndr
, "timestamp", r
->in
.timestamp
);
2816 ndr_print_eventlogEventTypes(ndr
, "event_type", r
->in
.event_type
);
2817 ndr_print_uint16(ndr
, "event_category", r
->in
.event_category
);
2818 ndr_print_uint32(ndr
, "event_id", r
->in
.event_id
);
2819 ndr_print_ptr(ndr
, "sourcename", r
->in
.sourcename
);
2821 ndr_print_lsa_String(ndr
, "sourcename", r
->in
.sourcename
);
2823 ndr_print_uint16(ndr
, "num_of_strings", r
->in
.num_of_strings
);
2824 ndr_print_uint32(ndr
, "data_size", r
->in
.data_size
);
2825 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
2827 ndr_print_lsa_String(ndr
, "servername", r
->in
.servername
);
2829 ndr_print_ptr(ndr
, "user_sid", r
->in
.user_sid
);
2831 if (r
->in
.user_sid
) {
2832 ndr_print_dom_sid(ndr
, "user_sid", r
->in
.user_sid
);
2835 ndr_print_ptr(ndr
, "strings", r
->in
.strings
);
2837 if (r
->in
.strings
) {
2838 ndr
->print(ndr
, "%s: ARRAY(%d)", "strings", (int)r
->in
.num_of_strings
);
2840 for (cntr_strings_1
=0;cntr_strings_1
<r
->in
.num_of_strings
;cntr_strings_1
++) {
2842 if (asprintf(&idx_1
, "[%d]", cntr_strings_1
) != -1) {
2843 ndr_print_ptr(ndr
, "strings", r
->in
.strings
[cntr_strings_1
]);
2845 if (r
->in
.strings
[cntr_strings_1
]) {
2846 ndr_print_lsa_String(ndr
, "strings", r
->in
.strings
[cntr_strings_1
]);
2855 ndr_print_ptr(ndr
, "data", r
->in
.data
);
2858 ndr_print_array_uint8(ndr
, "data", r
->in
.data
, r
->in
.data_size
);
2861 ndr_print_uint16(ndr
, "flags", r
->in
.flags
);
2862 ndr_print_ptr(ndr
, "record_number", r
->in
.record_number
);
2864 if (r
->in
.record_number
) {
2865 ndr_print_uint32(ndr
, "record_number", *r
->in
.record_number
);
2868 ndr_print_ptr(ndr
, "time_written", r
->in
.time_written
);
2870 if (r
->in
.time_written
) {
2871 ndr_print_time_t(ndr
, "time_written", *r
->in
.time_written
);
2876 if (flags
& NDR_OUT
) {
2877 ndr_print_struct(ndr
, "out", "eventlog_ReportEventAndSourceW");
2879 ndr_print_ptr(ndr
, "record_number", r
->out
.record_number
);
2881 if (r
->out
.record_number
) {
2882 ndr_print_uint32(ndr
, "record_number", *r
->out
.record_number
);
2885 ndr_print_ptr(ndr
, "time_written", r
->out
.time_written
);
2887 if (r
->out
.time_written
) {
2888 ndr_print_time_t(ndr
, "time_written", *r
->out
.time_written
);
2891 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
2897 static const struct ndr_interface_call eventlog_calls
[] = {
2899 "eventlog_ClearEventLogW",
2900 sizeof(struct eventlog_ClearEventLogW
),
2901 (ndr_push_flags_fn_t
) ndr_push_eventlog_ClearEventLogW
,
2902 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ClearEventLogW
,
2903 (ndr_print_function_t
) ndr_print_eventlog_ClearEventLogW
,
2907 "eventlog_BackupEventLogW",
2908 sizeof(struct eventlog_BackupEventLogW
),
2909 (ndr_push_flags_fn_t
) ndr_push_eventlog_BackupEventLogW
,
2910 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_BackupEventLogW
,
2911 (ndr_print_function_t
) ndr_print_eventlog_BackupEventLogW
,
2915 "eventlog_CloseEventLog",
2916 sizeof(struct eventlog_CloseEventLog
),
2917 (ndr_push_flags_fn_t
) ndr_push_eventlog_CloseEventLog
,
2918 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_CloseEventLog
,
2919 (ndr_print_function_t
) ndr_print_eventlog_CloseEventLog
,
2923 "eventlog_DeregisterEventSource",
2924 sizeof(struct eventlog_DeregisterEventSource
),
2925 (ndr_push_flags_fn_t
) ndr_push_eventlog_DeregisterEventSource
,
2926 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_DeregisterEventSource
,
2927 (ndr_print_function_t
) ndr_print_eventlog_DeregisterEventSource
,
2931 "eventlog_GetNumRecords",
2932 sizeof(struct eventlog_GetNumRecords
),
2933 (ndr_push_flags_fn_t
) ndr_push_eventlog_GetNumRecords
,
2934 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_GetNumRecords
,
2935 (ndr_print_function_t
) ndr_print_eventlog_GetNumRecords
,
2939 "eventlog_GetOldestRecord",
2940 sizeof(struct eventlog_GetOldestRecord
),
2941 (ndr_push_flags_fn_t
) ndr_push_eventlog_GetOldestRecord
,
2942 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_GetOldestRecord
,
2943 (ndr_print_function_t
) ndr_print_eventlog_GetOldestRecord
,
2947 "eventlog_ChangeNotify",
2948 sizeof(struct eventlog_ChangeNotify
),
2949 (ndr_push_flags_fn_t
) ndr_push_eventlog_ChangeNotify
,
2950 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ChangeNotify
,
2951 (ndr_print_function_t
) ndr_print_eventlog_ChangeNotify
,
2955 "eventlog_OpenEventLogW",
2956 sizeof(struct eventlog_OpenEventLogW
),
2957 (ndr_push_flags_fn_t
) ndr_push_eventlog_OpenEventLogW
,
2958 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_OpenEventLogW
,
2959 (ndr_print_function_t
) ndr_print_eventlog_OpenEventLogW
,
2963 "eventlog_RegisterEventSourceW",
2964 sizeof(struct eventlog_RegisterEventSourceW
),
2965 (ndr_push_flags_fn_t
) ndr_push_eventlog_RegisterEventSourceW
,
2966 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_RegisterEventSourceW
,
2967 (ndr_print_function_t
) ndr_print_eventlog_RegisterEventSourceW
,
2971 "eventlog_OpenBackupEventLogW",
2972 sizeof(struct eventlog_OpenBackupEventLogW
),
2973 (ndr_push_flags_fn_t
) ndr_push_eventlog_OpenBackupEventLogW
,
2974 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_OpenBackupEventLogW
,
2975 (ndr_print_function_t
) ndr_print_eventlog_OpenBackupEventLogW
,
2979 "eventlog_ReadEventLogW",
2980 sizeof(struct eventlog_ReadEventLogW
),
2981 (ndr_push_flags_fn_t
) ndr_push_eventlog_ReadEventLogW
,
2982 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ReadEventLogW
,
2983 (ndr_print_function_t
) ndr_print_eventlog_ReadEventLogW
,
2987 "eventlog_ReportEventW",
2988 sizeof(struct eventlog_ReportEventW
),
2989 (ndr_push_flags_fn_t
) ndr_push_eventlog_ReportEventW
,
2990 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ReportEventW
,
2991 (ndr_print_function_t
) ndr_print_eventlog_ReportEventW
,
2995 "eventlog_ClearEventLogA",
2996 sizeof(struct eventlog_ClearEventLogA
),
2997 (ndr_push_flags_fn_t
) ndr_push_eventlog_ClearEventLogA
,
2998 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ClearEventLogA
,
2999 (ndr_print_function_t
) ndr_print_eventlog_ClearEventLogA
,
3003 "eventlog_BackupEventLogA",
3004 sizeof(struct eventlog_BackupEventLogA
),
3005 (ndr_push_flags_fn_t
) ndr_push_eventlog_BackupEventLogA
,
3006 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_BackupEventLogA
,
3007 (ndr_print_function_t
) ndr_print_eventlog_BackupEventLogA
,
3011 "eventlog_OpenEventLogA",
3012 sizeof(struct eventlog_OpenEventLogA
),
3013 (ndr_push_flags_fn_t
) ndr_push_eventlog_OpenEventLogA
,
3014 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_OpenEventLogA
,
3015 (ndr_print_function_t
) ndr_print_eventlog_OpenEventLogA
,
3019 "eventlog_RegisterEventSourceA",
3020 sizeof(struct eventlog_RegisterEventSourceA
),
3021 (ndr_push_flags_fn_t
) ndr_push_eventlog_RegisterEventSourceA
,
3022 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_RegisterEventSourceA
,
3023 (ndr_print_function_t
) ndr_print_eventlog_RegisterEventSourceA
,
3027 "eventlog_OpenBackupEventLogA",
3028 sizeof(struct eventlog_OpenBackupEventLogA
),
3029 (ndr_push_flags_fn_t
) ndr_push_eventlog_OpenBackupEventLogA
,
3030 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_OpenBackupEventLogA
,
3031 (ndr_print_function_t
) ndr_print_eventlog_OpenBackupEventLogA
,
3035 "eventlog_ReadEventLogA",
3036 sizeof(struct eventlog_ReadEventLogA
),
3037 (ndr_push_flags_fn_t
) ndr_push_eventlog_ReadEventLogA
,
3038 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ReadEventLogA
,
3039 (ndr_print_function_t
) ndr_print_eventlog_ReadEventLogA
,
3043 "eventlog_ReportEventA",
3044 sizeof(struct eventlog_ReportEventA
),
3045 (ndr_push_flags_fn_t
) ndr_push_eventlog_ReportEventA
,
3046 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ReportEventA
,
3047 (ndr_print_function_t
) ndr_print_eventlog_ReportEventA
,
3051 "eventlog_RegisterClusterSvc",
3052 sizeof(struct eventlog_RegisterClusterSvc
),
3053 (ndr_push_flags_fn_t
) ndr_push_eventlog_RegisterClusterSvc
,
3054 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_RegisterClusterSvc
,
3055 (ndr_print_function_t
) ndr_print_eventlog_RegisterClusterSvc
,
3059 "eventlog_DeregisterClusterSvc",
3060 sizeof(struct eventlog_DeregisterClusterSvc
),
3061 (ndr_push_flags_fn_t
) ndr_push_eventlog_DeregisterClusterSvc
,
3062 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_DeregisterClusterSvc
,
3063 (ndr_print_function_t
) ndr_print_eventlog_DeregisterClusterSvc
,
3067 "eventlog_WriteClusterEvents",
3068 sizeof(struct eventlog_WriteClusterEvents
),
3069 (ndr_push_flags_fn_t
) ndr_push_eventlog_WriteClusterEvents
,
3070 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_WriteClusterEvents
,
3071 (ndr_print_function_t
) ndr_print_eventlog_WriteClusterEvents
,
3075 "eventlog_GetLogInformation",
3076 sizeof(struct eventlog_GetLogInformation
),
3077 (ndr_push_flags_fn_t
) ndr_push_eventlog_GetLogInformation
,
3078 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_GetLogInformation
,
3079 (ndr_print_function_t
) ndr_print_eventlog_GetLogInformation
,
3083 "eventlog_FlushEventLog",
3084 sizeof(struct eventlog_FlushEventLog
),
3085 (ndr_push_flags_fn_t
) ndr_push_eventlog_FlushEventLog
,
3086 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_FlushEventLog
,
3087 (ndr_print_function_t
) ndr_print_eventlog_FlushEventLog
,
3091 "eventlog_ReportEventAndSourceW",
3092 sizeof(struct eventlog_ReportEventAndSourceW
),
3093 (ndr_push_flags_fn_t
) ndr_push_eventlog_ReportEventAndSourceW
,
3094 (ndr_pull_flags_fn_t
) ndr_pull_eventlog_ReportEventAndSourceW
,
3095 (ndr_print_function_t
) ndr_print_eventlog_ReportEventAndSourceW
,
3098 { NULL
, 0, NULL
, NULL
, NULL
, false }
3101 static const char * const eventlog_endpoint_strings
[] = {
3102 "ncacn_np:[\\pipe\\eventlog]",
3105 static const struct ndr_interface_string_array eventlog_endpoints
= {
3107 .names
= eventlog_endpoint_strings
3110 static const char * const eventlog_authservice_strings
[] = {
3114 static const struct ndr_interface_string_array eventlog_authservices
= {
3116 .names
= eventlog_authservice_strings
3120 const struct ndr_interface_table ndr_table_eventlog
= {
3123 {0x82273fdc,0xe32a,0x18c3,{0x3f,0x78},{0x82,0x79,0x29,0xdc,0x23,0xea}},
3124 NDR_EVENTLOG_VERSION
3126 .helpstring
= NDR_EVENTLOG_HELPSTRING
,
3128 .calls
= eventlog_calls
,
3129 .endpoints
= &eventlog_endpoints
,
3130 .authservices
= &eventlog_authservices