Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_mgmt.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 1064 : static enum ndr_err_code ndr_push_ndr_syntax_id_p(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ndr_syntax_id_p *r)
8 : {
9 1064 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10 1064 : if (ndr_flags & NDR_SCALARS) {
11 532 : NDR_CHECK(ndr_push_align(ndr, 5));
12 532 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->id));
13 532 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
14 : }
15 1064 : if (ndr_flags & NDR_BUFFERS) {
16 532 : if (r->id) {
17 532 : NDR_CHECK(ndr_push_ndr_syntax_id(ndr, NDR_SCALARS, r->id));
18 : }
19 : }
20 1064 : return NDR_ERR_SUCCESS;
21 : }
22 :
23 558 : static enum ndr_err_code ndr_pull_ndr_syntax_id_p(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ndr_syntax_id_p *r)
24 : {
25 0 : uint32_t _ptr_id;
26 558 : TALLOC_CTX *_mem_save_id_0 = NULL;
27 558 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
28 558 : if (ndr_flags & NDR_SCALARS) {
29 279 : NDR_CHECK(ndr_pull_align(ndr, 5));
30 279 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_id));
31 279 : if (_ptr_id) {
32 279 : NDR_PULL_ALLOC(ndr, r->id);
33 : } else {
34 0 : r->id = NULL;
35 : }
36 279 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
37 : }
38 558 : if (ndr_flags & NDR_BUFFERS) {
39 279 : if (r->id) {
40 279 : _mem_save_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
41 279 : NDR_PULL_SET_MEM_CTX(ndr, r->id, 0);
42 279 : NDR_CHECK(ndr_pull_ndr_syntax_id(ndr, NDR_SCALARS, r->id));
43 279 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_id_0, 0);
44 : }
45 : }
46 558 : return NDR_ERR_SUCCESS;
47 : }
48 :
49 44 : _PUBLIC_ void ndr_print_ndr_syntax_id_p(struct ndr_print *ndr, const char *name, const struct ndr_syntax_id_p *r)
50 : {
51 44 : ndr_print_struct(ndr, name, "ndr_syntax_id_p");
52 44 : if (r == NULL) { ndr_print_null(ndr); return; }
53 44 : ndr->depth++;
54 44 : ndr_print_ptr(ndr, "id", r->id);
55 44 : ndr->depth++;
56 44 : if (r->id) {
57 44 : ndr_print_ndr_syntax_id(ndr, "id", r->id);
58 : }
59 44 : ndr->depth--;
60 44 : ndr->depth--;
61 : }
62 :
63 484 : static enum ndr_err_code ndr_push_rpc_if_id_vector_t(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct rpc_if_id_vector_t *r)
64 : {
65 0 : uint32_t cntr_if_id_0;
66 484 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
67 484 : if (ndr_flags & NDR_SCALARS) {
68 484 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
69 484 : NDR_CHECK(ndr_push_align(ndr, 5));
70 484 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
71 1016 : for (cntr_if_id_0 = 0; cntr_if_id_0 < (r->count); cntr_if_id_0++) {
72 532 : NDR_CHECK(ndr_push_ndr_syntax_id_p(ndr, NDR_SCALARS, &r->if_id[cntr_if_id_0]));
73 : }
74 484 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
75 : }
76 484 : if (ndr_flags & NDR_BUFFERS) {
77 1016 : for (cntr_if_id_0 = 0; cntr_if_id_0 < (r->count); cntr_if_id_0++) {
78 532 : NDR_CHECK(ndr_push_ndr_syntax_id_p(ndr, NDR_BUFFERS, &r->if_id[cntr_if_id_0]));
79 : }
80 : }
81 484 : return NDR_ERR_SUCCESS;
82 : }
83 :
84 225 : static enum ndr_err_code ndr_pull_rpc_if_id_vector_t(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct rpc_if_id_vector_t *r)
85 : {
86 225 : uint32_t size_if_id_0 = 0;
87 0 : uint32_t cntr_if_id_0;
88 225 : TALLOC_CTX *_mem_save_if_id_0 = NULL;
89 225 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
90 225 : if (ndr_flags & NDR_SCALARS) {
91 225 : NDR_CHECK(ndr_pull_array_size(ndr, &r->if_id));
92 225 : NDR_CHECK(ndr_pull_align(ndr, 5));
93 225 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
94 225 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->if_id, &size_if_id_0));
95 225 : NDR_PULL_ALLOC_N(ndr, r->if_id, size_if_id_0);
96 225 : _mem_save_if_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
97 225 : NDR_PULL_SET_MEM_CTX(ndr, r->if_id, 0);
98 504 : for (cntr_if_id_0 = 0; cntr_if_id_0 < (size_if_id_0); cntr_if_id_0++) {
99 279 : NDR_CHECK(ndr_pull_ndr_syntax_id_p(ndr, NDR_SCALARS, &r->if_id[cntr_if_id_0]));
100 : }
101 225 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_if_id_0, 0);
102 225 : if (r->if_id) {
103 225 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->if_id, r->count));
104 : }
105 225 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
106 : }
107 225 : if (ndr_flags & NDR_BUFFERS) {
108 225 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->if_id, &size_if_id_0));
109 225 : _mem_save_if_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
110 225 : NDR_PULL_SET_MEM_CTX(ndr, r->if_id, 0);
111 504 : for (cntr_if_id_0 = 0; cntr_if_id_0 < (size_if_id_0); cntr_if_id_0++) {
112 279 : NDR_CHECK(ndr_pull_ndr_syntax_id_p(ndr, NDR_BUFFERS, &r->if_id[cntr_if_id_0]));
113 : }
114 225 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_if_id_0, 0);
115 504 : for (cntr_if_id_0 = 0; cntr_if_id_0 < (size_if_id_0); cntr_if_id_0++) {
116 : }
117 : }
118 225 : return NDR_ERR_SUCCESS;
119 : }
120 :
121 32 : _PUBLIC_ void ndr_print_rpc_if_id_vector_t(struct ndr_print *ndr, const char *name, const struct rpc_if_id_vector_t *r)
122 : {
123 0 : uint32_t cntr_if_id_0;
124 32 : ndr_print_struct(ndr, name, "rpc_if_id_vector_t");
125 32 : if (r == NULL) { ndr_print_null(ndr); return; }
126 32 : ndr->depth++;
127 32 : ndr_print_uint32(ndr, "count", r->count);
128 32 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "if_id", (uint32_t)(r->count));
129 32 : ndr->depth++;
130 76 : for (cntr_if_id_0 = 0; cntr_if_id_0 < (r->count); cntr_if_id_0++) {
131 44 : ndr_print_ndr_syntax_id_p(ndr, "if_id", &r->if_id[cntr_if_id_0]);
132 : }
133 32 : ndr->depth--;
134 32 : ndr->depth--;
135 : }
136 :
137 204 : static enum ndr_err_code ndr_push_mgmt_statistics(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct mgmt_statistics *r)
138 : {
139 0 : uint32_t cntr_statistics_0;
140 204 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
141 204 : if (ndr_flags & NDR_SCALARS) {
142 204 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
143 204 : NDR_CHECK(ndr_push_align(ndr, 4));
144 204 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
145 876 : for (cntr_statistics_0 = 0; cntr_statistics_0 < (r->count); cntr_statistics_0++) {
146 672 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->statistics[cntr_statistics_0]));
147 : }
148 204 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
149 : }
150 204 : if (ndr_flags & NDR_BUFFERS) {
151 0 : }
152 204 : return NDR_ERR_SUCCESS;
153 : }
154 :
155 150 : static enum ndr_err_code ndr_pull_mgmt_statistics(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct mgmt_statistics *r)
156 : {
157 150 : uint32_t size_statistics_0 = 0;
158 0 : uint32_t cntr_statistics_0;
159 150 : TALLOC_CTX *_mem_save_statistics_0 = NULL;
160 150 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
161 150 : if (ndr_flags & NDR_SCALARS) {
162 150 : NDR_CHECK(ndr_pull_array_size(ndr, &r->statistics));
163 150 : NDR_CHECK(ndr_pull_align(ndr, 4));
164 150 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
165 150 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->statistics, &size_statistics_0));
166 150 : NDR_PULL_ALLOC_N(ndr, r->statistics, size_statistics_0);
167 150 : _mem_save_statistics_0 = NDR_PULL_GET_MEM_CTX(ndr);
168 150 : NDR_PULL_SET_MEM_CTX(ndr, r->statistics, 0);
169 750 : for (cntr_statistics_0 = 0; cntr_statistics_0 < (size_statistics_0); cntr_statistics_0++) {
170 600 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->statistics[cntr_statistics_0]));
171 : }
172 150 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_statistics_0, 0);
173 150 : if (r->statistics) {
174 150 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->statistics, r->count));
175 : }
176 150 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
177 : }
178 150 : if (ndr_flags & NDR_BUFFERS) {
179 0 : }
180 150 : return NDR_ERR_SUCCESS;
181 : }
182 :
183 32 : _PUBLIC_ void ndr_print_mgmt_statistics(struct ndr_print *ndr, const char *name, const struct mgmt_statistics *r)
184 : {
185 0 : uint32_t cntr_statistics_0;
186 32 : ndr_print_struct(ndr, name, "mgmt_statistics");
187 32 : if (r == NULL) { ndr_print_null(ndr); return; }
188 32 : ndr->depth++;
189 32 : ndr_print_uint32(ndr, "count", r->count);
190 32 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "statistics", (uint32_t)(r->count));
191 32 : ndr->depth++;
192 160 : for (cntr_statistics_0 = 0; cntr_statistics_0 < (r->count); cntr_statistics_0++) {
193 128 : ndr_print_uint32(ndr, "statistics", r->statistics[cntr_statistics_0]);
194 : }
195 32 : ndr->depth--;
196 32 : ndr->depth--;
197 : }
198 :
199 844 : static enum ndr_err_code ndr_push_mgmt_inq_if_ids(struct ndr_push *ndr, ndr_flags_type flags, const struct mgmt_inq_if_ids *r)
200 : {
201 844 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
202 844 : if (flags & NDR_IN) {
203 0 : }
204 844 : if (flags & NDR_OUT) {
205 484 : if (r->out.if_id_vector == NULL) {
206 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
207 : }
208 484 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.if_id_vector));
209 484 : if (*r->out.if_id_vector) {
210 484 : NDR_CHECK(ndr_push_rpc_if_id_vector_t(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.if_id_vector));
211 : }
212 484 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
213 : }
214 844 : return NDR_ERR_SUCCESS;
215 : }
216 :
217 693 : static enum ndr_err_code ndr_pull_mgmt_inq_if_ids(struct ndr_pull *ndr, ndr_flags_type flags, struct mgmt_inq_if_ids *r)
218 : {
219 0 : uint32_t _ptr_if_id_vector;
220 693 : TALLOC_CTX *_mem_save_if_id_vector_0 = NULL;
221 693 : TALLOC_CTX *_mem_save_if_id_vector_1 = NULL;
222 693 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
223 693 : if (flags & NDR_IN) {
224 468 : NDR_ZERO_STRUCT(r->out);
225 :
226 468 : NDR_PULL_ALLOC(ndr, r->out.if_id_vector);
227 468 : NDR_ZERO_STRUCTP(r->out.if_id_vector);
228 : }
229 693 : if (flags & NDR_OUT) {
230 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
231 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
232 225 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
233 91 : NDR_PULL_ALLOC(ndr, r->out.if_id_vector);
234 : }
235 225 : _mem_save_if_id_vector_0 = NDR_PULL_GET_MEM_CTX(ndr);
236 225 : NDR_PULL_SET_MEM_CTX(ndr, r->out.if_id_vector, LIBNDR_FLAG_REF_ALLOC);
237 225 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_if_id_vector));
238 225 : if (_ptr_if_id_vector) {
239 225 : NDR_PULL_ALLOC(ndr, *r->out.if_id_vector);
240 : } else {
241 0 : *r->out.if_id_vector = NULL;
242 : }
243 225 : if (*r->out.if_id_vector) {
244 225 : _mem_save_if_id_vector_1 = NDR_PULL_GET_MEM_CTX(ndr);
245 225 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.if_id_vector, 0);
246 225 : NDR_CHECK(ndr_pull_rpc_if_id_vector_t(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.if_id_vector));
247 225 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_if_id_vector_1, 0);
248 : }
249 225 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_if_id_vector_0, LIBNDR_FLAG_REF_ALLOC);
250 225 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
251 : }
252 693 : return NDR_ERR_SUCCESS;
253 : }
254 :
255 32 : _PUBLIC_ void ndr_print_mgmt_inq_if_ids(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct mgmt_inq_if_ids *r)
256 : {
257 32 : ndr_print_struct(ndr, name, "mgmt_inq_if_ids");
258 32 : if (r == NULL) { ndr_print_null(ndr); return; }
259 32 : ndr->depth++;
260 32 : if (flags & NDR_SET_VALUES) {
261 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
262 : }
263 32 : if (flags & NDR_IN) {
264 0 : ndr_print_struct(ndr, "in", "mgmt_inq_if_ids");
265 0 : ndr->depth++;
266 0 : ndr->depth--;
267 : }
268 32 : if (flags & NDR_OUT) {
269 32 : ndr_print_struct(ndr, "out", "mgmt_inq_if_ids");
270 32 : ndr->depth++;
271 32 : ndr_print_ptr(ndr, "if_id_vector", r->out.if_id_vector);
272 32 : ndr->depth++;
273 32 : ndr_print_ptr(ndr, "if_id_vector", *r->out.if_id_vector);
274 32 : ndr->depth++;
275 32 : if (*r->out.if_id_vector) {
276 32 : ndr_print_rpc_if_id_vector_t(ndr, "if_id_vector", *r->out.if_id_vector);
277 : }
278 32 : ndr->depth--;
279 32 : ndr->depth--;
280 32 : ndr_print_WERROR(ndr, "result", r->out.result);
281 32 : ndr->depth--;
282 : }
283 32 : ndr->depth--;
284 : }
285 :
286 354 : static enum ndr_err_code ndr_push_mgmt_inq_stats(struct ndr_push *ndr, ndr_flags_type flags, const struct mgmt_inq_stats *r)
287 : {
288 354 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
289 354 : if (flags & NDR_IN) {
290 150 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_count));
291 150 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
292 : }
293 354 : if (flags & NDR_OUT) {
294 204 : if (r->out.statistics == NULL) {
295 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
296 : }
297 204 : NDR_CHECK(ndr_push_mgmt_statistics(ndr, NDR_SCALARS, r->out.statistics));
298 204 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
299 : }
300 354 : return NDR_ERR_SUCCESS;
301 : }
302 :
303 338 : static enum ndr_err_code ndr_pull_mgmt_inq_stats(struct ndr_pull *ndr, ndr_flags_type flags, struct mgmt_inq_stats *r)
304 : {
305 338 : TALLOC_CTX *_mem_save_statistics_0 = NULL;
306 338 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
307 338 : if (flags & NDR_IN) {
308 188 : NDR_ZERO_STRUCT(r->out);
309 :
310 188 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_count));
311 188 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
312 188 : NDR_PULL_ALLOC(ndr, r->out.statistics);
313 188 : NDR_ZERO_STRUCTP(r->out.statistics);
314 : }
315 338 : if (flags & NDR_OUT) {
316 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
317 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
318 150 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
319 16 : NDR_PULL_ALLOC(ndr, r->out.statistics);
320 : }
321 150 : _mem_save_statistics_0 = NDR_PULL_GET_MEM_CTX(ndr);
322 150 : NDR_PULL_SET_MEM_CTX(ndr, r->out.statistics, LIBNDR_FLAG_REF_ALLOC);
323 150 : NDR_CHECK(ndr_pull_mgmt_statistics(ndr, NDR_SCALARS, r->out.statistics));
324 150 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_statistics_0, LIBNDR_FLAG_REF_ALLOC);
325 150 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
326 : }
327 338 : return NDR_ERR_SUCCESS;
328 : }
329 :
330 32 : _PUBLIC_ void ndr_print_mgmt_inq_stats(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct mgmt_inq_stats *r)
331 : {
332 32 : ndr_print_struct(ndr, name, "mgmt_inq_stats");
333 32 : if (r == NULL) { ndr_print_null(ndr); return; }
334 32 : ndr->depth++;
335 32 : if (flags & NDR_SET_VALUES) {
336 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
337 : }
338 32 : if (flags & NDR_IN) {
339 0 : ndr_print_struct(ndr, "in", "mgmt_inq_stats");
340 0 : ndr->depth++;
341 0 : ndr_print_uint32(ndr, "max_count", r->in.max_count);
342 0 : ndr_print_uint32(ndr, "unknown", r->in.unknown);
343 0 : ndr->depth--;
344 : }
345 32 : if (flags & NDR_OUT) {
346 32 : ndr_print_struct(ndr, "out", "mgmt_inq_stats");
347 32 : ndr->depth++;
348 32 : ndr_print_ptr(ndr, "statistics", r->out.statistics);
349 32 : ndr->depth++;
350 32 : ndr_print_mgmt_statistics(ndr, "statistics", r->out.statistics);
351 32 : ndr->depth--;
352 32 : ndr_print_WERROR(ndr, "result", r->out.result);
353 32 : ndr->depth--;
354 : }
355 32 : ndr->depth--;
356 : }
357 :
358 360 : static enum ndr_err_code ndr_push_mgmt_is_server_listening(struct ndr_push *ndr, ndr_flags_type flags, const struct mgmt_is_server_listening *r)
359 : {
360 360 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
361 360 : if (flags & NDR_IN) {
362 0 : }
363 360 : if (flags & NDR_OUT) {
364 186 : if (r->out.status == NULL) {
365 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
366 : }
367 186 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.status));
368 186 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
369 : }
370 360 : return NDR_ERR_SUCCESS;
371 : }
372 :
373 344 : static enum ndr_err_code ndr_pull_mgmt_is_server_listening(struct ndr_pull *ndr, ndr_flags_type flags, struct mgmt_is_server_listening *r)
374 : {
375 344 : TALLOC_CTX *_mem_save_status_0 = NULL;
376 344 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
377 344 : if (flags & NDR_IN) {
378 170 : NDR_ZERO_STRUCT(r->out);
379 :
380 170 : NDR_PULL_ALLOC(ndr, r->out.status);
381 170 : NDR_ZERO_STRUCTP(r->out.status);
382 : }
383 344 : if (flags & NDR_OUT) {
384 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
385 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
386 174 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
387 40 : NDR_PULL_ALLOC(ndr, r->out.status);
388 : }
389 174 : _mem_save_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
390 174 : NDR_PULL_SET_MEM_CTX(ndr, r->out.status, LIBNDR_FLAG_REF_ALLOC);
391 174 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.status));
392 174 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_status_0, LIBNDR_FLAG_REF_ALLOC);
393 174 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
394 : }
395 344 : return NDR_ERR_SUCCESS;
396 : }
397 :
398 32 : _PUBLIC_ void ndr_print_mgmt_is_server_listening(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct mgmt_is_server_listening *r)
399 : {
400 32 : ndr_print_struct(ndr, name, "mgmt_is_server_listening");
401 32 : if (r == NULL) { ndr_print_null(ndr); return; }
402 32 : ndr->depth++;
403 32 : if (flags & NDR_SET_VALUES) {
404 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
405 : }
406 32 : if (flags & NDR_IN) {
407 0 : ndr_print_struct(ndr, "in", "mgmt_is_server_listening");
408 0 : ndr->depth++;
409 0 : ndr->depth--;
410 : }
411 32 : if (flags & NDR_OUT) {
412 32 : ndr_print_struct(ndr, "out", "mgmt_is_server_listening");
413 32 : ndr->depth++;
414 32 : ndr_print_ptr(ndr, "status", r->out.status);
415 32 : ndr->depth++;
416 32 : ndr_print_uint32(ndr, "status", *r->out.status);
417 32 : ndr->depth--;
418 32 : ndr_print_uint32(ndr, "result", r->out.result);
419 32 : ndr->depth--;
420 : }
421 32 : ndr->depth--;
422 : }
423 :
424 348 : static enum ndr_err_code ndr_push_mgmt_stop_server_listening(struct ndr_push *ndr, ndr_flags_type flags, const struct mgmt_stop_server_listening *r)
425 : {
426 348 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
427 348 : if (flags & NDR_IN) {
428 0 : }
429 348 : if (flags & NDR_OUT) {
430 198 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
431 : }
432 348 : return NDR_ERR_SUCCESS;
433 : }
434 :
435 332 : static enum ndr_err_code ndr_pull_mgmt_stop_server_listening(struct ndr_pull *ndr, ndr_flags_type flags, struct mgmt_stop_server_listening *r)
436 : {
437 332 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
438 332 : if (flags & NDR_IN) {
439 0 : }
440 332 : if (flags & NDR_OUT) {
441 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
442 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
443 150 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
444 : }
445 332 : return NDR_ERR_SUCCESS;
446 : }
447 :
448 32 : _PUBLIC_ void ndr_print_mgmt_stop_server_listening(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct mgmt_stop_server_listening *r)
449 : {
450 32 : ndr_print_struct(ndr, name, "mgmt_stop_server_listening");
451 32 : if (r == NULL) { ndr_print_null(ndr); return; }
452 32 : ndr->depth++;
453 32 : if (flags & NDR_SET_VALUES) {
454 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
455 : }
456 32 : if (flags & NDR_IN) {
457 0 : ndr_print_struct(ndr, "in", "mgmt_stop_server_listening");
458 0 : ndr->depth++;
459 0 : ndr->depth--;
460 : }
461 32 : if (flags & NDR_OUT) {
462 32 : ndr_print_struct(ndr, "out", "mgmt_stop_server_listening");
463 32 : ndr->depth++;
464 32 : ndr_print_WERROR(ndr, "result", r->out.result);
465 32 : ndr->depth--;
466 : }
467 32 : ndr->depth--;
468 : }
469 :
470 82606 : static enum ndr_err_code ndr_push_mgmt_inq_princ_name(struct ndr_push *ndr, ndr_flags_type flags, const struct mgmt_inq_princ_name *r)
471 : {
472 82606 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
473 82606 : if (flags & NDR_IN) {
474 39822 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.authn_proto));
475 39822 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.princ_name_size));
476 : }
477 82606 : if (flags & NDR_OUT) {
478 42784 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.princ_name_size));
479 42784 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
480 42784 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->out.princ_name, CH_DOS)));
481 42784 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->out.princ_name, ndr_charset_length(r->out.princ_name, CH_DOS), sizeof(uint8_t), CH_DOS));
482 42784 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
483 : }
484 82606 : return NDR_ERR_SUCCESS;
485 : }
486 :
487 78502 : static enum ndr_err_code ndr_pull_mgmt_inq_princ_name(struct ndr_pull *ndr, ndr_flags_type flags, struct mgmt_inq_princ_name *r)
488 : {
489 78502 : uint32_t size_princ_name_0 = 0;
490 78502 : uint32_t length_princ_name_0 = 0;
491 78502 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
492 78502 : if (flags & NDR_IN) {
493 38782 : NDR_ZERO_STRUCT(r->out);
494 :
495 38782 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.authn_proto));
496 38782 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.princ_name_size));
497 : }
498 78502 : if (flags & NDR_OUT) {
499 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
500 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
501 39720 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.princ_name));
502 39720 : NDR_CHECK(ndr_pull_array_length(ndr, &r->out.princ_name));
503 39720 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.princ_name, &size_princ_name_0));
504 39720 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->out.princ_name, &length_princ_name_0));
505 39720 : if (length_princ_name_0 > size_princ_name_0) {
506 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_princ_name_0, length_princ_name_0);
507 : }
508 39720 : NDR_CHECK(ndr_check_string_terminator(ndr, length_princ_name_0, sizeof(uint8_t)));
509 39720 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->out.princ_name, length_princ_name_0, sizeof(uint8_t), CH_DOS));
510 39720 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
511 39720 : if (r->out.princ_name) {
512 39720 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.princ_name, r->in.princ_name_size));
513 : }
514 : }
515 78502 : return NDR_ERR_SUCCESS;
516 : }
517 :
518 8192 : _PUBLIC_ void ndr_print_mgmt_inq_princ_name(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct mgmt_inq_princ_name *r)
519 : {
520 8192 : ndr_print_struct(ndr, name, "mgmt_inq_princ_name");
521 8192 : if (r == NULL) { ndr_print_null(ndr); return; }
522 8192 : ndr->depth++;
523 8192 : if (flags & NDR_SET_VALUES) {
524 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
525 : }
526 8192 : if (flags & NDR_IN) {
527 0 : ndr_print_struct(ndr, "in", "mgmt_inq_princ_name");
528 0 : ndr->depth++;
529 0 : ndr_print_uint32(ndr, "authn_proto", r->in.authn_proto);
530 0 : ndr_print_uint32(ndr, "princ_name_size", r->in.princ_name_size);
531 0 : ndr->depth--;
532 : }
533 8192 : if (flags & NDR_OUT) {
534 8192 : ndr_print_struct(ndr, "out", "mgmt_inq_princ_name");
535 8192 : ndr->depth++;
536 8192 : ndr_print_string(ndr, "princ_name", r->out.princ_name);
537 8192 : ndr_print_WERROR(ndr, "result", r->out.result);
538 8192 : ndr->depth--;
539 : }
540 8192 : ndr->depth--;
541 : }
542 :
543 : #ifndef SKIP_NDR_TABLE_mgmt
544 : static const struct ndr_interface_public_struct mgmt_public_structs[] = {
545 : { .name = NULL }
546 : };
547 :
548 : static const struct ndr_interface_call mgmt_calls[] = {
549 : {
550 : "mgmt_inq_if_ids",
551 : sizeof(struct mgmt_inq_if_ids),
552 : (ndr_push_flags_fn_t) ndr_push_mgmt_inq_if_ids,
553 : (ndr_pull_flags_fn_t) ndr_pull_mgmt_inq_if_ids,
554 : (ndr_print_function_t) ndr_print_mgmt_inq_if_ids,
555 : { 0, NULL },
556 : { 0, NULL },
557 : },
558 : {
559 : "mgmt_inq_stats",
560 : sizeof(struct mgmt_inq_stats),
561 : (ndr_push_flags_fn_t) ndr_push_mgmt_inq_stats,
562 : (ndr_pull_flags_fn_t) ndr_pull_mgmt_inq_stats,
563 : (ndr_print_function_t) ndr_print_mgmt_inq_stats,
564 : { 0, NULL },
565 : { 0, NULL },
566 : },
567 : {
568 : "mgmt_is_server_listening",
569 : sizeof(struct mgmt_is_server_listening),
570 : (ndr_push_flags_fn_t) ndr_push_mgmt_is_server_listening,
571 : (ndr_pull_flags_fn_t) ndr_pull_mgmt_is_server_listening,
572 : (ndr_print_function_t) ndr_print_mgmt_is_server_listening,
573 : { 0, NULL },
574 : { 0, NULL },
575 : },
576 : {
577 : "mgmt_stop_server_listening",
578 : sizeof(struct mgmt_stop_server_listening),
579 : (ndr_push_flags_fn_t) ndr_push_mgmt_stop_server_listening,
580 : (ndr_pull_flags_fn_t) ndr_pull_mgmt_stop_server_listening,
581 : (ndr_print_function_t) ndr_print_mgmt_stop_server_listening,
582 : { 0, NULL },
583 : { 0, NULL },
584 : },
585 : {
586 : "mgmt_inq_princ_name",
587 : sizeof(struct mgmt_inq_princ_name),
588 : (ndr_push_flags_fn_t) ndr_push_mgmt_inq_princ_name,
589 : (ndr_pull_flags_fn_t) ndr_pull_mgmt_inq_princ_name,
590 : (ndr_print_function_t) ndr_print_mgmt_inq_princ_name,
591 : { 0, NULL },
592 : { 0, NULL },
593 : },
594 : { .name = NULL }
595 : };
596 :
597 : static const char * const mgmt_endpoint_strings[] = {
598 : "ncacn_np:[\\pipe\\mgmt]",
599 : };
600 :
601 : static const struct ndr_interface_string_array mgmt_endpoints = {
602 : .count = 1,
603 : .names = mgmt_endpoint_strings
604 : };
605 :
606 : static const char * const mgmt_authservice_strings[] = {
607 : "host",
608 : };
609 :
610 : static const struct ndr_interface_string_array mgmt_authservices = {
611 : .count = 1,
612 : .names = mgmt_authservice_strings
613 : };
614 :
615 :
616 : const struct ndr_interface_table ndr_table_mgmt = {
617 : .name = "mgmt",
618 : .syntax_id = {
619 : {0xafa8bd80,0x7d8a,0x11c9,{0xbe,0xf4},{0x08,0x00,0x2b,0x10,0x29,0x89}},
620 : NDR_MGMT_VERSION
621 : },
622 : .helpstring = NDR_MGMT_HELPSTRING,
623 : .num_calls = 5,
624 : .calls = mgmt_calls,
625 : .num_public_structs = 0,
626 : .public_structs = mgmt_public_structs,
627 : .endpoints = &mgmt_endpoints,
628 : .authservices = &mgmt_authservices
629 : };
630 :
631 : #endif /* SKIP_NDR_TABLE_mgmt */
|