diff options
author | Günther Deschner <gd@samba.org> | 2009-02-03 15:55:46 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-02-03 16:06:57 +0100 |
commit | 1c627c22324fbb83de4c602cdbdd658ab53cde54 (patch) | |
tree | 464dd8f2ba7ef4abc9b8ada1de8ecf879e2e6342 /librpc/gen_ndr | |
parent | 268f87df61dbf2625d33c149607db046f60dd5fd (diff) | |
download | samba-1c627c22324fbb83de4c602cdbdd658ab53cde54.tar.gz samba-1c627c22324fbb83de4c602cdbdd658ab53cde54.tar.bz2 samba-1c627c22324fbb83de4c602cdbdd658ab53cde54.zip |
s3: re-run make samba3-idl.
Guenther
Diffstat (limited to 'librpc/gen_ndr')
-rw-r--r-- | librpc/gen_ndr/eventlog.h | 29 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_eventlog.c | 174 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_eventlog.h | 3 |
3 files changed, 206 insertions, 0 deletions
diff --git a/librpc/gen_ndr/eventlog.h b/librpc/gen_ndr/eventlog.h index 8dc0d0d146..0c998a8a18 100644 --- a/librpc/gen_ndr/eventlog.h +++ b/librpc/gen_ndr/eventlog.h @@ -65,6 +65,35 @@ struct eventlog_Record { uint32_t size2;/* [value(size)] */ }/* [public,flag(LIBNDR_FLAG_NOALIGN)] */; +struct eventlog_Record_tdb { + uint32_t size; + const char *reserved;/* [value("eLfL"),charset(DOS)] */ + uint32_t record_number; + time_t time_generated; + time_t time_written; + uint32_t event_id; + 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; + uint32_t stringoffset; + uint32_t sid_length;/* [value(sid.length)] */ + uint32_t sid_offset; + uint32_t data_length;/* [value(data.length)] */ + uint32_t data_offset; + uint32_t source_name_len;/* [value(2*strlen_m_term(source_name))] */ + const char * source_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ + uint32_t computer_name_len;/* [value(2*strlen_m_term(computer_name))] */ + const char * computer_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ + uint32_t sid_padding; + DATA_BLOB sid; + uint32_t strings_len;/* [value(2*ndr_size_string_array(strings,num_of_strings,LIBNDR_FLAG_STR_NULLTERM))] */ + const char * *strings;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ + DATA_BLOB data; + uint32_t padding; +}/* [public,flag(LIBNDR_FLAG_NOALIGN|LIBNDR_PRINT_ARRAY_HEX)] */; + struct EVENTLOG_FULL_INFORMATION { uint32_t full; }; diff --git a/librpc/gen_ndr/ndr_eventlog.c b/librpc/gen_ndr/ndr_eventlog.c index 938f0db8eb..a43b343aa7 100644 --- a/librpc/gen_ndr/ndr_eventlog.c +++ b/librpc/gen_ndr/ndr_eventlog.c @@ -287,6 +287,180 @@ _PUBLIC_ void ndr_print_eventlog_Record(struct ndr_print *ndr, const char *name, } } +_PUBLIC_ enum ndr_err_code ndr_push_eventlog_Record_tdb(struct ndr_push *ndr, int ndr_flags, const struct eventlog_Record_tdb *r) +{ + uint32_t cntr_strings_0; + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_PRINT_ARRAY_HEX); + 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, r->sid.length)); + 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)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m_term(r->source_name))); + { + 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_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m_term(r->computer_name))); + { + 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; + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_padding)); + NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->sid)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * ndr_size_string_array(r->strings, r->num_of_strings, LIBNDR_FLAG_STR_NULLTERM))); + { + 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; + } + NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->padding)); + } + if (ndr_flags & NDR_BUFFERS) { + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_eventlog_Record_tdb(struct ndr_pull *ndr, int ndr_flags, struct eventlog_Record_tdb *r) +{ + uint32_t cntr_strings_0; + TALLOC_CTX *_mem_save_strings_0; + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_PRINT_ARRAY_HEX); + 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 > 256) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } + 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_length)); + 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)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->source_name_len)); + { + 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; + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->computer_name_len)); + { + 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; + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_padding)); + NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->sid)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->strings_len)); + { + 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; + } + NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding)); + } + if (ndr_flags & NDR_BUFFERS) { + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_eventlog_Record_tdb(struct ndr_print *ndr, const char *name, const struct eventlog_Record_tdb *r) +{ + uint32_t cntr_strings_0; + ndr_print_struct(ndr, name, "eventlog_Record_tdb"); + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_PRINT_ARRAY_HEX); + 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_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->sid.length:r->sid_length); + ndr_print_uint32(ndr, "sid_offset", r->sid_offset); + ndr_print_uint32(ndr, "data_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->data.length:r->data_length); + ndr_print_uint32(ndr, "data_offset", r->data_offset); + ndr_print_uint32(ndr, "source_name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m_term(r->source_name):r->source_name_len); + ndr_print_string(ndr, "source_name", r->source_name); + ndr_print_uint32(ndr, "computer_name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m_term(r->computer_name):r->computer_name_len); + ndr_print_string(ndr, "computer_name", r->computer_name); + ndr_print_uint32(ndr, "sid_padding", r->sid_padding); + ndr_print_DATA_BLOB(ndr, "sid", r->sid); + 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); + 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_DATA_BLOB(ndr, "data", r->data); + ndr_print_uint32(ndr, "padding", r->padding); + ndr->depth--; + ndr->flags = _flags_save_STRUCT; + } +} + static enum ndr_err_code ndr_push_eventlog_ClearEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_ClearEventLogW *r) { if (flags & NDR_IN) { diff --git a/librpc/gen_ndr/ndr_eventlog.h b/librpc/gen_ndr/ndr_eventlog.h index 3fa20e3a29..39bfd38665 100644 --- a/librpc/gen_ndr/ndr_eventlog.h +++ b/librpc/gen_ndr/ndr_eventlog.h @@ -70,6 +70,9 @@ void ndr_print_eventlog_OpenUnknown0(struct ndr_print *ndr, const char *name, co 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); void ndr_print_eventlog_Record(struct ndr_print *ndr, const char *name, const struct eventlog_Record *r); +enum ndr_err_code ndr_push_eventlog_Record_tdb(struct ndr_push *ndr, int ndr_flags, const struct eventlog_Record_tdb *r); +enum ndr_err_code ndr_pull_eventlog_Record_tdb(struct ndr_pull *ndr, int ndr_flags, struct eventlog_Record_tdb *r); +void ndr_print_eventlog_Record_tdb(struct ndr_print *ndr, const char *name, const struct eventlog_Record_tdb *r); void ndr_print_eventlog_ClearEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ClearEventLogW *r); void ndr_print_eventlog_BackupEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_BackupEventLogW *r); void ndr_print_eventlog_CloseEventLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_CloseEventLog *r); |