Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/source3/librpc/gen_ndr/ndr_perfcount.h"
5 :
6 0 : static enum ndr_err_code ndr_push_SYSTEMTIME(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SYSTEMTIME *r)
7 : {
8 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9 0 : if (ndr_flags & NDR_SCALARS) {
10 0 : NDR_CHECK(ndr_push_align(ndr, 2));
11 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->year));
12 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->month));
13 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->dayofweek));
14 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->day));
15 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->hour));
16 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->minute));
17 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->second));
18 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->milliseconds));
19 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 2));
20 : }
21 0 : if (ndr_flags & NDR_BUFFERS) {
22 0 : }
23 0 : return NDR_ERR_SUCCESS;
24 : }
25 :
26 0 : static enum ndr_err_code ndr_pull_SYSTEMTIME(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SYSTEMTIME *r)
27 : {
28 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
29 0 : if (ndr_flags & NDR_SCALARS) {
30 0 : NDR_CHECK(ndr_pull_align(ndr, 2));
31 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->year));
32 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->month));
33 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->dayofweek));
34 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->day));
35 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->hour));
36 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->minute));
37 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->second));
38 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->milliseconds));
39 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
40 : }
41 0 : if (ndr_flags & NDR_BUFFERS) {
42 0 : }
43 0 : return NDR_ERR_SUCCESS;
44 : }
45 :
46 0 : _PUBLIC_ void ndr_print_SYSTEMTIME(struct ndr_print *ndr, const char *name, const struct SYSTEMTIME *r)
47 : {
48 0 : ndr_print_struct(ndr, name, "SYSTEMTIME");
49 0 : if (r == NULL) { ndr_print_null(ndr); return; }
50 0 : ndr->depth++;
51 0 : ndr_print_uint16(ndr, "year", r->year);
52 0 : ndr_print_uint16(ndr, "month", r->month);
53 0 : ndr_print_uint16(ndr, "dayofweek", r->dayofweek);
54 0 : ndr_print_uint16(ndr, "day", r->day);
55 0 : ndr_print_uint16(ndr, "hour", r->hour);
56 0 : ndr_print_uint16(ndr, "minute", r->minute);
57 0 : ndr_print_uint16(ndr, "second", r->second);
58 0 : ndr_print_uint16(ndr, "milliseconds", r->milliseconds);
59 0 : ndr->depth--;
60 : }
61 :
62 0 : _PUBLIC_ enum ndr_err_code ndr_push_PERF_COUNTER_DEFINITION(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct PERF_COUNTER_DEFINITION *r)
63 : {
64 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
65 0 : if (ndr_flags & NDR_SCALARS) {
66 0 : NDR_CHECK(ndr_push_align(ndr, 4));
67 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ByteLength));
68 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterNameTitleIndex));
69 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterNameTitlePointer));
70 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterHelpTitleIndex));
71 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterHelpTitlePointer));
72 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DefaultScale));
73 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DetailLevel));
74 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterType));
75 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterSize));
76 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterOffset));
77 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
78 : }
79 0 : if (ndr_flags & NDR_BUFFERS) {
80 0 : }
81 0 : return NDR_ERR_SUCCESS;
82 : }
83 :
84 0 : _PUBLIC_ enum ndr_err_code ndr_pull_PERF_COUNTER_DEFINITION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct PERF_COUNTER_DEFINITION *r)
85 : {
86 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
87 0 : if (ndr_flags & NDR_SCALARS) {
88 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
89 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ByteLength));
90 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CounterNameTitleIndex));
91 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CounterNameTitlePointer));
92 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CounterHelpTitleIndex));
93 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CounterHelpTitlePointer));
94 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DefaultScale));
95 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DetailLevel));
96 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CounterType));
97 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CounterSize));
98 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CounterOffset));
99 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
100 : }
101 0 : if (ndr_flags & NDR_BUFFERS) {
102 0 : }
103 0 : return NDR_ERR_SUCCESS;
104 : }
105 :
106 0 : static void ndr_print_flags_PERF_COUNTER_DEFINITION(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct PERF_COUNTER_DEFINITION *r)
107 : {
108 0 : ndr_print_PERF_COUNTER_DEFINITION(ndr, name, r);
109 0 : }
110 :
111 0 : _PUBLIC_ void ndr_print_PERF_COUNTER_DEFINITION(struct ndr_print *ndr, const char *name, const struct PERF_COUNTER_DEFINITION *r)
112 : {
113 0 : ndr_print_struct(ndr, name, "PERF_COUNTER_DEFINITION");
114 0 : if (r == NULL) { ndr_print_null(ndr); return; }
115 0 : ndr->depth++;
116 0 : ndr_print_uint32(ndr, "ByteLength", r->ByteLength);
117 0 : ndr_print_uint32(ndr, "CounterNameTitleIndex", r->CounterNameTitleIndex);
118 0 : ndr_print_uint32(ndr, "CounterNameTitlePointer", r->CounterNameTitlePointer);
119 0 : ndr_print_uint32(ndr, "CounterHelpTitleIndex", r->CounterHelpTitleIndex);
120 0 : ndr_print_uint32(ndr, "CounterHelpTitlePointer", r->CounterHelpTitlePointer);
121 0 : ndr_print_uint32(ndr, "DefaultScale", r->DefaultScale);
122 0 : ndr_print_uint32(ndr, "DetailLevel", r->DetailLevel);
123 0 : ndr_print_uint32(ndr, "CounterType", r->CounterType);
124 0 : ndr_print_uint32(ndr, "CounterSize", r->CounterSize);
125 0 : ndr_print_uint32(ndr, "CounterOffset", r->CounterOffset);
126 0 : ndr->depth--;
127 : }
128 :
129 0 : _PUBLIC_ enum ndr_err_code ndr_push_PERF_COUNTER_BLOCK(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct PERF_COUNTER_BLOCK *r)
130 : {
131 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
132 0 : if (ndr_flags & NDR_SCALARS) {
133 0 : NDR_CHECK(ndr_push_align(ndr, 4));
134 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ByteLength));
135 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->ByteLength));
136 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
137 : }
138 0 : if (ndr_flags & NDR_BUFFERS) {
139 0 : }
140 0 : return NDR_ERR_SUCCESS;
141 : }
142 :
143 0 : _PUBLIC_ enum ndr_err_code ndr_pull_PERF_COUNTER_BLOCK(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct PERF_COUNTER_BLOCK *r)
144 : {
145 0 : uint32_t size_data_0 = 0;
146 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
147 0 : if (ndr_flags & NDR_SCALARS) {
148 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
149 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ByteLength));
150 0 : size_data_0 = r->ByteLength;
151 0 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_0);
152 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_0));
153 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
154 : }
155 0 : if (ndr_flags & NDR_BUFFERS) {
156 0 : }
157 0 : return NDR_ERR_SUCCESS;
158 : }
159 :
160 0 : static void ndr_print_flags_PERF_COUNTER_BLOCK(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct PERF_COUNTER_BLOCK *r)
161 : {
162 0 : ndr_print_PERF_COUNTER_BLOCK(ndr, name, r);
163 0 : }
164 :
165 0 : _PUBLIC_ void ndr_print_PERF_COUNTER_BLOCK(struct ndr_print *ndr, const char *name, const struct PERF_COUNTER_BLOCK *r)
166 : {
167 0 : ndr_print_struct(ndr, name, "PERF_COUNTER_BLOCK");
168 0 : if (r == NULL) { ndr_print_null(ndr); return; }
169 0 : ndr->depth++;
170 0 : ndr_print_uint32(ndr, "ByteLength", r->ByteLength);
171 0 : ndr_print_array_uint8(ndr, "data", r->data, r->ByteLength);
172 0 : ndr->depth--;
173 : }
174 :
175 0 : _PUBLIC_ enum ndr_err_code ndr_push_PERF_INSTANCE_DEFINITION(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct PERF_INSTANCE_DEFINITION *r)
176 : {
177 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
178 0 : if (ndr_flags & NDR_SCALARS) {
179 0 : NDR_CHECK(ndr_push_align(ndr, 5));
180 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ByteLength));
181 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ParentObjectTitleIndex));
182 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ParentObjectTitlePointer));
183 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->UniqueID));
184 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->NameOffset));
185 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->NameLength));
186 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
187 0 : NDR_CHECK(ndr_push_PERF_COUNTER_BLOCK(ndr, NDR_SCALARS, &r->counter_data));
188 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
189 : }
190 0 : if (ndr_flags & NDR_BUFFERS) {
191 0 : if (r->data) {
192 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->data));
193 : }
194 : }
195 0 : return NDR_ERR_SUCCESS;
196 : }
197 :
198 0 : _PUBLIC_ enum ndr_err_code ndr_pull_PERF_INSTANCE_DEFINITION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct PERF_INSTANCE_DEFINITION *r)
199 : {
200 0 : uint32_t _ptr_data;
201 0 : TALLOC_CTX *_mem_save_data_0 = NULL;
202 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
203 0 : if (ndr_flags & NDR_SCALARS) {
204 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
205 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ByteLength));
206 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ParentObjectTitleIndex));
207 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ParentObjectTitlePointer));
208 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->UniqueID));
209 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->NameOffset));
210 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->NameLength));
211 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
212 0 : if (_ptr_data) {
213 0 : NDR_PULL_ALLOC(ndr, r->data);
214 : } else {
215 0 : r->data = NULL;
216 : }
217 0 : NDR_CHECK(ndr_pull_PERF_COUNTER_BLOCK(ndr, NDR_SCALARS, &r->counter_data));
218 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
219 : }
220 0 : if (ndr_flags & NDR_BUFFERS) {
221 0 : if (r->data) {
222 0 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
223 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
224 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->data));
225 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
226 : }
227 : }
228 0 : return NDR_ERR_SUCCESS;
229 : }
230 :
231 0 : static void ndr_print_flags_PERF_INSTANCE_DEFINITION(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct PERF_INSTANCE_DEFINITION *r)
232 : {
233 0 : ndr_print_PERF_INSTANCE_DEFINITION(ndr, name, r);
234 0 : }
235 :
236 0 : _PUBLIC_ void ndr_print_PERF_INSTANCE_DEFINITION(struct ndr_print *ndr, const char *name, const struct PERF_INSTANCE_DEFINITION *r)
237 : {
238 0 : ndr_print_struct(ndr, name, "PERF_INSTANCE_DEFINITION");
239 0 : if (r == NULL) { ndr_print_null(ndr); return; }
240 0 : ndr->depth++;
241 0 : ndr_print_uint32(ndr, "ByteLength", r->ByteLength);
242 0 : ndr_print_uint32(ndr, "ParentObjectTitleIndex", r->ParentObjectTitleIndex);
243 0 : ndr_print_uint32(ndr, "ParentObjectTitlePointer", r->ParentObjectTitlePointer);
244 0 : ndr_print_uint32(ndr, "UniqueID", r->UniqueID);
245 0 : ndr_print_uint32(ndr, "NameOffset", r->NameOffset);
246 0 : ndr_print_uint32(ndr, "NameLength", r->NameLength);
247 0 : ndr_print_ptr(ndr, "data", r->data);
248 0 : ndr->depth++;
249 0 : if (r->data) {
250 0 : ndr_print_uint8(ndr, "data", *r->data);
251 : }
252 0 : ndr->depth--;
253 0 : ndr_print_PERF_COUNTER_BLOCK(ndr, "counter_data", &r->counter_data);
254 0 : ndr->depth--;
255 : }
256 :
257 0 : _PUBLIC_ enum ndr_err_code ndr_push_PERF_OBJECT_TYPE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct PERF_OBJECT_TYPE *r)
258 : {
259 0 : uint32_t cntr_counters_0;
260 0 : uint32_t cntr_instances_0;
261 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
262 0 : if (ndr_flags & NDR_SCALARS) {
263 0 : NDR_CHECK(ndr_push_align(ndr, 8));
264 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->TotalByteLength));
265 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DefinitionLength));
266 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->HeaderLength));
267 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ObjectNameTitleIndex));
268 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ObjectNameTitlePointer));
269 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ObjectHelpTitleIndex));
270 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ObjectHelpTitlePointer));
271 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DetailLevel));
272 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->NumCounters));
273 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DefaultCounter));
274 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->NumInstances));
275 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CodePage));
276 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->PerfTime));
277 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->PerfFreq));
278 0 : for (cntr_counters_0 = 0; cntr_counters_0 < (r->NumCounters); cntr_counters_0++) {
279 0 : NDR_CHECK(ndr_push_PERF_COUNTER_DEFINITION(ndr, NDR_SCALARS, &r->counters[cntr_counters_0]));
280 : }
281 0 : for (cntr_instances_0 = 0; cntr_instances_0 < (r->NumInstances); cntr_instances_0++) {
282 0 : NDR_CHECK(ndr_push_PERF_INSTANCE_DEFINITION(ndr, NDR_SCALARS, &r->instances[cntr_instances_0]));
283 : }
284 0 : NDR_CHECK(ndr_push_PERF_COUNTER_BLOCK(ndr, NDR_SCALARS, &r->counter_data));
285 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
286 : }
287 0 : if (ndr_flags & NDR_BUFFERS) {
288 0 : for (cntr_instances_0 = 0; cntr_instances_0 < (r->NumInstances); cntr_instances_0++) {
289 0 : NDR_CHECK(ndr_push_PERF_INSTANCE_DEFINITION(ndr, NDR_BUFFERS, &r->instances[cntr_instances_0]));
290 : }
291 : }
292 0 : return NDR_ERR_SUCCESS;
293 : }
294 :
295 0 : _PUBLIC_ enum ndr_err_code ndr_pull_PERF_OBJECT_TYPE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct PERF_OBJECT_TYPE *r)
296 : {
297 0 : uint32_t size_counters_0 = 0;
298 0 : uint32_t cntr_counters_0;
299 0 : TALLOC_CTX *_mem_save_counters_0 = NULL;
300 0 : uint32_t size_instances_0 = 0;
301 0 : uint32_t cntr_instances_0;
302 0 : TALLOC_CTX *_mem_save_instances_0 = NULL;
303 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
304 0 : if (ndr_flags & NDR_SCALARS) {
305 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
306 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->TotalByteLength));
307 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DefinitionLength));
308 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->HeaderLength));
309 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ObjectNameTitleIndex));
310 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ObjectNameTitlePointer));
311 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ObjectHelpTitleIndex));
312 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ObjectHelpTitlePointer));
313 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DetailLevel));
314 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->NumCounters));
315 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DefaultCounter));
316 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->NumInstances));
317 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CodePage));
318 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->PerfTime));
319 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->PerfFreq));
320 0 : size_counters_0 = r->NumCounters;
321 0 : NDR_PULL_ALLOC_N(ndr, r->counters, size_counters_0);
322 0 : _mem_save_counters_0 = NDR_PULL_GET_MEM_CTX(ndr);
323 0 : NDR_PULL_SET_MEM_CTX(ndr, r->counters, 0);
324 0 : for (cntr_counters_0 = 0; cntr_counters_0 < (size_counters_0); cntr_counters_0++) {
325 0 : NDR_CHECK(ndr_pull_PERF_COUNTER_DEFINITION(ndr, NDR_SCALARS, &r->counters[cntr_counters_0]));
326 : }
327 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_counters_0, 0);
328 0 : size_instances_0 = r->NumInstances;
329 0 : NDR_PULL_ALLOC_N(ndr, r->instances, size_instances_0);
330 0 : _mem_save_instances_0 = NDR_PULL_GET_MEM_CTX(ndr);
331 0 : NDR_PULL_SET_MEM_CTX(ndr, r->instances, 0);
332 0 : for (cntr_instances_0 = 0; cntr_instances_0 < (size_instances_0); cntr_instances_0++) {
333 0 : NDR_CHECK(ndr_pull_PERF_INSTANCE_DEFINITION(ndr, NDR_SCALARS, &r->instances[cntr_instances_0]));
334 : }
335 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_instances_0, 0);
336 0 : NDR_CHECK(ndr_pull_PERF_COUNTER_BLOCK(ndr, NDR_SCALARS, &r->counter_data));
337 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
338 : }
339 0 : if (ndr_flags & NDR_BUFFERS) {
340 0 : size_instances_0 = r->NumInstances;
341 0 : _mem_save_instances_0 = NDR_PULL_GET_MEM_CTX(ndr);
342 0 : NDR_PULL_SET_MEM_CTX(ndr, r->instances, 0);
343 0 : for (cntr_instances_0 = 0; cntr_instances_0 < (size_instances_0); cntr_instances_0++) {
344 0 : NDR_CHECK(ndr_pull_PERF_INSTANCE_DEFINITION(ndr, NDR_BUFFERS, &r->instances[cntr_instances_0]));
345 : }
346 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_instances_0, 0);
347 0 : for (cntr_instances_0 = 0; cntr_instances_0 < (size_instances_0); cntr_instances_0++) {
348 : }
349 : }
350 0 : return NDR_ERR_SUCCESS;
351 : }
352 :
353 0 : static void ndr_print_flags_PERF_OBJECT_TYPE(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct PERF_OBJECT_TYPE *r)
354 : {
355 0 : ndr_print_PERF_OBJECT_TYPE(ndr, name, r);
356 0 : }
357 :
358 0 : _PUBLIC_ void ndr_print_PERF_OBJECT_TYPE(struct ndr_print *ndr, const char *name, const struct PERF_OBJECT_TYPE *r)
359 : {
360 0 : uint32_t cntr_counters_0;
361 0 : uint32_t cntr_instances_0;
362 0 : ndr_print_struct(ndr, name, "PERF_OBJECT_TYPE");
363 0 : if (r == NULL) { ndr_print_null(ndr); return; }
364 0 : ndr->depth++;
365 0 : ndr_print_uint32(ndr, "TotalByteLength", r->TotalByteLength);
366 0 : ndr_print_uint32(ndr, "DefinitionLength", r->DefinitionLength);
367 0 : ndr_print_uint32(ndr, "HeaderLength", r->HeaderLength);
368 0 : ndr_print_uint32(ndr, "ObjectNameTitleIndex", r->ObjectNameTitleIndex);
369 0 : ndr_print_uint32(ndr, "ObjectNameTitlePointer", r->ObjectNameTitlePointer);
370 0 : ndr_print_uint32(ndr, "ObjectHelpTitleIndex", r->ObjectHelpTitleIndex);
371 0 : ndr_print_uint32(ndr, "ObjectHelpTitlePointer", r->ObjectHelpTitlePointer);
372 0 : ndr_print_uint32(ndr, "DetailLevel", r->DetailLevel);
373 0 : ndr_print_uint32(ndr, "NumCounters", r->NumCounters);
374 0 : ndr_print_uint32(ndr, "DefaultCounter", r->DefaultCounter);
375 0 : ndr_print_uint32(ndr, "NumInstances", r->NumInstances);
376 0 : ndr_print_uint32(ndr, "CodePage", r->CodePage);
377 0 : ndr_print_hyper(ndr, "PerfTime", r->PerfTime);
378 0 : ndr_print_hyper(ndr, "PerfFreq", r->PerfFreq);
379 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "counters", (uint32_t)(r->NumCounters));
380 0 : ndr->depth++;
381 0 : for (cntr_counters_0 = 0; cntr_counters_0 < (r->NumCounters); cntr_counters_0++) {
382 0 : ndr_print_PERF_COUNTER_DEFINITION(ndr, "counters", &r->counters[cntr_counters_0]);
383 : }
384 0 : ndr->depth--;
385 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "instances", (uint32_t)(r->NumInstances));
386 0 : ndr->depth++;
387 0 : for (cntr_instances_0 = 0; cntr_instances_0 < (r->NumInstances); cntr_instances_0++) {
388 0 : ndr_print_PERF_INSTANCE_DEFINITION(ndr, "instances", &r->instances[cntr_instances_0]);
389 : }
390 0 : ndr->depth--;
391 0 : ndr_print_PERF_COUNTER_BLOCK(ndr, "counter_data", &r->counter_data);
392 0 : ndr->depth--;
393 : }
394 :
395 0 : _PUBLIC_ enum ndr_err_code ndr_push_PERF_DATA_BLOCK(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct PERF_DATA_BLOCK *r)
396 : {
397 0 : uint32_t cntr_Signature_0;
398 0 : uint32_t cntr_objects_0;
399 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
400 0 : if (ndr_flags & NDR_SCALARS) {
401 0 : NDR_CHECK(ndr_push_align(ndr, 8));
402 0 : for (cntr_Signature_0 = 0; cntr_Signature_0 < (4); cntr_Signature_0++) {
403 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Signature[cntr_Signature_0]));
404 : }
405 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->LittleEndian));
406 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Version));
407 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Revision));
408 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->TotalByteLength));
409 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->HeaderLength));
410 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->NumObjectTypes));
411 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DefaultObject));
412 0 : NDR_CHECK(ndr_push_SYSTEMTIME(ndr, NDR_SCALARS, &r->SystemTime));
413 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Padding));
414 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->PerfTime));
415 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->PerfFreq));
416 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->PerfTime100nSec));
417 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SystemNameLength));
418 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SystemNameOffset));
419 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
420 0 : for (cntr_objects_0 = 0; cntr_objects_0 < (r->NumObjectTypes); cntr_objects_0++) {
421 0 : NDR_CHECK(ndr_push_PERF_OBJECT_TYPE(ndr, NDR_SCALARS, &r->objects[cntr_objects_0]));
422 : }
423 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
424 : }
425 0 : if (ndr_flags & NDR_BUFFERS) {
426 0 : if (r->data) {
427 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->data));
428 : }
429 0 : for (cntr_objects_0 = 0; cntr_objects_0 < (r->NumObjectTypes); cntr_objects_0++) {
430 0 : NDR_CHECK(ndr_push_PERF_OBJECT_TYPE(ndr, NDR_BUFFERS, &r->objects[cntr_objects_0]));
431 : }
432 : }
433 0 : return NDR_ERR_SUCCESS;
434 : }
435 :
436 0 : _PUBLIC_ enum ndr_err_code ndr_pull_PERF_DATA_BLOCK(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct PERF_DATA_BLOCK *r)
437 : {
438 0 : uint32_t size_Signature_0 = 0;
439 0 : uint32_t cntr_Signature_0;
440 0 : uint32_t _ptr_data;
441 0 : TALLOC_CTX *_mem_save_data_0 = NULL;
442 0 : uint32_t size_objects_0 = 0;
443 0 : uint32_t cntr_objects_0;
444 0 : TALLOC_CTX *_mem_save_objects_0 = NULL;
445 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
446 0 : if (ndr_flags & NDR_SCALARS) {
447 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
448 0 : size_Signature_0 = 4;
449 0 : for (cntr_Signature_0 = 0; cntr_Signature_0 < (size_Signature_0); cntr_Signature_0++) {
450 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Signature[cntr_Signature_0]));
451 : }
452 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->LittleEndian));
453 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Version));
454 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Revision));
455 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->TotalByteLength));
456 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->HeaderLength));
457 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->NumObjectTypes));
458 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DefaultObject));
459 0 : NDR_CHECK(ndr_pull_SYSTEMTIME(ndr, NDR_SCALARS, &r->SystemTime));
460 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Padding));
461 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->PerfTime));
462 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->PerfFreq));
463 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->PerfTime100nSec));
464 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SystemNameLength));
465 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SystemNameOffset));
466 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
467 0 : if (_ptr_data) {
468 0 : NDR_PULL_ALLOC(ndr, r->data);
469 : } else {
470 0 : r->data = NULL;
471 : }
472 0 : size_objects_0 = r->NumObjectTypes;
473 0 : NDR_PULL_ALLOC_N(ndr, r->objects, size_objects_0);
474 0 : _mem_save_objects_0 = NDR_PULL_GET_MEM_CTX(ndr);
475 0 : NDR_PULL_SET_MEM_CTX(ndr, r->objects, 0);
476 0 : for (cntr_objects_0 = 0; cntr_objects_0 < (size_objects_0); cntr_objects_0++) {
477 0 : NDR_CHECK(ndr_pull_PERF_OBJECT_TYPE(ndr, NDR_SCALARS, &r->objects[cntr_objects_0]));
478 : }
479 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_objects_0, 0);
480 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
481 : }
482 0 : if (ndr_flags & NDR_BUFFERS) {
483 0 : if (r->data) {
484 0 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
485 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
486 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->data));
487 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
488 : }
489 0 : size_objects_0 = r->NumObjectTypes;
490 0 : _mem_save_objects_0 = NDR_PULL_GET_MEM_CTX(ndr);
491 0 : NDR_PULL_SET_MEM_CTX(ndr, r->objects, 0);
492 0 : for (cntr_objects_0 = 0; cntr_objects_0 < (size_objects_0); cntr_objects_0++) {
493 0 : NDR_CHECK(ndr_pull_PERF_OBJECT_TYPE(ndr, NDR_BUFFERS, &r->objects[cntr_objects_0]));
494 : }
495 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_objects_0, 0);
496 0 : for (cntr_objects_0 = 0; cntr_objects_0 < (size_objects_0); cntr_objects_0++) {
497 : }
498 : }
499 0 : return NDR_ERR_SUCCESS;
500 : }
501 :
502 0 : static void ndr_print_flags_PERF_DATA_BLOCK(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct PERF_DATA_BLOCK *r)
503 : {
504 0 : ndr_print_PERF_DATA_BLOCK(ndr, name, r);
505 0 : }
506 :
507 0 : _PUBLIC_ void ndr_print_PERF_DATA_BLOCK(struct ndr_print *ndr, const char *name, const struct PERF_DATA_BLOCK *r)
508 : {
509 0 : uint32_t cntr_Signature_0;
510 0 : uint32_t cntr_objects_0;
511 0 : ndr_print_struct(ndr, name, "PERF_DATA_BLOCK");
512 0 : if (r == NULL) { ndr_print_null(ndr); return; }
513 0 : ndr->depth++;
514 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "Signature", (uint32_t)(4));
515 0 : ndr->depth++;
516 0 : for (cntr_Signature_0 = 0; cntr_Signature_0 < (4); cntr_Signature_0++) {
517 0 : ndr_print_uint16(ndr, "Signature", r->Signature[cntr_Signature_0]);
518 : }
519 0 : ndr->depth--;
520 0 : ndr_print_uint32(ndr, "LittleEndian", r->LittleEndian);
521 0 : ndr_print_uint32(ndr, "Version", r->Version);
522 0 : ndr_print_uint32(ndr, "Revision", r->Revision);
523 0 : ndr_print_uint32(ndr, "TotalByteLength", r->TotalByteLength);
524 0 : ndr_print_uint32(ndr, "HeaderLength", r->HeaderLength);
525 0 : ndr_print_uint32(ndr, "NumObjectTypes", r->NumObjectTypes);
526 0 : ndr_print_uint32(ndr, "DefaultObject", r->DefaultObject);
527 0 : ndr_print_SYSTEMTIME(ndr, "SystemTime", &r->SystemTime);
528 0 : ndr_print_uint32(ndr, "Padding", r->Padding);
529 0 : ndr_print_hyper(ndr, "PerfTime", r->PerfTime);
530 0 : ndr_print_hyper(ndr, "PerfFreq", r->PerfFreq);
531 0 : ndr_print_hyper(ndr, "PerfTime100nSec", r->PerfTime100nSec);
532 0 : ndr_print_uint32(ndr, "SystemNameLength", r->SystemNameLength);
533 0 : ndr_print_uint32(ndr, "SystemNameOffset", r->SystemNameOffset);
534 0 : ndr_print_ptr(ndr, "data", r->data);
535 0 : ndr->depth++;
536 0 : if (r->data) {
537 0 : ndr_print_uint8(ndr, "data", *r->data);
538 : }
539 0 : ndr->depth--;
540 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "objects", (uint32_t)(r->NumObjectTypes));
541 0 : ndr->depth++;
542 0 : for (cntr_objects_0 = 0; cntr_objects_0 < (r->NumObjectTypes); cntr_objects_0++) {
543 0 : ndr_print_PERF_OBJECT_TYPE(ndr, "objects", &r->objects[cntr_objects_0]);
544 : }
545 0 : ndr->depth--;
546 0 : ndr->depth--;
547 : }
548 :
549 : #ifndef SKIP_NDR_TABLE_perfcount
550 : static const struct ndr_interface_public_struct perfcount_public_structs[] = {
551 : {
552 : .name = "PERF_COUNTER_DEFINITION",
553 : .struct_size = sizeof(struct PERF_COUNTER_DEFINITION ),
554 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_PERF_COUNTER_DEFINITION,
555 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_PERF_COUNTER_DEFINITION,
556 : .ndr_print = (ndr_print_function_t) ndr_print_flags_PERF_COUNTER_DEFINITION,
557 : },
558 : {
559 : .name = "PERF_COUNTER_BLOCK",
560 : .struct_size = sizeof(struct PERF_COUNTER_BLOCK ),
561 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_PERF_COUNTER_BLOCK,
562 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_PERF_COUNTER_BLOCK,
563 : .ndr_print = (ndr_print_function_t) ndr_print_flags_PERF_COUNTER_BLOCK,
564 : },
565 : {
566 : .name = "PERF_INSTANCE_DEFINITION",
567 : .struct_size = sizeof(struct PERF_INSTANCE_DEFINITION ),
568 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_PERF_INSTANCE_DEFINITION,
569 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_PERF_INSTANCE_DEFINITION,
570 : .ndr_print = (ndr_print_function_t) ndr_print_flags_PERF_INSTANCE_DEFINITION,
571 : },
572 : {
573 : .name = "PERF_OBJECT_TYPE",
574 : .struct_size = sizeof(struct PERF_OBJECT_TYPE ),
575 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_PERF_OBJECT_TYPE,
576 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_PERF_OBJECT_TYPE,
577 : .ndr_print = (ndr_print_function_t) ndr_print_flags_PERF_OBJECT_TYPE,
578 : },
579 : {
580 : .name = "PERF_DATA_BLOCK",
581 : .struct_size = sizeof(struct PERF_DATA_BLOCK ),
582 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_PERF_DATA_BLOCK,
583 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_PERF_DATA_BLOCK,
584 : .ndr_print = (ndr_print_function_t) ndr_print_flags_PERF_DATA_BLOCK,
585 : },
586 : { .name = NULL }
587 : };
588 :
589 : static const struct ndr_interface_call perfcount_calls[] = {
590 : { .name = NULL }
591 : };
592 :
593 : static const char * const perfcount_endpoint_strings[] = {
594 : "ncacn_np:[\\pipe\\perfcount]",
595 : };
596 :
597 : static const struct ndr_interface_string_array perfcount_endpoints = {
598 : .count = 1,
599 : .names = perfcount_endpoint_strings
600 : };
601 :
602 : static const char * const perfcount_authservice_strings[] = {
603 : "host",
604 : };
605 :
606 : static const struct ndr_interface_string_array perfcount_authservices = {
607 : .count = 1,
608 : .names = perfcount_authservice_strings
609 : };
610 :
611 :
612 : const struct ndr_interface_table ndr_table_perfcount = {
613 : .name = "perfcount",
614 : .num_calls = 0,
615 : .calls = perfcount_calls,
616 : .num_public_structs = 5,
617 : .public_structs = perfcount_public_structs,
618 : .endpoints = &perfcount_endpoints,
619 : .authservices = &perfcount_authservices
620 : };
621 :
622 : #endif /* SKIP_NDR_TABLE_perfcount */
|