diff options
author | Günther Deschner <gd@samba.org> | 2009-10-01 02:09:33 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-10-01 12:19:43 +0200 |
commit | cd82d4ba569a5048e506f8455d9c496a47805fc1 (patch) | |
tree | 9562840e5959256fc1de1bb363fa6616a52ff1ef /source3/librpc/gen_ndr | |
parent | c6a7ecf28b5d531b8f8921643b3aa3a01b74151b (diff) | |
download | samba-cd82d4ba569a5048e506f8455d9c496a47805fc1.tar.gz samba-cd82d4ba569a5048e506f8455d9c496a47805fc1.tar.bz2 samba-cd82d4ba569a5048e506f8455d9c496a47805fc1.zip |
s3: add perfcount idl and generated files.
Guenther
Diffstat (limited to 'source3/librpc/gen_ndr')
-rw-r--r-- | source3/librpc/gen_ndr/ndr_perfcount.c | 493 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/ndr_perfcount.h | 26 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/perfcount.h | 129 |
3 files changed, 648 insertions, 0 deletions
diff --git a/source3/librpc/gen_ndr/ndr_perfcount.c b/source3/librpc/gen_ndr/ndr_perfcount.c new file mode 100644 index 0000000000..9944434920 --- /dev/null +++ b/source3/librpc/gen_ndr/ndr_perfcount.c @@ -0,0 +1,493 @@ +/* parser auto-generated by pidl */ + +#include "includes.h" +#include "librpc/gen_ndr/ndr_perfcount.h" + +static enum ndr_err_code ndr_push_SYSTEMTIME(struct ndr_push *ndr, int ndr_flags, const struct SYSTEMTIME *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 2)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->year)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->month)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->dayofweek)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->day)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->hour)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->minute)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->second)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->milliseconds)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_SYSTEMTIME(struct ndr_pull *ndr, int ndr_flags, struct SYSTEMTIME *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 2)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->year)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->month)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->dayofweek)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->day)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->hour)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->minute)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->second)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->milliseconds)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_SYSTEMTIME(struct ndr_print *ndr, const char *name, const struct SYSTEMTIME *r) +{ + ndr_print_struct(ndr, name, "SYSTEMTIME"); + ndr->depth++; + ndr_print_uint16(ndr, "year", r->year); + ndr_print_uint16(ndr, "month", r->month); + ndr_print_uint16(ndr, "dayofweek", r->dayofweek); + ndr_print_uint16(ndr, "day", r->day); + ndr_print_uint16(ndr, "hour", r->hour); + ndr_print_uint16(ndr, "minute", r->minute); + ndr_print_uint16(ndr, "second", r->second); + ndr_print_uint16(ndr, "milliseconds", r->milliseconds); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_PERF_COUNTER_DEFINITION(struct ndr_push *ndr, int ndr_flags, const struct PERF_COUNTER_DEFINITION *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ByteLength)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterNameTitleIndex)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterNameTitlePointer)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterHelpTitleIndex)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterHelpTitlePointer)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DefaultScale)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DetailLevel)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterType)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterSize)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterOffset)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_PERF_COUNTER_DEFINITION(struct ndr_pull *ndr, int ndr_flags, struct PERF_COUNTER_DEFINITION *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ByteLength)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CounterNameTitleIndex)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CounterNameTitlePointer)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CounterHelpTitleIndex)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CounterHelpTitlePointer)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DefaultScale)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DetailLevel)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CounterType)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CounterSize)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CounterOffset)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PERF_COUNTER_DEFINITION(struct ndr_print *ndr, const char *name, const struct PERF_COUNTER_DEFINITION *r) +{ + ndr_print_struct(ndr, name, "PERF_COUNTER_DEFINITION"); + ndr->depth++; + ndr_print_uint32(ndr, "ByteLength", r->ByteLength); + ndr_print_uint32(ndr, "CounterNameTitleIndex", r->CounterNameTitleIndex); + ndr_print_uint32(ndr, "CounterNameTitlePointer", r->CounterNameTitlePointer); + ndr_print_uint32(ndr, "CounterHelpTitleIndex", r->CounterHelpTitleIndex); + ndr_print_uint32(ndr, "CounterHelpTitlePointer", r->CounterHelpTitlePointer); + ndr_print_uint32(ndr, "DefaultScale", r->DefaultScale); + ndr_print_uint32(ndr, "DetailLevel", r->DetailLevel); + ndr_print_uint32(ndr, "CounterType", r->CounterType); + ndr_print_uint32(ndr, "CounterSize", r->CounterSize); + ndr_print_uint32(ndr, "CounterOffset", r->CounterOffset); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_PERF_COUNTER_BLOCK(struct ndr_push *ndr, int ndr_flags, const struct PERF_COUNTER_BLOCK *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ByteLength)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->ByteLength)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_PERF_COUNTER_BLOCK(struct ndr_pull *ndr, int ndr_flags, struct PERF_COUNTER_BLOCK *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ByteLength)); + NDR_PULL_ALLOC_N(ndr, r->data, r->ByteLength); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, r->ByteLength)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PERF_COUNTER_BLOCK(struct ndr_print *ndr, const char *name, const struct PERF_COUNTER_BLOCK *r) +{ + ndr_print_struct(ndr, name, "PERF_COUNTER_BLOCK"); + ndr->depth++; + ndr_print_uint32(ndr, "ByteLength", r->ByteLength); + ndr_print_array_uint8(ndr, "data", r->data, r->ByteLength); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_PERF_INSTANCE_DEFINITION(struct ndr_push *ndr, int ndr_flags, const struct PERF_INSTANCE_DEFINITION *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 5)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ByteLength)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ParentObjectTitleIndex)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ParentObjectTitlePointer)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->UniqueID)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->NameOffset)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->NameLength)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); + NDR_CHECK(ndr_push_PERF_COUNTER_BLOCK(ndr, NDR_SCALARS, &r->counter_data)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->data) { + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->data)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_PERF_INSTANCE_DEFINITION(struct ndr_pull *ndr, int ndr_flags, struct PERF_INSTANCE_DEFINITION *r) +{ + uint32_t _ptr_data; + TALLOC_CTX *_mem_save_data_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 5)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ByteLength)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ParentObjectTitleIndex)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ParentObjectTitlePointer)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->UniqueID)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->NameOffset)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->NameLength)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data)); + if (_ptr_data) { + NDR_PULL_ALLOC(ndr, r->data); + } else { + r->data = NULL; + } + NDR_CHECK(ndr_pull_PERF_COUNTER_BLOCK(ndr, NDR_SCALARS, &r->counter_data)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->data) { + _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->data, 0); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->data)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PERF_INSTANCE_DEFINITION(struct ndr_print *ndr, const char *name, const struct PERF_INSTANCE_DEFINITION *r) +{ + ndr_print_struct(ndr, name, "PERF_INSTANCE_DEFINITION"); + ndr->depth++; + ndr_print_uint32(ndr, "ByteLength", r->ByteLength); + ndr_print_uint32(ndr, "ParentObjectTitleIndex", r->ParentObjectTitleIndex); + ndr_print_uint32(ndr, "ParentObjectTitlePointer", r->ParentObjectTitlePointer); + ndr_print_uint32(ndr, "UniqueID", r->UniqueID); + ndr_print_uint32(ndr, "NameOffset", r->NameOffset); + ndr_print_uint32(ndr, "NameLength", r->NameLength); + ndr_print_ptr(ndr, "data", r->data); + ndr->depth++; + if (r->data) { + ndr_print_uint8(ndr, "data", *r->data); + } + ndr->depth--; + ndr_print_PERF_COUNTER_BLOCK(ndr, "counter_data", &r->counter_data); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_PERF_OBJECT_TYPE(struct ndr_push *ndr, int ndr_flags, const struct PERF_OBJECT_TYPE *r) +{ + uint32_t cntr_counters_0; + uint32_t cntr_instances_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 8)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->TotalByteLength)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DefinitionLength)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->HeaderLength)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ObjectNameTitleIndex)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ObjectNameTitlePointer)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ObjectHelpTitleIndex)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ObjectHelpTitlePointer)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DetailLevel)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->NumCounters)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DefaultCounter)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->NumInstances)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CodePage)); + NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->PerfTime)); + NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->PerfFreq)); + for (cntr_counters_0 = 0; cntr_counters_0 < r->NumCounters; cntr_counters_0++) { + NDR_CHECK(ndr_push_PERF_COUNTER_DEFINITION(ndr, NDR_SCALARS, &r->counters[cntr_counters_0])); + } + for (cntr_instances_0 = 0; cntr_instances_0 < r->NumInstances; cntr_instances_0++) { + NDR_CHECK(ndr_push_PERF_INSTANCE_DEFINITION(ndr, NDR_SCALARS, &r->instances[cntr_instances_0])); + } + NDR_CHECK(ndr_push_PERF_COUNTER_BLOCK(ndr, NDR_SCALARS, &r->counter_data)); + } + if (ndr_flags & NDR_BUFFERS) { + for (cntr_instances_0 = 0; cntr_instances_0 < r->NumInstances; cntr_instances_0++) { + NDR_CHECK(ndr_push_PERF_INSTANCE_DEFINITION(ndr, NDR_BUFFERS, &r->instances[cntr_instances_0])); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_PERF_OBJECT_TYPE(struct ndr_pull *ndr, int ndr_flags, struct PERF_OBJECT_TYPE *r) +{ + uint32_t cntr_counters_0; + TALLOC_CTX *_mem_save_counters_0; + uint32_t cntr_instances_0; + TALLOC_CTX *_mem_save_instances_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 8)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->TotalByteLength)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DefinitionLength)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->HeaderLength)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ObjectNameTitleIndex)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ObjectNameTitlePointer)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ObjectHelpTitleIndex)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ObjectHelpTitlePointer)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DetailLevel)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->NumCounters)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DefaultCounter)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->NumInstances)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CodePage)); + NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->PerfTime)); + NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->PerfFreq)); + NDR_PULL_ALLOC_N(ndr, r->counters, r->NumCounters); + _mem_save_counters_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->counters, 0); + for (cntr_counters_0 = 0; cntr_counters_0 < r->NumCounters; cntr_counters_0++) { + NDR_CHECK(ndr_pull_PERF_COUNTER_DEFINITION(ndr, NDR_SCALARS, &r->counters[cntr_counters_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_counters_0, 0); + NDR_PULL_ALLOC_N(ndr, r->instances, r->NumInstances); + _mem_save_instances_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->instances, 0); + for (cntr_instances_0 = 0; cntr_instances_0 < r->NumInstances; cntr_instances_0++) { + NDR_CHECK(ndr_pull_PERF_INSTANCE_DEFINITION(ndr, NDR_SCALARS, &r->instances[cntr_instances_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_instances_0, 0); + NDR_CHECK(ndr_pull_PERF_COUNTER_BLOCK(ndr, NDR_SCALARS, &r->counter_data)); + } + if (ndr_flags & NDR_BUFFERS) { + _mem_save_instances_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->instances, 0); + for (cntr_instances_0 = 0; cntr_instances_0 < r->NumInstances; cntr_instances_0++) { + NDR_CHECK(ndr_pull_PERF_INSTANCE_DEFINITION(ndr, NDR_BUFFERS, &r->instances[cntr_instances_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_instances_0, 0); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PERF_OBJECT_TYPE(struct ndr_print *ndr, const char *name, const struct PERF_OBJECT_TYPE *r) +{ + uint32_t cntr_counters_0; + uint32_t cntr_instances_0; + ndr_print_struct(ndr, name, "PERF_OBJECT_TYPE"); + ndr->depth++; + ndr_print_uint32(ndr, "TotalByteLength", r->TotalByteLength); + ndr_print_uint32(ndr, "DefinitionLength", r->DefinitionLength); + ndr_print_uint32(ndr, "HeaderLength", r->HeaderLength); + ndr_print_uint32(ndr, "ObjectNameTitleIndex", r->ObjectNameTitleIndex); + ndr_print_uint32(ndr, "ObjectNameTitlePointer", r->ObjectNameTitlePointer); + ndr_print_uint32(ndr, "ObjectHelpTitleIndex", r->ObjectHelpTitleIndex); + ndr_print_uint32(ndr, "ObjectHelpTitlePointer", r->ObjectHelpTitlePointer); + ndr_print_uint32(ndr, "DetailLevel", r->DetailLevel); + ndr_print_uint32(ndr, "NumCounters", r->NumCounters); + ndr_print_uint32(ndr, "DefaultCounter", r->DefaultCounter); + ndr_print_uint32(ndr, "NumInstances", r->NumInstances); + ndr_print_uint32(ndr, "CodePage", r->CodePage); + ndr_print_hyper(ndr, "PerfTime", r->PerfTime); + ndr_print_hyper(ndr, "PerfFreq", r->PerfFreq); + ndr->print(ndr, "%s: ARRAY(%d)", "counters", (int)r->NumCounters); + ndr->depth++; + for (cntr_counters_0=0;cntr_counters_0<r->NumCounters;cntr_counters_0++) { + char *idx_0=NULL; + if (asprintf(&idx_0, "[%d]", cntr_counters_0) != -1) { + ndr_print_PERF_COUNTER_DEFINITION(ndr, "counters", &r->counters[cntr_counters_0]); + free(idx_0); + } + } + ndr->depth--; + ndr->print(ndr, "%s: ARRAY(%d)", "instances", (int)r->NumInstances); + ndr->depth++; + for (cntr_instances_0=0;cntr_instances_0<r->NumInstances;cntr_instances_0++) { + char *idx_0=NULL; + if (asprintf(&idx_0, "[%d]", cntr_instances_0) != -1) { + ndr_print_PERF_INSTANCE_DEFINITION(ndr, "instances", &r->instances[cntr_instances_0]); + free(idx_0); + } + } + ndr->depth--; + ndr_print_PERF_COUNTER_BLOCK(ndr, "counter_data", &r->counter_data); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_PERF_DATA_BLOCK(struct ndr_push *ndr, int ndr_flags, const struct PERF_DATA_BLOCK *r) +{ + uint32_t cntr_Signature_0; + uint32_t cntr_objects_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 8)); + for (cntr_Signature_0 = 0; cntr_Signature_0 < 4; cntr_Signature_0++) { + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Signature[cntr_Signature_0])); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->LittleEndian)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Version)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Revision)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->TotalByteLength)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->HeaderLength)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->NumObjectTypes)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DefaultObject)); + NDR_CHECK(ndr_push_SYSTEMTIME(ndr, NDR_SCALARS, &r->SystemTime)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Padding)); + NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->PerfTime)); + NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->PerfFreq)); + NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->PerfTime100nSec)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SystemNameLength)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SystemNameOffset)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); + for (cntr_objects_0 = 0; cntr_objects_0 < r->NumObjectTypes; cntr_objects_0++) { + NDR_CHECK(ndr_push_PERF_OBJECT_TYPE(ndr, NDR_SCALARS, &r->objects[cntr_objects_0])); + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->data) { + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->data)); + } + for (cntr_objects_0 = 0; cntr_objects_0 < r->NumObjectTypes; cntr_objects_0++) { + NDR_CHECK(ndr_push_PERF_OBJECT_TYPE(ndr, NDR_BUFFERS, &r->objects[cntr_objects_0])); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_PERF_DATA_BLOCK(struct ndr_pull *ndr, int ndr_flags, struct PERF_DATA_BLOCK *r) +{ + uint32_t cntr_Signature_0; + uint32_t _ptr_data; + TALLOC_CTX *_mem_save_data_0; + uint32_t cntr_objects_0; + TALLOC_CTX *_mem_save_objects_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 8)); + for (cntr_Signature_0 = 0; cntr_Signature_0 < 4; cntr_Signature_0++) { + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Signature[cntr_Signature_0])); + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->LittleEndian)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Version)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Revision)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->TotalByteLength)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->HeaderLength)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->NumObjectTypes)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DefaultObject)); + NDR_CHECK(ndr_pull_SYSTEMTIME(ndr, NDR_SCALARS, &r->SystemTime)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Padding)); + NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->PerfTime)); + NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->PerfFreq)); + NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->PerfTime100nSec)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SystemNameLength)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SystemNameOffset)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data)); + if (_ptr_data) { + NDR_PULL_ALLOC(ndr, r->data); + } else { + r->data = NULL; + } + NDR_PULL_ALLOC_N(ndr, r->objects, r->NumObjectTypes); + _mem_save_objects_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->objects, 0); + for (cntr_objects_0 = 0; cntr_objects_0 < r->NumObjectTypes; cntr_objects_0++) { + NDR_CHECK(ndr_pull_PERF_OBJECT_TYPE(ndr, NDR_SCALARS, &r->objects[cntr_objects_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_objects_0, 0); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->data) { + _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->data, 0); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->data)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0); + } + _mem_save_objects_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->objects, 0); + for (cntr_objects_0 = 0; cntr_objects_0 < r->NumObjectTypes; cntr_objects_0++) { + NDR_CHECK(ndr_pull_PERF_OBJECT_TYPE(ndr, NDR_BUFFERS, &r->objects[cntr_objects_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_objects_0, 0); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PERF_DATA_BLOCK(struct ndr_print *ndr, const char *name, const struct PERF_DATA_BLOCK *r) +{ + uint32_t cntr_Signature_0; + uint32_t cntr_objects_0; + ndr_print_struct(ndr, name, "PERF_DATA_BLOCK"); + ndr->depth++; + ndr->print(ndr, "%s: ARRAY(%d)", "Signature", (int)4); + ndr->depth++; + for (cntr_Signature_0=0;cntr_Signature_0<4;cntr_Signature_0++) { + char *idx_0=NULL; + if (asprintf(&idx_0, "[%d]", cntr_Signature_0) != -1) { + ndr_print_uint16(ndr, "Signature", r->Signature[cntr_Signature_0]); + free(idx_0); + } + } + ndr->depth--; + ndr_print_uint32(ndr, "LittleEndian", r->LittleEndian); + ndr_print_uint32(ndr, "Version", r->Version); + ndr_print_uint32(ndr, "Revision", r->Revision); + ndr_print_uint32(ndr, "TotalByteLength", r->TotalByteLength); + ndr_print_uint32(ndr, "HeaderLength", r->HeaderLength); + ndr_print_uint32(ndr, "NumObjectTypes", r->NumObjectTypes); + ndr_print_uint32(ndr, "DefaultObject", r->DefaultObject); + ndr_print_SYSTEMTIME(ndr, "SystemTime", &r->SystemTime); + ndr_print_uint32(ndr, "Padding", r->Padding); + ndr_print_hyper(ndr, "PerfTime", r->PerfTime); + ndr_print_hyper(ndr, "PerfFreq", r->PerfFreq); + ndr_print_hyper(ndr, "PerfTime100nSec", r->PerfTime100nSec); + ndr_print_uint32(ndr, "SystemNameLength", r->SystemNameLength); + ndr_print_uint32(ndr, "SystemNameOffset", r->SystemNameOffset); + ndr_print_ptr(ndr, "data", r->data); + ndr->depth++; + if (r->data) { + ndr_print_uint8(ndr, "data", *r->data); + } + ndr->depth--; + ndr->print(ndr, "%s: ARRAY(%d)", "objects", (int)r->NumObjectTypes); + ndr->depth++; + for (cntr_objects_0=0;cntr_objects_0<r->NumObjectTypes;cntr_objects_0++) { + char *idx_0=NULL; + if (asprintf(&idx_0, "[%d]", cntr_objects_0) != -1) { + ndr_print_PERF_OBJECT_TYPE(ndr, "objects", &r->objects[cntr_objects_0]); + free(idx_0); + } + } + ndr->depth--; + ndr->depth--; +} + diff --git a/source3/librpc/gen_ndr/ndr_perfcount.h b/source3/librpc/gen_ndr/ndr_perfcount.h new file mode 100644 index 0000000000..8697bf08d2 --- /dev/null +++ b/source3/librpc/gen_ndr/ndr_perfcount.h @@ -0,0 +1,26 @@ +/* header auto-generated by pidl */ + +#include "librpc/ndr/libndr.h" +#include "librpc/gen_ndr/perfcount.h" + +#ifndef _HEADER_NDR_perfcount +#define _HEADER_NDR_perfcount + +#define NDR_PERFCOUNT_CALL_COUNT (0) +void ndr_print_SYSTEMTIME(struct ndr_print *ndr, const char *name, const struct SYSTEMTIME *r); +enum ndr_err_code ndr_push_PERF_COUNTER_DEFINITION(struct ndr_push *ndr, int ndr_flags, const struct PERF_COUNTER_DEFINITION *r); +enum ndr_err_code ndr_pull_PERF_COUNTER_DEFINITION(struct ndr_pull *ndr, int ndr_flags, struct PERF_COUNTER_DEFINITION *r); +void ndr_print_PERF_COUNTER_DEFINITION(struct ndr_print *ndr, const char *name, const struct PERF_COUNTER_DEFINITION *r); +enum ndr_err_code ndr_push_PERF_COUNTER_BLOCK(struct ndr_push *ndr, int ndr_flags, const struct PERF_COUNTER_BLOCK *r); +enum ndr_err_code ndr_pull_PERF_COUNTER_BLOCK(struct ndr_pull *ndr, int ndr_flags, struct PERF_COUNTER_BLOCK *r); +void ndr_print_PERF_COUNTER_BLOCK(struct ndr_print *ndr, const char *name, const struct PERF_COUNTER_BLOCK *r); +enum ndr_err_code ndr_push_PERF_INSTANCE_DEFINITION(struct ndr_push *ndr, int ndr_flags, const struct PERF_INSTANCE_DEFINITION *r); +enum ndr_err_code ndr_pull_PERF_INSTANCE_DEFINITION(struct ndr_pull *ndr, int ndr_flags, struct PERF_INSTANCE_DEFINITION *r); +void ndr_print_PERF_INSTANCE_DEFINITION(struct ndr_print *ndr, const char *name, const struct PERF_INSTANCE_DEFINITION *r); +enum ndr_err_code ndr_push_PERF_OBJECT_TYPE(struct ndr_push *ndr, int ndr_flags, const struct PERF_OBJECT_TYPE *r); +enum ndr_err_code ndr_pull_PERF_OBJECT_TYPE(struct ndr_pull *ndr, int ndr_flags, struct PERF_OBJECT_TYPE *r); +void ndr_print_PERF_OBJECT_TYPE(struct ndr_print *ndr, const char *name, const struct PERF_OBJECT_TYPE *r); +enum ndr_err_code ndr_push_PERF_DATA_BLOCK(struct ndr_push *ndr, int ndr_flags, const struct PERF_DATA_BLOCK *r); +enum ndr_err_code ndr_pull_PERF_DATA_BLOCK(struct ndr_pull *ndr, int ndr_flags, struct PERF_DATA_BLOCK *r); +void ndr_print_PERF_DATA_BLOCK(struct ndr_print *ndr, const char *name, const struct PERF_DATA_BLOCK *r); +#endif /* _HEADER_NDR_perfcount */ diff --git a/source3/librpc/gen_ndr/perfcount.h b/source3/librpc/gen_ndr/perfcount.h new file mode 100644 index 0000000000..cafce4f604 --- /dev/null +++ b/source3/librpc/gen_ndr/perfcount.h @@ -0,0 +1,129 @@ +/* header auto-generated by pidl */ + +#include <stdint.h> + +#include "libcli/util/ntstatus.h" + +#ifndef _HEADER_perfcount +#define _HEADER_perfcount + +#define PERF_NO_INSTANCES ( -1 ) +#define PERF_NO_UNIQUE_ID ( -1 ) +#define PERF_SIZE_DWORD ( 0x00000000 ) +#define PERF_SIZE_LARGE ( 0x00000100 ) +#define PERF_SIZE_ZERO ( 0x00000200 ) +#define PERF_SIZE_VARIABLE_LEN ( 0x00000300 ) +#define PERF_TYPE_NUMBER ( 0x00000000 ) +#define PERF_TYPE_COUNTER ( 0x00000400 ) +#define PERF_TYPE_TEXT ( 0x00000800 ) +#define PERF_TYPE_ZERO ( 0x00000C00 ) +#define PERF_NUMBER_HEX ( 0x00000000 ) +#define PERF_NUMBER_DECIMAL ( 0x00010000 ) +#define PERF_NUMBER_DEC_1000 ( 0x00020000 ) +#define PERF_COUNTER_VALUE ( 0x00000000 ) +#define PERF_COUNTER_RATE ( 0x00010000 ) +#define PERF_COUNTER_FRACTION ( 0x00020000 ) +#define PERF_COUNTER_BASE ( 0x00030000 ) +#define PERF_COUNTER_ELAPSED ( 0x00040000 ) +#define PERF_COUNTER_QUEUELEN ( 0x00050000 ) +#define PERF_COUNTER_HISTOGRAM ( 0x00060000 ) +#define PERF_COUNTER_PRECISION ( 0x00070000 ) +#define PERF_TEXT_UNICODE ( 0x00000000 ) +#define PERF_TEXT_ASCII ( 0x00010000 ) +#define PERF_TIMER_TICK ( 0x00000000 ) +#define PERF_TIMER_100NS ( 0x00100000 ) +#define PERF_OBJECT_TIMER ( 0x00200000 ) +#define PERF_DELTA_COUNTER ( 0x00400000 ) +#define PERF_DELTA_BASE ( 0x00800000 ) +#define PERF_INVERSE_COUNTER ( 0x01000000 ) +#define PERF_MULTI_COUNTER ( 0x02000000 ) +#define PERF_DISPLAY_NO_SUFFIX ( 0x00000000 ) +#define PERF_DISPLAY_PER_SEC ( 0x10000000 ) +#define PERF_DISPLAY_PERCENT ( 0x20000000 ) +#define PERF_DISPLAY_SECONDS ( 0x30000000 ) +#define PERF_DISPLAY_NOSHOW ( 0x40000000 ) +#define PERF_DETAIL_NOVICE ( 100 ) +#define PERF_DETAIL_ADVANCED ( 200 ) +#define PERF_DETAIL_EXPERT ( 300 ) +#define PERF_DETAIL_WIZARD ( 400 ) +struct SYSTEMTIME { + uint16_t year; + uint16_t month; + uint16_t dayofweek; + uint16_t day; + uint16_t hour; + uint16_t minute; + uint16_t second; + uint16_t milliseconds; +}; + +struct PERF_COUNTER_DEFINITION { + uint32_t ByteLength; + uint32_t CounterNameTitleIndex; + uint32_t CounterNameTitlePointer; + uint32_t CounterHelpTitleIndex; + uint32_t CounterHelpTitlePointer; + uint32_t DefaultScale; + uint32_t DetailLevel; + uint32_t CounterType; + uint32_t CounterSize; + uint32_t CounterOffset; +}/* [public] */; + +struct PERF_COUNTER_BLOCK { + uint32_t ByteLength; + uint8_t *data; +}/* [public] */; + +struct PERF_INSTANCE_DEFINITION { + uint32_t ByteLength; + uint32_t ParentObjectTitleIndex; + uint32_t ParentObjectTitlePointer; + uint32_t UniqueID; + uint32_t NameOffset; + uint32_t NameLength; + uint8_t *data;/* [unique] */ + struct PERF_COUNTER_BLOCK counter_data; +}/* [public] */; + +struct PERF_OBJECT_TYPE { + uint32_t TotalByteLength; + uint32_t DefinitionLength; + uint32_t HeaderLength; + uint32_t ObjectNameTitleIndex; + uint32_t ObjectNameTitlePointer; + uint32_t ObjectHelpTitleIndex; + uint32_t ObjectHelpTitlePointer; + uint32_t DetailLevel; + uint32_t NumCounters; + uint32_t DefaultCounter; + uint32_t NumInstances; + uint32_t CodePage; + uint64_t PerfTime; + uint64_t PerfFreq; + struct PERF_COUNTER_DEFINITION *counters; + struct PERF_INSTANCE_DEFINITION *instances; + struct PERF_COUNTER_BLOCK counter_data; +}/* [public] */; + +struct PERF_DATA_BLOCK { + uint16_t Signature[4]; + uint32_t LittleEndian; + uint32_t Version; + uint32_t Revision; + uint32_t TotalByteLength; + uint32_t HeaderLength; + uint32_t NumObjectTypes; + uint32_t DefaultObject; + struct SYSTEMTIME SystemTime; + uint32_t Padding; + uint64_t PerfTime; + uint64_t PerfFreq; + uint64_t PerfTime100nSec; + uint32_t SystemNameLength; + uint32_t SystemNameOffset; + uint8_t *data;/* [unique] */ + struct PERF_OBJECT_TYPE *objects; +}/* [public] */; + +#endif /* _HEADER_perfcount */ |