• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt/router/samba-3.5.8/source3/librpc/idl/
1#include "idl_types.h"
2
3/*
4   IDL structures for perfcount code
5*/
6
7[
8	pointer_default(unique)
9]
10	interface perfcount
11{
12	const int PERF_NO_INSTANCES		= -1;
13	const int PERF_NO_UNIQUE_ID		= -1;
14
15	/* These determine the data size */
16	const int PERF_SIZE_DWORD		= 0x00000000;
17	const int PERF_SIZE_LARGE		= 0x00000100;
18	const int PERF_SIZE_ZERO		= 0x00000200;
19	const int PERF_SIZE_VARIABLE_LEN	= 0x00000300;
20
21	/* These determine the usage of the counter */
22	const int PERF_TYPE_NUMBER		= 0x00000000;
23	const int PERF_TYPE_COUNTER		= 0x00000400;
24	const int PERF_TYPE_TEXT		= 0x00000800;
25	const int PERF_TYPE_ZERO		= 0x00000C00;
26
27	/* If PERF_TYPE_NUMBER was selected, these provide display information */
28	const int PERF_NUMBER_HEX		= 0x00000000;
29	const int PERF_NUMBER_DECIMAL		= 0x00010000;
30	const int PERF_NUMBER_DEC_1000		= 0x00020000;
31
32	/* If PERF_TYPE_COUNTER was selected, these provide display information */
33	const int PERF_COUNTER_VALUE		= 0x00000000;
34	const int PERF_COUNTER_RATE		= 0x00010000;
35	const int PERF_COUNTER_FRACTION		= 0x00020000;
36	const int PERF_COUNTER_BASE		= 0x00030000;
37	const int PERF_COUNTER_ELAPSED		= 0x00040000;
38	const int PERF_COUNTER_QUEUELEN		= 0x00050000;
39	const int PERF_COUNTER_HISTOGRAM	= 0x00060000;
40	const int PERF_COUNTER_PRECISION	= 0x00070000;
41
42	/* If PERF_TYPE_TEXT was selected, these provide display information */
43	const int PERF_TEXT_UNICODE		= 0x00000000;
44	const int PERF_TEXT_ASCII		= 0x00010000;
45
46	/* These provide information for which tick count to use when computing elapsed interval */
47	const int PERF_TIMER_TICK		= 0x00000000;
48	const int PERF_TIMER_100NS		= 0x00100000;
49	const int PERF_OBJECT_TIMER		= 0x00200000;
50
51	/* These affect how the data is manipulated prior to being displayed */
52	const int PERF_DELTA_COUNTER		= 0x00400000;
53	const int PERF_DELTA_BASE		= 0x00800000;
54	const int PERF_INVERSE_COUNTER		= 0x01000000;
55	const int PERF_MULTI_COUNTER		= 0x02000000;
56
57	/* These determine if any text gets added when the value is displayed */
58	const int PERF_DISPLAY_NO_SUFFIX	= 0x00000000;
59	const int PERF_DISPLAY_PER_SEC		= 0x10000000;
60	const int PERF_DISPLAY_PERCENT		= 0x20000000;
61	const int PERF_DISPLAY_SECONDS		= 0x30000000;
62	const int PERF_DISPLAY_NOSHOW		= 0x40000000;
63
64	/* These determine the DetailLevel of the counter */
65	const int PERF_DETAIL_NOVICE		= 100;
66	const int PERF_DETAIL_ADVANCED		= 200;
67	const int PERF_DETAIL_EXPERT		= 300;
68	const int PERF_DETAIL_WIZARD		= 400;
69
70	typedef struct {
71		uint16 year;
72		uint16 month;
73		uint16 dayofweek;
74		uint16 day;
75		uint16 hour;
76		uint16 minute;
77		uint16 second;
78		uint16 milliseconds;
79	} SYSTEMTIME;
80
81	typedef [public] struct {
82		/* sizeof(PERF_COUNTER_DEFINITION) */
83		uint32 ByteLength;
84		uint32 CounterNameTitleIndex;
85		uint32 CounterNameTitlePointer;
86		uint32 CounterHelpTitleIndex;
87		uint32 CounterHelpTitlePointer;
88		uint32 DefaultScale;
89		uint32 DetailLevel;
90		uint32 CounterType;
91		uint32 CounterSize;
92		uint32 CounterOffset;
93	} PERF_COUNTER_DEFINITION;
94
95	typedef [public] struct {
96		/* Total size of the data block, including all data plus this header */
97		uint32 ByteLength;
98		uint8 data[ByteLength];
99	} PERF_COUNTER_BLOCK;
100
101	typedef [public] struct {
102		/* Total size of the instance definition, including the length of the terminated Name string */
103		uint32 ByteLength;
104		uint32 ParentObjectTitleIndex;
105		uint32 ParentObjectTitlePointer;
106		uint32 UniqueID;
107		/* From the start of the PERF_INSTANCE_DEFINITION, the byte offset to the start of the Name string */
108		uint32 NameOffset;
109		uint32 NameLength;
110		/* Unicode string containing the name for the instance */
111		uint8 *data;
112		PERF_COUNTER_BLOCK counter_data;
113	} PERF_INSTANCE_DEFINITION;
114
115	typedef [public] struct {
116		/* Total size of the object block, including all PERF_INSTANCE_DEFINITIONs,
117		   PERF_COUNTER_DEFINITIONs and PERF_COUNTER_BLOCKs in bytes */
118		uint32 TotalByteLength;
119		/* Size of this PERF_OBJECT_TYPE plus all PERF_COUNTER_DEFINITIONs in bytes */
120		uint32 DefinitionLength;
121		/* Size of this PERF_OBJECT_TYPE */
122		uint32 HeaderLength;
123		uint32 ObjectNameTitleIndex;
124		uint32 ObjectNameTitlePointer;
125		uint32 ObjectHelpTitleIndex;
126		uint32 ObjectHelpTitlePointer;
127		uint32 DetailLevel;
128		uint32 NumCounters;
129		uint32 DefaultCounter;
130		uint32 NumInstances;
131		uint32 CodePage;
132		hyper PerfTime;
133		hyper PerfFreq;
134		PERF_COUNTER_DEFINITION counters[NumCounters];
135		PERF_INSTANCE_DEFINITION instances[NumInstances];
136		PERF_COUNTER_BLOCK counter_data;
137	} PERF_OBJECT_TYPE;
138
139	/* PerfCounter Inner Buffer structs */
140	typedef [public] struct {
141		/* hardcoded to read "P.E.R.F" */
142		uint16 Signature[4];
143		uint32 LittleEndian;
144		/* both currently hardcoded to 1 */
145		uint32 Version;
146		uint32 Revision;
147		/* bytes of PERF_OBJECT_TYPE data, does NOT include the PERF_DATA_BLOCK */
148		uint32 TotalByteLength;
149		/* size of PERF_DATA_BLOCK including the uint8 *data */
150		uint32 HeaderLength;
151		/* number of PERF_OBJECT_TYPE structures encoded */
152		uint32 NumObjectTypes;
153		uint32 DefaultObject;
154		SYSTEMTIME SystemTime;
155		/* This will guarantee that we're on a 64-bit boundary before we encode
156		   PerfTime, and having it there will make my offset math much easier. */
157		uint32 Padding;
158		/* Now when I'm marshalling this, I'll need to call prs_align_uint64()
159		   before I start encodint the uint64 structs */
160		/* clock rate * seconds uptime */
161		hyper PerfTime;
162		/* The clock rate of the CPU */
163		hyper PerfFreq;
164		/* used for high-res timers -- for now PerfTime * 10e7 */
165		hyper PerfTime100nSec;
166		uint32 SystemNameLength;
167		uint32 SystemNameOffset;
168		/* The SystemName, in unicode, terminated */
169		uint8* data;
170		PERF_OBJECT_TYPE objects[NumObjectTypes];
171	} PERF_DATA_BLOCK;
172}
173