Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/source4/librpc/gen_ndr/ndr_irpc.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 : #include "librpc/gen_ndr/ndr_security.h"
8 : #include "librpc/gen_ndr/ndr_nbt.h"
9 : #include "librpc/gen_ndr/ndr_netlogon.h"
10 : #include "librpc/gen_ndr/ndr_server_id.h"
11 35523 : static enum ndr_err_code ndr_push_irpc_flags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
12 : {
13 35523 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
14 14363 : return NDR_ERR_SUCCESS;
15 : }
16 :
17 40464 : static enum ndr_err_code ndr_pull_irpc_flags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
18 : {
19 21160 : uint32_t v;
20 40464 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
21 40464 : *r = v;
22 40464 : return NDR_ERR_SUCCESS;
23 : }
24 :
25 0 : _PUBLIC_ void ndr_print_irpc_flags(struct ndr_print *ndr, const char *name, uint32_t r)
26 : {
27 0 : ndr_print_uint32(ndr, name, r);
28 0 : ndr->depth++;
29 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "IRPC_FLAG_REPLY", IRPC_FLAG_REPLY, r);
30 0 : ndr->depth--;
31 0 : }
32 :
33 35523 : static enum ndr_err_code ndr_push_irpc_creds(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct irpc_creds *r)
34 : {
35 35523 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
36 35523 : if (ndr_flags & NDR_SCALARS) {
37 35523 : NDR_CHECK(ndr_push_align(ndr, 5));
38 35523 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->token));
39 35523 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
40 : }
41 35523 : if (ndr_flags & NDR_BUFFERS) {
42 35523 : if (r->token) {
43 2245 : NDR_CHECK(ndr_push_security_token(ndr, NDR_SCALARS|NDR_BUFFERS, r->token));
44 : }
45 : }
46 14363 : return NDR_ERR_SUCCESS;
47 : }
48 :
49 40464 : static enum ndr_err_code ndr_pull_irpc_creds(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct irpc_creds *r)
50 : {
51 21160 : uint32_t _ptr_token;
52 40464 : TALLOC_CTX *_mem_save_token_0 = NULL;
53 40464 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
54 40464 : if (ndr_flags & NDR_SCALARS) {
55 40464 : NDR_CHECK(ndr_pull_align(ndr, 5));
56 40464 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_token));
57 40464 : if (_ptr_token) {
58 3529 : NDR_PULL_ALLOC(ndr, r->token);
59 : } else {
60 36935 : r->token = NULL;
61 : }
62 40464 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
63 : }
64 40464 : if (ndr_flags & NDR_BUFFERS) {
65 40464 : if (r->token) {
66 3529 : _mem_save_token_0 = NDR_PULL_GET_MEM_CTX(ndr);
67 3529 : NDR_PULL_SET_MEM_CTX(ndr, r->token, 0);
68 3529 : NDR_CHECK(ndr_pull_security_token(ndr, NDR_SCALARS|NDR_BUFFERS, r->token));
69 3529 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_token_0, 0);
70 : }
71 : }
72 19304 : return NDR_ERR_SUCCESS;
73 : }
74 :
75 0 : _PUBLIC_ void ndr_print_irpc_creds(struct ndr_print *ndr, const char *name, const struct irpc_creds *r)
76 : {
77 0 : ndr_print_struct(ndr, name, "irpc_creds");
78 0 : if (r == NULL) { ndr_print_null(ndr); return; }
79 0 : ndr->depth++;
80 0 : ndr_print_ptr(ndr, "token", r->token);
81 0 : ndr->depth++;
82 0 : if (r->token) {
83 0 : ndr_print_security_token(ndr, "token", r->token);
84 : }
85 0 : ndr->depth--;
86 0 : ndr->depth--;
87 : }
88 :
89 35523 : _PUBLIC_ enum ndr_err_code ndr_push_irpc_header(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct irpc_header *r)
90 : {
91 35523 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
92 35523 : if (ndr_flags & NDR_SCALARS) {
93 35523 : NDR_CHECK(ndr_push_align(ndr, 4));
94 35523 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->uuid));
95 35523 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->if_version));
96 35523 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->callnum));
97 35523 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->callid));
98 56683 : NDR_CHECK(ndr_push_irpc_flags(ndr, NDR_SCALARS, r->flags));
99 35523 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status));
100 : {
101 21160 : struct ndr_push *_ndr_creds;
102 35523 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_creds, 4, -1));
103 35523 : NDR_CHECK(ndr_push_irpc_creds(_ndr_creds, NDR_SCALARS|NDR_BUFFERS, &r->creds));
104 35523 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_creds, 4, -1));
105 : }
106 : {
107 35523 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
108 35523 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
109 35523 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
110 35523 : ndr->flags = _flags_save_DATA_BLOB;
111 : }
112 35523 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
113 : }
114 35523 : if (ndr_flags & NDR_BUFFERS) {
115 21160 : }
116 35523 : return NDR_ERR_SUCCESS;
117 : }
118 :
119 40464 : _PUBLIC_ enum ndr_err_code ndr_pull_irpc_header(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct irpc_header *r)
120 : {
121 40464 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
122 40464 : if (ndr_flags & NDR_SCALARS) {
123 40464 : NDR_CHECK(ndr_pull_align(ndr, 4));
124 40464 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->uuid));
125 40464 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->if_version));
126 40464 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->callnum));
127 40464 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->callid));
128 61624 : NDR_CHECK(ndr_pull_irpc_flags(ndr, NDR_SCALARS, &r->flags));
129 40464 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
130 : {
131 21160 : struct ndr_pull *_ndr_creds;
132 40464 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_creds, 4, -1));
133 40464 : NDR_CHECK(ndr_pull_irpc_creds(_ndr_creds, NDR_SCALARS|NDR_BUFFERS, &r->creds));
134 40464 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_creds, 4, -1));
135 : }
136 : {
137 40464 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
138 40464 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
139 40464 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
140 40464 : ndr->flags = _flags_save_DATA_BLOB;
141 : }
142 40464 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
143 : }
144 40464 : if (ndr_flags & NDR_BUFFERS) {
145 21160 : }
146 40464 : return NDR_ERR_SUCCESS;
147 : }
148 :
149 0 : static void ndr_print_flags_irpc_header(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct irpc_header *r)
150 : {
151 0 : ndr_print_irpc_header(ndr, name, r);
152 0 : }
153 :
154 0 : _PUBLIC_ void ndr_print_irpc_header(struct ndr_print *ndr, const char *name, const struct irpc_header *r)
155 : {
156 0 : ndr_print_struct(ndr, name, "irpc_header");
157 0 : if (r == NULL) { ndr_print_null(ndr); return; }
158 0 : ndr->depth++;
159 0 : ndr_print_GUID(ndr, "uuid", &r->uuid);
160 0 : ndr_print_uint32(ndr, "if_version", r->if_version);
161 0 : ndr_print_uint32(ndr, "callnum", r->callnum);
162 0 : ndr_print_uint32(ndr, "callid", r->callid);
163 0 : ndr_print_irpc_flags(ndr, "flags", r->flags);
164 0 : ndr_print_NTSTATUS(ndr, "status", r->status);
165 0 : ndr_print_irpc_creds(ndr, "creds", &r->creds);
166 : {
167 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
168 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
169 0 : ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
170 0 : ndr->flags = _flags_save_DATA_BLOB;
171 : }
172 0 : ndr->depth--;
173 : }
174 :
175 0 : _PUBLIC_ enum ndr_err_code ndr_push_irpc_name_record(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct irpc_name_record *r)
176 : {
177 0 : uint32_t cntr_ids_0;
178 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
179 0 : if (ndr_flags & NDR_SCALARS) {
180 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
181 0 : NDR_CHECK(ndr_push_align(ndr, 8));
182 : {
183 0 : libndr_flags _flags_save_string = ndr->flags;
184 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
185 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name));
186 0 : ndr->flags = _flags_save_string;
187 : }
188 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
189 0 : for (cntr_ids_0 = 0; cntr_ids_0 < (r->count); cntr_ids_0++) {
190 0 : NDR_CHECK(ndr_push_server_id(ndr, NDR_SCALARS, &r->ids[cntr_ids_0]));
191 : }
192 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
193 : }
194 0 : if (ndr_flags & NDR_BUFFERS) {
195 0 : }
196 0 : return NDR_ERR_SUCCESS;
197 : }
198 :
199 0 : _PUBLIC_ enum ndr_err_code ndr_pull_irpc_name_record(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct irpc_name_record *r)
200 : {
201 0 : uint32_t size_ids_0 = 0;
202 0 : uint32_t cntr_ids_0;
203 0 : TALLOC_CTX *_mem_save_ids_0 = NULL;
204 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
205 0 : if (ndr_flags & NDR_SCALARS) {
206 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->ids));
207 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
208 : {
209 0 : libndr_flags _flags_save_string = ndr->flags;
210 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
211 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name));
212 0 : ndr->flags = _flags_save_string;
213 : }
214 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
215 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->ids, &size_ids_0));
216 0 : NDR_PULL_ALLOC_N(ndr, r->ids, size_ids_0);
217 0 : _mem_save_ids_0 = NDR_PULL_GET_MEM_CTX(ndr);
218 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ids, 0);
219 0 : for (cntr_ids_0 = 0; cntr_ids_0 < (size_ids_0); cntr_ids_0++) {
220 0 : NDR_CHECK(ndr_pull_server_id(ndr, NDR_SCALARS, &r->ids[cntr_ids_0]));
221 : }
222 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ids_0, 0);
223 0 : if (r->ids) {
224 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->ids, r->count));
225 : }
226 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
227 : }
228 0 : if (ndr_flags & NDR_BUFFERS) {
229 0 : }
230 0 : return NDR_ERR_SUCCESS;
231 : }
232 :
233 0 : static void ndr_print_flags_irpc_name_record(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct irpc_name_record *r)
234 : {
235 0 : ndr_print_irpc_name_record(ndr, name, r);
236 0 : }
237 :
238 0 : _PUBLIC_ void ndr_print_irpc_name_record(struct ndr_print *ndr, const char *name, const struct irpc_name_record *r)
239 : {
240 0 : uint32_t cntr_ids_0;
241 0 : ndr_print_struct(ndr, name, "irpc_name_record");
242 0 : if (r == NULL) { ndr_print_null(ndr); return; }
243 0 : ndr->depth++;
244 : {
245 0 : libndr_flags _flags_save_string = ndr->flags;
246 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
247 0 : ndr_print_string(ndr, "name", r->name);
248 0 : ndr->flags = _flags_save_string;
249 : }
250 0 : ndr_print_uint32(ndr, "count", r->count);
251 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "ids", (uint32_t)(r->count));
252 0 : ndr->depth++;
253 0 : for (cntr_ids_0 = 0; cntr_ids_0 < (r->count); cntr_ids_0++) {
254 0 : ndr_print_server_id(ndr, "ids", &r->ids[cntr_ids_0]);
255 : }
256 0 : ndr->depth--;
257 0 : ndr->depth--;
258 : }
259 :
260 0 : _PUBLIC_ enum ndr_err_code ndr_push_irpc_name_records(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct irpc_name_records *r)
261 : {
262 0 : uint32_t cntr_names_0;
263 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
264 0 : if (ndr_flags & NDR_SCALARS) {
265 0 : NDR_CHECK(ndr_push_align(ndr, 5));
266 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_records));
267 0 : for (cntr_names_0 = 0; cntr_names_0 < (r->num_records); cntr_names_0++) {
268 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->names[cntr_names_0]));
269 : }
270 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_records));
271 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
272 : }
273 0 : if (ndr_flags & NDR_BUFFERS) {
274 0 : for (cntr_names_0 = 0; cntr_names_0 < (r->num_records); cntr_names_0++) {
275 0 : if (r->names[cntr_names_0]) {
276 0 : NDR_CHECK(ndr_push_irpc_name_record(ndr, NDR_SCALARS, r->names[cntr_names_0]));
277 : }
278 : }
279 : }
280 0 : return NDR_ERR_SUCCESS;
281 : }
282 :
283 0 : _PUBLIC_ enum ndr_err_code ndr_pull_irpc_name_records(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct irpc_name_records *r)
284 : {
285 0 : uint32_t _ptr_names;
286 0 : uint32_t size_names_0 = 0;
287 0 : uint32_t cntr_names_0;
288 0 : TALLOC_CTX *_mem_save_names_0 = NULL;
289 0 : TALLOC_CTX *_mem_save_names_1 = NULL;
290 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
291 0 : if (ndr_flags & NDR_SCALARS) {
292 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
293 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
294 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->names, &size_names_0));
295 0 : NDR_PULL_ALLOC_N(ndr, r->names, size_names_0);
296 0 : _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
297 0 : NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
298 0 : for (cntr_names_0 = 0; cntr_names_0 < (size_names_0); cntr_names_0++) {
299 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
300 0 : if (_ptr_names) {
301 0 : NDR_PULL_ALLOC(ndr, r->names[cntr_names_0]);
302 : } else {
303 0 : r->names[cntr_names_0] = NULL;
304 : }
305 : }
306 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
307 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_records));
308 0 : if (r->names) {
309 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->num_records));
310 : }
311 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
312 : }
313 0 : if (ndr_flags & NDR_BUFFERS) {
314 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->names, &size_names_0));
315 0 : _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
316 0 : NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
317 0 : for (cntr_names_0 = 0; cntr_names_0 < (size_names_0); cntr_names_0++) {
318 0 : if (r->names[cntr_names_0]) {
319 0 : _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
320 0 : NDR_PULL_SET_MEM_CTX(ndr, r->names[cntr_names_0], 0);
321 0 : NDR_CHECK(ndr_pull_irpc_name_record(ndr, NDR_SCALARS, r->names[cntr_names_0]));
322 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
323 : }
324 : }
325 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
326 0 : for (cntr_names_0 = 0; cntr_names_0 < (size_names_0); cntr_names_0++) {
327 : }
328 : }
329 0 : return NDR_ERR_SUCCESS;
330 : }
331 :
332 0 : static void ndr_print_flags_irpc_name_records(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct irpc_name_records *r)
333 : {
334 0 : ndr_print_irpc_name_records(ndr, name, r);
335 0 : }
336 :
337 0 : _PUBLIC_ void ndr_print_irpc_name_records(struct ndr_print *ndr, const char *name, const struct irpc_name_records *r)
338 : {
339 0 : uint32_t cntr_names_0;
340 0 : ndr_print_struct(ndr, name, "irpc_name_records");
341 0 : if (r == NULL) { ndr_print_null(ndr); return; }
342 0 : ndr->depth++;
343 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "names", (uint32_t)(r->num_records));
344 0 : ndr->depth++;
345 0 : for (cntr_names_0 = 0; cntr_names_0 < (r->num_records); cntr_names_0++) {
346 0 : ndr_print_ptr(ndr, "names", r->names[cntr_names_0]);
347 0 : ndr->depth++;
348 0 : if (r->names[cntr_names_0]) {
349 0 : ndr_print_irpc_name_record(ndr, "names", r->names[cntr_names_0]);
350 : }
351 0 : ndr->depth--;
352 : }
353 0 : ndr->depth--;
354 0 : ndr_print_uint32(ndr, "num_records", r->num_records);
355 0 : ndr->depth--;
356 : }
357 :
358 0 : static enum ndr_err_code ndr_push_nbtd_info_level(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum nbtd_info_level r)
359 : {
360 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
361 0 : return NDR_ERR_SUCCESS;
362 : }
363 :
364 0 : static enum ndr_err_code ndr_pull_nbtd_info_level(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum nbtd_info_level *r)
365 : {
366 0 : uint32_t v;
367 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
368 0 : *r = v;
369 0 : return NDR_ERR_SUCCESS;
370 : }
371 :
372 0 : _PUBLIC_ void ndr_print_nbtd_info_level(struct ndr_print *ndr, const char *name, enum nbtd_info_level r)
373 : {
374 0 : const char *val = NULL;
375 :
376 0 : switch (r) {
377 0 : case NBTD_INFO_STATISTICS: val = "NBTD_INFO_STATISTICS"; break;
378 : }
379 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
380 0 : }
381 :
382 0 : static enum ndr_err_code ndr_push_nbtd_statistics(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct nbtd_statistics *r)
383 : {
384 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
385 0 : if (ndr_flags & NDR_SCALARS) {
386 0 : NDR_CHECK(ndr_push_align(ndr, 8));
387 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->total_received));
388 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->total_sent));
389 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->query_count));
390 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->register_count));
391 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->release_count));
392 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
393 : }
394 0 : if (ndr_flags & NDR_BUFFERS) {
395 0 : }
396 0 : return NDR_ERR_SUCCESS;
397 : }
398 :
399 0 : static enum ndr_err_code ndr_pull_nbtd_statistics(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct nbtd_statistics *r)
400 : {
401 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
402 0 : if (ndr_flags & NDR_SCALARS) {
403 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
404 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->total_received));
405 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->total_sent));
406 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->query_count));
407 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->register_count));
408 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->release_count));
409 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
410 : }
411 0 : if (ndr_flags & NDR_BUFFERS) {
412 0 : }
413 0 : return NDR_ERR_SUCCESS;
414 : }
415 :
416 0 : _PUBLIC_ void ndr_print_nbtd_statistics(struct ndr_print *ndr, const char *name, const struct nbtd_statistics *r)
417 : {
418 0 : ndr_print_struct(ndr, name, "nbtd_statistics");
419 0 : if (r == NULL) { ndr_print_null(ndr); return; }
420 0 : ndr->depth++;
421 0 : ndr_print_hyper(ndr, "total_received", r->total_received);
422 0 : ndr_print_hyper(ndr, "total_sent", r->total_sent);
423 0 : ndr_print_hyper(ndr, "query_count", r->query_count);
424 0 : ndr_print_hyper(ndr, "register_count", r->register_count);
425 0 : ndr_print_hyper(ndr, "release_count", r->release_count);
426 0 : ndr->depth--;
427 : }
428 :
429 0 : static enum ndr_err_code ndr_push_nbtd_info(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union nbtd_info *r)
430 : {
431 0 : uint32_t level;
432 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
433 0 : if (ndr_flags & NDR_SCALARS) {
434 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
435 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
436 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
437 0 : NDR_CHECK(ndr_push_nbtd_info_level(ndr, NDR_SCALARS, level));
438 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
439 0 : switch (level) {
440 0 : case NBTD_INFO_STATISTICS: {
441 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->stats));
442 0 : break; }
443 :
444 0 : default:
445 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
446 : }
447 : }
448 0 : if (ndr_flags & NDR_BUFFERS) {
449 0 : if (!(ndr_flags & NDR_SCALARS)) {
450 : /* We didn't get it above, and the token is not needed after this. */
451 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
452 : }
453 0 : switch (level) {
454 0 : case NBTD_INFO_STATISTICS:
455 0 : if (r->stats) {
456 0 : NDR_CHECK(ndr_push_nbtd_statistics(ndr, NDR_SCALARS, r->stats));
457 : }
458 0 : break;
459 :
460 0 : default:
461 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
462 : }
463 : }
464 0 : return NDR_ERR_SUCCESS;
465 : }
466 :
467 0 : static enum ndr_err_code ndr_pull_nbtd_info(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union nbtd_info *r)
468 : {
469 0 : uint32_t level;
470 0 : uint32_t _level;
471 0 : TALLOC_CTX *_mem_save_stats_0 = NULL;
472 0 : uint32_t _ptr_stats;
473 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
474 0 : if (ndr_flags & NDR_SCALARS) {
475 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
476 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
477 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
478 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
479 0 : if (_level != level) {
480 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
481 : }
482 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
483 0 : switch (level) {
484 0 : case NBTD_INFO_STATISTICS: {
485 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stats));
486 0 : if (_ptr_stats) {
487 0 : NDR_PULL_ALLOC(ndr, r->stats);
488 : } else {
489 0 : r->stats = NULL;
490 : }
491 0 : break; }
492 :
493 0 : default:
494 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
495 : }
496 : }
497 0 : if (ndr_flags & NDR_BUFFERS) {
498 0 : if (!(ndr_flags & NDR_SCALARS)) {
499 : /* We didn't get it above, and the token is not needed after this. */
500 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
501 : }
502 0 : switch (level) {
503 0 : case NBTD_INFO_STATISTICS:
504 0 : if (r->stats) {
505 0 : _mem_save_stats_0 = NDR_PULL_GET_MEM_CTX(ndr);
506 0 : NDR_PULL_SET_MEM_CTX(ndr, r->stats, 0);
507 0 : NDR_CHECK(ndr_pull_nbtd_statistics(ndr, NDR_SCALARS, r->stats));
508 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stats_0, 0);
509 : }
510 0 : break;
511 :
512 0 : default:
513 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
514 : }
515 : }
516 0 : return NDR_ERR_SUCCESS;
517 : }
518 :
519 0 : _PUBLIC_ void ndr_print_nbtd_info(struct ndr_print *ndr, const char *name, const union nbtd_info *r)
520 : {
521 0 : uint32_t level;
522 0 : level = ndr_print_steal_switch_value(ndr, r);
523 0 : ndr_print_union(ndr, name, level, "nbtd_info");
524 0 : switch (level) {
525 0 : case NBTD_INFO_STATISTICS:
526 0 : ndr_print_ptr(ndr, "stats", r->stats);
527 0 : ndr->depth++;
528 0 : if (r->stats) {
529 0 : ndr_print_nbtd_statistics(ndr, "stats", r->stats);
530 : }
531 0 : ndr->depth--;
532 0 : break;
533 :
534 0 : default:
535 0 : ndr_print_bad_level(ndr, name, level);
536 : }
537 0 : }
538 :
539 75 : static enum ndr_err_code ndr_push_nbtd_proxy_wins_addr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct nbtd_proxy_wins_addr *r)
540 : {
541 75 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
542 75 : if (ndr_flags & NDR_SCALARS) {
543 75 : NDR_CHECK(ndr_push_align(ndr, 4));
544 75 : NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->addr));
545 75 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
546 : }
547 75 : if (ndr_flags & NDR_BUFFERS) {
548 0 : }
549 75 : return NDR_ERR_SUCCESS;
550 : }
551 :
552 75 : static enum ndr_err_code ndr_pull_nbtd_proxy_wins_addr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct nbtd_proxy_wins_addr *r)
553 : {
554 75 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
555 75 : if (ndr_flags & NDR_SCALARS) {
556 75 : NDR_CHECK(ndr_pull_align(ndr, 4));
557 75 : NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->addr));
558 75 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
559 : }
560 75 : if (ndr_flags & NDR_BUFFERS) {
561 0 : }
562 75 : return NDR_ERR_SUCCESS;
563 : }
564 :
565 0 : _PUBLIC_ void ndr_print_nbtd_proxy_wins_addr(struct ndr_print *ndr, const char *name, const struct nbtd_proxy_wins_addr *r)
566 : {
567 0 : ndr_print_struct(ndr, name, "nbtd_proxy_wins_addr");
568 0 : if (r == NULL) { ndr_print_null(ndr); return; }
569 0 : ndr->depth++;
570 0 : ndr_print_ipv4address(ndr, "addr", r->addr);
571 0 : ndr->depth--;
572 : }
573 :
574 0 : static enum ndr_err_code ndr_push_smbsrv_info_level(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum smbsrv_info_level r)
575 : {
576 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
577 0 : return NDR_ERR_SUCCESS;
578 : }
579 :
580 0 : static enum ndr_err_code ndr_pull_smbsrv_info_level(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum smbsrv_info_level *r)
581 : {
582 0 : uint32_t v;
583 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
584 0 : *r = v;
585 0 : return NDR_ERR_SUCCESS;
586 : }
587 :
588 0 : _PUBLIC_ void ndr_print_smbsrv_info_level(struct ndr_print *ndr, const char *name, enum smbsrv_info_level r)
589 : {
590 0 : const char *val = NULL;
591 :
592 0 : switch (r) {
593 0 : case SMBSRV_INFO_SESSIONS: val = "SMBSRV_INFO_SESSIONS"; break;
594 0 : case SMBSRV_INFO_TCONS: val = "SMBSRV_INFO_TCONS"; break;
595 : }
596 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
597 0 : }
598 :
599 0 : static enum ndr_err_code ndr_push_smbsrv_session_info(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct smbsrv_session_info *r)
600 : {
601 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
602 0 : if (ndr_flags & NDR_SCALARS) {
603 0 : NDR_CHECK(ndr_push_align(ndr, 8));
604 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->vuid));
605 : {
606 0 : libndr_flags _flags_save_string = ndr->flags;
607 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
608 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->account_name));
609 0 : ndr->flags = _flags_save_string;
610 : }
611 : {
612 0 : libndr_flags _flags_save_string = ndr->flags;
613 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
614 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain_name));
615 0 : ndr->flags = _flags_save_string;
616 : }
617 : {
618 0 : libndr_flags _flags_save_string = ndr->flags;
619 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
620 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->client_ip));
621 0 : ndr->flags = _flags_save_string;
622 : }
623 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->connect_time));
624 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->auth_time));
625 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_use_time));
626 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
627 : }
628 0 : if (ndr_flags & NDR_BUFFERS) {
629 0 : }
630 0 : return NDR_ERR_SUCCESS;
631 : }
632 :
633 0 : static enum ndr_err_code ndr_pull_smbsrv_session_info(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct smbsrv_session_info *r)
634 : {
635 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
636 0 : if (ndr_flags & NDR_SCALARS) {
637 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
638 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->vuid));
639 : {
640 0 : libndr_flags _flags_save_string = ndr->flags;
641 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
642 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->account_name));
643 0 : ndr->flags = _flags_save_string;
644 : }
645 : {
646 0 : libndr_flags _flags_save_string = ndr->flags;
647 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
648 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain_name));
649 0 : ndr->flags = _flags_save_string;
650 : }
651 : {
652 0 : libndr_flags _flags_save_string = ndr->flags;
653 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
654 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->client_ip));
655 0 : ndr->flags = _flags_save_string;
656 : }
657 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->connect_time));
658 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->auth_time));
659 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_use_time));
660 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
661 : }
662 0 : if (ndr_flags & NDR_BUFFERS) {
663 0 : }
664 0 : return NDR_ERR_SUCCESS;
665 : }
666 :
667 0 : _PUBLIC_ void ndr_print_smbsrv_session_info(struct ndr_print *ndr, const char *name, const struct smbsrv_session_info *r)
668 : {
669 0 : ndr_print_struct(ndr, name, "smbsrv_session_info");
670 0 : if (r == NULL) { ndr_print_null(ndr); return; }
671 0 : ndr->depth++;
672 0 : ndr_print_hyper(ndr, "vuid", r->vuid);
673 : {
674 0 : libndr_flags _flags_save_string = ndr->flags;
675 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
676 0 : ndr_print_string(ndr, "account_name", r->account_name);
677 0 : ndr->flags = _flags_save_string;
678 : }
679 : {
680 0 : libndr_flags _flags_save_string = ndr->flags;
681 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
682 0 : ndr_print_string(ndr, "domain_name", r->domain_name);
683 0 : ndr->flags = _flags_save_string;
684 : }
685 : {
686 0 : libndr_flags _flags_save_string = ndr->flags;
687 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
688 0 : ndr_print_string(ndr, "client_ip", r->client_ip);
689 0 : ndr->flags = _flags_save_string;
690 : }
691 0 : ndr_print_NTTIME(ndr, "connect_time", r->connect_time);
692 0 : ndr_print_NTTIME(ndr, "auth_time", r->auth_time);
693 0 : ndr_print_NTTIME(ndr, "last_use_time", r->last_use_time);
694 0 : ndr->depth--;
695 : }
696 :
697 0 : static enum ndr_err_code ndr_push_smbsrv_sessions(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct smbsrv_sessions *r)
698 : {
699 0 : uint32_t cntr_sessions_1;
700 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
701 0 : if (ndr_flags & NDR_SCALARS) {
702 0 : NDR_CHECK(ndr_push_align(ndr, 5));
703 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sessions));
704 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sessions));
705 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
706 : }
707 0 : if (ndr_flags & NDR_BUFFERS) {
708 0 : if (r->sessions) {
709 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_sessions));
710 0 : for (cntr_sessions_1 = 0; cntr_sessions_1 < (r->num_sessions); cntr_sessions_1++) {
711 0 : NDR_CHECK(ndr_push_smbsrv_session_info(ndr, NDR_SCALARS, &r->sessions[cntr_sessions_1]));
712 : }
713 : }
714 : }
715 0 : return NDR_ERR_SUCCESS;
716 : }
717 :
718 0 : static enum ndr_err_code ndr_pull_smbsrv_sessions(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct smbsrv_sessions *r)
719 : {
720 0 : uint32_t _ptr_sessions;
721 0 : uint32_t size_sessions_1 = 0;
722 0 : uint32_t cntr_sessions_1;
723 0 : TALLOC_CTX *_mem_save_sessions_0 = NULL;
724 0 : TALLOC_CTX *_mem_save_sessions_1 = NULL;
725 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
726 0 : if (ndr_flags & NDR_SCALARS) {
727 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
728 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sessions));
729 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sessions));
730 0 : if (_ptr_sessions) {
731 0 : NDR_PULL_ALLOC(ndr, r->sessions);
732 : } else {
733 0 : r->sessions = NULL;
734 : }
735 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
736 : }
737 0 : if (ndr_flags & NDR_BUFFERS) {
738 0 : if (r->sessions) {
739 0 : _mem_save_sessions_0 = NDR_PULL_GET_MEM_CTX(ndr);
740 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sessions, 0);
741 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->sessions));
742 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sessions, &size_sessions_1));
743 0 : NDR_PULL_ALLOC_N(ndr, r->sessions, size_sessions_1);
744 0 : _mem_save_sessions_1 = NDR_PULL_GET_MEM_CTX(ndr);
745 0 : NDR_PULL_SET_MEM_CTX(ndr, r->sessions, 0);
746 0 : for (cntr_sessions_1 = 0; cntr_sessions_1 < (size_sessions_1); cntr_sessions_1++) {
747 0 : NDR_CHECK(ndr_pull_smbsrv_session_info(ndr, NDR_SCALARS, &r->sessions[cntr_sessions_1]));
748 : }
749 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sessions_1, 0);
750 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sessions_0, 0);
751 : }
752 0 : if (r->sessions) {
753 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->sessions, r->num_sessions));
754 : }
755 : }
756 0 : return NDR_ERR_SUCCESS;
757 : }
758 :
759 0 : _PUBLIC_ void ndr_print_smbsrv_sessions(struct ndr_print *ndr, const char *name, const struct smbsrv_sessions *r)
760 : {
761 0 : uint32_t cntr_sessions_1;
762 0 : ndr_print_struct(ndr, name, "smbsrv_sessions");
763 0 : if (r == NULL) { ndr_print_null(ndr); return; }
764 0 : ndr->depth++;
765 0 : ndr_print_uint32(ndr, "num_sessions", r->num_sessions);
766 0 : ndr_print_ptr(ndr, "sessions", r->sessions);
767 0 : ndr->depth++;
768 0 : if (r->sessions) {
769 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "sessions", (uint32_t)(r->num_sessions));
770 0 : ndr->depth++;
771 0 : for (cntr_sessions_1 = 0; cntr_sessions_1 < (r->num_sessions); cntr_sessions_1++) {
772 0 : ndr_print_smbsrv_session_info(ndr, "sessions", &r->sessions[cntr_sessions_1]);
773 : }
774 0 : ndr->depth--;
775 : }
776 0 : ndr->depth--;
777 0 : ndr->depth--;
778 : }
779 :
780 0 : static enum ndr_err_code ndr_push_smbsrv_tcon_info(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct smbsrv_tcon_info *r)
781 : {
782 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
783 0 : if (ndr_flags & NDR_SCALARS) {
784 0 : NDR_CHECK(ndr_push_align(ndr, 4));
785 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->tid));
786 : {
787 0 : libndr_flags _flags_save_string = ndr->flags;
788 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
789 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->share_name));
790 0 : ndr->flags = _flags_save_string;
791 : }
792 : {
793 0 : libndr_flags _flags_save_string = ndr->flags;
794 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
795 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->client_ip));
796 0 : ndr->flags = _flags_save_string;
797 : }
798 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->connect_time));
799 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_use_time));
800 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
801 : }
802 0 : if (ndr_flags & NDR_BUFFERS) {
803 0 : }
804 0 : return NDR_ERR_SUCCESS;
805 : }
806 :
807 0 : static enum ndr_err_code ndr_pull_smbsrv_tcon_info(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct smbsrv_tcon_info *r)
808 : {
809 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
810 0 : if (ndr_flags & NDR_SCALARS) {
811 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
812 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->tid));
813 : {
814 0 : libndr_flags _flags_save_string = ndr->flags;
815 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
816 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->share_name));
817 0 : ndr->flags = _flags_save_string;
818 : }
819 : {
820 0 : libndr_flags _flags_save_string = ndr->flags;
821 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
822 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->client_ip));
823 0 : ndr->flags = _flags_save_string;
824 : }
825 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->connect_time));
826 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_use_time));
827 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
828 : }
829 0 : if (ndr_flags & NDR_BUFFERS) {
830 0 : }
831 0 : return NDR_ERR_SUCCESS;
832 : }
833 :
834 0 : _PUBLIC_ void ndr_print_smbsrv_tcon_info(struct ndr_print *ndr, const char *name, const struct smbsrv_tcon_info *r)
835 : {
836 0 : ndr_print_struct(ndr, name, "smbsrv_tcon_info");
837 0 : if (r == NULL) { ndr_print_null(ndr); return; }
838 0 : ndr->depth++;
839 0 : ndr_print_uint32(ndr, "tid", r->tid);
840 : {
841 0 : libndr_flags _flags_save_string = ndr->flags;
842 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
843 0 : ndr_print_string(ndr, "share_name", r->share_name);
844 0 : ndr->flags = _flags_save_string;
845 : }
846 : {
847 0 : libndr_flags _flags_save_string = ndr->flags;
848 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
849 0 : ndr_print_string(ndr, "client_ip", r->client_ip);
850 0 : ndr->flags = _flags_save_string;
851 : }
852 0 : ndr_print_NTTIME(ndr, "connect_time", r->connect_time);
853 0 : ndr_print_NTTIME(ndr, "last_use_time", r->last_use_time);
854 0 : ndr->depth--;
855 : }
856 :
857 0 : static enum ndr_err_code ndr_push_smbsrv_tcons(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct smbsrv_tcons *r)
858 : {
859 0 : uint32_t cntr_tcons_1;
860 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
861 0 : if (ndr_flags & NDR_SCALARS) {
862 0 : NDR_CHECK(ndr_push_align(ndr, 5));
863 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_tcons));
864 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->tcons));
865 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
866 : }
867 0 : if (ndr_flags & NDR_BUFFERS) {
868 0 : if (r->tcons) {
869 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_tcons));
870 0 : for (cntr_tcons_1 = 0; cntr_tcons_1 < (r->num_tcons); cntr_tcons_1++) {
871 0 : NDR_CHECK(ndr_push_smbsrv_tcon_info(ndr, NDR_SCALARS, &r->tcons[cntr_tcons_1]));
872 : }
873 : }
874 : }
875 0 : return NDR_ERR_SUCCESS;
876 : }
877 :
878 0 : static enum ndr_err_code ndr_pull_smbsrv_tcons(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct smbsrv_tcons *r)
879 : {
880 0 : uint32_t _ptr_tcons;
881 0 : uint32_t size_tcons_1 = 0;
882 0 : uint32_t cntr_tcons_1;
883 0 : TALLOC_CTX *_mem_save_tcons_0 = NULL;
884 0 : TALLOC_CTX *_mem_save_tcons_1 = NULL;
885 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
886 0 : if (ndr_flags & NDR_SCALARS) {
887 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
888 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_tcons));
889 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_tcons));
890 0 : if (_ptr_tcons) {
891 0 : NDR_PULL_ALLOC(ndr, r->tcons);
892 : } else {
893 0 : r->tcons = NULL;
894 : }
895 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
896 : }
897 0 : if (ndr_flags & NDR_BUFFERS) {
898 0 : if (r->tcons) {
899 0 : _mem_save_tcons_0 = NDR_PULL_GET_MEM_CTX(ndr);
900 0 : NDR_PULL_SET_MEM_CTX(ndr, r->tcons, 0);
901 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->tcons));
902 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->tcons, &size_tcons_1));
903 0 : NDR_PULL_ALLOC_N(ndr, r->tcons, size_tcons_1);
904 0 : _mem_save_tcons_1 = NDR_PULL_GET_MEM_CTX(ndr);
905 0 : NDR_PULL_SET_MEM_CTX(ndr, r->tcons, 0);
906 0 : for (cntr_tcons_1 = 0; cntr_tcons_1 < (size_tcons_1); cntr_tcons_1++) {
907 0 : NDR_CHECK(ndr_pull_smbsrv_tcon_info(ndr, NDR_SCALARS, &r->tcons[cntr_tcons_1]));
908 : }
909 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tcons_1, 0);
910 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tcons_0, 0);
911 : }
912 0 : if (r->tcons) {
913 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->tcons, r->num_tcons));
914 : }
915 : }
916 0 : return NDR_ERR_SUCCESS;
917 : }
918 :
919 0 : _PUBLIC_ void ndr_print_smbsrv_tcons(struct ndr_print *ndr, const char *name, const struct smbsrv_tcons *r)
920 : {
921 0 : uint32_t cntr_tcons_1;
922 0 : ndr_print_struct(ndr, name, "smbsrv_tcons");
923 0 : if (r == NULL) { ndr_print_null(ndr); return; }
924 0 : ndr->depth++;
925 0 : ndr_print_uint32(ndr, "num_tcons", r->num_tcons);
926 0 : ndr_print_ptr(ndr, "tcons", r->tcons);
927 0 : ndr->depth++;
928 0 : if (r->tcons) {
929 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "tcons", (uint32_t)(r->num_tcons));
930 0 : ndr->depth++;
931 0 : for (cntr_tcons_1 = 0; cntr_tcons_1 < (r->num_tcons); cntr_tcons_1++) {
932 0 : ndr_print_smbsrv_tcon_info(ndr, "tcons", &r->tcons[cntr_tcons_1]);
933 : }
934 0 : ndr->depth--;
935 : }
936 0 : ndr->depth--;
937 0 : ndr->depth--;
938 : }
939 :
940 0 : static enum ndr_err_code ndr_push_smbsrv_info(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union smbsrv_info *r)
941 : {
942 0 : uint32_t level;
943 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
944 0 : if (ndr_flags & NDR_SCALARS) {
945 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
946 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
947 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
948 0 : NDR_CHECK(ndr_push_smbsrv_info_level(ndr, NDR_SCALARS, level));
949 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
950 0 : switch (level) {
951 0 : case SMBSRV_INFO_SESSIONS: {
952 0 : NDR_CHECK(ndr_push_smbsrv_sessions(ndr, NDR_SCALARS, &r->sessions));
953 0 : break; }
954 :
955 0 : case SMBSRV_INFO_TCONS: {
956 0 : NDR_CHECK(ndr_push_smbsrv_tcons(ndr, NDR_SCALARS, &r->tcons));
957 0 : break; }
958 :
959 0 : default:
960 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
961 : }
962 : }
963 0 : if (ndr_flags & NDR_BUFFERS) {
964 0 : if (!(ndr_flags & NDR_SCALARS)) {
965 : /* We didn't get it above, and the token is not needed after this. */
966 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
967 : }
968 0 : switch (level) {
969 0 : case SMBSRV_INFO_SESSIONS:
970 0 : NDR_CHECK(ndr_push_smbsrv_sessions(ndr, NDR_BUFFERS, &r->sessions));
971 0 : break;
972 :
973 0 : case SMBSRV_INFO_TCONS:
974 0 : NDR_CHECK(ndr_push_smbsrv_tcons(ndr, NDR_BUFFERS, &r->tcons));
975 0 : break;
976 :
977 0 : default:
978 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
979 : }
980 : }
981 0 : return NDR_ERR_SUCCESS;
982 : }
983 :
984 0 : static enum ndr_err_code ndr_pull_smbsrv_info(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union smbsrv_info *r)
985 : {
986 0 : uint32_t level;
987 0 : uint32_t _level;
988 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
989 0 : if (ndr_flags & NDR_SCALARS) {
990 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
991 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
992 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
993 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
994 0 : if (_level != level) {
995 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
996 : }
997 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
998 0 : switch (level) {
999 0 : case SMBSRV_INFO_SESSIONS: {
1000 0 : NDR_CHECK(ndr_pull_smbsrv_sessions(ndr, NDR_SCALARS, &r->sessions));
1001 0 : break; }
1002 :
1003 0 : case SMBSRV_INFO_TCONS: {
1004 0 : NDR_CHECK(ndr_pull_smbsrv_tcons(ndr, NDR_SCALARS, &r->tcons));
1005 0 : break; }
1006 :
1007 0 : default:
1008 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
1009 : }
1010 : }
1011 0 : if (ndr_flags & NDR_BUFFERS) {
1012 0 : if (!(ndr_flags & NDR_SCALARS)) {
1013 : /* We didn't get it above, and the token is not needed after this. */
1014 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1015 : }
1016 0 : switch (level) {
1017 0 : case SMBSRV_INFO_SESSIONS:
1018 0 : NDR_CHECK(ndr_pull_smbsrv_sessions(ndr, NDR_BUFFERS, &r->sessions));
1019 0 : break;
1020 :
1021 0 : case SMBSRV_INFO_TCONS:
1022 0 : NDR_CHECK(ndr_pull_smbsrv_tcons(ndr, NDR_BUFFERS, &r->tcons));
1023 0 : break;
1024 :
1025 0 : default:
1026 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
1027 : }
1028 : }
1029 0 : return NDR_ERR_SUCCESS;
1030 : }
1031 :
1032 0 : _PUBLIC_ void ndr_print_smbsrv_info(struct ndr_print *ndr, const char *name, const union smbsrv_info *r)
1033 : {
1034 0 : uint32_t level;
1035 0 : level = ndr_print_steal_switch_value(ndr, r);
1036 0 : ndr_print_union(ndr, name, level, "smbsrv_info");
1037 0 : switch (level) {
1038 0 : case SMBSRV_INFO_SESSIONS:
1039 0 : ndr_print_smbsrv_sessions(ndr, "sessions", &r->sessions);
1040 0 : break;
1041 :
1042 0 : case SMBSRV_INFO_TCONS:
1043 0 : ndr_print_smbsrv_tcons(ndr, "tcons", &r->tcons);
1044 0 : break;
1045 :
1046 0 : default:
1047 0 : ndr_print_bad_level(ndr, name, level);
1048 : }
1049 0 : }
1050 :
1051 22 : static enum ndr_err_code ndr_push_drepl_role_master(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drepl_role_master r)
1052 : {
1053 22 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1054 22 : return NDR_ERR_SUCCESS;
1055 : }
1056 :
1057 22 : static enum ndr_err_code ndr_pull_drepl_role_master(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drepl_role_master *r)
1058 : {
1059 0 : uint32_t v;
1060 22 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1061 22 : *r = v;
1062 22 : return NDR_ERR_SUCCESS;
1063 : }
1064 :
1065 0 : _PUBLIC_ void ndr_print_drepl_role_master(struct ndr_print *ndr, const char *name, enum drepl_role_master r)
1066 : {
1067 0 : const char *val = NULL;
1068 :
1069 0 : switch (r) {
1070 0 : case DREPL_SCHEMA_MASTER: val = "DREPL_SCHEMA_MASTER"; break;
1071 0 : case DREPL_RID_MASTER: val = "DREPL_RID_MASTER"; break;
1072 0 : case DREPL_INFRASTRUCTURE_MASTER: val = "DREPL_INFRASTRUCTURE_MASTER"; break;
1073 0 : case DREPL_NAMING_MASTER: val = "DREPL_NAMING_MASTER"; break;
1074 0 : case DREPL_PDC_MASTER: val = "DREPL_PDC_MASTER"; break;
1075 : }
1076 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
1077 0 : }
1078 :
1079 0 : static enum ndr_err_code ndr_push_irpc_uptime(struct ndr_push *ndr, ndr_flags_type flags, const struct irpc_uptime *r)
1080 : {
1081 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1082 0 : if (flags & NDR_IN) {
1083 0 : }
1084 0 : if (flags & NDR_OUT) {
1085 0 : if (r->out.start_time == NULL) {
1086 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1087 : }
1088 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, *r->out.start_time));
1089 : }
1090 0 : return NDR_ERR_SUCCESS;
1091 : }
1092 :
1093 0 : static enum ndr_err_code ndr_pull_irpc_uptime(struct ndr_pull *ndr, ndr_flags_type flags, struct irpc_uptime *r)
1094 : {
1095 0 : TALLOC_CTX *_mem_save_start_time_0 = NULL;
1096 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1097 0 : if (flags & NDR_IN) {
1098 0 : NDR_ZERO_STRUCT(r->out);
1099 :
1100 0 : NDR_PULL_ALLOC(ndr, r->out.start_time);
1101 0 : NDR_ZERO_STRUCTP(r->out.start_time);
1102 : }
1103 0 : if (flags & NDR_OUT) {
1104 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1105 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1106 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1107 0 : NDR_PULL_ALLOC(ndr, r->out.start_time);
1108 : }
1109 0 : _mem_save_start_time_0 = NDR_PULL_GET_MEM_CTX(ndr);
1110 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.start_time, LIBNDR_FLAG_REF_ALLOC);
1111 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, r->out.start_time));
1112 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_start_time_0, LIBNDR_FLAG_REF_ALLOC);
1113 : }
1114 0 : return NDR_ERR_SUCCESS;
1115 : }
1116 :
1117 0 : _PUBLIC_ void ndr_print_irpc_uptime(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct irpc_uptime *r)
1118 : {
1119 0 : ndr_print_struct(ndr, name, "irpc_uptime");
1120 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1121 0 : ndr->depth++;
1122 0 : if (flags & NDR_SET_VALUES) {
1123 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1124 : }
1125 0 : if (flags & NDR_IN) {
1126 0 : ndr_print_struct(ndr, "in", "irpc_uptime");
1127 0 : ndr->depth++;
1128 0 : ndr->depth--;
1129 : }
1130 0 : if (flags & NDR_OUT) {
1131 0 : ndr_print_struct(ndr, "out", "irpc_uptime");
1132 0 : ndr->depth++;
1133 0 : ndr_print_ptr(ndr, "start_time", r->out.start_time);
1134 0 : ndr->depth++;
1135 0 : ndr_print_NTTIME(ndr, "start_time", *r->out.start_time);
1136 0 : ndr->depth--;
1137 0 : ndr->depth--;
1138 : }
1139 0 : ndr->depth--;
1140 : }
1141 :
1142 0 : static enum ndr_err_code ndr_push_nbtd_information(struct ndr_push *ndr, ndr_flags_type flags, const struct nbtd_information *r)
1143 : {
1144 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1145 0 : if (flags & NDR_IN) {
1146 0 : NDR_CHECK(ndr_push_nbtd_info_level(ndr, NDR_SCALARS, r->in.level));
1147 : }
1148 0 : if (flags & NDR_OUT) {
1149 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info, r->in.level));
1150 0 : NDR_CHECK(ndr_push_nbtd_info(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.info));
1151 : }
1152 0 : return NDR_ERR_SUCCESS;
1153 : }
1154 :
1155 0 : static enum ndr_err_code ndr_pull_nbtd_information(struct ndr_pull *ndr, ndr_flags_type flags, struct nbtd_information *r)
1156 : {
1157 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1158 0 : if (flags & NDR_IN) {
1159 0 : NDR_ZERO_STRUCT(r->out);
1160 :
1161 0 : NDR_CHECK(ndr_pull_nbtd_info_level(ndr, NDR_SCALARS, &r->in.level));
1162 : }
1163 0 : if (flags & NDR_OUT) {
1164 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1165 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1166 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info, r->in.level));
1167 0 : NDR_CHECK(ndr_pull_nbtd_info(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.info));
1168 : }
1169 0 : return NDR_ERR_SUCCESS;
1170 : }
1171 :
1172 0 : _PUBLIC_ void ndr_print_nbtd_information(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct nbtd_information *r)
1173 : {
1174 0 : ndr_print_struct(ndr, name, "nbtd_information");
1175 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1176 0 : ndr->depth++;
1177 0 : if (flags & NDR_SET_VALUES) {
1178 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1179 : }
1180 0 : if (flags & NDR_IN) {
1181 0 : ndr_print_struct(ndr, "in", "nbtd_information");
1182 0 : ndr->depth++;
1183 0 : ndr_print_nbtd_info_level(ndr, "level", r->in.level);
1184 0 : ndr->depth--;
1185 : }
1186 0 : if (flags & NDR_OUT) {
1187 0 : ndr_print_struct(ndr, "out", "nbtd_information");
1188 0 : ndr->depth++;
1189 0 : ndr_print_set_switch_value(ndr, &r->out.info, r->in.level);
1190 0 : ndr_print_nbtd_info(ndr, "info", &r->out.info);
1191 0 : ndr->depth--;
1192 : }
1193 0 : ndr->depth--;
1194 : }
1195 :
1196 0 : static enum ndr_err_code ndr_push_nbtd_getdcname(struct ndr_push *ndr, ndr_flags_type flags, const struct nbtd_getdcname *r)
1197 : {
1198 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1199 0 : if (flags & NDR_IN) {
1200 0 : if (r->in.domain_sid == NULL) {
1201 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1202 : }
1203 : {
1204 0 : libndr_flags _flags_save_string = ndr->flags;
1205 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1206 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->in.domainname));
1207 0 : ndr->flags = _flags_save_string;
1208 : }
1209 : {
1210 0 : libndr_flags _flags_save_string = ndr->flags;
1211 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1212 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->in.ip_address));
1213 0 : ndr->flags = _flags_save_string;
1214 : }
1215 : {
1216 0 : libndr_flags _flags_save_string = ndr->flags;
1217 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1218 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->in.my_computername));
1219 0 : ndr->flags = _flags_save_string;
1220 : }
1221 : {
1222 0 : libndr_flags _flags_save_string = ndr->flags;
1223 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1224 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->in.my_accountname));
1225 0 : ndr->flags = _flags_save_string;
1226 : }
1227 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.account_control));
1228 0 : NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.domain_sid));
1229 : }
1230 0 : if (flags & NDR_OUT) {
1231 : {
1232 0 : libndr_flags _flags_save_string = ndr->flags;
1233 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1234 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.dcname));
1235 0 : if (r->out.dcname) {
1236 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->out.dcname));
1237 : }
1238 0 : ndr->flags = _flags_save_string;
1239 : }
1240 : }
1241 0 : return NDR_ERR_SUCCESS;
1242 : }
1243 :
1244 0 : static enum ndr_err_code ndr_pull_nbtd_getdcname(struct ndr_pull *ndr, ndr_flags_type flags, struct nbtd_getdcname *r)
1245 : {
1246 0 : uint32_t _ptr_dcname;
1247 0 : TALLOC_CTX *_mem_save_domain_sid_0 = NULL;
1248 0 : TALLOC_CTX *_mem_save_dcname_0 = NULL;
1249 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1250 0 : if (flags & NDR_IN) {
1251 0 : NDR_ZERO_STRUCT(r->out);
1252 :
1253 : {
1254 0 : libndr_flags _flags_save_string = ndr->flags;
1255 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1256 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->in.domainname));
1257 0 : ndr->flags = _flags_save_string;
1258 : }
1259 : {
1260 0 : libndr_flags _flags_save_string = ndr->flags;
1261 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1262 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->in.ip_address));
1263 0 : ndr->flags = _flags_save_string;
1264 : }
1265 : {
1266 0 : libndr_flags _flags_save_string = ndr->flags;
1267 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1268 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->in.my_computername));
1269 0 : ndr->flags = _flags_save_string;
1270 : }
1271 : {
1272 0 : libndr_flags _flags_save_string = ndr->flags;
1273 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1274 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->in.my_accountname));
1275 0 : ndr->flags = _flags_save_string;
1276 : }
1277 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.account_control));
1278 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1279 0 : NDR_PULL_ALLOC(ndr, r->in.domain_sid);
1280 : }
1281 0 : _mem_save_domain_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1282 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_sid, LIBNDR_FLAG_REF_ALLOC);
1283 0 : NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.domain_sid));
1284 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_sid_0, LIBNDR_FLAG_REF_ALLOC);
1285 : }
1286 0 : if (flags & NDR_OUT) {
1287 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1288 : if (r->in.domain_sid == NULL) {
1289 : NDR_PULL_ALLOC(ndr, r->in.domain_sid);
1290 : NDR_ZERO_STRUCTP(r->in.domain_sid);
1291 : }
1292 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1293 : {
1294 0 : libndr_flags _flags_save_string = ndr->flags;
1295 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1296 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dcname));
1297 0 : if (_ptr_dcname) {
1298 0 : NDR_PULL_ALLOC(ndr, r->out.dcname);
1299 : } else {
1300 0 : r->out.dcname = NULL;
1301 : }
1302 0 : if (r->out.dcname) {
1303 0 : _mem_save_dcname_0 = NDR_PULL_GET_MEM_CTX(ndr);
1304 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.dcname, 0);
1305 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->out.dcname));
1306 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_0, 0);
1307 : }
1308 0 : ndr->flags = _flags_save_string;
1309 : }
1310 : }
1311 0 : return NDR_ERR_SUCCESS;
1312 : }
1313 :
1314 0 : _PUBLIC_ void ndr_print_nbtd_getdcname(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct nbtd_getdcname *r)
1315 : {
1316 0 : ndr_print_struct(ndr, name, "nbtd_getdcname");
1317 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1318 0 : ndr->depth++;
1319 0 : if (flags & NDR_SET_VALUES) {
1320 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1321 : }
1322 0 : if (flags & NDR_IN) {
1323 0 : ndr_print_struct(ndr, "in", "nbtd_getdcname");
1324 0 : ndr->depth++;
1325 : {
1326 0 : libndr_flags _flags_save_string = ndr->flags;
1327 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1328 0 : ndr_print_string(ndr, "domainname", r->in.domainname);
1329 0 : ndr->flags = _flags_save_string;
1330 : }
1331 : {
1332 0 : libndr_flags _flags_save_string = ndr->flags;
1333 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1334 0 : ndr_print_string(ndr, "ip_address", r->in.ip_address);
1335 0 : ndr->flags = _flags_save_string;
1336 : }
1337 : {
1338 0 : libndr_flags _flags_save_string = ndr->flags;
1339 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1340 0 : ndr_print_string(ndr, "my_computername", r->in.my_computername);
1341 0 : ndr->flags = _flags_save_string;
1342 : }
1343 : {
1344 0 : libndr_flags _flags_save_string = ndr->flags;
1345 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1346 0 : ndr_print_string(ndr, "my_accountname", r->in.my_accountname);
1347 0 : ndr->flags = _flags_save_string;
1348 : }
1349 0 : ndr_print_uint32(ndr, "account_control", r->in.account_control);
1350 0 : ndr_print_ptr(ndr, "domain_sid", r->in.domain_sid);
1351 0 : ndr->depth++;
1352 0 : ndr_print_dom_sid(ndr, "domain_sid", r->in.domain_sid);
1353 0 : ndr->depth--;
1354 0 : ndr->depth--;
1355 : }
1356 0 : if (flags & NDR_OUT) {
1357 0 : ndr_print_struct(ndr, "out", "nbtd_getdcname");
1358 0 : ndr->depth++;
1359 : {
1360 0 : libndr_flags _flags_save_string = ndr->flags;
1361 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1362 0 : ndr_print_ptr(ndr, "dcname", r->out.dcname);
1363 0 : ndr->depth++;
1364 0 : if (r->out.dcname) {
1365 0 : ndr_print_string(ndr, "dcname", r->out.dcname);
1366 : }
1367 0 : ndr->depth--;
1368 0 : ndr->flags = _flags_save_string;
1369 : }
1370 0 : ndr->depth--;
1371 : }
1372 0 : ndr->depth--;
1373 : }
1374 :
1375 42 : static enum ndr_err_code ndr_push_nbtd_proxy_wins_challenge(struct ndr_push *ndr, ndr_flags_type flags, const struct nbtd_proxy_wins_challenge *r)
1376 : {
1377 0 : uint32_t cntr_addrs_0;
1378 42 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1379 42 : if (flags & NDR_IN) {
1380 21 : NDR_CHECK(ndr_push_nbt_name(ndr, NDR_SCALARS, &r->in.name));
1381 21 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_addrs));
1382 48 : for (cntr_addrs_0 = 0; cntr_addrs_0 < (r->in.num_addrs); cntr_addrs_0++) {
1383 27 : NDR_CHECK(ndr_push_nbtd_proxy_wins_addr(ndr, NDR_SCALARS, &r->in.addrs[cntr_addrs_0]));
1384 : }
1385 : }
1386 42 : if (flags & NDR_OUT) {
1387 21 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.num_addrs));
1388 59 : for (cntr_addrs_0 = 0; cntr_addrs_0 < (r->out.num_addrs); cntr_addrs_0++) {
1389 38 : NDR_CHECK(ndr_push_nbtd_proxy_wins_addr(ndr, NDR_SCALARS, &r->out.addrs[cntr_addrs_0]));
1390 : }
1391 : }
1392 42 : return NDR_ERR_SUCCESS;
1393 : }
1394 :
1395 37 : static enum ndr_err_code ndr_pull_nbtd_proxy_wins_challenge(struct ndr_pull *ndr, ndr_flags_type flags, struct nbtd_proxy_wins_challenge *r)
1396 : {
1397 37 : uint32_t size_addrs_0 = 0;
1398 0 : uint32_t cntr_addrs_0;
1399 37 : TALLOC_CTX *_mem_save_addrs_0 = NULL;
1400 37 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1401 37 : if (flags & NDR_IN) {
1402 21 : NDR_ZERO_STRUCT(r->out);
1403 :
1404 21 : NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->in.name));
1405 21 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_addrs));
1406 21 : size_addrs_0 = r->in.num_addrs;
1407 21 : NDR_PULL_ALLOC_N(ndr, r->in.addrs, size_addrs_0);
1408 21 : _mem_save_addrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
1409 21 : NDR_PULL_SET_MEM_CTX(ndr, r->in.addrs, 0);
1410 48 : for (cntr_addrs_0 = 0; cntr_addrs_0 < (size_addrs_0); cntr_addrs_0++) {
1411 27 : NDR_CHECK(ndr_pull_nbtd_proxy_wins_addr(ndr, NDR_SCALARS, &r->in.addrs[cntr_addrs_0]));
1412 : }
1413 21 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addrs_0, 0);
1414 : }
1415 37 : if (flags & NDR_OUT) {
1416 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1417 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1418 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.num_addrs));
1419 16 : size_addrs_0 = r->out.num_addrs;
1420 16 : NDR_PULL_ALLOC_N(ndr, r->out.addrs, size_addrs_0);
1421 16 : _mem_save_addrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
1422 16 : NDR_PULL_SET_MEM_CTX(ndr, r->out.addrs, 0);
1423 54 : for (cntr_addrs_0 = 0; cntr_addrs_0 < (size_addrs_0); cntr_addrs_0++) {
1424 38 : NDR_CHECK(ndr_pull_nbtd_proxy_wins_addr(ndr, NDR_SCALARS, &r->out.addrs[cntr_addrs_0]));
1425 : }
1426 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addrs_0, 0);
1427 : }
1428 37 : return NDR_ERR_SUCCESS;
1429 : }
1430 :
1431 0 : _PUBLIC_ void ndr_print_nbtd_proxy_wins_challenge(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct nbtd_proxy_wins_challenge *r)
1432 : {
1433 0 : uint32_t cntr_addrs_0;
1434 0 : ndr_print_struct(ndr, name, "nbtd_proxy_wins_challenge");
1435 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1436 0 : ndr->depth++;
1437 0 : if (flags & NDR_SET_VALUES) {
1438 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1439 : }
1440 0 : if (flags & NDR_IN) {
1441 0 : ndr_print_struct(ndr, "in", "nbtd_proxy_wins_challenge");
1442 0 : ndr->depth++;
1443 0 : ndr_print_nbt_name(ndr, "name", &r->in.name);
1444 0 : ndr_print_uint32(ndr, "num_addrs", r->in.num_addrs);
1445 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "addrs", (uint32_t)(r->in.num_addrs));
1446 0 : ndr->depth++;
1447 0 : for (cntr_addrs_0 = 0; cntr_addrs_0 < (r->in.num_addrs); cntr_addrs_0++) {
1448 0 : ndr_print_nbtd_proxy_wins_addr(ndr, "addrs", &r->in.addrs[cntr_addrs_0]);
1449 : }
1450 0 : ndr->depth--;
1451 0 : ndr->depth--;
1452 : }
1453 0 : if (flags & NDR_OUT) {
1454 0 : ndr_print_struct(ndr, "out", "nbtd_proxy_wins_challenge");
1455 0 : ndr->depth++;
1456 0 : ndr_print_uint32(ndr, "num_addrs", r->out.num_addrs);
1457 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "addrs", (uint32_t)(r->out.num_addrs));
1458 0 : ndr->depth++;
1459 0 : for (cntr_addrs_0 = 0; cntr_addrs_0 < (r->out.num_addrs); cntr_addrs_0++) {
1460 0 : ndr_print_nbtd_proxy_wins_addr(ndr, "addrs", &r->out.addrs[cntr_addrs_0]);
1461 : }
1462 0 : ndr->depth--;
1463 0 : ndr->depth--;
1464 : }
1465 0 : ndr->depth--;
1466 : }
1467 :
1468 20 : static enum ndr_err_code ndr_push_nbtd_proxy_wins_release_demand(struct ndr_push *ndr, ndr_flags_type flags, const struct nbtd_proxy_wins_release_demand *r)
1469 : {
1470 0 : uint32_t cntr_addrs_0;
1471 20 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1472 20 : if (flags & NDR_IN) {
1473 10 : NDR_CHECK(ndr_push_nbt_name(ndr, NDR_SCALARS, &r->in.name));
1474 10 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_addrs));
1475 20 : for (cntr_addrs_0 = 0; cntr_addrs_0 < (r->in.num_addrs); cntr_addrs_0++) {
1476 10 : NDR_CHECK(ndr_push_nbtd_proxy_wins_addr(ndr, NDR_SCALARS, &r->in.addrs[cntr_addrs_0]));
1477 : }
1478 : }
1479 20 : if (flags & NDR_OUT) {
1480 0 : }
1481 20 : return NDR_ERR_SUCCESS;
1482 : }
1483 :
1484 19 : static enum ndr_err_code ndr_pull_nbtd_proxy_wins_release_demand(struct ndr_pull *ndr, ndr_flags_type flags, struct nbtd_proxy_wins_release_demand *r)
1485 : {
1486 19 : uint32_t size_addrs_0 = 0;
1487 0 : uint32_t cntr_addrs_0;
1488 19 : TALLOC_CTX *_mem_save_addrs_0 = NULL;
1489 19 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1490 19 : if (flags & NDR_IN) {
1491 10 : NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->in.name));
1492 10 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_addrs));
1493 10 : size_addrs_0 = r->in.num_addrs;
1494 10 : NDR_PULL_ALLOC_N(ndr, r->in.addrs, size_addrs_0);
1495 10 : _mem_save_addrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
1496 10 : NDR_PULL_SET_MEM_CTX(ndr, r->in.addrs, 0);
1497 20 : for (cntr_addrs_0 = 0; cntr_addrs_0 < (size_addrs_0); cntr_addrs_0++) {
1498 10 : NDR_CHECK(ndr_pull_nbtd_proxy_wins_addr(ndr, NDR_SCALARS, &r->in.addrs[cntr_addrs_0]));
1499 : }
1500 10 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addrs_0, 0);
1501 : }
1502 19 : if (flags & NDR_OUT) {
1503 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1504 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1505 0 : }
1506 19 : return NDR_ERR_SUCCESS;
1507 : }
1508 :
1509 0 : _PUBLIC_ void ndr_print_nbtd_proxy_wins_release_demand(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct nbtd_proxy_wins_release_demand *r)
1510 : {
1511 0 : uint32_t cntr_addrs_0;
1512 0 : ndr_print_struct(ndr, name, "nbtd_proxy_wins_release_demand");
1513 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1514 0 : ndr->depth++;
1515 0 : if (flags & NDR_SET_VALUES) {
1516 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1517 : }
1518 0 : if (flags & NDR_IN) {
1519 0 : ndr_print_struct(ndr, "in", "nbtd_proxy_wins_release_demand");
1520 0 : ndr->depth++;
1521 0 : ndr_print_nbt_name(ndr, "name", &r->in.name);
1522 0 : ndr_print_uint32(ndr, "num_addrs", r->in.num_addrs);
1523 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "addrs", (uint32_t)(r->in.num_addrs));
1524 0 : ndr->depth++;
1525 0 : for (cntr_addrs_0 = 0; cntr_addrs_0 < (r->in.num_addrs); cntr_addrs_0++) {
1526 0 : ndr_print_nbtd_proxy_wins_addr(ndr, "addrs", &r->in.addrs[cntr_addrs_0]);
1527 : }
1528 0 : ndr->depth--;
1529 0 : ndr->depth--;
1530 : }
1531 0 : if (flags & NDR_OUT) {
1532 0 : ndr_print_struct(ndr, "out", "nbtd_proxy_wins_release_demand");
1533 0 : ndr->depth++;
1534 0 : ndr->depth--;
1535 : }
1536 0 : ndr->depth--;
1537 : }
1538 :
1539 500 : static enum ndr_err_code ndr_push_kdc_check_generic_kerberos(struct ndr_push *ndr, ndr_flags_type flags, const struct kdc_check_generic_kerberos *r)
1540 : {
1541 500 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1542 500 : if (flags & NDR_IN) {
1543 250 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->in.generic_request));
1544 : }
1545 500 : if (flags & NDR_OUT) {
1546 250 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->out.generic_reply));
1547 : }
1548 500 : return NDR_ERR_SUCCESS;
1549 : }
1550 :
1551 300 : static enum ndr_err_code ndr_pull_kdc_check_generic_kerberos(struct ndr_pull *ndr, ndr_flags_type flags, struct kdc_check_generic_kerberos *r)
1552 : {
1553 300 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1554 300 : if (flags & NDR_IN) {
1555 250 : NDR_ZERO_STRUCT(r->out);
1556 :
1557 250 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->in.generic_request));
1558 : }
1559 300 : if (flags & NDR_OUT) {
1560 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1561 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1562 50 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->out.generic_reply));
1563 : }
1564 300 : return NDR_ERR_SUCCESS;
1565 : }
1566 :
1567 0 : _PUBLIC_ void ndr_print_kdc_check_generic_kerberos(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct kdc_check_generic_kerberos *r)
1568 : {
1569 0 : ndr_print_struct(ndr, name, "kdc_check_generic_kerberos");
1570 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1571 0 : ndr->depth++;
1572 0 : if (flags & NDR_SET_VALUES) {
1573 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1574 : }
1575 0 : if (flags & NDR_IN) {
1576 0 : ndr_print_struct(ndr, "in", "kdc_check_generic_kerberos");
1577 0 : ndr->depth++;
1578 0 : ndr_print_DATA_BLOB(ndr, "generic_request", r->in.generic_request);
1579 0 : ndr->depth--;
1580 : }
1581 0 : if (flags & NDR_OUT) {
1582 0 : ndr_print_struct(ndr, "out", "kdc_check_generic_kerberos");
1583 0 : ndr->depth++;
1584 0 : ndr_print_DATA_BLOB(ndr, "generic_reply", r->out.generic_reply);
1585 0 : ndr->depth--;
1586 : }
1587 0 : ndr->depth--;
1588 : }
1589 :
1590 0 : static enum ndr_err_code ndr_push_smbsrv_information(struct ndr_push *ndr, ndr_flags_type flags, const struct smbsrv_information *r)
1591 : {
1592 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1593 0 : if (flags & NDR_IN) {
1594 0 : NDR_CHECK(ndr_push_smbsrv_info_level(ndr, NDR_SCALARS, r->in.level));
1595 : }
1596 0 : if (flags & NDR_OUT) {
1597 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info, r->in.level));
1598 0 : NDR_CHECK(ndr_push_smbsrv_info(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.info));
1599 : }
1600 0 : return NDR_ERR_SUCCESS;
1601 : }
1602 :
1603 0 : static enum ndr_err_code ndr_pull_smbsrv_information(struct ndr_pull *ndr, ndr_flags_type flags, struct smbsrv_information *r)
1604 : {
1605 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1606 0 : if (flags & NDR_IN) {
1607 0 : NDR_ZERO_STRUCT(r->out);
1608 :
1609 0 : NDR_CHECK(ndr_pull_smbsrv_info_level(ndr, NDR_SCALARS, &r->in.level));
1610 : }
1611 0 : if (flags & NDR_OUT) {
1612 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1613 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1614 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info, r->in.level));
1615 0 : NDR_CHECK(ndr_pull_smbsrv_info(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.info));
1616 : }
1617 0 : return NDR_ERR_SUCCESS;
1618 : }
1619 :
1620 0 : _PUBLIC_ void ndr_print_smbsrv_information(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct smbsrv_information *r)
1621 : {
1622 0 : ndr_print_struct(ndr, name, "smbsrv_information");
1623 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1624 0 : ndr->depth++;
1625 0 : if (flags & NDR_SET_VALUES) {
1626 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1627 : }
1628 0 : if (flags & NDR_IN) {
1629 0 : ndr_print_struct(ndr, "in", "smbsrv_information");
1630 0 : ndr->depth++;
1631 0 : ndr_print_smbsrv_info_level(ndr, "level", r->in.level);
1632 0 : ndr->depth--;
1633 : }
1634 0 : if (flags & NDR_OUT) {
1635 0 : ndr_print_struct(ndr, "out", "smbsrv_information");
1636 0 : ndr->depth++;
1637 0 : ndr_print_set_switch_value(ndr, &r->out.info, r->in.level);
1638 0 : ndr_print_smbsrv_info(ndr, "info", &r->out.info);
1639 0 : ndr->depth--;
1640 : }
1641 0 : ndr->depth--;
1642 : }
1643 :
1644 0 : static enum ndr_err_code ndr_push_samba_terminate(struct ndr_push *ndr, ndr_flags_type flags, const struct samba_terminate *r)
1645 : {
1646 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1647 0 : if (flags & NDR_IN) {
1648 : {
1649 0 : libndr_flags _flags_save_string = ndr->flags;
1650 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1651 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->in.reason));
1652 0 : ndr->flags = _flags_save_string;
1653 : }
1654 : }
1655 0 : if (flags & NDR_OUT) {
1656 0 : }
1657 0 : return NDR_ERR_SUCCESS;
1658 : }
1659 :
1660 0 : static enum ndr_err_code ndr_pull_samba_terminate(struct ndr_pull *ndr, ndr_flags_type flags, struct samba_terminate *r)
1661 : {
1662 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1663 0 : if (flags & NDR_IN) {
1664 : {
1665 0 : libndr_flags _flags_save_string = ndr->flags;
1666 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1667 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->in.reason));
1668 0 : ndr->flags = _flags_save_string;
1669 : }
1670 : }
1671 0 : if (flags & NDR_OUT) {
1672 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1673 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1674 0 : }
1675 0 : return NDR_ERR_SUCCESS;
1676 : }
1677 :
1678 0 : _PUBLIC_ void ndr_print_samba_terminate(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct samba_terminate *r)
1679 : {
1680 0 : ndr_print_struct(ndr, name, "samba_terminate");
1681 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1682 0 : ndr->depth++;
1683 0 : if (flags & NDR_SET_VALUES) {
1684 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1685 : }
1686 0 : if (flags & NDR_IN) {
1687 0 : ndr_print_struct(ndr, "in", "samba_terminate");
1688 0 : ndr->depth++;
1689 : {
1690 0 : libndr_flags _flags_save_string = ndr->flags;
1691 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1692 0 : ndr_print_string(ndr, "reason", r->in.reason);
1693 0 : ndr->flags = _flags_save_string;
1694 : }
1695 0 : ndr->depth--;
1696 : }
1697 0 : if (flags & NDR_OUT) {
1698 0 : ndr_print_struct(ndr, "out", "samba_terminate");
1699 0 : ndr->depth++;
1700 0 : ndr->depth--;
1701 : }
1702 0 : ndr->depth--;
1703 : }
1704 :
1705 3436 : static enum ndr_err_code ndr_push_dreplsrv_refresh(struct ndr_push *ndr, ndr_flags_type flags, const struct dreplsrv_refresh *r)
1706 : {
1707 3436 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1708 3436 : if (flags & NDR_IN) {
1709 0 : }
1710 3436 : if (flags & NDR_OUT) {
1711 1718 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1712 : }
1713 3436 : return NDR_ERR_SUCCESS;
1714 : }
1715 :
1716 1718 : static enum ndr_err_code ndr_pull_dreplsrv_refresh(struct ndr_pull *ndr, ndr_flags_type flags, struct dreplsrv_refresh *r)
1717 : {
1718 1718 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1719 1718 : if (flags & NDR_IN) {
1720 0 : }
1721 1718 : if (flags & NDR_OUT) {
1722 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1723 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1724 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1725 : }
1726 1718 : return NDR_ERR_SUCCESS;
1727 : }
1728 :
1729 0 : _PUBLIC_ void ndr_print_dreplsrv_refresh(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct dreplsrv_refresh *r)
1730 : {
1731 0 : ndr_print_struct(ndr, name, "dreplsrv_refresh");
1732 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1733 0 : ndr->depth++;
1734 0 : if (flags & NDR_SET_VALUES) {
1735 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1736 : }
1737 0 : if (flags & NDR_IN) {
1738 0 : ndr_print_struct(ndr, "in", "dreplsrv_refresh");
1739 0 : ndr->depth++;
1740 0 : ndr->depth--;
1741 : }
1742 0 : if (flags & NDR_OUT) {
1743 0 : ndr_print_struct(ndr, "out", "dreplsrv_refresh");
1744 0 : ndr->depth++;
1745 0 : ndr_print_WERROR(ndr, "result", r->out.result);
1746 0 : ndr->depth--;
1747 : }
1748 0 : ndr->depth--;
1749 : }
1750 :
1751 44 : static enum ndr_err_code ndr_push_drepl_takeFSMORole(struct ndr_push *ndr, ndr_flags_type flags, const struct drepl_takeFSMORole *r)
1752 : {
1753 44 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1754 44 : if (flags & NDR_IN) {
1755 22 : NDR_CHECK(ndr_push_drepl_role_master(ndr, NDR_SCALARS, r->in.role));
1756 : }
1757 44 : if (flags & NDR_OUT) {
1758 22 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1759 : }
1760 44 : return NDR_ERR_SUCCESS;
1761 : }
1762 :
1763 44 : static enum ndr_err_code ndr_pull_drepl_takeFSMORole(struct ndr_pull *ndr, ndr_flags_type flags, struct drepl_takeFSMORole *r)
1764 : {
1765 44 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1766 44 : if (flags & NDR_IN) {
1767 22 : NDR_CHECK(ndr_pull_drepl_role_master(ndr, NDR_SCALARS, &r->in.role));
1768 : }
1769 44 : if (flags & NDR_OUT) {
1770 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1771 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1772 22 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1773 : }
1774 44 : return NDR_ERR_SUCCESS;
1775 : }
1776 :
1777 0 : _PUBLIC_ void ndr_print_drepl_takeFSMORole(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drepl_takeFSMORole *r)
1778 : {
1779 0 : ndr_print_struct(ndr, name, "drepl_takeFSMORole");
1780 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1781 0 : ndr->depth++;
1782 0 : if (flags & NDR_SET_VALUES) {
1783 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1784 : }
1785 0 : if (flags & NDR_IN) {
1786 0 : ndr_print_struct(ndr, "in", "drepl_takeFSMORole");
1787 0 : ndr->depth++;
1788 0 : ndr_print_drepl_role_master(ndr, "role", r->in.role);
1789 0 : ndr->depth--;
1790 : }
1791 0 : if (flags & NDR_OUT) {
1792 0 : ndr_print_struct(ndr, "out", "drepl_takeFSMORole");
1793 0 : ndr->depth++;
1794 0 : ndr_print_WERROR(ndr, "result", r->out.result);
1795 0 : ndr->depth--;
1796 : }
1797 0 : ndr->depth--;
1798 : }
1799 :
1800 1794 : static enum ndr_err_code ndr_push_drepl_trigger_repl_secret(struct ndr_push *ndr, ndr_flags_type flags, const struct drepl_trigger_repl_secret *r)
1801 : {
1802 1794 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1803 1794 : if (flags & NDR_IN) {
1804 : {
1805 1794 : libndr_flags _flags_save_string = ndr->flags;
1806 1794 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1807 1794 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->in.user_dn));
1808 1794 : ndr->flags = _flags_save_string;
1809 : }
1810 : }
1811 1794 : if (flags & NDR_OUT) {
1812 0 : }
1813 1794 : return NDR_ERR_SUCCESS;
1814 : }
1815 :
1816 1849 : static enum ndr_err_code ndr_pull_drepl_trigger_repl_secret(struct ndr_pull *ndr, ndr_flags_type flags, struct drepl_trigger_repl_secret *r)
1817 : {
1818 1849 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1819 1849 : if (flags & NDR_IN) {
1820 : {
1821 1849 : libndr_flags _flags_save_string = ndr->flags;
1822 1849 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1823 1849 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->in.user_dn));
1824 1849 : ndr->flags = _flags_save_string;
1825 : }
1826 : }
1827 1849 : if (flags & NDR_OUT) {
1828 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1829 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1830 0 : }
1831 1849 : return NDR_ERR_SUCCESS;
1832 : }
1833 :
1834 0 : _PUBLIC_ void ndr_print_drepl_trigger_repl_secret(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drepl_trigger_repl_secret *r)
1835 : {
1836 0 : ndr_print_struct(ndr, name, "drepl_trigger_repl_secret");
1837 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1838 0 : ndr->depth++;
1839 0 : if (flags & NDR_SET_VALUES) {
1840 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1841 : }
1842 0 : if (flags & NDR_IN) {
1843 0 : ndr_print_struct(ndr, "in", "drepl_trigger_repl_secret");
1844 0 : ndr->depth++;
1845 : {
1846 0 : libndr_flags _flags_save_string = ndr->flags;
1847 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
1848 0 : ndr_print_string(ndr, "user_dn", r->in.user_dn);
1849 0 : ndr->flags = _flags_save_string;
1850 : }
1851 0 : ndr->depth--;
1852 : }
1853 0 : if (flags & NDR_OUT) {
1854 0 : ndr_print_struct(ndr, "out", "drepl_trigger_repl_secret");
1855 0 : ndr->depth++;
1856 0 : ndr->depth--;
1857 : }
1858 0 : ndr->depth--;
1859 : }
1860 :
1861 10 : static enum ndr_err_code ndr_push_dnsupdate_RODC(struct ndr_push *ndr, ndr_flags_type flags, const struct dnsupdate_RODC *r)
1862 : {
1863 10 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1864 10 : if (flags & NDR_IN) {
1865 5 : if (r->in.dns_names == NULL) {
1866 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1867 : }
1868 5 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dom_sid));
1869 5 : if (r->in.dom_sid) {
1870 5 : NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.dom_sid));
1871 : }
1872 5 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_name));
1873 5 : if (r->in.site_name) {
1874 5 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
1875 5 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1876 5 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
1877 5 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.site_name, ndr_charset_length(r->in.site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1878 : }
1879 5 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dns_ttl));
1880 5 : NDR_CHECK(ndr_push_NL_DNS_NAME_INFO_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dns_names));
1881 : }
1882 10 : if (flags & NDR_OUT) {
1883 5 : if (r->out.dns_names == NULL) {
1884 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1885 : }
1886 5 : NDR_CHECK(ndr_push_NL_DNS_NAME_INFO_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.dns_names));
1887 5 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1888 : }
1889 10 : return NDR_ERR_SUCCESS;
1890 : }
1891 :
1892 10 : static enum ndr_err_code ndr_pull_dnsupdate_RODC(struct ndr_pull *ndr, ndr_flags_type flags, struct dnsupdate_RODC *r)
1893 : {
1894 0 : uint32_t _ptr_dom_sid;
1895 0 : uint32_t _ptr_site_name;
1896 10 : uint32_t size_site_name_1 = 0;
1897 10 : uint32_t length_site_name_1 = 0;
1898 10 : TALLOC_CTX *_mem_save_dom_sid_0 = NULL;
1899 10 : TALLOC_CTX *_mem_save_site_name_0 = NULL;
1900 10 : TALLOC_CTX *_mem_save_dns_names_0 = NULL;
1901 10 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1902 10 : if (flags & NDR_IN) {
1903 5 : NDR_ZERO_STRUCT(r->out);
1904 :
1905 5 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_sid));
1906 5 : if (_ptr_dom_sid) {
1907 5 : NDR_PULL_ALLOC(ndr, r->in.dom_sid);
1908 : } else {
1909 0 : r->in.dom_sid = NULL;
1910 : }
1911 5 : if (r->in.dom_sid) {
1912 5 : _mem_save_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1913 5 : NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_sid, 0);
1914 5 : NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.dom_sid));
1915 5 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_sid_0, 0);
1916 : }
1917 5 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
1918 5 : if (_ptr_site_name) {
1919 5 : NDR_PULL_ALLOC(ndr, r->in.site_name);
1920 : } else {
1921 0 : r->in.site_name = NULL;
1922 : }
1923 5 : if (r->in.site_name) {
1924 5 : _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1925 5 : NDR_PULL_SET_MEM_CTX(ndr, r->in.site_name, 0);
1926 5 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.site_name));
1927 5 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.site_name));
1928 5 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.site_name, &size_site_name_1));
1929 5 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.site_name, &length_site_name_1));
1930 5 : if (length_site_name_1 > size_site_name_1) {
1931 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_name_1, length_site_name_1);
1932 : }
1933 5 : NDR_CHECK(ndr_check_string_terminator(ndr, length_site_name_1, sizeof(uint16_t)));
1934 5 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.site_name, length_site_name_1, sizeof(uint16_t), CH_UTF16));
1935 5 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
1936 : }
1937 5 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dns_ttl));
1938 5 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1939 5 : NDR_PULL_ALLOC(ndr, r->in.dns_names);
1940 : }
1941 5 : _mem_save_dns_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
1942 5 : NDR_PULL_SET_MEM_CTX(ndr, r->in.dns_names, LIBNDR_FLAG_REF_ALLOC);
1943 5 : NDR_CHECK(ndr_pull_NL_DNS_NAME_INFO_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dns_names));
1944 5 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_names_0, LIBNDR_FLAG_REF_ALLOC);
1945 5 : NDR_PULL_ALLOC(ndr, r->out.dns_names);
1946 5 : *r->out.dns_names = *r->in.dns_names;
1947 : }
1948 10 : if (flags & NDR_OUT) {
1949 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1950 : if (r->in.dns_names == NULL) {
1951 : NDR_PULL_ALLOC(ndr, r->in.dns_names);
1952 : NDR_ZERO_STRUCTP(r->in.dns_names);
1953 : }
1954 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1955 5 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1956 5 : NDR_PULL_ALLOC(ndr, r->out.dns_names);
1957 : }
1958 5 : _mem_save_dns_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
1959 5 : NDR_PULL_SET_MEM_CTX(ndr, r->out.dns_names, LIBNDR_FLAG_REF_ALLOC);
1960 5 : NDR_CHECK(ndr_pull_NL_DNS_NAME_INFO_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.dns_names));
1961 5 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_names_0, LIBNDR_FLAG_REF_ALLOC);
1962 5 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1963 : }
1964 10 : return NDR_ERR_SUCCESS;
1965 : }
1966 :
1967 0 : _PUBLIC_ void ndr_print_dnsupdate_RODC(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct dnsupdate_RODC *r)
1968 : {
1969 0 : ndr_print_struct(ndr, name, "dnsupdate_RODC");
1970 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1971 0 : ndr->depth++;
1972 0 : if (flags & NDR_SET_VALUES) {
1973 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1974 : }
1975 0 : if (flags & NDR_IN) {
1976 0 : ndr_print_struct(ndr, "in", "dnsupdate_RODC");
1977 0 : ndr->depth++;
1978 0 : ndr_print_ptr(ndr, "dom_sid", r->in.dom_sid);
1979 0 : ndr->depth++;
1980 0 : if (r->in.dom_sid) {
1981 0 : ndr_print_dom_sid(ndr, "dom_sid", r->in.dom_sid);
1982 : }
1983 0 : ndr->depth--;
1984 0 : ndr_print_ptr(ndr, "site_name", r->in.site_name);
1985 0 : ndr->depth++;
1986 0 : if (r->in.site_name) {
1987 0 : ndr_print_string(ndr, "site_name", r->in.site_name);
1988 : }
1989 0 : ndr->depth--;
1990 0 : ndr_print_uint32(ndr, "dns_ttl", r->in.dns_ttl);
1991 0 : ndr_print_ptr(ndr, "dns_names", r->in.dns_names);
1992 0 : ndr->depth++;
1993 0 : ndr_print_NL_DNS_NAME_INFO_ARRAY(ndr, "dns_names", r->in.dns_names);
1994 0 : ndr->depth--;
1995 0 : ndr->depth--;
1996 : }
1997 0 : if (flags & NDR_OUT) {
1998 0 : ndr_print_struct(ndr, "out", "dnsupdate_RODC");
1999 0 : ndr->depth++;
2000 0 : ndr_print_ptr(ndr, "dns_names", r->out.dns_names);
2001 0 : ndr->depth++;
2002 0 : ndr_print_NL_DNS_NAME_INFO_ARRAY(ndr, "dns_names", r->out.dns_names);
2003 0 : ndr->depth--;
2004 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
2005 0 : ndr->depth--;
2006 : }
2007 0 : ndr->depth--;
2008 : }
2009 :
2010 2444 : static enum ndr_err_code ndr_push_dnssrv_reload_dns_zones(struct ndr_push *ndr, ndr_flags_type flags, const struct dnssrv_reload_dns_zones *r)
2011 : {
2012 2444 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2013 2444 : if (flags & NDR_IN) {
2014 0 : }
2015 2444 : if (flags & NDR_OUT) {
2016 1222 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2017 : }
2018 2444 : return NDR_ERR_SUCCESS;
2019 : }
2020 :
2021 1222 : static enum ndr_err_code ndr_pull_dnssrv_reload_dns_zones(struct ndr_pull *ndr, ndr_flags_type flags, struct dnssrv_reload_dns_zones *r)
2022 : {
2023 1222 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2024 1222 : if (flags & NDR_IN) {
2025 0 : }
2026 1222 : if (flags & NDR_OUT) {
2027 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2028 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2029 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2030 : }
2031 1222 : return NDR_ERR_SUCCESS;
2032 : }
2033 :
2034 0 : _PUBLIC_ void ndr_print_dnssrv_reload_dns_zones(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct dnssrv_reload_dns_zones *r)
2035 : {
2036 0 : ndr_print_struct(ndr, name, "dnssrv_reload_dns_zones");
2037 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2038 0 : ndr->depth++;
2039 0 : if (flags & NDR_SET_VALUES) {
2040 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2041 : }
2042 0 : if (flags & NDR_IN) {
2043 0 : ndr_print_struct(ndr, "in", "dnssrv_reload_dns_zones");
2044 0 : ndr->depth++;
2045 0 : ndr->depth--;
2046 : }
2047 0 : if (flags & NDR_OUT) {
2048 0 : ndr_print_struct(ndr, "out", "dnssrv_reload_dns_zones");
2049 0 : ndr->depth++;
2050 0 : ndr_print_NTSTATUS(ndr, "result", r->out.result);
2051 0 : ndr->depth--;
2052 : }
2053 0 : ndr->depth--;
2054 : }
2055 :
2056 : #ifndef SKIP_NDR_TABLE_irpc
2057 : static const struct ndr_interface_public_struct irpc_public_structs[] = {
2058 : {
2059 : .name = "irpc_header",
2060 : .struct_size = sizeof(struct irpc_header ),
2061 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_irpc_header,
2062 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_irpc_header,
2063 : .ndr_print = (ndr_print_function_t) ndr_print_flags_irpc_header,
2064 : },
2065 : {
2066 : .name = "irpc_name_record",
2067 : .struct_size = sizeof(struct irpc_name_record ),
2068 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_irpc_name_record,
2069 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_irpc_name_record,
2070 : .ndr_print = (ndr_print_function_t) ndr_print_flags_irpc_name_record,
2071 : },
2072 : {
2073 : .name = "irpc_name_records",
2074 : .struct_size = sizeof(struct irpc_name_records ),
2075 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_irpc_name_records,
2076 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_irpc_name_records,
2077 : .ndr_print = (ndr_print_function_t) ndr_print_flags_irpc_name_records,
2078 : },
2079 : { .name = NULL }
2080 : };
2081 :
2082 : static const struct ndr_interface_call irpc_calls[] = {
2083 : {
2084 : "irpc_uptime",
2085 : sizeof(struct irpc_uptime),
2086 : (ndr_push_flags_fn_t) ndr_push_irpc_uptime,
2087 : (ndr_pull_flags_fn_t) ndr_pull_irpc_uptime,
2088 : (ndr_print_function_t) ndr_print_irpc_uptime,
2089 : { 0, NULL },
2090 : { 0, NULL },
2091 : },
2092 : {
2093 : "nbtd_information",
2094 : sizeof(struct nbtd_information),
2095 : (ndr_push_flags_fn_t) ndr_push_nbtd_information,
2096 : (ndr_pull_flags_fn_t) ndr_pull_nbtd_information,
2097 : (ndr_print_function_t) ndr_print_nbtd_information,
2098 : { 0, NULL },
2099 : { 0, NULL },
2100 : },
2101 : {
2102 : "nbtd_getdcname",
2103 : sizeof(struct nbtd_getdcname),
2104 : (ndr_push_flags_fn_t) ndr_push_nbtd_getdcname,
2105 : (ndr_pull_flags_fn_t) ndr_pull_nbtd_getdcname,
2106 : (ndr_print_function_t) ndr_print_nbtd_getdcname,
2107 : { 0, NULL },
2108 : { 0, NULL },
2109 : },
2110 : {
2111 : "nbtd_proxy_wins_challenge",
2112 : sizeof(struct nbtd_proxy_wins_challenge),
2113 : (ndr_push_flags_fn_t) ndr_push_nbtd_proxy_wins_challenge,
2114 : (ndr_pull_flags_fn_t) ndr_pull_nbtd_proxy_wins_challenge,
2115 : (ndr_print_function_t) ndr_print_nbtd_proxy_wins_challenge,
2116 : { 0, NULL },
2117 : { 0, NULL },
2118 : },
2119 : {
2120 : "nbtd_proxy_wins_release_demand",
2121 : sizeof(struct nbtd_proxy_wins_release_demand),
2122 : (ndr_push_flags_fn_t) ndr_push_nbtd_proxy_wins_release_demand,
2123 : (ndr_pull_flags_fn_t) ndr_pull_nbtd_proxy_wins_release_demand,
2124 : (ndr_print_function_t) ndr_print_nbtd_proxy_wins_release_demand,
2125 : { 0, NULL },
2126 : { 0, NULL },
2127 : },
2128 : {
2129 : "kdc_check_generic_kerberos",
2130 : sizeof(struct kdc_check_generic_kerberos),
2131 : (ndr_push_flags_fn_t) ndr_push_kdc_check_generic_kerberos,
2132 : (ndr_pull_flags_fn_t) ndr_pull_kdc_check_generic_kerberos,
2133 : (ndr_print_function_t) ndr_print_kdc_check_generic_kerberos,
2134 : { 0, NULL },
2135 : { 0, NULL },
2136 : },
2137 : {
2138 : "smbsrv_information",
2139 : sizeof(struct smbsrv_information),
2140 : (ndr_push_flags_fn_t) ndr_push_smbsrv_information,
2141 : (ndr_pull_flags_fn_t) ndr_pull_smbsrv_information,
2142 : (ndr_print_function_t) ndr_print_smbsrv_information,
2143 : { 0, NULL },
2144 : { 0, NULL },
2145 : },
2146 : {
2147 : "samba_terminate",
2148 : sizeof(struct samba_terminate),
2149 : (ndr_push_flags_fn_t) ndr_push_samba_terminate,
2150 : (ndr_pull_flags_fn_t) ndr_pull_samba_terminate,
2151 : (ndr_print_function_t) ndr_print_samba_terminate,
2152 : { 0, NULL },
2153 : { 0, NULL },
2154 : },
2155 : {
2156 : "dreplsrv_refresh",
2157 : sizeof(struct dreplsrv_refresh),
2158 : (ndr_push_flags_fn_t) ndr_push_dreplsrv_refresh,
2159 : (ndr_pull_flags_fn_t) ndr_pull_dreplsrv_refresh,
2160 : (ndr_print_function_t) ndr_print_dreplsrv_refresh,
2161 : { 0, NULL },
2162 : { 0, NULL },
2163 : },
2164 : {
2165 : "drepl_takeFSMORole",
2166 : sizeof(struct drepl_takeFSMORole),
2167 : (ndr_push_flags_fn_t) ndr_push_drepl_takeFSMORole,
2168 : (ndr_pull_flags_fn_t) ndr_pull_drepl_takeFSMORole,
2169 : (ndr_print_function_t) ndr_print_drepl_takeFSMORole,
2170 : { 0, NULL },
2171 : { 0, NULL },
2172 : },
2173 : {
2174 : "drepl_trigger_repl_secret",
2175 : sizeof(struct drepl_trigger_repl_secret),
2176 : (ndr_push_flags_fn_t) ndr_push_drepl_trigger_repl_secret,
2177 : (ndr_pull_flags_fn_t) ndr_pull_drepl_trigger_repl_secret,
2178 : (ndr_print_function_t) ndr_print_drepl_trigger_repl_secret,
2179 : { 0, NULL },
2180 : { 0, NULL },
2181 : },
2182 : {
2183 : "dnsupdate_RODC",
2184 : sizeof(struct dnsupdate_RODC),
2185 : (ndr_push_flags_fn_t) ndr_push_dnsupdate_RODC,
2186 : (ndr_pull_flags_fn_t) ndr_pull_dnsupdate_RODC,
2187 : (ndr_print_function_t) ndr_print_dnsupdate_RODC,
2188 : { 0, NULL },
2189 : { 0, NULL },
2190 : },
2191 : {
2192 : "dnssrv_reload_dns_zones",
2193 : sizeof(struct dnssrv_reload_dns_zones),
2194 : (ndr_push_flags_fn_t) ndr_push_dnssrv_reload_dns_zones,
2195 : (ndr_pull_flags_fn_t) ndr_pull_dnssrv_reload_dns_zones,
2196 : (ndr_print_function_t) ndr_print_dnssrv_reload_dns_zones,
2197 : { 0, NULL },
2198 : { 0, NULL },
2199 : },
2200 : { .name = NULL }
2201 : };
2202 :
2203 : static const char * const irpc_endpoint_strings[] = {
2204 : "ncacn_np:[\\pipe\\irpc]",
2205 : };
2206 :
2207 : static const struct ndr_interface_string_array irpc_endpoints = {
2208 : .count = 1,
2209 : .names = irpc_endpoint_strings
2210 : };
2211 :
2212 : static const char * const irpc_authservice_strings[] = {
2213 : "host",
2214 : };
2215 :
2216 : static const struct ndr_interface_string_array irpc_authservices = {
2217 : .count = 1,
2218 : .names = irpc_authservice_strings
2219 : };
2220 :
2221 :
2222 : const struct ndr_interface_table ndr_table_irpc = {
2223 : .name = "irpc",
2224 : .syntax_id = {
2225 : {0xe770c620,0x0b06,0x4b5e,{0x8d,0x87},{0xa2,0x6e,0x20,0xf2,0x83,0x40}},
2226 : NDR_IRPC_VERSION
2227 : },
2228 : .helpstring = NDR_IRPC_HELPSTRING,
2229 : .num_calls = 13,
2230 : .calls = irpc_calls,
2231 : .num_public_structs = 3,
2232 : .public_structs = irpc_public_structs,
2233 : .endpoints = &irpc_endpoints,
2234 : .authservices = &irpc_authservices
2235 : };
2236 :
2237 : #endif /* SKIP_NDR_TABLE_irpc */
|