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