r10224: add {Unl,L}ockServiceDatabase() to get srvmgr.exe to work
[Samba.git] / source / include / rpc_perfcount.h
blob0e3a6eb018181f40644dff6e6d519d26735c077d
1 #ifndef _RPC_PERFCOUNT_H
2 #define _RPC_PERFCOUNT_H
4 typedef struct perf_counter_definition
6 /* sizeof(PERF_COUNTER_DEFINITION) */
7 uint32 ByteLength;
8 uint32 CounterNameTitleIndex;
9 uint32 CounterNameTitlePointer;
10 uint32 CounterHelpTitleIndex;
11 uint32 CounterHelpTitlePointer;
12 uint32 DefaultScale;
13 uint32 DetailLevel;
14 uint32 CounterType;
15 uint32 CounterSize;
16 uint32 CounterOffset;
18 PERF_COUNTER_DEFINITION;
20 typedef struct perf_counter_block
22 /* Total size of the data block, including all data plus this header */
23 uint32 ByteLength;
24 uint8 *data;
26 PERF_COUNTER_BLOCK;
28 typedef struct perf_instance_definition
30 /* Total size of the instance definition, including the length of the terminated Name string */
31 uint32 ByteLength;
32 uint32 ParentObjectTitleIndex;
33 uint32 ParentObjectTitlePointer;
34 uint32 UniqueID;
35 /* From the start of the PERF_INSTANCE_DEFINITION, the byte offset to the start of the Name string */
36 uint32 NameOffset;
37 uint32 NameLength;
38 /* Unicode string containing the name for the instance */
39 uint8 *data;
40 PERF_COUNTER_BLOCK counter_data;
42 PERF_INSTANCE_DEFINITION;
44 typedef struct perf_object_type
46 /* Total size of the object block, including all PERF_INSTANCE_DEFINITIONs,
47 PERF_COUNTER_DEFINITIONs and PERF_COUNTER_BLOCKs in bytes */
48 uint32 TotalByteLength;
49 /* Size of this PERF_OBJECT_TYPE plus all PERF_COUNTER_DEFINITIONs in bytes */
50 uint32 DefinitionLength;
51 /* Size of this PERF_OBJECT_TYPE */
52 uint32 HeaderLength;
53 uint32 ObjectNameTitleIndex;
54 uint32 ObjectNameTitlePointer;
55 uint32 ObjectHelpTitleIndex;
56 uint32 ObjectHelpTitlePointer;
57 uint32 DetailLevel;
58 uint32 NumCounters;
59 uint32 DefaultCounter;
60 uint32 NumInstances;
61 uint32 CodePage;
62 UINT64_S PerfTime;
63 UINT64_S PerfFreq;
64 PERF_COUNTER_DEFINITION *counters;
65 PERF_INSTANCE_DEFINITION *instances;
66 PERF_COUNTER_BLOCK counter_data;
68 PERF_OBJECT_TYPE;
70 /* PerfCounter Inner Buffer structs */
71 typedef struct perf_data_block
73 /* hardcoded to read "P.E.R.F" */
74 uint16 Signature[4];
75 uint32 LittleEndian;
76 /* both currently hardcoded to 1 */
77 uint32 Version;
78 uint32 Revision;
79 /* bytes of PERF_OBJECT_TYPE data, does NOT include the PERF_DATA_BLOCK */
80 uint32 TotalByteLength;
81 /* size of PERF_DATA_BLOCK including the uint8 *data */
82 uint32 HeaderLength;
83 /* number of PERF_OBJECT_TYPE structures encoded */
84 uint32 NumObjectTypes;
85 uint32 DefaultObject;
86 SYSTEMTIME SystemTime;
87 /* This will guarantee that we're on a 64-bit boundary before we encode
88 PerfTime, and having it there will make my offset math much easier. */
89 uint32 Padding;
90 /* Now when I'm marshalling this, I'll need to call prs_align_uint64()
91 before I start encodint the UINT64_S structs */
92 /* clock rate * seconds uptime */
93 UINT64_S PerfTime;
94 /* The clock rate of the CPU */
95 UINT64_S PerfFreq;
96 /* used for high-res timers -- for now PerfTime * 10e7 */
97 UINT64_S PerfTime100nSec;
98 uint32 SystemNameLength;
99 uint32 SystemNameOffset;
100 /* The SystemName, in unicode, terminated */
101 uint8* data;
102 PERF_OBJECT_TYPE *objects;
104 PERF_DATA_BLOCK;
106 #endif /* _RPC_PERFCOUNT_H */