1 #ifndef _RPC_PERFCOUNT_H
2 #define _RPC_PERFCOUNT_H
4 * Unix SMB/CIFS implementation.
5 * Virtual Windows Registry Layer
7 * Copyright (C) Marcin Krzysztof Porwit 2005,
8 * Copyright (C) Gerald (Jerry) Carter 2005.
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) */
28 uint32 CounterNameTitleIndex
;
29 uint32 CounterNameTitlePointer
;
30 uint32 CounterHelpTitleIndex
;
31 uint32 CounterHelpTitlePointer
;
38 PERF_COUNTER_DEFINITION
;
40 typedef struct perf_counter_block
42 /* Total size of the data block, including all data plus this header */
48 typedef struct perf_instance_definition
50 /* Total size of the instance definition, including the length of the terminated Name string */
52 uint32 ParentObjectTitleIndex
;
53 uint32 ParentObjectTitlePointer
;
55 /* From the start of the PERF_INSTANCE_DEFINITION, the byte offset to the start of the Name string */
58 /* Unicode string containing the name for the instance */
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 */
73 uint32 ObjectNameTitleIndex
;
74 uint32 ObjectNameTitlePointer
;
75 uint32 ObjectHelpTitleIndex
;
76 uint32 ObjectHelpTitlePointer
;
79 uint32 DefaultCounter
;
84 PERF_COUNTER_DEFINITION
*counters
;
85 PERF_INSTANCE_DEFINITION
*instances
;
86 PERF_COUNTER_BLOCK counter_data
;
90 /* PerfCounter Inner Buffer structs */
91 typedef struct perf_data_block
93 /* hardcoded to read "P.E.R.F" */
96 /* both currently hardcoded to 1 */
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 */
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. */
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 */
114 /* The clock rate of the CPU */
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 */
122 PERF_OBJECT_TYPE
*objects
;
126 #endif /* _RPC_PERFCOUNT_H */