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 1118 : 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 1118 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10 1118 : if (ndr_flags & NDR_SCALARS) {
11 559 : NDR_CHECK(ndr_push_align(ndr, 5));
12 559 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->id));
13 559 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
14 : }
15 1118 : if (ndr_flags & NDR_BUFFERS) {
16 559 : if (r->id) {
17 559 : NDR_CHECK(ndr_push_ndr_syntax_id(ndr, NDR_SCALARS, r->id));
18 : }
19 : }
20 1118 : return NDR_ERR_SUCCESS;
21 : }
22 :
23 602 : 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 602 : TALLOC_CTX *_mem_save_id_0 = NULL;
27 602 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
28 602 : if (ndr_flags & NDR_SCALARS) {
29 301 : NDR_CHECK(ndr_pull_align(ndr, 5));
30 301 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_id));
31 301 : if (_ptr_id) {
32 301 : NDR_PULL_ALLOC(ndr, r->id);
33 : } else {
34 0 : r->id = NULL;
35 : }
36 301 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
37 : }
38 602 : if (ndr_flags & NDR_BUFFERS) {
39 301 : if (r->id) {
40 301 : _mem_save_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
41 301 : NDR_PULL_SET_MEM_CTX(ndr, r->id, 0);
42 301 : NDR_CHECK(ndr_pull_ndr_syntax_id(ndr, NDR_SCALARS, r->id));
43 301 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_id_0, 0);
44 : }
45 : }
46 602 : return NDR_ERR_SUCCESS;
47 : }
48 :
49 50 : _PUBLIC_ void ndr_print_ndr_syntax_id_p(struct ndr_print *ndr, const char *name, const struct ndr_syntax_id_p *r)
50 : {
51 50 : ndr_print_struct(ndr, name, "ndr_syntax_id_p");
52 50 : if (r == NULL) { ndr_print_null(ndr); return; }
53 50 : ndr->depth++;
54 50 : ndr_print_ptr(ndr, "id", r->id);
55 50 : ndr->depth++;
56 50 : if (r->id) {
57 50 : ndr_print_ndr_syntax_id(ndr, "id", r->id);
58 : }
59 50 : ndr->depth--;
60 50 : ndr->depth--;
61 : }
62 :
63 493 : 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 493 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
67 493 : if (ndr_flags & NDR_SCALARS) {
68 493 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
69 493 : NDR_CHECK(ndr_push_align(ndr, 5));
70 493 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
71 1052 : for (cntr_if_id_0 = 0; cntr_if_id_0 < (r->count); cntr_if_id_0++) {
72 559 : NDR_CHECK(ndr_push_ndr_syntax_id_p(ndr, NDR_SCALARS, &r->if_id[cntr_if_id_0]));
73 : }
74 493 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
75 : }
76 493 : if (ndr_flags & NDR_BUFFERS) {
77 1052 : for (cntr_if_id_0 = 0; cntr_if_id_0 < (r->count); cntr_if_id_0++) {
78 559 : NDR_CHECK(ndr_push_ndr_syntax_id_p(ndr, NDR_BUFFERS, &r->if_id[cntr_if_id_0]));
79 : }
80 : }
81 493 : return NDR_ERR_SUCCESS;
82 : }
83 :
84 233 : 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 233 : uint32_t size_if_id_0 = 0;
87 0 : uint32_t cntr_if_id_0;
88 233 : TALLOC_CTX *_mem_save_if_id_0 = NULL;
89 233 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
90 233 : if (ndr_flags & NDR_SCALARS) {
91 233 : NDR_CHECK(ndr_pull_array_size(ndr, &r->if_id));
92 233 : NDR_CHECK(ndr_pull_align(ndr, 5));
93 233 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
94 233 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->if_id, &size_if_id_0));
95 233 : NDR_PULL_ALLOC_N(ndr, r->if_id, size_if_id_0);
96 233 : _mem_save_if_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
97 233 : NDR_PULL_SET_MEM_CTX(ndr, r->if_id, 0);
98 534 : for (cntr_if_id_0 = 0; cntr_if_id_0 < (size_if_id_0); cntr_if_id_0++) {
99 301 : NDR_CHECK(ndr_pull_ndr_syntax_id_p(ndr, NDR_SCALARS, &r->if_id[cntr_if_id_0]));
100 : }
101 233 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_if_id_0, 0);
102 233 : if (r->if_id) {
103 233 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->if_id, r->count));
104 : }
105 233 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
106 : }
107 233 : if (ndr_flags & NDR_BUFFERS) {
108 233 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->if_id, &size_if_id_0));
109 233 : _mem_save_if_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
110 233 : NDR_PULL_SET_MEM_CTX(ndr, r->if_id, 0);
111 534 : for (cntr_if_id_0 = 0; cntr_if_id_0 < (size_if_id_0); cntr_if_id_0++) {
112 301 : NDR_CHECK(ndr_pull_ndr_syntax_id_p(ndr, NDR_BUFFERS, &r->if_id[cntr_if_id_0]));
113 : }
114 233 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_if_id_0, 0);
115 534 : for (cntr_if_id_0 = 0; cntr_if_id_0 < (size_if_id_0); cntr_if_id_0++) {
116 : }
117 : }
118 233 : return NDR_ERR_SUCCESS;
119 : }
120 :
121 34 : _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 34 : ndr_print_struct(ndr, name, "rpc_if_id_vector_t");
125 34 : if (r == NULL) { ndr_print_null(ndr); return; }
126 34 : ndr->depth++;
127 34 : ndr_print_uint32(ndr, "count", r->count);
128 34 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "if_id", (uint32_t)(r->count));
129 34 : ndr->depth++;
130 84 : for (cntr_if_id_0 = 0; cntr_if_id_0 < (r->count); cntr_if_id_0++) {
131 50 : ndr_print_ndr_syntax_id_p(ndr, "if_id", &r->if_id[cntr_if_id_0]);
132 : }
133 34 : ndr->depth--;
134 34 : ndr->depth--;
135 : }
136 :
137 213 : 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 213 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
141 213 : if (ndr_flags & NDR_SCALARS) {
142 213 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
143 213 : NDR_CHECK(ndr_push_align(ndr, 4));
144 213 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
145 921 : for (cntr_statistics_0 = 0; cntr_statistics_0 < (r->count); cntr_statistics_0++) {
146 708 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->statistics[cntr_statistics_0]));
147 : }
148 213 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
149 : }
150 213 : if (ndr_flags & NDR_BUFFERS) {
151 0 : }
152 213 : return NDR_ERR_SUCCESS;
153 : }
154 :
155 158 : static enum ndr_err_code ndr_pull_mgmt_statistics(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct mgmt_statistics *r)
156 : {
157 158 : uint32_t size_statistics_0 = 0;
158 0 : uint32_t cntr_statistics_0;
159 158 : TALLOC_CTX *_mem_save_statistics_0 = NULL;
160 158 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
161 158 : if (ndr_flags & NDR_SCALARS) {
162 158 : NDR_CHECK(ndr_pull_array_size(ndr, &r->statistics));
163 158 : NDR_CHECK(ndr_pull_align(ndr, 4));
164 158 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
165 158 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->statistics, &size_statistics_0));
166 158 : NDR_PULL_ALLOC_N(ndr, r->statistics, size_statistics_0);
167 158 : _mem_save_statistics_0 = NDR_PULL_GET_MEM_CTX(ndr);
168 158 : NDR_PULL_SET_MEM_CTX(ndr, r->statistics, 0);
169 790 : for (cntr_statistics_0 = 0; cntr_statistics_0 < (size_statistics_0); cntr_statistics_0++) {
170 632 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->statistics[cntr_statistics_0]));
171 : }
172 158 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_statistics_0, 0);
173 158 : if (r->statistics) {
174 158 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->statistics, r->count));
175 : }
176 158 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
177 : }
178 158 : if (ndr_flags & NDR_BUFFERS) {
179 0 : }
180 158 : return NDR_ERR_SUCCESS;
181 : }
182 :
183 34 : _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 34 : ndr_print_struct(ndr, name, "mgmt_statistics");
187 34 : if (r == NULL) { ndr_print_null(ndr); return; }
188 34 : ndr->depth++;
189 34 : ndr_print_uint32(ndr, "count", r->count);
190 34 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "statistics", (uint32_t)(r->count));
191 34 : ndr->depth++;
192 170 : for (cntr_statistics_0 = 0; cntr_statistics_0 < (r->count); cntr_statistics_0++) {
193 136 : ndr_print_uint32(ndr, "statistics", r->statistics[cntr_statistics_0]);
194 : }
195 34 : ndr->depth--;
196 34 : ndr->depth--;
197 : }
198 :
199 861 : 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 861 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
202 861 : if (flags & NDR_IN) {
203 0 : }
204 861 : if (flags & NDR_OUT) {
205 493 : if (r->out.if_id_vector == NULL) {
206 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
207 : }
208 493 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.if_id_vector));
209 493 : if (*r->out.if_id_vector) {
210 493 : NDR_CHECK(ndr_push_rpc_if_id_vector_t(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.if_id_vector));
211 : }
212 493 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
213 : }
214 861 : return NDR_ERR_SUCCESS;
215 : }
216 :
217 709 : 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 709 : TALLOC_CTX *_mem_save_if_id_vector_0 = NULL;
221 709 : TALLOC_CTX *_mem_save_if_id_vector_1 = NULL;
222 709 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
223 709 : if (flags & NDR_IN) {
224 476 : NDR_ZERO_STRUCT(r->out);
225 :
226 476 : NDR_PULL_ALLOC(ndr, r->out.if_id_vector);
227 476 : NDR_ZERO_STRUCTP(r->out.if_id_vector);
228 : }
229 709 : if (flags & NDR_OUT) {
230 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
231 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
232 233 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
233 92 : NDR_PULL_ALLOC(ndr, r->out.if_id_vector);
234 : }
235 233 : _mem_save_if_id_vector_0 = NDR_PULL_GET_MEM_CTX(ndr);
236 233 : NDR_PULL_SET_MEM_CTX(ndr, r->out.if_id_vector, LIBNDR_FLAG_REF_ALLOC);
237 233 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_if_id_vector));
238 233 : if (_ptr_if_id_vector) {
239 233 : NDR_PULL_ALLOC(ndr, *r->out.if_id_vector);
240 : } else {
241 0 : *r->out.if_id_vector = NULL;
242 : }
243 233 : if (*r->out.if_id_vector) {
244 233 : _mem_save_if_id_vector_1 = NDR_PULL_GET_MEM_CTX(ndr);
245 233 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.if_id_vector, 0);
246 233 : NDR_CHECK(ndr_pull_rpc_if_id_vector_t(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.if_id_vector));
247 233 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_if_id_vector_1, 0);
248 : }
249 233 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_if_id_vector_0, LIBNDR_FLAG_REF_ALLOC);
250 233 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
251 : }
252 709 : return NDR_ERR_SUCCESS;
253 : }
254 :
255 34 : _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 34 : ndr_print_struct(ndr, name, "mgmt_inq_if_ids");
258 34 : if (r == NULL) { ndr_print_null(ndr); return; }
259 34 : ndr->depth++;
260 34 : if (flags & NDR_SET_VALUES) {
261 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
262 : }
263 34 : 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 34 : if (flags & NDR_OUT) {
269 34 : ndr_print_struct(ndr, "out", "mgmt_inq_if_ids");
270 34 : ndr->depth++;
271 34 : ndr_print_ptr(ndr, "if_id_vector", r->out.if_id_vector);
272 34 : ndr->depth++;
273 34 : ndr_print_ptr(ndr, "if_id_vector", *r->out.if_id_vector);
274 34 : ndr->depth++;
275 34 : if (*r->out.if_id_vector) {
276 34 : ndr_print_rpc_if_id_vector_t(ndr, "if_id_vector", *r->out.if_id_vector);
277 : }
278 34 : ndr->depth--;
279 34 : ndr->depth--;
280 34 : ndr_print_WERROR(ndr, "result", r->out.result);
281 34 : ndr->depth--;
282 : }
283 34 : ndr->depth--;
284 : }
285 :
286 371 : 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 371 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
289 371 : if (flags & NDR_IN) {
290 158 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_count));
291 158 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
292 : }
293 371 : if (flags & NDR_OUT) {
294 213 : if (r->out.statistics == NULL) {
295 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
296 : }
297 213 : NDR_CHECK(ndr_push_mgmt_statistics(ndr, NDR_SCALARS, r->out.statistics));
298 213 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
299 : }
300 371 : return NDR_ERR_SUCCESS;
301 : }
302 :
303 354 : 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 354 : TALLOC_CTX *_mem_save_statistics_0 = NULL;
306 354 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
307 354 : if (flags & NDR_IN) {
308 196 : NDR_ZERO_STRUCT(r->out);
309 :
310 196 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_count));
311 196 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
312 196 : NDR_PULL_ALLOC(ndr, r->out.statistics);
313 196 : NDR_ZERO_STRUCTP(r->out.statistics);
314 : }
315 354 : if (flags & NDR_OUT) {
316 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
317 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
318 158 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
319 17 : NDR_PULL_ALLOC(ndr, r->out.statistics);
320 : }
321 158 : _mem_save_statistics_0 = NDR_PULL_GET_MEM_CTX(ndr);
322 158 : NDR_PULL_SET_MEM_CTX(ndr, r->out.statistics, LIBNDR_FLAG_REF_ALLOC);
323 158 : NDR_CHECK(ndr_pull_mgmt_statistics(ndr, NDR_SCALARS, r->out.statistics));
324 158 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_statistics_0, LIBNDR_FLAG_REF_ALLOC);
325 158 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
326 : }
327 354 : return NDR_ERR_SUCCESS;
328 : }
329 :
330 34 : _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 34 : ndr_print_struct(ndr, name, "mgmt_inq_stats");
333 34 : if (r == NULL) { ndr_print_null(ndr); return; }
334 34 : ndr->depth++;
335 34 : if (flags & NDR_SET_VALUES) {
336 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
337 : }
338 34 : 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 34 : if (flags & NDR_OUT) {
346 34 : ndr_print_struct(ndr, "out", "mgmt_inq_stats");
347 34 : ndr->depth++;
348 34 : ndr_print_ptr(ndr, "statistics", r->out.statistics);
349 34 : ndr->depth++;
350 34 : ndr_print_mgmt_statistics(ndr, "statistics", r->out.statistics);
351 34 : ndr->depth--;
352 34 : ndr_print_WERROR(ndr, "result", r->out.result);
353 34 : ndr->depth--;
354 : }
355 34 : ndr->depth--;
356 : }
357 :
358 377 : 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 377 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
361 377 : if (flags & NDR_IN) {
362 0 : }
363 377 : if (flags & NDR_OUT) {
364 195 : if (r->out.status == NULL) {
365 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
366 : }
367 195 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.status));
368 195 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
369 : }
370 377 : return NDR_ERR_SUCCESS;
371 : }
372 :
373 360 : 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 360 : TALLOC_CTX *_mem_save_status_0 = NULL;
376 360 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
377 360 : if (flags & NDR_IN) {
378 178 : NDR_ZERO_STRUCT(r->out);
379 :
380 178 : NDR_PULL_ALLOC(ndr, r->out.status);
381 178 : NDR_ZERO_STRUCTP(r->out.status);
382 : }
383 360 : if (flags & NDR_OUT) {
384 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
385 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
386 182 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
387 41 : NDR_PULL_ALLOC(ndr, r->out.status);
388 : }
389 182 : _mem_save_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
390 182 : NDR_PULL_SET_MEM_CTX(ndr, r->out.status, LIBNDR_FLAG_REF_ALLOC);
391 182 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.status));
392 182 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_status_0, LIBNDR_FLAG_REF_ALLOC);
393 182 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
394 : }
395 360 : return NDR_ERR_SUCCESS;
396 : }
397 :
398 34 : _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 34 : ndr_print_struct(ndr, name, "mgmt_is_server_listening");
401 34 : if (r == NULL) { ndr_print_null(ndr); return; }
402 34 : ndr->depth++;
403 34 : if (flags & NDR_SET_VALUES) {
404 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
405 : }
406 34 : 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 34 : if (flags & NDR_OUT) {
412 34 : ndr_print_struct(ndr, "out", "mgmt_is_server_listening");
413 34 : ndr->depth++;
414 34 : ndr_print_ptr(ndr, "status", r->out.status);
415 34 : ndr->depth++;
416 34 : ndr_print_uint32(ndr, "status", *r->out.status);
417 34 : ndr->depth--;
418 34 : ndr_print_uint32(ndr, "result", r->out.result);
419 34 : ndr->depth--;
420 : }
421 34 : ndr->depth--;
422 : }
423 :
424 365 : 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 365 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
427 365 : if (flags & NDR_IN) {
428 0 : }
429 365 : if (flags & NDR_OUT) {
430 207 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
431 : }
432 365 : return NDR_ERR_SUCCESS;
433 : }
434 :
435 348 : 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 348 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
438 348 : if (flags & NDR_IN) {
439 0 : }
440 348 : if (flags & NDR_OUT) {
441 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
442 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
443 158 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
444 : }
445 348 : return NDR_ERR_SUCCESS;
446 : }
447 :
448 34 : _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 34 : ndr_print_struct(ndr, name, "mgmt_stop_server_listening");
451 34 : if (r == NULL) { ndr_print_null(ndr); return; }
452 34 : ndr->depth++;
453 34 : if (flags & NDR_SET_VALUES) {
454 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
455 : }
456 34 : 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 34 : if (flags & NDR_OUT) {
462 34 : ndr_print_struct(ndr, "out", "mgmt_stop_server_listening");
463 34 : ndr->depth++;
464 34 : ndr_print_WERROR(ndr, "result", r->out.result);
465 34 : ndr->depth--;
466 : }
467 34 : ndr->depth--;
468 : }
469 :
470 86970 : 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 86970 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
473 86970 : if (flags & NDR_IN) {
474 41878 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.authn_proto));
475 41878 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.princ_name_size));
476 : }
477 86970 : if (flags & NDR_OUT) {
478 45092 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.princ_name_size));
479 45092 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
480 45092 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->out.princ_name, CH_DOS)));
481 45092 : 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 45092 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
483 : }
484 86970 : return NDR_ERR_SUCCESS;
485 : }
486 :
487 82610 : 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 82610 : uint32_t size_princ_name_0 = 0;
490 82610 : uint32_t length_princ_name_0 = 0;
491 82610 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
492 82610 : if (flags & NDR_IN) {
493 40838 : NDR_ZERO_STRUCT(r->out);
494 :
495 40838 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.authn_proto));
496 40838 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.princ_name_size));
497 : }
498 82610 : if (flags & NDR_OUT) {
499 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
500 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
501 41772 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.princ_name));
502 41772 : NDR_CHECK(ndr_pull_array_length(ndr, &r->out.princ_name));
503 41772 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.princ_name, &size_princ_name_0));
504 41772 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->out.princ_name, &length_princ_name_0));
505 41772 : 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 41772 : NDR_CHECK(ndr_check_string_terminator(ndr, length_princ_name_0, sizeof(uint8_t)));
509 41772 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->out.princ_name, length_princ_name_0, sizeof(uint8_t), CH_DOS));
510 41772 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
511 41772 : if (r->out.princ_name) {
512 41772 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.princ_name, r->in.princ_name_size));
513 : }
514 : }
515 82610 : return NDR_ERR_SUCCESS;
516 : }
517 :
518 8704 : _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 8704 : ndr_print_struct(ndr, name, "mgmt_inq_princ_name");
521 8704 : if (r == NULL) { ndr_print_null(ndr); return; }
522 8704 : ndr->depth++;
523 8704 : if (flags & NDR_SET_VALUES) {
524 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
525 : }
526 8704 : 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 8704 : if (flags & NDR_OUT) {
534 8704 : ndr_print_struct(ndr, "out", "mgmt_inq_princ_name");
535 8704 : ndr->depth++;
536 8704 : ndr_print_string(ndr, "princ_name", r->out.princ_name);
537 8704 : ndr_print_WERROR(ndr, "result", r->out.result);
538 8704 : ndr->depth--;
539 : }
540 8704 : 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 */
|