summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--librpc/gen_ndr/eventlog.h23
-rw-r--r--librpc/gen_ndr/ndr_eventlog.c343
-rw-r--r--librpc/gen_ndr/ndr_eventlog.h3
3 files changed, 216 insertions, 153 deletions
diff --git a/librpc/gen_ndr/eventlog.h b/librpc/gen_ndr/eventlog.h
index 805364bbe5..9c9a2ed218 100644
--- a/librpc/gen_ndr/eventlog.h
+++ b/librpc/gen_ndr/eventlog.h
@@ -13,13 +13,26 @@
#define EVENTLOG_FORWARDS_READ ( 0x0004 )
#define EVENTLOG_BACKWARDS_READ ( 0x0008 )
-/* bitmap eventlogEventTypes */
+enum eventlogEventTypes
+#ifndef USE_UINT_ENUMS
+ {
+ EVENTLOG_SUCCESS=0x0000,
+ EVENTLOG_ERROR_TYPE=0x0001,
+ EVENTLOG_WARNING_TYPE=0x0002,
+ EVENTLOG_INFORMATION_TYPE=0x0004,
+ EVENTLOG_AUDIT_SUCCESS=0x0008,
+ EVENTLOG_AUDIT_FAILURE=0x0010
+}
+#else
+ { __donnot_use_enum_eventlogEventTypes=0x7FFFFFFF}
#define EVENTLOG_SUCCESS ( 0x0000 )
#define EVENTLOG_ERROR_TYPE ( 0x0001 )
#define EVENTLOG_WARNING_TYPE ( 0x0002 )
#define EVENTLOG_INFORMATION_TYPE ( 0x0004 )
#define EVENTLOG_AUDIT_SUCCESS ( 0x0008 )
#define EVENTLOG_AUDIT_FAILURE ( 0x0010 )
+#endif
+;
struct eventlog_OpenUnknown0 {
uint16_t unknown0;
@@ -28,13 +41,13 @@ struct eventlog_OpenUnknown0 {
struct eventlog_Record {
uint32_t size;
- uint32_t reserved;/* [value(0x654c664C)] */
+ const char *reserved;/* [value("eLfL"),charset(DOS)] */
uint32_t record_number;
time_t time_generated;
time_t time_written;
uint32_t event_id;
- uint16_t event_type;
- uint16_t num_of_strings;
+ enum eventlogEventTypes event_type;
+ uint16_t num_of_strings;/* [range(0,256)] */
uint16_t event_category;
uint16_t reserved_flags;
uint32_t closing_record_number;
@@ -50,7 +63,7 @@ struct eventlog_Record {
const char * raw_data;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
DATA_BLOB _padding;/* [flag(LIBNDR_FLAG_ALIGN4)] */
uint32_t size2;/* [value(size)] */
-}/* [public] */;
+}/* [public,flag(LIBNDR_FLAG_NOALIGN)] */;
struct eventlog_ClearEventLogW {
diff --git a/librpc/gen_ndr/ndr_eventlog.c b/librpc/gen_ndr/ndr_eventlog.c
index 5d1bda5b83..9b64deb58f 100644
--- a/librpc/gen_ndr/ndr_eventlog.c
+++ b/librpc/gen_ndr/ndr_eventlog.c
@@ -30,6 +30,35 @@ _PUBLIC_ void ndr_print_eventlogReadFlags(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
+_PUBLIC_ enum ndr_err_code ndr_push_eventlogEventTypes(struct ndr_push *ndr, int ndr_flags, enum eventlogEventTypes r)
+{
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_eventlogEventTypes(struct ndr_pull *ndr, int ndr_flags, enum eventlogEventTypes *r)
+{
+ uint16_t v;
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_eventlogEventTypes(struct ndr_print *ndr, const char *name, enum eventlogEventTypes r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case EVENTLOG_SUCCESS: val = "EVENTLOG_SUCCESS"; break;
+ case EVENTLOG_ERROR_TYPE: val = "EVENTLOG_ERROR_TYPE"; break;
+ case EVENTLOG_WARNING_TYPE: val = "EVENTLOG_WARNING_TYPE"; break;
+ case EVENTLOG_INFORMATION_TYPE: val = "EVENTLOG_INFORMATION_TYPE"; break;
+ case EVENTLOG_AUDIT_SUCCESS: val = "EVENTLOG_AUDIT_SUCCESS"; break;
+ case EVENTLOG_AUDIT_FAILURE: val = "EVENTLOG_AUDIT_FAILURE"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
static enum ndr_err_code ndr_push_eventlog_OpenUnknown0(struct ndr_push *ndr, int ndr_flags, const struct eventlog_OpenUnknown0 *r)
{
if (ndr_flags & NDR_SCALARS) {
@@ -66,65 +95,70 @@ _PUBLIC_ void ndr_print_eventlog_OpenUnknown0(struct ndr_print *ndr, const char
_PUBLIC_ enum ndr_err_code ndr_push_eventlog_Record(struct ndr_push *ndr, int ndr_flags, const struct eventlog_Record *r)
{
uint32_t cntr_strings_0;
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x654c664C));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->record_number));
- NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->time_generated));
- NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->time_written));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->event_id));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->event_type));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_of_strings));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->event_category));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved_flags));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->closing_record_number));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->stringoffset));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid0(&r->sid, ndr->flags)));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_offset));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->data_length));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->data_offset));
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
- NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->source_name));
- ndr->flags = _flags_save_string;
- }
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
- NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->computer_name));
- ndr->flags = _flags_save_string;
- }
- {
- struct ndr_push *_ndr_sid;
- NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sid, 0, ndr_size_dom_sid0(&r->sid, ndr->flags)));
- NDR_CHECK(ndr_push_dom_sid0(_ndr_sid, NDR_SCALARS|NDR_BUFFERS, &r->sid));
- NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sid, 0, ndr_size_dom_sid0(&r->sid, ndr->flags)));
- }
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
- for (cntr_strings_0 = 0; cntr_strings_0 < r->num_of_strings; cntr_strings_0++) {
- NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->strings[cntr_strings_0]));
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "eLfL", 4, sizeof(uint8_t), CH_DOS));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->record_number));
+ NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->time_generated));
+ NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->time_written));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->event_id));
+ NDR_CHECK(ndr_push_eventlogEventTypes(ndr, NDR_SCALARS, r->event_type));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_of_strings));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->event_category));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved_flags));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->closing_record_number));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->stringoffset));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid0(&r->sid, ndr->flags)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_offset));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->data_length));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->data_offset));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->source_name));
+ ndr->flags = _flags_save_string;
}
- ndr->flags = _flags_save_string;
- }
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
- NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->raw_data));
- ndr->flags = _flags_save_string;
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->computer_name));
+ ndr->flags = _flags_save_string;
+ }
+ {
+ struct ndr_push *_ndr_sid;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sid, 0, ndr_size_dom_sid0(&r->sid, ndr->flags)));
+ NDR_CHECK(ndr_push_dom_sid0(_ndr_sid, NDR_SCALARS|NDR_BUFFERS, &r->sid));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sid, 0, ndr_size_dom_sid0(&r->sid, ndr->flags)));
+ }
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+ for (cntr_strings_0 = 0; cntr_strings_0 < r->num_of_strings; cntr_strings_0++) {
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->strings[cntr_strings_0]));
+ }
+ ndr->flags = _flags_save_string;
+ }
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->raw_data));
+ ndr->flags = _flags_save_string;
+ }
+ {
+ uint32_t _flags_save_DATA_BLOB = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
+ NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_padding));
+ ndr->flags = _flags_save_DATA_BLOB;
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
}
- {
- uint32_t _flags_save_DATA_BLOB = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
- NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_padding));
- ndr->flags = _flags_save_DATA_BLOB;
+ if (ndr_flags & NDR_BUFFERS) {
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
- }
- if (ndr_flags & NDR_BUFFERS) {
+ ndr->flags = _flags_save_STRUCT;
}
return NDR_ERR_SUCCESS;
}
@@ -133,69 +167,77 @@ _PUBLIC_ enum ndr_err_code ndr_pull_eventlog_Record(struct ndr_pull *ndr, int nd
{
uint32_t cntr_strings_0;
TALLOC_CTX *_mem_save_strings_0;
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->record_number));
- NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->time_generated));
- NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->time_written));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->event_id));
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->event_type));
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_of_strings));
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->event_category));
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved_flags));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->closing_record_number));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->stringoffset));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_size));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_offset));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data_length));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data_offset));
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
- NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->source_name));
- ndr->flags = _flags_save_string;
- }
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
- NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->computer_name));
- ndr->flags = _flags_save_string;
- }
- {
- struct ndr_pull *_ndr_sid;
- NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sid, 0, r->sid_size));
- NDR_CHECK(ndr_pull_dom_sid0(_ndr_sid, NDR_SCALARS|NDR_BUFFERS, &r->sid));
- NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sid, 0, r->sid_size));
- }
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
- NDR_PULL_ALLOC_N(ndr, r->strings, r->num_of_strings);
- _mem_save_strings_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->strings, 0);
- for (cntr_strings_0 = 0; cntr_strings_0 < r->num_of_strings; cntr_strings_0++) {
- NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->strings[cntr_strings_0]));
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->reserved, 4, sizeof(uint8_t), CH_DOS));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->record_number));
+ NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->time_generated));
+ NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->time_written));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->event_id));
+ NDR_CHECK(ndr_pull_eventlogEventTypes(ndr, NDR_SCALARS, &r->event_type));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_of_strings));
+ if (r->num_of_strings < 0 || r->num_of_strings > 256) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_0, 0);
- ndr->flags = _flags_save_string;
- }
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
- NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->raw_data));
- ndr->flags = _flags_save_string;
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->event_category));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved_flags));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->closing_record_number));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->stringoffset));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_size));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_offset));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data_length));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data_offset));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->source_name));
+ ndr->flags = _flags_save_string;
+ }
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->computer_name));
+ ndr->flags = _flags_save_string;
+ }
+ {
+ struct ndr_pull *_ndr_sid;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sid, 0, r->sid_size));
+ NDR_CHECK(ndr_pull_dom_sid0(_ndr_sid, NDR_SCALARS|NDR_BUFFERS, &r->sid));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sid, 0, r->sid_size));
+ }
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+ NDR_PULL_ALLOC_N(ndr, r->strings, r->num_of_strings);
+ _mem_save_strings_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->strings, 0);
+ for (cntr_strings_0 = 0; cntr_strings_0 < r->num_of_strings; cntr_strings_0++) {
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->strings[cntr_strings_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_0, 0);
+ ndr->flags = _flags_save_string;
+ }
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->raw_data));
+ ndr->flags = _flags_save_string;
+ }
+ {
+ uint32_t _flags_save_DATA_BLOB = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
+ NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_padding));
+ ndr->flags = _flags_save_DATA_BLOB;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size2));
}
- {
- uint32_t _flags_save_DATA_BLOB = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
- NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_padding));
- ndr->flags = _flags_save_DATA_BLOB;
+ if (ndr_flags & NDR_BUFFERS) {
}
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size2));
- }
- if (ndr_flags & NDR_BUFFERS) {
+ ndr->flags = _flags_save_STRUCT;
}
return NDR_ERR_SUCCESS;
}
@@ -204,40 +246,45 @@ _PUBLIC_ void ndr_print_eventlog_Record(struct ndr_print *ndr, const char *name,
{
uint32_t cntr_strings_0;
ndr_print_struct(ndr, name, "eventlog_Record");
- ndr->depth++;
- ndr_print_uint32(ndr, "size", r->size);
- ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x654c664C:r->reserved);
- ndr_print_uint32(ndr, "record_number", r->record_number);
- ndr_print_time_t(ndr, "time_generated", r->time_generated);
- ndr_print_time_t(ndr, "time_written", r->time_written);
- ndr_print_uint32(ndr, "event_id", r->event_id);
- ndr_print_uint16(ndr, "event_type", r->event_type);
- ndr_print_uint16(ndr, "num_of_strings", r->num_of_strings);
- ndr_print_uint16(ndr, "event_category", r->event_category);
- ndr_print_uint16(ndr, "reserved_flags", r->reserved_flags);
- ndr_print_uint32(ndr, "closing_record_number", r->closing_record_number);
- ndr_print_uint32(ndr, "stringoffset", r->stringoffset);
- ndr_print_uint32(ndr, "sid_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid0(&r->sid, ndr->flags):r->sid_size);
- ndr_print_uint32(ndr, "sid_offset", r->sid_offset);
- ndr_print_uint32(ndr, "data_length", r->data_length);
- ndr_print_uint32(ndr, "data_offset", r->data_offset);
- ndr_print_string(ndr, "source_name", r->source_name);
- ndr_print_string(ndr, "computer_name", r->computer_name);
- ndr_print_dom_sid0(ndr, "sid", &r->sid);
- ndr->print(ndr, "%s: ARRAY(%d)", "strings", (int)r->num_of_strings);
- ndr->depth++;
- for (cntr_strings_0=0;cntr_strings_0<r->num_of_strings;cntr_strings_0++) {
- char *idx_0=NULL;
- if (asprintf(&idx_0, "[%d]", cntr_strings_0) != -1) {
- ndr_print_string(ndr, "strings", r->strings[cntr_strings_0]);
- free(idx_0);
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "size", r->size);
+ ndr_print_string(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"eLfL":r->reserved);
+ ndr_print_uint32(ndr, "record_number", r->record_number);
+ ndr_print_time_t(ndr, "time_generated", r->time_generated);
+ ndr_print_time_t(ndr, "time_written", r->time_written);
+ ndr_print_uint32(ndr, "event_id", r->event_id);
+ ndr_print_eventlogEventTypes(ndr, "event_type", r->event_type);
+ ndr_print_uint16(ndr, "num_of_strings", r->num_of_strings);
+ ndr_print_uint16(ndr, "event_category", r->event_category);
+ ndr_print_uint16(ndr, "reserved_flags", r->reserved_flags);
+ ndr_print_uint32(ndr, "closing_record_number", r->closing_record_number);
+ ndr_print_uint32(ndr, "stringoffset", r->stringoffset);
+ ndr_print_uint32(ndr, "sid_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid0(&r->sid, ndr->flags):r->sid_size);
+ ndr_print_uint32(ndr, "sid_offset", r->sid_offset);
+ ndr_print_uint32(ndr, "data_length", r->data_length);
+ ndr_print_uint32(ndr, "data_offset", r->data_offset);
+ ndr_print_string(ndr, "source_name", r->source_name);
+ ndr_print_string(ndr, "computer_name", r->computer_name);
+ ndr_print_dom_sid0(ndr, "sid", &r->sid);
+ ndr->print(ndr, "%s: ARRAY(%d)", "strings", (int)r->num_of_strings);
+ ndr->depth++;
+ for (cntr_strings_0=0;cntr_strings_0<r->num_of_strings;cntr_strings_0++) {
+ char *idx_0=NULL;
+ if (asprintf(&idx_0, "[%d]", cntr_strings_0) != -1) {
+ ndr_print_string(ndr, "strings", r->strings[cntr_strings_0]);
+ free(idx_0);
+ }
}
+ ndr->depth--;
+ ndr_print_string(ndr, "raw_data", r->raw_data);
+ ndr_print_DATA_BLOB(ndr, "_padding", r->_padding);
+ ndr_print_uint32(ndr, "size2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->size:r->size2);
+ ndr->depth--;
+ ndr->flags = _flags_save_STRUCT;
}
- ndr->depth--;
- ndr_print_string(ndr, "raw_data", r->raw_data);
- ndr_print_DATA_BLOB(ndr, "_padding", r->_padding);
- ndr_print_uint32(ndr, "size2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->size:r->size2);
- ndr->depth--;
}
static enum ndr_err_code ndr_push_eventlog_ClearEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_ClearEventLogW *r)
diff --git a/librpc/gen_ndr/ndr_eventlog.h b/librpc/gen_ndr/ndr_eventlog.h
index c705290aef..f63fa9e569 100644
--- a/librpc/gen_ndr/ndr_eventlog.h
+++ b/librpc/gen_ndr/ndr_eventlog.h
@@ -61,6 +61,9 @@ extern const struct ndr_interface_table ndr_table_eventlog;
#define NDR_EVENTLOG_CALL_COUNT (24)
void ndr_print_eventlogReadFlags(struct ndr_print *ndr, const char *name, uint32_t r);
+enum ndr_err_code ndr_push_eventlogEventTypes(struct ndr_push *ndr, int ndr_flags, enum eventlogEventTypes r);
+enum ndr_err_code ndr_pull_eventlogEventTypes(struct ndr_pull *ndr, int ndr_flags, enum eventlogEventTypes *r);
+void ndr_print_eventlogEventTypes(struct ndr_print *ndr, const char *name, enum eventlogEventTypes r);
void ndr_print_eventlog_OpenUnknown0(struct ndr_print *ndr, const char *name, const struct eventlog_OpenUnknown0 *r);
enum ndr_err_code ndr_push_eventlog_Record(struct ndr_push *ndr, int ndr_flags, const struct eventlog_Record *r);
enum ndr_err_code ndr_pull_eventlog_Record(struct ndr_pull *ndr, int ndr_flags, struct eventlog_Record *r);