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 2 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, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 typedef struct perf_counter_definition
27 /* sizeof(PERF_COUNTER_DEFINITION) */
29 uint32 CounterNameTitleIndex
;
30 uint32 CounterNameTitlePointer
;
31 uint32 CounterHelpTitleIndex
;
32 uint32 CounterHelpTitlePointer
;
39 PERF_COUNTER_DEFINITION
;
41 typedef struct perf_counter_block
43 /* Total size of the data block, including all data plus this header */
49 typedef struct perf_instance_definition
51 /* Total size of the instance definition, including the length of the terminated Name string */
53 uint32 ParentObjectTitleIndex
;
54 uint32 ParentObjectTitlePointer
;
56 /* From the start of the PERF_INSTANCE_DEFINITION, the byte offset to the start of the Name string */
59 /* Unicode string containing the name for the instance */
61 PERF_COUNTER_BLOCK counter_data
;
63 PERF_INSTANCE_DEFINITION
;
65 typedef struct perf_object_type
67 /* Total size of the object block, including all PERF_INSTANCE_DEFINITIONs,
68 PERF_COUNTER_DEFINITIONs and PERF_COUNTER_BLOCKs in bytes */
69 uint32 TotalByteLength
;
70 /* Size of this PERF_OBJECT_TYPE plus all PERF_COUNTER_DEFINITIONs in bytes */
71 uint32 DefinitionLength
;
72 /* Size of this PERF_OBJECT_TYPE */
74 uint32 ObjectNameTitleIndex
;
75 uint32 ObjectNameTitlePointer
;
76 uint32 ObjectHelpTitleIndex
;
77 uint32 ObjectHelpTitlePointer
;
80 uint32 DefaultCounter
;
85 PERF_COUNTER_DEFINITION
*counters
;
86 PERF_INSTANCE_DEFINITION
*instances
;
87 PERF_COUNTER_BLOCK counter_data
;
91 /* PerfCounter Inner Buffer structs */
92 typedef struct perf_data_block
94 /* hardcoded to read "P.E.R.F" */
97 /* both currently hardcoded to 1 */
100 /* bytes of PERF_OBJECT_TYPE data, does NOT include the PERF_DATA_BLOCK */
101 uint32 TotalByteLength
;
102 /* size of PERF_DATA_BLOCK including the uint8 *data */
104 /* number of PERF_OBJECT_TYPE structures encoded */
105 uint32 NumObjectTypes
;
106 uint32 DefaultObject
;
107 SYSTEMTIME SystemTime
;
108 /* This will guarantee that we're on a 64-bit boundary before we encode
109 PerfTime, and having it there will make my offset math much easier. */
111 /* Now when I'm marshalling this, I'll need to call prs_align_uint64()
112 before I start encodint the uint64 structs */
113 /* clock rate * seconds uptime */
115 /* The clock rate of the CPU */
117 /* used for high-res timers -- for now PerfTime * 10e7 */
118 uint64 PerfTime100nSec
;
119 uint32 SystemNameLength
;
120 uint32 SystemNameOffset
;
121 /* The SystemName, in unicode, terminated */
123 PERF_OBJECT_TYPE
*objects
;
127 #endif /* _RPC_PERFCOUNT_H */