netlogon-idl: use netr_ChangeLogEntry subcontext in netr_DatabaseRedo.
[Samba/bb.git] / source / include / rpc_perfcount.h
blob0cb2fdc2126b2abf9f7d71194b294b0fb2bf364f
1 #ifndef _RPC_PERFCOUNT_H
2 #define _RPC_PERFCOUNT_H
3 /*
4 * Unix SMB/CIFS implementation.
5 * Virtual Windows Registry Layer
7 * Copyright (C) Marcin Krzysztof Porwit 2005,
8 * Copyright (C) Gerald (Jerry) Carter 2005.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 3 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see <http://www.gnu.org/licenses/>.
24 typedef struct perf_counter_definition
26 /* sizeof(PERF_COUNTER_DEFINITION) */
27 uint32 ByteLength;
28 uint32 CounterNameTitleIndex;
29 uint32 CounterNameTitlePointer;
30 uint32 CounterHelpTitleIndex;
31 uint32 CounterHelpTitlePointer;
32 uint32 DefaultScale;
33 uint32 DetailLevel;
34 uint32 CounterType;
35 uint32 CounterSize;
36 uint32 CounterOffset;
38 PERF_COUNTER_DEFINITION;
40 typedef struct perf_counter_block
42 /* Total size of the data block, including all data plus this header */
43 uint32 ByteLength;
44 uint8 *data;
46 PERF_COUNTER_BLOCK;
48 typedef struct perf_instance_definition
50 /* Total size of the instance definition, including the length of the terminated Name string */
51 uint32 ByteLength;
52 uint32 ParentObjectTitleIndex;
53 uint32 ParentObjectTitlePointer;
54 uint32 UniqueID;
55 /* From the start of the PERF_INSTANCE_DEFINITION, the byte offset to the start of the Name string */
56 uint32 NameOffset;
57 uint32 NameLength;
58 /* Unicode string containing the name for the instance */
59 uint8 *data;
60 PERF_COUNTER_BLOCK counter_data;
62 PERF_INSTANCE_DEFINITION;
64 typedef struct perf_object_type
66 /* Total size of the object block, including all PERF_INSTANCE_DEFINITIONs,
67 PERF_COUNTER_DEFINITIONs and PERF_COUNTER_BLOCKs in bytes */
68 uint32 TotalByteLength;
69 /* Size of this PERF_OBJECT_TYPE plus all PERF_COUNTER_DEFINITIONs in bytes */
70 uint32 DefinitionLength;
71 /* Size of this PERF_OBJECT_TYPE */
72 uint32 HeaderLength;
73 uint32 ObjectNameTitleIndex;
74 uint32 ObjectNameTitlePointer;
75 uint32 ObjectHelpTitleIndex;
76 uint32 ObjectHelpTitlePointer;
77 uint32 DetailLevel;
78 uint32 NumCounters;
79 uint32 DefaultCounter;
80 uint32 NumInstances;
81 uint32 CodePage;
82 uint64 PerfTime;
83 uint64 PerfFreq;
84 PERF_COUNTER_DEFINITION *counters;
85 PERF_INSTANCE_DEFINITION *instances;
86 PERF_COUNTER_BLOCK counter_data;
88 PERF_OBJECT_TYPE;
90 /* PerfCounter Inner Buffer structs */
91 typedef struct perf_data_block
93 /* hardcoded to read "P.E.R.F" */
94 uint16 Signature[4];
95 uint32 LittleEndian;
96 /* both currently hardcoded to 1 */
97 uint32 Version;
98 uint32 Revision;
99 /* bytes of PERF_OBJECT_TYPE data, does NOT include the PERF_DATA_BLOCK */
100 uint32 TotalByteLength;
101 /* size of PERF_DATA_BLOCK including the uint8 *data */
102 uint32 HeaderLength;
103 /* number of PERF_OBJECT_TYPE structures encoded */
104 uint32 NumObjectTypes;
105 uint32 DefaultObject;
106 SYSTEMTIME SystemTime;
107 /* This will guarantee that we're on a 64-bit boundary before we encode
108 PerfTime, and having it there will make my offset math much easier. */
109 uint32 Padding;
110 /* Now when I'm marshalling this, I'll need to call prs_align_uint64()
111 before I start encodint the uint64 structs */
112 /* clock rate * seconds uptime */
113 uint64 PerfTime;
114 /* The clock rate of the CPU */
115 uint64 PerfFreq;
116 /* used for high-res timers -- for now PerfTime * 10e7 */
117 uint64 PerfTime100nSec;
118 uint32 SystemNameLength;
119 uint32 SystemNameOffset;
120 /* The SystemName, in unicode, terminated */
121 uint8* data;
122 PERF_OBJECT_TYPE *objects;
124 PERF_DATA_BLOCK;
126 #endif /* _RPC_PERFCOUNT_H */