Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/source3/librpc/gen_ndr/ndr_smbXsrv.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 : #include "librpc/gen_ndr/ndr_server_id.h"
8 : #include "librpc/gen_ndr/ndr_security.h"
9 : #include "librpc/gen_ndr/ndr_auth.h"
10 839850 : static enum ndr_err_code ndr_push_smbXsrv_version_values(struct ndr_push *ndr, int ndr_flags, enum smbXsrv_version_values r)
11 : {
12 845508 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
13 839850 : return NDR_ERR_SUCCESS;
14 : }
15 :
16 4243 : static enum ndr_err_code ndr_pull_smbXsrv_version_values(struct ndr_pull *ndr, int ndr_flags, enum smbXsrv_version_values *r)
17 : {
18 : uint32_t v;
19 4243 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
20 4243 : *r = v;
21 4243 : return NDR_ERR_SUCCESS;
22 : }
23 :
24 0 : _PUBLIC_ void ndr_print_smbXsrv_version_values(struct ndr_print *ndr, const char *name, enum smbXsrv_version_values r)
25 : {
26 0 : const char *val = NULL;
27 :
28 0 : switch (r) {
29 0 : case SMBXSRV_VERSION_0: val = "SMBXSRV_VERSION_0"; break;
30 : }
31 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
32 0 : }
33 :
34 63 : static enum ndr_err_code ndr_push_smbXsrv_version_node0(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_version_node0 *r)
35 : {
36 63 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
37 63 : if (ndr_flags & NDR_SCALARS) {
38 63 : NDR_CHECK(ndr_push_align(ndr, 8));
39 63 : NDR_CHECK(ndr_push_server_id(ndr, NDR_SCALARS, &r->server_id));
40 65 : NDR_CHECK(ndr_push_smbXsrv_version_values(ndr, NDR_SCALARS, r->min_version));
41 65 : NDR_CHECK(ndr_push_smbXsrv_version_values(ndr, NDR_SCALARS, r->max_version));
42 65 : NDR_CHECK(ndr_push_smbXsrv_version_values(ndr, NDR_SCALARS, r->current_version));
43 63 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
44 : }
45 61 : if (ndr_flags & NDR_BUFFERS) {
46 : }
47 63 : return NDR_ERR_SUCCESS;
48 : }
49 :
50 0 : static enum ndr_err_code ndr_pull_smbXsrv_version_node0(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_version_node0 *r)
51 : {
52 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
53 0 : if (ndr_flags & NDR_SCALARS) {
54 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
55 0 : NDR_CHECK(ndr_pull_server_id(ndr, NDR_SCALARS, &r->server_id));
56 0 : NDR_CHECK(ndr_pull_smbXsrv_version_values(ndr, NDR_SCALARS, &r->min_version));
57 0 : NDR_CHECK(ndr_pull_smbXsrv_version_values(ndr, NDR_SCALARS, &r->max_version));
58 0 : NDR_CHECK(ndr_pull_smbXsrv_version_values(ndr, NDR_SCALARS, &r->current_version));
59 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
60 : }
61 0 : if (ndr_flags & NDR_BUFFERS) {
62 : }
63 0 : return NDR_ERR_SUCCESS;
64 : }
65 :
66 0 : _PUBLIC_ void ndr_print_smbXsrv_version_node0(struct ndr_print *ndr, const char *name, const struct smbXsrv_version_node0 *r)
67 : {
68 0 : ndr_print_struct(ndr, name, "smbXsrv_version_node0");
69 0 : if (r == NULL) { ndr_print_null(ndr); return; }
70 0 : ndr->depth++;
71 0 : ndr_print_server_id(ndr, "server_id", &r->server_id);
72 0 : ndr_print_smbXsrv_version_values(ndr, "min_version", r->min_version);
73 0 : ndr_print_smbXsrv_version_values(ndr, "max_version", r->max_version);
74 0 : ndr_print_smbXsrv_version_values(ndr, "current_version", r->current_version);
75 0 : ndr->depth--;
76 : }
77 :
78 63 : static enum ndr_err_code ndr_push_smbXsrv_version_global0(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_version_global0 *r)
79 : {
80 : uint32_t cntr_nodes_0;
81 63 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
82 63 : if (ndr_flags & NDR_SCALARS) {
83 63 : NDR_CHECK(ndr_push_align(ndr, 8));
84 63 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
85 : /* [ignore] 'db_rec' */
86 63 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_nodes));
87 124 : for (cntr_nodes_0 = 0; cntr_nodes_0 < (r->num_nodes); cntr_nodes_0++) {
88 63 : NDR_CHECK(ndr_push_smbXsrv_version_node0(ndr, NDR_SCALARS, &r->nodes[cntr_nodes_0]));
89 : }
90 63 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
91 : }
92 61 : if (ndr_flags & NDR_BUFFERS) {
93 : /* [ignore] 'db_rec' */
94 : }
95 61 : return NDR_ERR_SUCCESS;
96 : }
97 :
98 0 : static enum ndr_err_code ndr_pull_smbXsrv_version_global0(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_version_global0 *r)
99 : {
100 : uint32_t _ptr_db_rec;
101 0 : uint32_t size_nodes_0 = 0;
102 : uint32_t cntr_nodes_0;
103 0 : TALLOC_CTX *_mem_save_nodes_0 = NULL;
104 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
105 0 : if (ndr_flags & NDR_SCALARS) {
106 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
107 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_db_rec));
108 0 : _ptr_db_rec = 0;
109 0 : if (_ptr_db_rec) {
110 : } else {
111 0 : r->db_rec = NULL;
112 : }
113 : /* [ignore] 'db_rec' */
114 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_nodes));
115 0 : if (r->num_nodes < 1 || r->num_nodes > 1024) {
116 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
117 : }
118 0 : size_nodes_0 = r->num_nodes;
119 0 : NDR_PULL_ALLOC_N(ndr, r->nodes, size_nodes_0);
120 0 : _mem_save_nodes_0 = NDR_PULL_GET_MEM_CTX(ndr);
121 0 : NDR_PULL_SET_MEM_CTX(ndr, r->nodes, 0);
122 0 : for (cntr_nodes_0 = 0; cntr_nodes_0 < (size_nodes_0); cntr_nodes_0++) {
123 0 : NDR_CHECK(ndr_pull_smbXsrv_version_node0(ndr, NDR_SCALARS, &r->nodes[cntr_nodes_0]));
124 : }
125 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nodes_0, 0);
126 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
127 : }
128 0 : if (ndr_flags & NDR_BUFFERS) {
129 : /* [ignore] 'db_rec' */
130 : }
131 0 : return NDR_ERR_SUCCESS;
132 : }
133 :
134 0 : _PUBLIC_ void ndr_print_smbXsrv_version_global0(struct ndr_print *ndr, const char *name, const struct smbXsrv_version_global0 *r)
135 : {
136 : uint32_t cntr_nodes_0;
137 0 : ndr_print_struct(ndr, name, "smbXsrv_version_global0");
138 0 : if (r == NULL) { ndr_print_null(ndr); return; }
139 0 : ndr->depth++;
140 0 : ndr_print_ptr(ndr, "db_rec", r->db_rec);
141 : /* [ignore] 'db_rec' */
142 0 : ndr_print_uint32(ndr, "num_nodes", r->num_nodes);
143 0 : ndr->print(ndr, "%s: ARRAY(%d)", "nodes", (int)r->num_nodes);
144 0 : ndr->depth++;
145 0 : for (cntr_nodes_0 = 0; cntr_nodes_0 < (r->num_nodes); cntr_nodes_0++) {
146 0 : ndr_print_smbXsrv_version_node0(ndr, "nodes", &r->nodes[cntr_nodes_0]);
147 : }
148 0 : ndr->depth--;
149 0 : ndr->depth--;
150 : }
151 :
152 126 : static enum ndr_err_code ndr_push_smbXsrv_version_globalU(struct ndr_push *ndr, int ndr_flags, const union smbXsrv_version_globalU *r)
153 : {
154 : uint32_t level;
155 126 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
156 126 : if (ndr_flags & NDR_SCALARS) {
157 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
158 63 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
159 63 : NDR_CHECK(ndr_push_union_align(ndr, 5));
160 63 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
161 63 : NDR_CHECK(ndr_push_union_align(ndr, 5));
162 63 : switch (level) {
163 63 : case 0: {
164 63 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
165 61 : break; }
166 :
167 0 : default: {
168 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy));
169 0 : break; }
170 :
171 : }
172 63 : }
173 126 : if (ndr_flags & NDR_BUFFERS) {
174 63 : if (!(ndr_flags & NDR_SCALARS)) {
175 : /* We didn't get it above, and the token is not needed after this. */
176 63 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
177 : }
178 63 : switch (level) {
179 63 : case 0:
180 63 : if (r->info0) {
181 63 : NDR_CHECK(ndr_push_smbXsrv_version_global0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
182 : }
183 61 : break;
184 :
185 0 : default:
186 0 : if (r->dummy) {
187 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->dummy));
188 : }
189 0 : break;
190 :
191 : }
192 63 : }
193 122 : return NDR_ERR_SUCCESS;
194 : }
195 :
196 0 : static enum ndr_err_code ndr_pull_smbXsrv_version_globalU(struct ndr_pull *ndr, int ndr_flags, union smbXsrv_version_globalU *r)
197 : {
198 : uint32_t level;
199 : uint32_t _level;
200 0 : TALLOC_CTX *_mem_save_info0_0 = NULL;
201 : uint32_t _ptr_info0;
202 0 : TALLOC_CTX *_mem_save_dummy_0 = NULL;
203 : uint32_t _ptr_dummy;
204 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
205 0 : if (ndr_flags & NDR_SCALARS) {
206 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
207 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
208 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
209 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
210 0 : if (_level != level) {
211 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
212 : }
213 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
214 0 : switch (level) {
215 0 : case 0: {
216 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
217 0 : if (_ptr_info0) {
218 0 : NDR_PULL_ALLOC(ndr, r->info0);
219 : } else {
220 0 : r->info0 = NULL;
221 : }
222 0 : break; }
223 :
224 0 : default: {
225 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy));
226 0 : if (_ptr_dummy) {
227 0 : NDR_PULL_ALLOC(ndr, r->dummy);
228 : } else {
229 0 : r->dummy = NULL;
230 : }
231 0 : break; }
232 :
233 : }
234 0 : }
235 0 : if (ndr_flags & NDR_BUFFERS) {
236 0 : if (!(ndr_flags & NDR_SCALARS)) {
237 : /* We didn't get it above, and the token is not needed after this. */
238 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
239 : }
240 0 : switch (level) {
241 0 : case 0:
242 0 : if (r->info0) {
243 0 : _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
244 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
245 0 : NDR_CHECK(ndr_pull_smbXsrv_version_global0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
246 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
247 : }
248 0 : break;
249 :
250 0 : default:
251 0 : if (r->dummy) {
252 0 : _mem_save_dummy_0 = NDR_PULL_GET_MEM_CTX(ndr);
253 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dummy, 0);
254 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->dummy));
255 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy_0, 0);
256 : }
257 0 : break;
258 :
259 : }
260 0 : }
261 0 : return NDR_ERR_SUCCESS;
262 : }
263 :
264 0 : _PUBLIC_ void ndr_print_smbXsrv_version_globalU(struct ndr_print *ndr, const char *name, const union smbXsrv_version_globalU *r)
265 : {
266 : uint32_t level;
267 0 : level = ndr_print_steal_switch_value(ndr, r);
268 0 : ndr_print_union(ndr, name, level, "smbXsrv_version_globalU");
269 0 : switch (level) {
270 0 : case 0:
271 0 : ndr_print_ptr(ndr, "info0", r->info0);
272 0 : ndr->depth++;
273 0 : if (r->info0) {
274 0 : ndr_print_smbXsrv_version_global0(ndr, "info0", r->info0);
275 : }
276 0 : ndr->depth--;
277 0 : break;
278 :
279 0 : default:
280 0 : ndr_print_ptr(ndr, "dummy", r->dummy);
281 0 : ndr->depth++;
282 0 : if (r->dummy) {
283 0 : ndr_print_hyper(ndr, "dummy", *r->dummy);
284 : }
285 0 : ndr->depth--;
286 0 : break;
287 :
288 : }
289 0 : }
290 :
291 63 : _PUBLIC_ enum ndr_err_code ndr_push_smbXsrv_version_globalB(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_version_globalB *r)
292 : {
293 63 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
294 63 : if (ndr_flags & NDR_SCALARS) {
295 63 : NDR_CHECK(ndr_push_align(ndr, 5));
296 65 : NDR_CHECK(ndr_push_smbXsrv_version_values(ndr, NDR_SCALARS, r->version));
297 63 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->seqnum));
298 63 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
299 63 : NDR_CHECK(ndr_push_smbXsrv_version_globalU(ndr, NDR_SCALARS, &r->info));
300 63 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
301 : }
302 63 : if (ndr_flags & NDR_BUFFERS) {
303 63 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
304 63 : NDR_CHECK(ndr_push_smbXsrv_version_globalU(ndr, NDR_BUFFERS, &r->info));
305 : }
306 61 : return NDR_ERR_SUCCESS;
307 : }
308 :
309 0 : _PUBLIC_ enum ndr_err_code ndr_pull_smbXsrv_version_globalB(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_version_globalB *r)
310 : {
311 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
312 0 : if (ndr_flags & NDR_SCALARS) {
313 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
314 0 : NDR_CHECK(ndr_pull_smbXsrv_version_values(ndr, NDR_SCALARS, &r->version));
315 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->seqnum));
316 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
317 0 : NDR_CHECK(ndr_pull_smbXsrv_version_globalU(ndr, NDR_SCALARS, &r->info));
318 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
319 : }
320 0 : if (ndr_flags & NDR_BUFFERS) {
321 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
322 0 : NDR_CHECK(ndr_pull_smbXsrv_version_globalU(ndr, NDR_BUFFERS, &r->info));
323 : }
324 0 : return NDR_ERR_SUCCESS;
325 : }
326 :
327 0 : static void ndr_print_flags_smbXsrv_version_globalB(struct ndr_print *ndr, const char *name, int unused, const struct smbXsrv_version_globalB *r)
328 : {
329 0 : ndr_print_smbXsrv_version_globalB(ndr, name, r);
330 0 : }
331 :
332 0 : _PUBLIC_ void ndr_print_smbXsrv_version_globalB(struct ndr_print *ndr, const char *name, const struct smbXsrv_version_globalB *r)
333 : {
334 0 : ndr_print_struct(ndr, name, "smbXsrv_version_globalB");
335 0 : if (r == NULL) { ndr_print_null(ndr); return; }
336 0 : ndr->depth++;
337 0 : ndr_print_smbXsrv_version_values(ndr, "version", r->version);
338 0 : ndr_print_uint32(ndr, "seqnum", r->seqnum);
339 0 : ndr_print_set_switch_value(ndr, &r->info, r->version);
340 0 : ndr_print_smbXsrv_version_globalU(ndr, "info", &r->info);
341 0 : ndr->depth--;
342 : }
343 :
344 20738 : static enum ndr_err_code ndr_push_smbXsrv_client_global0(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_client_global0 *r)
345 : {
346 20738 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
347 20738 : if (ndr_flags & NDR_SCALARS) {
348 20738 : NDR_CHECK(ndr_push_align(ndr, 8));
349 20738 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
350 : /* [ignore] 'db_rec' */
351 20738 : NDR_CHECK(ndr_push_server_id(ndr, NDR_SCALARS, &r->server_id));
352 20738 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->local_address, CH_UTF8)));
353 20738 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
354 20738 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->local_address, CH_UTF8)));
355 20738 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->local_address, ndr_charset_length(r->local_address, CH_UTF8), sizeof(uint8_t), CH_UTF8));
356 20738 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_address, CH_UTF8)));
357 20738 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
358 20738 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_address, CH_UTF8)));
359 20738 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->remote_address, ndr_charset_length(r->remote_address, CH_UTF8), sizeof(uint8_t), CH_UTF8));
360 20738 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_name, CH_UTF8)));
361 20738 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
362 20738 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_name, CH_UTF8)));
363 20738 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->remote_name, ndr_charset_length(r->remote_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
364 20738 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->initial_connect_time));
365 20738 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->client_guid));
366 20738 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->stored));
367 20738 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
368 : }
369 20348 : if (ndr_flags & NDR_BUFFERS) {
370 : /* [ignore] 'db_rec' */
371 : }
372 20738 : return NDR_ERR_SUCCESS;
373 : }
374 :
375 992 : static enum ndr_err_code ndr_pull_smbXsrv_client_global0(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_client_global0 *r)
376 : {
377 : uint32_t _ptr_db_rec;
378 992 : uint32_t size_local_address_0 = 0;
379 992 : uint32_t length_local_address_0 = 0;
380 992 : uint32_t size_remote_address_0 = 0;
381 992 : uint32_t length_remote_address_0 = 0;
382 992 : uint32_t size_remote_name_0 = 0;
383 992 : uint32_t length_remote_name_0 = 0;
384 992 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
385 992 : if (ndr_flags & NDR_SCALARS) {
386 992 : NDR_CHECK(ndr_pull_align(ndr, 8));
387 992 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_db_rec));
388 992 : _ptr_db_rec = 0;
389 992 : if (_ptr_db_rec) {
390 : } else {
391 992 : r->db_rec = NULL;
392 : }
393 : /* [ignore] 'db_rec' */
394 992 : NDR_CHECK(ndr_pull_server_id(ndr, NDR_SCALARS, &r->server_id));
395 992 : NDR_CHECK(ndr_pull_array_size(ndr, &r->local_address));
396 992 : NDR_CHECK(ndr_pull_array_length(ndr, &r->local_address));
397 992 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->local_address, &size_local_address_0));
398 992 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->local_address, &length_local_address_0));
399 992 : if (length_local_address_0 > size_local_address_0) {
400 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_local_address_0, length_local_address_0);
401 : }
402 992 : NDR_CHECK(ndr_check_string_terminator(ndr, length_local_address_0, sizeof(uint8_t)));
403 992 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->local_address, length_local_address_0, sizeof(uint8_t), CH_UTF8));
404 992 : NDR_CHECK(ndr_pull_array_size(ndr, &r->remote_address));
405 992 : NDR_CHECK(ndr_pull_array_length(ndr, &r->remote_address));
406 992 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->remote_address, &size_remote_address_0));
407 992 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->remote_address, &length_remote_address_0));
408 992 : if (length_remote_address_0 > size_remote_address_0) {
409 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_remote_address_0, length_remote_address_0);
410 : }
411 992 : NDR_CHECK(ndr_check_string_terminator(ndr, length_remote_address_0, sizeof(uint8_t)));
412 992 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->remote_address, length_remote_address_0, sizeof(uint8_t), CH_UTF8));
413 992 : NDR_CHECK(ndr_pull_array_size(ndr, &r->remote_name));
414 992 : NDR_CHECK(ndr_pull_array_length(ndr, &r->remote_name));
415 992 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->remote_name, &size_remote_name_0));
416 992 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->remote_name, &length_remote_name_0));
417 992 : if (length_remote_name_0 > size_remote_name_0) {
418 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_remote_name_0, length_remote_name_0);
419 : }
420 992 : NDR_CHECK(ndr_check_string_terminator(ndr, length_remote_name_0, sizeof(uint8_t)));
421 992 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->remote_name, length_remote_name_0, sizeof(uint8_t), CH_UTF8));
422 992 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->initial_connect_time));
423 992 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->client_guid));
424 992 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->stored));
425 992 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
426 : }
427 992 : if (ndr_flags & NDR_BUFFERS) {
428 : /* [ignore] 'db_rec' */
429 : }
430 992 : return NDR_ERR_SUCCESS;
431 : }
432 :
433 0 : _PUBLIC_ void ndr_print_smbXsrv_client_global0(struct ndr_print *ndr, const char *name, const struct smbXsrv_client_global0 *r)
434 : {
435 0 : ndr_print_struct(ndr, name, "smbXsrv_client_global0");
436 0 : if (r == NULL) { ndr_print_null(ndr); return; }
437 0 : ndr->depth++;
438 0 : ndr_print_ptr(ndr, "db_rec", r->db_rec);
439 : /* [ignore] 'db_rec' */
440 0 : ndr_print_server_id(ndr, "server_id", &r->server_id);
441 0 : ndr_print_string(ndr, "local_address", r->local_address);
442 0 : ndr_print_string(ndr, "remote_address", r->remote_address);
443 0 : ndr_print_string(ndr, "remote_name", r->remote_name);
444 0 : ndr_print_NTTIME(ndr, "initial_connect_time", r->initial_connect_time);
445 0 : ndr_print_GUID(ndr, "client_guid", &r->client_guid);
446 0 : ndr_print_uint8(ndr, "stored", r->stored);
447 0 : ndr->depth--;
448 : }
449 :
450 41476 : static enum ndr_err_code ndr_push_smbXsrv_client_globalU(struct ndr_push *ndr, int ndr_flags, const union smbXsrv_client_globalU *r)
451 : {
452 : uint32_t level;
453 41476 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
454 41476 : if (ndr_flags & NDR_SCALARS) {
455 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
456 20738 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
457 20738 : NDR_CHECK(ndr_push_union_align(ndr, 5));
458 20738 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
459 20738 : NDR_CHECK(ndr_push_union_align(ndr, 5));
460 20738 : switch (level) {
461 20738 : case 0: {
462 20738 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
463 20348 : break; }
464 :
465 0 : default: {
466 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy));
467 0 : break; }
468 :
469 : }
470 17759 : }
471 41476 : if (ndr_flags & NDR_BUFFERS) {
472 20738 : if (!(ndr_flags & NDR_SCALARS)) {
473 : /* We didn't get it above, and the token is not needed after this. */
474 20738 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
475 : }
476 20738 : switch (level) {
477 20738 : case 0:
478 20738 : if (r->info0) {
479 20738 : NDR_CHECK(ndr_push_smbXsrv_client_global0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
480 : }
481 20348 : break;
482 :
483 0 : default:
484 0 : if (r->dummy) {
485 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->dummy));
486 : }
487 0 : break;
488 :
489 : }
490 17759 : }
491 40696 : return NDR_ERR_SUCCESS;
492 : }
493 :
494 1984 : static enum ndr_err_code ndr_pull_smbXsrv_client_globalU(struct ndr_pull *ndr, int ndr_flags, union smbXsrv_client_globalU *r)
495 : {
496 : uint32_t level;
497 : uint32_t _level;
498 1984 : TALLOC_CTX *_mem_save_info0_0 = NULL;
499 : uint32_t _ptr_info0;
500 1984 : TALLOC_CTX *_mem_save_dummy_0 = NULL;
501 : uint32_t _ptr_dummy;
502 1984 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
503 1984 : if (ndr_flags & NDR_SCALARS) {
504 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
505 992 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
506 992 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
507 992 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
508 992 : if (_level != level) {
509 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
510 : }
511 992 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
512 992 : switch (level) {
513 992 : case 0: {
514 992 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
515 992 : if (_ptr_info0) {
516 992 : NDR_PULL_ALLOC(ndr, r->info0);
517 : } else {
518 0 : r->info0 = NULL;
519 : }
520 992 : break; }
521 :
522 0 : default: {
523 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy));
524 0 : if (_ptr_dummy) {
525 0 : NDR_PULL_ALLOC(ndr, r->dummy);
526 : } else {
527 0 : r->dummy = NULL;
528 : }
529 0 : break; }
530 :
531 : }
532 756 : }
533 1984 : if (ndr_flags & NDR_BUFFERS) {
534 992 : if (!(ndr_flags & NDR_SCALARS)) {
535 : /* We didn't get it above, and the token is not needed after this. */
536 992 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
537 : }
538 992 : switch (level) {
539 992 : case 0:
540 992 : if (r->info0) {
541 992 : _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
542 992 : NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
543 992 : NDR_CHECK(ndr_pull_smbXsrv_client_global0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
544 992 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
545 : }
546 992 : break;
547 :
548 0 : default:
549 0 : if (r->dummy) {
550 0 : _mem_save_dummy_0 = NDR_PULL_GET_MEM_CTX(ndr);
551 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dummy, 0);
552 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->dummy));
553 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy_0, 0);
554 : }
555 0 : break;
556 :
557 : }
558 756 : }
559 1984 : return NDR_ERR_SUCCESS;
560 : }
561 :
562 0 : _PUBLIC_ void ndr_print_smbXsrv_client_globalU(struct ndr_print *ndr, const char *name, const union smbXsrv_client_globalU *r)
563 : {
564 : uint32_t level;
565 0 : level = ndr_print_steal_switch_value(ndr, r);
566 0 : ndr_print_union(ndr, name, level, "smbXsrv_client_globalU");
567 0 : switch (level) {
568 0 : case 0:
569 0 : ndr_print_ptr(ndr, "info0", r->info0);
570 0 : ndr->depth++;
571 0 : if (r->info0) {
572 0 : ndr_print_smbXsrv_client_global0(ndr, "info0", r->info0);
573 : }
574 0 : ndr->depth--;
575 0 : break;
576 :
577 0 : default:
578 0 : ndr_print_ptr(ndr, "dummy", r->dummy);
579 0 : ndr->depth++;
580 0 : if (r->dummy) {
581 0 : ndr_print_hyper(ndr, "dummy", *r->dummy);
582 : }
583 0 : ndr->depth--;
584 0 : break;
585 :
586 : }
587 0 : }
588 :
589 20738 : _PUBLIC_ enum ndr_err_code ndr_push_smbXsrv_client_globalB(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_client_globalB *r)
590 : {
591 20738 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
592 20738 : if (ndr_flags & NDR_SCALARS) {
593 20738 : NDR_CHECK(ndr_push_align(ndr, 5));
594 21128 : NDR_CHECK(ndr_push_smbXsrv_version_values(ndr, NDR_SCALARS, r->version));
595 20738 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->seqnum));
596 20738 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
597 20738 : NDR_CHECK(ndr_push_smbXsrv_client_globalU(ndr, NDR_SCALARS, &r->info));
598 20738 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
599 : }
600 20738 : if (ndr_flags & NDR_BUFFERS) {
601 20738 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
602 20738 : NDR_CHECK(ndr_push_smbXsrv_client_globalU(ndr, NDR_BUFFERS, &r->info));
603 : }
604 20348 : return NDR_ERR_SUCCESS;
605 : }
606 :
607 992 : _PUBLIC_ enum ndr_err_code ndr_pull_smbXsrv_client_globalB(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_client_globalB *r)
608 : {
609 992 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
610 992 : if (ndr_flags & NDR_SCALARS) {
611 992 : NDR_CHECK(ndr_pull_align(ndr, 5));
612 992 : NDR_CHECK(ndr_pull_smbXsrv_version_values(ndr, NDR_SCALARS, &r->version));
613 992 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->seqnum));
614 992 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
615 992 : NDR_CHECK(ndr_pull_smbXsrv_client_globalU(ndr, NDR_SCALARS, &r->info));
616 992 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
617 : }
618 992 : if (ndr_flags & NDR_BUFFERS) {
619 992 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
620 992 : NDR_CHECK(ndr_pull_smbXsrv_client_globalU(ndr, NDR_BUFFERS, &r->info));
621 : }
622 992 : return NDR_ERR_SUCCESS;
623 : }
624 :
625 0 : static void ndr_print_flags_smbXsrv_client_globalB(struct ndr_print *ndr, const char *name, int unused, const struct smbXsrv_client_globalB *r)
626 : {
627 0 : ndr_print_smbXsrv_client_globalB(ndr, name, r);
628 0 : }
629 :
630 0 : _PUBLIC_ void ndr_print_smbXsrv_client_globalB(struct ndr_print *ndr, const char *name, const struct smbXsrv_client_globalB *r)
631 : {
632 0 : ndr_print_struct(ndr, name, "smbXsrv_client_globalB");
633 0 : if (r == NULL) { ndr_print_null(ndr); return; }
634 0 : ndr->depth++;
635 0 : ndr_print_smbXsrv_version_values(ndr, "version", r->version);
636 0 : ndr_print_uint32(ndr, "seqnum", r->seqnum);
637 0 : ndr_print_set_switch_value(ndr, &r->info, r->version);
638 0 : ndr_print_smbXsrv_client_globalU(ndr, "info", &r->info);
639 0 : ndr->depth--;
640 : }
641 :
642 0 : _PUBLIC_ enum ndr_err_code ndr_push_smbXsrv_client(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_client *r)
643 : {
644 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
645 0 : if (ndr_flags & NDR_SCALARS) {
646 0 : if (r->global == NULL) {
647 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
648 : }
649 0 : NDR_CHECK(ndr_push_align(ndr, 8));
650 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
651 : /* [ignore] 'table' */
652 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
653 : /* [ignore] 'raw_ev_ctx' */
654 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
655 : /* [ignore] 'msg_ctx' */
656 0 : NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->global */
657 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
658 : /* [ignore] 'sconn' */
659 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
660 : /* [ignore] 'session_table' */
661 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
662 : /* [ignore] 'tcon_table' */
663 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
664 : /* [ignore] 'open_table' */
665 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
666 : /* [ignore] 'connections' */
667 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->server_multi_channel_enabled));
668 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->next_channel_id));
669 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
670 : /* [ignore] 'connection_pass_subreq' */
671 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
672 : /* [ignore] 'pending_breaks' */
673 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
674 : }
675 0 : if (ndr_flags & NDR_BUFFERS) {
676 : /* [ignore] 'table' */
677 : /* [ignore] 'raw_ev_ctx' */
678 : /* [ignore] 'msg_ctx' */
679 0 : NDR_CHECK(ndr_push_smbXsrv_client_global0(ndr, NDR_SCALARS|NDR_BUFFERS, r->global));
680 : /* [ignore] 'sconn' */
681 : /* [ignore] 'session_table' */
682 : /* [ignore] 'tcon_table' */
683 : /* [ignore] 'open_table' */
684 : /* [ignore] 'connections' */
685 : /* [ignore] 'connection_pass_subreq' */
686 : /* [ignore] 'pending_breaks' */
687 : }
688 0 : return NDR_ERR_SUCCESS;
689 : }
690 :
691 0 : _PUBLIC_ enum ndr_err_code ndr_pull_smbXsrv_client(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_client *r)
692 : {
693 : uint32_t _ptr_table;
694 : uint32_t _ptr_raw_ev_ctx;
695 : uint32_t _ptr_msg_ctx;
696 : uint32_t _ptr_global;
697 0 : TALLOC_CTX *_mem_save_global_0 = NULL;
698 : uint32_t _ptr_sconn;
699 : uint32_t _ptr_session_table;
700 : uint32_t _ptr_tcon_table;
701 : uint32_t _ptr_open_table;
702 : uint32_t _ptr_connections;
703 : uint32_t _ptr_connection_pass_subreq;
704 : uint32_t _ptr_pending_breaks;
705 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
706 0 : if (ndr_flags & NDR_SCALARS) {
707 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
708 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_table));
709 0 : _ptr_table = 0;
710 0 : if (_ptr_table) {
711 : } else {
712 0 : r->table = NULL;
713 : }
714 : /* [ignore] 'table' */
715 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_raw_ev_ctx));
716 0 : _ptr_raw_ev_ctx = 0;
717 0 : if (_ptr_raw_ev_ctx) {
718 : } else {
719 0 : r->raw_ev_ctx = NULL;
720 : }
721 : /* [ignore] 'raw_ev_ctx' */
722 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_msg_ctx));
723 0 : _ptr_msg_ctx = 0;
724 0 : if (_ptr_msg_ctx) {
725 : } else {
726 0 : r->msg_ctx = NULL;
727 : }
728 : /* [ignore] 'msg_ctx' */
729 0 : NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_global));
730 0 : if (_ptr_global) {
731 0 : NDR_PULL_ALLOC(ndr, r->global);
732 : } else {
733 0 : r->global = NULL;
734 : }
735 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_sconn));
736 0 : _ptr_sconn = 0;
737 0 : if (_ptr_sconn) {
738 : } else {
739 0 : r->sconn = NULL;
740 : }
741 : /* [ignore] 'sconn' */
742 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_session_table));
743 0 : _ptr_session_table = 0;
744 0 : if (_ptr_session_table) {
745 : } else {
746 0 : r->session_table = NULL;
747 : }
748 : /* [ignore] 'session_table' */
749 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_tcon_table));
750 0 : _ptr_tcon_table = 0;
751 0 : if (_ptr_tcon_table) {
752 : } else {
753 0 : r->tcon_table = NULL;
754 : }
755 : /* [ignore] 'tcon_table' */
756 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_open_table));
757 0 : _ptr_open_table = 0;
758 0 : if (_ptr_open_table) {
759 : } else {
760 0 : r->open_table = NULL;
761 : }
762 : /* [ignore] 'open_table' */
763 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_connections));
764 0 : _ptr_connections = 0;
765 0 : if (_ptr_connections) {
766 : } else {
767 0 : r->connections = NULL;
768 : }
769 : /* [ignore] 'connections' */
770 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->server_multi_channel_enabled));
771 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->next_channel_id));
772 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_connection_pass_subreq));
773 0 : _ptr_connection_pass_subreq = 0;
774 0 : if (_ptr_connection_pass_subreq) {
775 : } else {
776 0 : r->connection_pass_subreq = NULL;
777 : }
778 : /* [ignore] 'connection_pass_subreq' */
779 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_pending_breaks));
780 0 : _ptr_pending_breaks = 0;
781 0 : if (_ptr_pending_breaks) {
782 : } else {
783 0 : r->pending_breaks = NULL;
784 : }
785 : /* [ignore] 'pending_breaks' */
786 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
787 : }
788 0 : if (ndr_flags & NDR_BUFFERS) {
789 : /* [ignore] 'table' */
790 : /* [ignore] 'raw_ev_ctx' */
791 : /* [ignore] 'msg_ctx' */
792 0 : _mem_save_global_0 = NDR_PULL_GET_MEM_CTX(ndr);
793 0 : NDR_PULL_SET_MEM_CTX(ndr, r->global, 0);
794 0 : NDR_CHECK(ndr_pull_smbXsrv_client_global0(ndr, NDR_SCALARS|NDR_BUFFERS, r->global));
795 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_global_0, 0);
796 : /* [ignore] 'sconn' */
797 : /* [ignore] 'session_table' */
798 : /* [ignore] 'tcon_table' */
799 : /* [ignore] 'open_table' */
800 : /* [ignore] 'connections' */
801 : /* [ignore] 'connection_pass_subreq' */
802 : /* [ignore] 'pending_breaks' */
803 : }
804 0 : return NDR_ERR_SUCCESS;
805 : }
806 :
807 0 : static void ndr_print_flags_smbXsrv_client(struct ndr_print *ndr, const char *name, int unused, const struct smbXsrv_client *r)
808 : {
809 0 : ndr_print_smbXsrv_client(ndr, name, r);
810 0 : }
811 :
812 0 : _PUBLIC_ void ndr_print_smbXsrv_client(struct ndr_print *ndr, const char *name, const struct smbXsrv_client *r)
813 : {
814 0 : ndr_print_struct(ndr, name, "smbXsrv_client");
815 0 : if (r == NULL) { ndr_print_null(ndr); return; }
816 0 : ndr->depth++;
817 0 : ndr_print_ptr(ndr, "table", r->table);
818 : /* [ignore] 'table' */
819 0 : ndr_print_ptr(ndr, "raw_ev_ctx", r->raw_ev_ctx);
820 : /* [ignore] 'raw_ev_ctx' */
821 0 : ndr_print_ptr(ndr, "msg_ctx", r->msg_ctx);
822 : /* [ignore] 'msg_ctx' */
823 0 : ndr_print_ptr(ndr, "global", r->global);
824 0 : ndr->depth++;
825 0 : ndr_print_smbXsrv_client_global0(ndr, "global", r->global);
826 0 : ndr->depth--;
827 0 : ndr_print_ptr(ndr, "sconn", r->sconn);
828 : /* [ignore] 'sconn' */
829 0 : ndr_print_ptr(ndr, "session_table", r->session_table);
830 : /* [ignore] 'session_table' */
831 0 : ndr_print_ptr(ndr, "tcon_table", r->tcon_table);
832 : /* [ignore] 'tcon_table' */
833 0 : ndr_print_ptr(ndr, "open_table", r->open_table);
834 : /* [ignore] 'open_table' */
835 0 : ndr_print_ptr(ndr, "connections", r->connections);
836 : /* [ignore] 'connections' */
837 0 : ndr_print_uint8(ndr, "server_multi_channel_enabled", r->server_multi_channel_enabled);
838 0 : ndr_print_hyper(ndr, "next_channel_id", r->next_channel_id);
839 0 : ndr_print_ptr(ndr, "connection_pass_subreq", r->connection_pass_subreq);
840 : /* [ignore] 'connection_pass_subreq' */
841 0 : ndr_print_ptr(ndr, "pending_breaks", r->pending_breaks);
842 : /* [ignore] 'pending_breaks' */
843 0 : ndr->depth--;
844 : }
845 :
846 0 : static enum ndr_err_code ndr_push_smbXsrv_clientU(struct ndr_push *ndr, int ndr_flags, const union smbXsrv_clientU *r)
847 : {
848 : uint32_t level;
849 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
850 0 : if (ndr_flags & NDR_SCALARS) {
851 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
852 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
853 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
854 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
855 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
856 0 : switch (level) {
857 0 : case 0: {
858 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
859 0 : break; }
860 :
861 0 : default: {
862 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy));
863 0 : break; }
864 :
865 : }
866 0 : }
867 0 : if (ndr_flags & NDR_BUFFERS) {
868 0 : if (!(ndr_flags & NDR_SCALARS)) {
869 : /* We didn't get it above, and the token is not needed after this. */
870 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
871 : }
872 0 : switch (level) {
873 0 : case 0:
874 0 : if (r->info0) {
875 0 : NDR_CHECK(ndr_push_smbXsrv_client(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
876 : }
877 0 : break;
878 :
879 0 : default:
880 0 : if (r->dummy) {
881 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->dummy));
882 : }
883 0 : break;
884 :
885 : }
886 0 : }
887 0 : return NDR_ERR_SUCCESS;
888 : }
889 :
890 0 : static enum ndr_err_code ndr_pull_smbXsrv_clientU(struct ndr_pull *ndr, int ndr_flags, union smbXsrv_clientU *r)
891 : {
892 : uint32_t level;
893 : uint32_t _level;
894 0 : TALLOC_CTX *_mem_save_info0_0 = NULL;
895 : uint32_t _ptr_info0;
896 0 : TALLOC_CTX *_mem_save_dummy_0 = NULL;
897 : uint32_t _ptr_dummy;
898 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
899 0 : if (ndr_flags & NDR_SCALARS) {
900 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
901 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
902 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
903 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
904 0 : if (_level != level) {
905 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
906 : }
907 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
908 0 : switch (level) {
909 0 : case 0: {
910 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
911 0 : if (_ptr_info0) {
912 0 : NDR_PULL_ALLOC(ndr, r->info0);
913 : } else {
914 0 : r->info0 = NULL;
915 : }
916 0 : break; }
917 :
918 0 : default: {
919 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy));
920 0 : if (_ptr_dummy) {
921 0 : NDR_PULL_ALLOC(ndr, r->dummy);
922 : } else {
923 0 : r->dummy = NULL;
924 : }
925 0 : break; }
926 :
927 : }
928 0 : }
929 0 : if (ndr_flags & NDR_BUFFERS) {
930 0 : if (!(ndr_flags & NDR_SCALARS)) {
931 : /* We didn't get it above, and the token is not needed after this. */
932 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
933 : }
934 0 : switch (level) {
935 0 : case 0:
936 0 : if (r->info0) {
937 0 : _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
938 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
939 0 : NDR_CHECK(ndr_pull_smbXsrv_client(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
940 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
941 : }
942 0 : break;
943 :
944 0 : default:
945 0 : if (r->dummy) {
946 0 : _mem_save_dummy_0 = NDR_PULL_GET_MEM_CTX(ndr);
947 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dummy, 0);
948 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->dummy));
949 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy_0, 0);
950 : }
951 0 : break;
952 :
953 : }
954 0 : }
955 0 : return NDR_ERR_SUCCESS;
956 : }
957 :
958 0 : _PUBLIC_ void ndr_print_smbXsrv_clientU(struct ndr_print *ndr, const char *name, const union smbXsrv_clientU *r)
959 : {
960 : uint32_t level;
961 0 : level = ndr_print_steal_switch_value(ndr, r);
962 0 : ndr_print_union(ndr, name, level, "smbXsrv_clientU");
963 0 : switch (level) {
964 0 : case 0:
965 0 : ndr_print_ptr(ndr, "info0", r->info0);
966 0 : ndr->depth++;
967 0 : if (r->info0) {
968 0 : ndr_print_smbXsrv_client(ndr, "info0", r->info0);
969 : }
970 0 : ndr->depth--;
971 0 : break;
972 :
973 0 : default:
974 0 : ndr_print_ptr(ndr, "dummy", r->dummy);
975 0 : ndr->depth++;
976 0 : if (r->dummy) {
977 0 : ndr_print_hyper(ndr, "dummy", *r->dummy);
978 : }
979 0 : ndr->depth--;
980 0 : break;
981 :
982 : }
983 0 : }
984 :
985 0 : _PUBLIC_ enum ndr_err_code ndr_push_smbXsrv_clientB(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_clientB *r)
986 : {
987 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
988 0 : if (ndr_flags & NDR_SCALARS) {
989 0 : NDR_CHECK(ndr_push_align(ndr, 5));
990 0 : NDR_CHECK(ndr_push_smbXsrv_version_values(ndr, NDR_SCALARS, r->version));
991 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
992 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
993 0 : NDR_CHECK(ndr_push_smbXsrv_clientU(ndr, NDR_SCALARS, &r->info));
994 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
995 : }
996 0 : if (ndr_flags & NDR_BUFFERS) {
997 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
998 0 : NDR_CHECK(ndr_push_smbXsrv_clientU(ndr, NDR_BUFFERS, &r->info));
999 : }
1000 0 : return NDR_ERR_SUCCESS;
1001 : }
1002 :
1003 0 : _PUBLIC_ enum ndr_err_code ndr_pull_smbXsrv_clientB(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_clientB *r)
1004 : {
1005 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1006 0 : if (ndr_flags & NDR_SCALARS) {
1007 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
1008 0 : NDR_CHECK(ndr_pull_smbXsrv_version_values(ndr, NDR_SCALARS, &r->version));
1009 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
1010 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
1011 0 : NDR_CHECK(ndr_pull_smbXsrv_clientU(ndr, NDR_SCALARS, &r->info));
1012 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1013 : }
1014 0 : if (ndr_flags & NDR_BUFFERS) {
1015 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
1016 0 : NDR_CHECK(ndr_pull_smbXsrv_clientU(ndr, NDR_BUFFERS, &r->info));
1017 : }
1018 0 : return NDR_ERR_SUCCESS;
1019 : }
1020 :
1021 0 : static void ndr_print_flags_smbXsrv_clientB(struct ndr_print *ndr, const char *name, int unused, const struct smbXsrv_clientB *r)
1022 : {
1023 0 : ndr_print_smbXsrv_clientB(ndr, name, r);
1024 0 : }
1025 :
1026 0 : _PUBLIC_ void ndr_print_smbXsrv_clientB(struct ndr_print *ndr, const char *name, const struct smbXsrv_clientB *r)
1027 : {
1028 0 : ndr_print_struct(ndr, name, "smbXsrv_clientB");
1029 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1030 0 : ndr->depth++;
1031 0 : ndr_print_smbXsrv_version_values(ndr, "version", r->version);
1032 0 : ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
1033 0 : ndr_print_set_switch_value(ndr, &r->info, r->version);
1034 0 : ndr_print_smbXsrv_clientU(ndr, "info", &r->info);
1035 0 : ndr->depth--;
1036 : }
1037 :
1038 1922 : static enum ndr_err_code ndr_push_smbXsrv_connection_pass0(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_connection_pass0 *r)
1039 : {
1040 1922 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1041 1922 : if (ndr_flags & NDR_SCALARS) {
1042 1922 : NDR_CHECK(ndr_push_align(ndr, 8));
1043 1922 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->client_guid));
1044 1922 : NDR_CHECK(ndr_push_server_id(ndr, NDR_SCALARS, &r->src_server_id));
1045 1922 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->xconn_connect_time));
1046 1922 : NDR_CHECK(ndr_push_server_id(ndr, NDR_SCALARS, &r->dst_server_id));
1047 1922 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->client_connect_time));
1048 1922 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->negotiate_request));
1049 1922 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
1050 : }
1051 1922 : if (ndr_flags & NDR_BUFFERS) {
1052 : }
1053 1922 : return NDR_ERR_SUCCESS;
1054 : }
1055 :
1056 1922 : static enum ndr_err_code ndr_pull_smbXsrv_connection_pass0(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_connection_pass0 *r)
1057 : {
1058 1922 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1059 1922 : if (ndr_flags & NDR_SCALARS) {
1060 1922 : NDR_CHECK(ndr_pull_align(ndr, 8));
1061 1922 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->client_guid));
1062 1922 : NDR_CHECK(ndr_pull_server_id(ndr, NDR_SCALARS, &r->src_server_id));
1063 1922 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->xconn_connect_time));
1064 1922 : NDR_CHECK(ndr_pull_server_id(ndr, NDR_SCALARS, &r->dst_server_id));
1065 1922 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->client_connect_time));
1066 1922 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->negotiate_request));
1067 1922 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
1068 : }
1069 1922 : if (ndr_flags & NDR_BUFFERS) {
1070 : }
1071 1922 : return NDR_ERR_SUCCESS;
1072 : }
1073 :
1074 0 : _PUBLIC_ void ndr_print_smbXsrv_connection_pass0(struct ndr_print *ndr, const char *name, const struct smbXsrv_connection_pass0 *r)
1075 : {
1076 0 : ndr_print_struct(ndr, name, "smbXsrv_connection_pass0");
1077 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1078 0 : ndr->depth++;
1079 0 : ndr_print_GUID(ndr, "client_guid", &r->client_guid);
1080 0 : ndr_print_server_id(ndr, "src_server_id", &r->src_server_id);
1081 0 : ndr_print_NTTIME(ndr, "xconn_connect_time", r->xconn_connect_time);
1082 0 : ndr_print_server_id(ndr, "dst_server_id", &r->dst_server_id);
1083 0 : ndr_print_NTTIME(ndr, "client_connect_time", r->client_connect_time);
1084 0 : ndr_print_DATA_BLOB(ndr, "negotiate_request", r->negotiate_request);
1085 0 : ndr->depth--;
1086 : }
1087 :
1088 3844 : static enum ndr_err_code ndr_push_smbXsrv_connection_passU(struct ndr_push *ndr, int ndr_flags, const union smbXsrv_connection_passU *r)
1089 : {
1090 : uint32_t level;
1091 3844 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1092 3844 : if (ndr_flags & NDR_SCALARS) {
1093 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1094 1922 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1095 1922 : NDR_CHECK(ndr_push_union_align(ndr, 5));
1096 1922 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1097 1922 : NDR_CHECK(ndr_push_union_align(ndr, 5));
1098 1922 : switch (level) {
1099 1922 : case 0: {
1100 1922 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
1101 1922 : break; }
1102 :
1103 0 : default: {
1104 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy));
1105 0 : break; }
1106 :
1107 : }
1108 1450 : }
1109 3844 : if (ndr_flags & NDR_BUFFERS) {
1110 1922 : if (!(ndr_flags & NDR_SCALARS)) {
1111 : /* We didn't get it above, and the token is not needed after this. */
1112 1922 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1113 : }
1114 1922 : switch (level) {
1115 1922 : case 0:
1116 1922 : if (r->info0) {
1117 1922 : NDR_CHECK(ndr_push_smbXsrv_connection_pass0(ndr, NDR_SCALARS, r->info0));
1118 : }
1119 1922 : break;
1120 :
1121 0 : default:
1122 0 : if (r->dummy) {
1123 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->dummy));
1124 : }
1125 0 : break;
1126 :
1127 : }
1128 1450 : }
1129 3844 : return NDR_ERR_SUCCESS;
1130 : }
1131 :
1132 3844 : static enum ndr_err_code ndr_pull_smbXsrv_connection_passU(struct ndr_pull *ndr, int ndr_flags, union smbXsrv_connection_passU *r)
1133 : {
1134 : uint32_t level;
1135 : uint32_t _level;
1136 3844 : TALLOC_CTX *_mem_save_info0_0 = NULL;
1137 : uint32_t _ptr_info0;
1138 3844 : TALLOC_CTX *_mem_save_dummy_0 = NULL;
1139 : uint32_t _ptr_dummy;
1140 3844 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1141 3844 : if (ndr_flags & NDR_SCALARS) {
1142 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1143 1922 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1144 1922 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
1145 1922 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1146 1922 : if (_level != level) {
1147 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1148 : }
1149 1922 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
1150 1922 : switch (level) {
1151 1922 : case 0: {
1152 1922 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
1153 1922 : if (_ptr_info0) {
1154 1922 : NDR_PULL_ALLOC(ndr, r->info0);
1155 : } else {
1156 0 : r->info0 = NULL;
1157 : }
1158 1922 : break; }
1159 :
1160 0 : default: {
1161 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy));
1162 0 : if (_ptr_dummy) {
1163 0 : NDR_PULL_ALLOC(ndr, r->dummy);
1164 : } else {
1165 0 : r->dummy = NULL;
1166 : }
1167 0 : break; }
1168 :
1169 : }
1170 1450 : }
1171 3844 : if (ndr_flags & NDR_BUFFERS) {
1172 1922 : if (!(ndr_flags & NDR_SCALARS)) {
1173 : /* We didn't get it above, and the token is not needed after this. */
1174 1922 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1175 : }
1176 1922 : switch (level) {
1177 1922 : case 0:
1178 1922 : if (r->info0) {
1179 1922 : _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1180 1922 : NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
1181 1922 : NDR_CHECK(ndr_pull_smbXsrv_connection_pass0(ndr, NDR_SCALARS, r->info0));
1182 1922 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
1183 : }
1184 1922 : break;
1185 :
1186 0 : default:
1187 0 : if (r->dummy) {
1188 0 : _mem_save_dummy_0 = NDR_PULL_GET_MEM_CTX(ndr);
1189 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dummy, 0);
1190 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->dummy));
1191 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy_0, 0);
1192 : }
1193 0 : break;
1194 :
1195 : }
1196 1450 : }
1197 3844 : return NDR_ERR_SUCCESS;
1198 : }
1199 :
1200 0 : _PUBLIC_ void ndr_print_smbXsrv_connection_passU(struct ndr_print *ndr, const char *name, const union smbXsrv_connection_passU *r)
1201 : {
1202 : uint32_t level;
1203 0 : level = ndr_print_steal_switch_value(ndr, r);
1204 0 : ndr_print_union(ndr, name, level, "smbXsrv_connection_passU");
1205 0 : switch (level) {
1206 0 : case 0:
1207 0 : ndr_print_ptr(ndr, "info0", r->info0);
1208 0 : ndr->depth++;
1209 0 : if (r->info0) {
1210 0 : ndr_print_smbXsrv_connection_pass0(ndr, "info0", r->info0);
1211 : }
1212 0 : ndr->depth--;
1213 0 : break;
1214 :
1215 0 : default:
1216 0 : ndr_print_ptr(ndr, "dummy", r->dummy);
1217 0 : ndr->depth++;
1218 0 : if (r->dummy) {
1219 0 : ndr_print_hyper(ndr, "dummy", *r->dummy);
1220 : }
1221 0 : ndr->depth--;
1222 0 : break;
1223 :
1224 : }
1225 0 : }
1226 :
1227 1922 : _PUBLIC_ enum ndr_err_code ndr_push_smbXsrv_connection_passB(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_connection_passB *r)
1228 : {
1229 1922 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1230 1922 : if (ndr_flags & NDR_SCALARS) {
1231 1922 : NDR_CHECK(ndr_push_align(ndr, 5));
1232 1922 : NDR_CHECK(ndr_push_smbXsrv_version_values(ndr, NDR_SCALARS, r->version));
1233 1922 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1234 1922 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
1235 1922 : NDR_CHECK(ndr_push_smbXsrv_connection_passU(ndr, NDR_SCALARS, &r->info));
1236 1922 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1237 : }
1238 1922 : if (ndr_flags & NDR_BUFFERS) {
1239 1922 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
1240 1922 : NDR_CHECK(ndr_push_smbXsrv_connection_passU(ndr, NDR_BUFFERS, &r->info));
1241 : }
1242 1922 : return NDR_ERR_SUCCESS;
1243 : }
1244 :
1245 1922 : _PUBLIC_ enum ndr_err_code ndr_pull_smbXsrv_connection_passB(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_connection_passB *r)
1246 : {
1247 1922 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1248 1922 : if (ndr_flags & NDR_SCALARS) {
1249 1922 : NDR_CHECK(ndr_pull_align(ndr, 5));
1250 1922 : NDR_CHECK(ndr_pull_smbXsrv_version_values(ndr, NDR_SCALARS, &r->version));
1251 1922 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
1252 1922 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
1253 1922 : NDR_CHECK(ndr_pull_smbXsrv_connection_passU(ndr, NDR_SCALARS, &r->info));
1254 1922 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1255 : }
1256 1922 : if (ndr_flags & NDR_BUFFERS) {
1257 1922 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
1258 1922 : NDR_CHECK(ndr_pull_smbXsrv_connection_passU(ndr, NDR_BUFFERS, &r->info));
1259 : }
1260 1922 : return NDR_ERR_SUCCESS;
1261 : }
1262 :
1263 0 : static void ndr_print_flags_smbXsrv_connection_passB(struct ndr_print *ndr, const char *name, int unused, const struct smbXsrv_connection_passB *r)
1264 : {
1265 0 : ndr_print_smbXsrv_connection_passB(ndr, name, r);
1266 0 : }
1267 :
1268 0 : _PUBLIC_ void ndr_print_smbXsrv_connection_passB(struct ndr_print *ndr, const char *name, const struct smbXsrv_connection_passB *r)
1269 : {
1270 0 : ndr_print_struct(ndr, name, "smbXsrv_connection_passB");
1271 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1272 0 : ndr->depth++;
1273 0 : ndr_print_smbXsrv_version_values(ndr, "version", r->version);
1274 0 : ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
1275 0 : ndr_print_set_switch_value(ndr, &r->info, r->version);
1276 0 : ndr_print_smbXsrv_connection_passU(ndr, "info", &r->info);
1277 0 : ndr->depth--;
1278 : }
1279 :
1280 265981 : _PUBLIC_ enum ndr_err_code ndr_push_smbXsrv_encrpytion_flags(struct ndr_push *ndr, int ndr_flags, uint8_t r)
1281 : {
1282 265981 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
1283 265981 : return NDR_ERR_SUCCESS;
1284 : }
1285 :
1286 1087 : _PUBLIC_ enum ndr_err_code ndr_pull_smbXsrv_encrpytion_flags(struct ndr_pull *ndr, int ndr_flags, uint8_t *r)
1287 : {
1288 : uint8_t v;
1289 1087 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
1290 1087 : *r = v;
1291 1087 : return NDR_ERR_SUCCESS;
1292 : }
1293 :
1294 0 : _PUBLIC_ void ndr_print_smbXsrv_encrpytion_flags(struct ndr_print *ndr, const char *name, uint8_t r)
1295 : {
1296 0 : ndr_print_uint8(ndr, name, r);
1297 0 : ndr->depth++;
1298 0 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SMBXSRV_ENCRYPTION_REQUIRED", SMBXSRV_ENCRYPTION_REQUIRED, r);
1299 0 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SMBXSRV_ENCRYPTION_DESIRED", SMBXSRV_ENCRYPTION_DESIRED, r);
1300 0 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SMBXSRV_PROCESSED_ENCRYPTED_PACKET", SMBXSRV_PROCESSED_ENCRYPTED_PACKET, r);
1301 0 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SMBXSRV_PROCESSED_UNENCRYPTED_PACKET", SMBXSRV_PROCESSED_UNENCRYPTED_PACKET, r);
1302 0 : ndr->depth--;
1303 0 : }
1304 :
1305 265981 : _PUBLIC_ enum ndr_err_code ndr_push_smbXsrv_signing_flags(struct ndr_push *ndr, int ndr_flags, uint8_t r)
1306 : {
1307 265981 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
1308 265981 : return NDR_ERR_SUCCESS;
1309 : }
1310 :
1311 1087 : _PUBLIC_ enum ndr_err_code ndr_pull_smbXsrv_signing_flags(struct ndr_pull *ndr, int ndr_flags, uint8_t *r)
1312 : {
1313 : uint8_t v;
1314 1087 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
1315 1087 : *r = v;
1316 1087 : return NDR_ERR_SUCCESS;
1317 : }
1318 :
1319 0 : _PUBLIC_ void ndr_print_smbXsrv_signing_flags(struct ndr_print *ndr, const char *name, uint8_t r)
1320 : {
1321 0 : ndr_print_uint8(ndr, name, r);
1322 0 : ndr->depth++;
1323 0 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SMBXSRV_SIGNING_REQUIRED", SMBXSRV_SIGNING_REQUIRED, r);
1324 0 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SMBXSRV_PROCESSED_SIGNED_PACKET", SMBXSRV_PROCESSED_SIGNED_PACKET, r);
1325 0 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SMBXSRV_PROCESSED_UNSIGNED_PACKET", SMBXSRV_PROCESSED_UNSIGNED_PACKET, r);
1326 0 : ndr->depth--;
1327 0 : }
1328 :
1329 344616 : static enum ndr_err_code ndr_push_smbXsrv_channel_global0(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_channel_global0 *r)
1330 : {
1331 344616 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1332 344616 : if (ndr_flags & NDR_SCALARS) {
1333 172308 : NDR_CHECK(ndr_push_align(ndr, 8));
1334 172308 : NDR_CHECK(ndr_push_server_id(ndr, NDR_SCALARS, &r->server_id));
1335 172308 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->channel_id));
1336 172308 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->creation_time));
1337 172308 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->local_address, CH_UTF8)));
1338 172308 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1339 172308 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->local_address, CH_UTF8)));
1340 172308 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->local_address, ndr_charset_length(r->local_address, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1341 172308 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_address, CH_UTF8)));
1342 172308 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1343 172308 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_address, CH_UTF8)));
1344 172308 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->remote_address, ndr_charset_length(r->remote_address, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1345 172308 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_name, CH_UTF8)));
1346 172308 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1347 172308 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_name, CH_UTF8)));
1348 172308 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->remote_name, ndr_charset_length(r->remote_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
1349 172308 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->signing_key_blob));
1350 172308 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1351 : /* [ignore] 'signing_key' */
1352 172308 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auth_session_info_seqnum));
1353 172308 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1354 : /* [ignore] 'connection' */
1355 172308 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->signing_algo));
1356 172308 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->encryption_cipher));
1357 172308 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
1358 : }
1359 340696 : if (ndr_flags & NDR_BUFFERS) {
1360 : /* [ignore] 'signing_key' */
1361 : /* [ignore] 'connection' */
1362 : }
1363 344616 : return NDR_ERR_SUCCESS;
1364 : }
1365 :
1366 1876 : static enum ndr_err_code ndr_pull_smbXsrv_channel_global0(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_channel_global0 *r)
1367 : {
1368 1876 : uint32_t size_local_address_0 = 0;
1369 1876 : uint32_t length_local_address_0 = 0;
1370 1876 : uint32_t size_remote_address_0 = 0;
1371 1876 : uint32_t length_remote_address_0 = 0;
1372 1876 : uint32_t size_remote_name_0 = 0;
1373 1876 : uint32_t length_remote_name_0 = 0;
1374 : uint32_t _ptr_signing_key;
1375 : uint32_t _ptr_connection;
1376 1876 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1377 1876 : if (ndr_flags & NDR_SCALARS) {
1378 938 : NDR_CHECK(ndr_pull_align(ndr, 8));
1379 938 : NDR_CHECK(ndr_pull_server_id(ndr, NDR_SCALARS, &r->server_id));
1380 938 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->channel_id));
1381 938 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->creation_time));
1382 938 : NDR_CHECK(ndr_pull_array_size(ndr, &r->local_address));
1383 938 : NDR_CHECK(ndr_pull_array_length(ndr, &r->local_address));
1384 938 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->local_address, &size_local_address_0));
1385 938 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->local_address, &length_local_address_0));
1386 938 : if (length_local_address_0 > size_local_address_0) {
1387 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_local_address_0, length_local_address_0);
1388 : }
1389 938 : NDR_CHECK(ndr_check_string_terminator(ndr, length_local_address_0, sizeof(uint8_t)));
1390 938 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->local_address, length_local_address_0, sizeof(uint8_t), CH_UTF8));
1391 938 : NDR_CHECK(ndr_pull_array_size(ndr, &r->remote_address));
1392 938 : NDR_CHECK(ndr_pull_array_length(ndr, &r->remote_address));
1393 938 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->remote_address, &size_remote_address_0));
1394 938 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->remote_address, &length_remote_address_0));
1395 938 : if (length_remote_address_0 > size_remote_address_0) {
1396 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_remote_address_0, length_remote_address_0);
1397 : }
1398 938 : NDR_CHECK(ndr_check_string_terminator(ndr, length_remote_address_0, sizeof(uint8_t)));
1399 938 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->remote_address, length_remote_address_0, sizeof(uint8_t), CH_UTF8));
1400 938 : NDR_CHECK(ndr_pull_array_size(ndr, &r->remote_name));
1401 938 : NDR_CHECK(ndr_pull_array_length(ndr, &r->remote_name));
1402 938 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->remote_name, &size_remote_name_0));
1403 938 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->remote_name, &length_remote_name_0));
1404 938 : if (length_remote_name_0 > size_remote_name_0) {
1405 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_remote_name_0, length_remote_name_0);
1406 : }
1407 938 : NDR_CHECK(ndr_check_string_terminator(ndr, length_remote_name_0, sizeof(uint8_t)));
1408 938 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->remote_name, length_remote_name_0, sizeof(uint8_t), CH_UTF8));
1409 938 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->signing_key_blob));
1410 938 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_signing_key));
1411 938 : _ptr_signing_key = 0;
1412 938 : if (_ptr_signing_key) {
1413 : } else {
1414 938 : r->signing_key = NULL;
1415 : }
1416 : /* [ignore] 'signing_key' */
1417 938 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auth_session_info_seqnum));
1418 938 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_connection));
1419 938 : _ptr_connection = 0;
1420 938 : if (_ptr_connection) {
1421 : } else {
1422 938 : r->connection = NULL;
1423 : }
1424 : /* [ignore] 'connection' */
1425 938 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->signing_algo));
1426 938 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->encryption_cipher));
1427 938 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
1428 : }
1429 1876 : if (ndr_flags & NDR_BUFFERS) {
1430 : /* [ignore] 'signing_key' */
1431 : /* [ignore] 'connection' */
1432 : }
1433 1876 : return NDR_ERR_SUCCESS;
1434 : }
1435 :
1436 0 : _PUBLIC_ void ndr_print_smbXsrv_channel_global0(struct ndr_print *ndr, const char *name, const struct smbXsrv_channel_global0 *r)
1437 : {
1438 0 : ndr_print_struct(ndr, name, "smbXsrv_channel_global0");
1439 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1440 0 : ndr->depth++;
1441 0 : ndr_print_server_id(ndr, "server_id", &r->server_id);
1442 0 : ndr_print_hyper(ndr, "channel_id", r->channel_id);
1443 0 : ndr_print_NTTIME(ndr, "creation_time", r->creation_time);
1444 0 : ndr_print_string(ndr, "local_address", r->local_address);
1445 0 : ndr_print_string(ndr, "remote_address", r->remote_address);
1446 0 : ndr_print_string(ndr, "remote_name", r->remote_name);
1447 0 : ndr_print_ptr(ndr, "signing_key", r->signing_key);
1448 : /* [ignore] 'signing_key' */
1449 0 : ndr_print_uint32(ndr, "auth_session_info_seqnum", r->auth_session_info_seqnum);
1450 0 : ndr_print_ptr(ndr, "connection", r->connection);
1451 : /* [ignore] 'connection' */
1452 0 : ndr_print_uint16(ndr, "signing_algo", r->signing_algo);
1453 0 : ndr_print_uint16(ndr, "encryption_cipher", r->encryption_cipher);
1454 0 : ndr->depth--;
1455 : }
1456 :
1457 139770 : static enum ndr_err_code ndr_push_smbXsrv_session_global0(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_session_global0 *r)
1458 : {
1459 : uint32_t cntr_channels_0;
1460 139770 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1461 139770 : if (ndr_flags & NDR_SCALARS) {
1462 139770 : NDR_CHECK(ndr_push_align(ndr, 8));
1463 139770 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1464 : /* [ignore] 'db_rec' */
1465 139770 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->session_global_id));
1466 139770 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->session_wire_id));
1467 139770 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->creation_time));
1468 139770 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->expiration_time));
1469 139770 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->auth_time));
1470 139770 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auth_session_info_seqnum));
1471 139770 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->auth_session_info));
1472 139770 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->connection_dialect));
1473 139770 : NDR_CHECK(ndr_push_smbXsrv_signing_flags(ndr, NDR_SCALARS, r->signing_flags));
1474 139770 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->signing_algo));
1475 139770 : NDR_CHECK(ndr_push_smbXsrv_encrpytion_flags(ndr, NDR_SCALARS, r->encryption_flags));
1476 139770 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->encryption_cipher));
1477 139770 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->signing_key_blob));
1478 139770 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1479 : /* [ignore] 'signing_key' */
1480 139770 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->encryption_key_blob));
1481 139770 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1482 : /* [ignore] 'encryption_key' */
1483 139770 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->decryption_key_blob));
1484 139770 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1485 : /* [ignore] 'decryption_key' */
1486 139770 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->application_key_blob));
1487 139770 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1488 : /* [ignore] 'application_key' */
1489 139770 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_channels));
1490 310118 : for (cntr_channels_0 = 0; cntr_channels_0 < (r->num_channels); cntr_channels_0++) {
1491 172308 : NDR_CHECK(ndr_push_smbXsrv_channel_global0(ndr, NDR_SCALARS, &r->channels[cntr_channels_0]));
1492 : }
1493 139770 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
1494 : }
1495 139770 : if (ndr_flags & NDR_BUFFERS) {
1496 : /* [ignore] 'db_rec' */
1497 139770 : if (r->auth_session_info) {
1498 54648 : NDR_CHECK(ndr_push_auth_session_info(ndr, NDR_SCALARS|NDR_BUFFERS, r->auth_session_info));
1499 : }
1500 : /* [ignore] 'signing_key' */
1501 : /* [ignore] 'encryption_key' */
1502 : /* [ignore] 'decryption_key' */
1503 : /* [ignore] 'application_key' */
1504 310118 : for (cntr_channels_0 = 0; cntr_channels_0 < (r->num_channels); cntr_channels_0++) {
1505 172308 : NDR_CHECK(ndr_push_smbXsrv_channel_global0(ndr, NDR_BUFFERS, &r->channels[cntr_channels_0]));
1506 : }
1507 : }
1508 137810 : return NDR_ERR_SUCCESS;
1509 : }
1510 :
1511 930 : static enum ndr_err_code ndr_pull_smbXsrv_session_global0(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_session_global0 *r)
1512 : {
1513 : uint32_t _ptr_db_rec;
1514 : uint32_t _ptr_auth_session_info;
1515 930 : TALLOC_CTX *_mem_save_auth_session_info_0 = NULL;
1516 : uint32_t _ptr_signing_key;
1517 : uint32_t _ptr_encryption_key;
1518 : uint32_t _ptr_decryption_key;
1519 : uint32_t _ptr_application_key;
1520 930 : uint32_t size_channels_0 = 0;
1521 : uint32_t cntr_channels_0;
1522 930 : TALLOC_CTX *_mem_save_channels_0 = NULL;
1523 930 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1524 930 : if (ndr_flags & NDR_SCALARS) {
1525 930 : NDR_CHECK(ndr_pull_align(ndr, 8));
1526 930 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_db_rec));
1527 930 : _ptr_db_rec = 0;
1528 930 : if (_ptr_db_rec) {
1529 : } else {
1530 930 : r->db_rec = NULL;
1531 : }
1532 : /* [ignore] 'db_rec' */
1533 930 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->session_global_id));
1534 930 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->session_wire_id));
1535 930 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->creation_time));
1536 930 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->expiration_time));
1537 930 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->auth_time));
1538 930 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auth_session_info_seqnum));
1539 930 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_auth_session_info));
1540 930 : if (_ptr_auth_session_info) {
1541 930 : NDR_PULL_ALLOC(ndr, r->auth_session_info);
1542 : } else {
1543 0 : r->auth_session_info = NULL;
1544 : }
1545 930 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->connection_dialect));
1546 930 : NDR_CHECK(ndr_pull_smbXsrv_signing_flags(ndr, NDR_SCALARS, &r->signing_flags));
1547 930 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->signing_algo));
1548 930 : NDR_CHECK(ndr_pull_smbXsrv_encrpytion_flags(ndr, NDR_SCALARS, &r->encryption_flags));
1549 930 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->encryption_cipher));
1550 930 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->signing_key_blob));
1551 930 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_signing_key));
1552 930 : _ptr_signing_key = 0;
1553 930 : if (_ptr_signing_key) {
1554 : } else {
1555 930 : r->signing_key = NULL;
1556 : }
1557 : /* [ignore] 'signing_key' */
1558 930 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->encryption_key_blob));
1559 930 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_encryption_key));
1560 930 : _ptr_encryption_key = 0;
1561 930 : if (_ptr_encryption_key) {
1562 : } else {
1563 930 : r->encryption_key = NULL;
1564 : }
1565 : /* [ignore] 'encryption_key' */
1566 930 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->decryption_key_blob));
1567 930 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_decryption_key));
1568 930 : _ptr_decryption_key = 0;
1569 930 : if (_ptr_decryption_key) {
1570 : } else {
1571 930 : r->decryption_key = NULL;
1572 : }
1573 : /* [ignore] 'decryption_key' */
1574 930 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->application_key_blob));
1575 930 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_application_key));
1576 930 : _ptr_application_key = 0;
1577 930 : if (_ptr_application_key) {
1578 : } else {
1579 930 : r->application_key = NULL;
1580 : }
1581 : /* [ignore] 'application_key' */
1582 930 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_channels));
1583 930 : if (r->num_channels < 1 || r->num_channels > 1024) {
1584 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1585 : }
1586 930 : size_channels_0 = r->num_channels;
1587 930 : NDR_PULL_ALLOC_N(ndr, r->channels, size_channels_0);
1588 930 : _mem_save_channels_0 = NDR_PULL_GET_MEM_CTX(ndr);
1589 930 : NDR_PULL_SET_MEM_CTX(ndr, r->channels, 0);
1590 1868 : for (cntr_channels_0 = 0; cntr_channels_0 < (size_channels_0); cntr_channels_0++) {
1591 938 : NDR_CHECK(ndr_pull_smbXsrv_channel_global0(ndr, NDR_SCALARS, &r->channels[cntr_channels_0]));
1592 : }
1593 930 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_channels_0, 0);
1594 930 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
1595 : }
1596 930 : if (ndr_flags & NDR_BUFFERS) {
1597 : /* [ignore] 'db_rec' */
1598 930 : if (r->auth_session_info) {
1599 930 : _mem_save_auth_session_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
1600 930 : NDR_PULL_SET_MEM_CTX(ndr, r->auth_session_info, 0);
1601 930 : NDR_CHECK(ndr_pull_auth_session_info(ndr, NDR_SCALARS|NDR_BUFFERS, r->auth_session_info));
1602 930 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_auth_session_info_0, 0);
1603 : }
1604 : /* [ignore] 'signing_key' */
1605 : /* [ignore] 'encryption_key' */
1606 : /* [ignore] 'decryption_key' */
1607 : /* [ignore] 'application_key' */
1608 930 : size_channels_0 = r->num_channels;
1609 930 : _mem_save_channels_0 = NDR_PULL_GET_MEM_CTX(ndr);
1610 930 : NDR_PULL_SET_MEM_CTX(ndr, r->channels, 0);
1611 1868 : for (cntr_channels_0 = 0; cntr_channels_0 < (size_channels_0); cntr_channels_0++) {
1612 938 : NDR_CHECK(ndr_pull_smbXsrv_channel_global0(ndr, NDR_BUFFERS, &r->channels[cntr_channels_0]));
1613 : }
1614 930 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_channels_0, 0);
1615 1221 : for (cntr_channels_0 = 0; cntr_channels_0 < (size_channels_0); cntr_channels_0++) {
1616 : }
1617 : }
1618 930 : return NDR_ERR_SUCCESS;
1619 : }
1620 :
1621 0 : _PUBLIC_ void ndr_print_smbXsrv_session_global0(struct ndr_print *ndr, const char *name, const struct smbXsrv_session_global0 *r)
1622 : {
1623 : uint32_t cntr_channels_0;
1624 0 : ndr_print_struct(ndr, name, "smbXsrv_session_global0");
1625 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1626 0 : ndr->depth++;
1627 0 : ndr_print_ptr(ndr, "db_rec", r->db_rec);
1628 : /* [ignore] 'db_rec' */
1629 0 : ndr_print_uint32(ndr, "session_global_id", r->session_global_id);
1630 0 : ndr_print_hyper(ndr, "session_wire_id", r->session_wire_id);
1631 0 : ndr_print_NTTIME(ndr, "creation_time", r->creation_time);
1632 0 : ndr_print_NTTIME(ndr, "expiration_time", r->expiration_time);
1633 0 : ndr_print_NTTIME(ndr, "auth_time", r->auth_time);
1634 0 : ndr_print_uint32(ndr, "auth_session_info_seqnum", r->auth_session_info_seqnum);
1635 0 : ndr_print_ptr(ndr, "auth_session_info", r->auth_session_info);
1636 0 : ndr->depth++;
1637 0 : if (r->auth_session_info) {
1638 0 : ndr_print_auth_session_info(ndr, "auth_session_info", r->auth_session_info);
1639 : }
1640 0 : ndr->depth--;
1641 0 : ndr_print_uint16(ndr, "connection_dialect", r->connection_dialect);
1642 0 : ndr_print_smbXsrv_signing_flags(ndr, "signing_flags", r->signing_flags);
1643 0 : ndr_print_uint16(ndr, "signing_algo", r->signing_algo);
1644 0 : ndr_print_smbXsrv_encrpytion_flags(ndr, "encryption_flags", r->encryption_flags);
1645 0 : ndr_print_uint16(ndr, "encryption_cipher", r->encryption_cipher);
1646 0 : ndr_print_ptr(ndr, "signing_key", r->signing_key);
1647 : /* [ignore] 'signing_key' */
1648 0 : ndr_print_ptr(ndr, "encryption_key", r->encryption_key);
1649 : /* [ignore] 'encryption_key' */
1650 0 : ndr_print_ptr(ndr, "decryption_key", r->decryption_key);
1651 : /* [ignore] 'decryption_key' */
1652 0 : ndr_print_ptr(ndr, "application_key", r->application_key);
1653 : /* [ignore] 'application_key' */
1654 0 : ndr_print_uint32(ndr, "num_channels", r->num_channels);
1655 0 : ndr->print(ndr, "%s: ARRAY(%d)", "channels", (int)r->num_channels);
1656 0 : ndr->depth++;
1657 0 : for (cntr_channels_0 = 0; cntr_channels_0 < (r->num_channels); cntr_channels_0++) {
1658 0 : ndr_print_smbXsrv_channel_global0(ndr, "channels", &r->channels[cntr_channels_0]);
1659 : }
1660 0 : ndr->depth--;
1661 0 : ndr->depth--;
1662 : }
1663 :
1664 279540 : static enum ndr_err_code ndr_push_smbXsrv_session_globalU(struct ndr_push *ndr, int ndr_flags, const union smbXsrv_session_globalU *r)
1665 : {
1666 : uint32_t level;
1667 279540 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1668 279540 : if (ndr_flags & NDR_SCALARS) {
1669 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1670 139770 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1671 139770 : NDR_CHECK(ndr_push_union_align(ndr, 5));
1672 139770 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1673 139770 : NDR_CHECK(ndr_push_union_align(ndr, 5));
1674 139770 : switch (level) {
1675 139770 : case 0: {
1676 139770 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
1677 137810 : break; }
1678 :
1679 0 : default: {
1680 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy));
1681 0 : break; }
1682 :
1683 : }
1684 124229 : }
1685 279540 : if (ndr_flags & NDR_BUFFERS) {
1686 139770 : if (!(ndr_flags & NDR_SCALARS)) {
1687 : /* We didn't get it above, and the token is not needed after this. */
1688 139770 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1689 : }
1690 139770 : switch (level) {
1691 139770 : case 0:
1692 139770 : if (r->info0) {
1693 139770 : NDR_CHECK(ndr_push_smbXsrv_session_global0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
1694 : }
1695 137810 : break;
1696 :
1697 0 : default:
1698 0 : if (r->dummy) {
1699 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->dummy));
1700 : }
1701 0 : break;
1702 :
1703 : }
1704 124229 : }
1705 275620 : return NDR_ERR_SUCCESS;
1706 : }
1707 :
1708 1860 : static enum ndr_err_code ndr_pull_smbXsrv_session_globalU(struct ndr_pull *ndr, int ndr_flags, union smbXsrv_session_globalU *r)
1709 : {
1710 : uint32_t level;
1711 : uint32_t _level;
1712 1860 : TALLOC_CTX *_mem_save_info0_0 = NULL;
1713 : uint32_t _ptr_info0;
1714 1860 : TALLOC_CTX *_mem_save_dummy_0 = NULL;
1715 : uint32_t _ptr_dummy;
1716 1860 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1717 1860 : if (ndr_flags & NDR_SCALARS) {
1718 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1719 930 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1720 930 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
1721 930 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1722 930 : if (_level != level) {
1723 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1724 : }
1725 930 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
1726 930 : switch (level) {
1727 930 : case 0: {
1728 930 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
1729 930 : if (_ptr_info0) {
1730 930 : NDR_PULL_ALLOC(ndr, r->info0);
1731 : } else {
1732 0 : r->info0 = NULL;
1733 : }
1734 930 : break; }
1735 :
1736 0 : default: {
1737 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy));
1738 0 : if (_ptr_dummy) {
1739 0 : NDR_PULL_ALLOC(ndr, r->dummy);
1740 : } else {
1741 0 : r->dummy = NULL;
1742 : }
1743 0 : break; }
1744 :
1745 : }
1746 639 : }
1747 1860 : if (ndr_flags & NDR_BUFFERS) {
1748 930 : if (!(ndr_flags & NDR_SCALARS)) {
1749 : /* We didn't get it above, and the token is not needed after this. */
1750 930 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1751 : }
1752 930 : switch (level) {
1753 930 : case 0:
1754 930 : if (r->info0) {
1755 930 : _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1756 930 : NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
1757 930 : NDR_CHECK(ndr_pull_smbXsrv_session_global0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
1758 930 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
1759 : }
1760 930 : break;
1761 :
1762 0 : default:
1763 0 : if (r->dummy) {
1764 0 : _mem_save_dummy_0 = NDR_PULL_GET_MEM_CTX(ndr);
1765 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dummy, 0);
1766 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->dummy));
1767 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy_0, 0);
1768 : }
1769 0 : break;
1770 :
1771 : }
1772 639 : }
1773 1860 : return NDR_ERR_SUCCESS;
1774 : }
1775 :
1776 0 : _PUBLIC_ void ndr_print_smbXsrv_session_globalU(struct ndr_print *ndr, const char *name, const union smbXsrv_session_globalU *r)
1777 : {
1778 : uint32_t level;
1779 0 : level = ndr_print_steal_switch_value(ndr, r);
1780 0 : ndr_print_union(ndr, name, level, "smbXsrv_session_globalU");
1781 0 : switch (level) {
1782 0 : case 0:
1783 0 : ndr_print_ptr(ndr, "info0", r->info0);
1784 0 : ndr->depth++;
1785 0 : if (r->info0) {
1786 0 : ndr_print_smbXsrv_session_global0(ndr, "info0", r->info0);
1787 : }
1788 0 : ndr->depth--;
1789 0 : break;
1790 :
1791 0 : default:
1792 0 : ndr_print_ptr(ndr, "dummy", r->dummy);
1793 0 : ndr->depth++;
1794 0 : if (r->dummy) {
1795 0 : ndr_print_hyper(ndr, "dummy", *r->dummy);
1796 : }
1797 0 : ndr->depth--;
1798 0 : break;
1799 :
1800 : }
1801 0 : }
1802 :
1803 139770 : _PUBLIC_ enum ndr_err_code ndr_push_smbXsrv_session_globalB(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_session_globalB *r)
1804 : {
1805 139770 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1806 139770 : if (ndr_flags & NDR_SCALARS) {
1807 139770 : NDR_CHECK(ndr_push_align(ndr, 5));
1808 141730 : NDR_CHECK(ndr_push_smbXsrv_version_values(ndr, NDR_SCALARS, r->version));
1809 139770 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->seqnum));
1810 139770 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
1811 139770 : NDR_CHECK(ndr_push_smbXsrv_session_globalU(ndr, NDR_SCALARS, &r->info));
1812 139770 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1813 : }
1814 139770 : if (ndr_flags & NDR_BUFFERS) {
1815 139770 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
1816 139770 : NDR_CHECK(ndr_push_smbXsrv_session_globalU(ndr, NDR_BUFFERS, &r->info));
1817 : }
1818 137810 : return NDR_ERR_SUCCESS;
1819 : }
1820 :
1821 930 : _PUBLIC_ enum ndr_err_code ndr_pull_smbXsrv_session_globalB(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_session_globalB *r)
1822 : {
1823 930 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1824 930 : if (ndr_flags & NDR_SCALARS) {
1825 930 : NDR_CHECK(ndr_pull_align(ndr, 5));
1826 930 : NDR_CHECK(ndr_pull_smbXsrv_version_values(ndr, NDR_SCALARS, &r->version));
1827 930 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->seqnum));
1828 930 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
1829 930 : NDR_CHECK(ndr_pull_smbXsrv_session_globalU(ndr, NDR_SCALARS, &r->info));
1830 930 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1831 : }
1832 930 : if (ndr_flags & NDR_BUFFERS) {
1833 930 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
1834 930 : NDR_CHECK(ndr_pull_smbXsrv_session_globalU(ndr, NDR_BUFFERS, &r->info));
1835 : }
1836 930 : return NDR_ERR_SUCCESS;
1837 : }
1838 :
1839 0 : static void ndr_print_flags_smbXsrv_session_globalB(struct ndr_print *ndr, const char *name, int unused, const struct smbXsrv_session_globalB *r)
1840 : {
1841 0 : ndr_print_smbXsrv_session_globalB(ndr, name, r);
1842 0 : }
1843 :
1844 0 : _PUBLIC_ void ndr_print_smbXsrv_session_globalB(struct ndr_print *ndr, const char *name, const struct smbXsrv_session_globalB *r)
1845 : {
1846 0 : ndr_print_struct(ndr, name, "smbXsrv_session_globalB");
1847 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1848 0 : ndr->depth++;
1849 0 : ndr_print_smbXsrv_version_values(ndr, "version", r->version);
1850 0 : ndr_print_uint32(ndr, "seqnum", r->seqnum);
1851 0 : ndr_print_set_switch_value(ndr, &r->info, r->version);
1852 0 : ndr_print_smbXsrv_session_globalU(ndr, "info", &r->info);
1853 0 : ndr->depth--;
1854 : }
1855 :
1856 0 : static enum ndr_err_code ndr_push_smbXsrv_session_auth0(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_session_auth0 *r)
1857 : {
1858 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1859 0 : if (ndr_flags & NDR_SCALARS) {
1860 0 : NDR_CHECK(ndr_push_align(ndr, 8));
1861 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1862 : /* [ignore] 'prev' */
1863 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->next));
1864 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1865 : /* [ignore] 'session' */
1866 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1867 : /* [ignore] 'connection' */
1868 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1869 : /* [ignore] 'gensec' */
1870 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1871 : /* [ignore] 'preauth' */
1872 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in_flags));
1873 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in_security_mode));
1874 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->creation_time));
1875 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->idle_time));
1876 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->channel_id));
1877 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
1878 : }
1879 0 : if (ndr_flags & NDR_BUFFERS) {
1880 : /* [ignore] 'prev' */
1881 0 : if (r->next) {
1882 0 : NDR_CHECK(ndr_push_smbXsrv_session_auth0(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
1883 : }
1884 : /* [ignore] 'session' */
1885 : /* [ignore] 'connection' */
1886 : /* [ignore] 'gensec' */
1887 : /* [ignore] 'preauth' */
1888 : }
1889 0 : return NDR_ERR_SUCCESS;
1890 : }
1891 :
1892 0 : static enum ndr_err_code ndr_pull_smbXsrv_session_auth0(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_session_auth0 *r)
1893 : {
1894 : uint32_t _ptr_prev;
1895 : uint32_t _ptr_next;
1896 0 : TALLOC_CTX *_mem_save_next_0 = NULL;
1897 : uint32_t _ptr_session;
1898 : uint32_t _ptr_connection;
1899 : uint32_t _ptr_gensec;
1900 : uint32_t _ptr_preauth;
1901 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1902 0 : if (ndr_flags & NDR_SCALARS) {
1903 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
1904 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_prev));
1905 0 : _ptr_prev = 0;
1906 0 : if (_ptr_prev) {
1907 : } else {
1908 0 : r->prev = NULL;
1909 : }
1910 : /* [ignore] 'prev' */
1911 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next));
1912 0 : if (_ptr_next) {
1913 0 : NDR_PULL_ALLOC(ndr, r->next);
1914 : } else {
1915 0 : r->next = NULL;
1916 : }
1917 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_session));
1918 0 : _ptr_session = 0;
1919 0 : if (_ptr_session) {
1920 : } else {
1921 0 : r->session = NULL;
1922 : }
1923 : /* [ignore] 'session' */
1924 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_connection));
1925 0 : _ptr_connection = 0;
1926 0 : if (_ptr_connection) {
1927 : } else {
1928 0 : r->connection = NULL;
1929 : }
1930 : /* [ignore] 'connection' */
1931 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_gensec));
1932 0 : _ptr_gensec = 0;
1933 0 : if (_ptr_gensec) {
1934 : } else {
1935 0 : r->gensec = NULL;
1936 : }
1937 : /* [ignore] 'gensec' */
1938 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_preauth));
1939 0 : _ptr_preauth = 0;
1940 0 : if (_ptr_preauth) {
1941 : } else {
1942 0 : r->preauth = NULL;
1943 : }
1944 : /* [ignore] 'preauth' */
1945 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in_flags));
1946 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in_security_mode));
1947 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->creation_time));
1948 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->idle_time));
1949 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->channel_id));
1950 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
1951 : }
1952 0 : if (ndr_flags & NDR_BUFFERS) {
1953 : /* [ignore] 'prev' */
1954 0 : if (r->next) {
1955 0 : _mem_save_next_0 = NDR_PULL_GET_MEM_CTX(ndr);
1956 0 : NDR_PULL_SET_MEM_CTX(ndr, r->next, 0);
1957 0 : NDR_RECURSION_CHECK(ndr, 20000);
1958 0 : NDR_CHECK(ndr_pull_smbXsrv_session_auth0(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
1959 0 : NDR_RECURSION_UNWIND(ndr);
1960 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_0, 0);
1961 : }
1962 : /* [ignore] 'session' */
1963 : /* [ignore] 'connection' */
1964 : /* [ignore] 'gensec' */
1965 : /* [ignore] 'preauth' */
1966 : }
1967 0 : return NDR_ERR_SUCCESS;
1968 : }
1969 :
1970 0 : _PUBLIC_ void ndr_print_smbXsrv_session_auth0(struct ndr_print *ndr, const char *name, const struct smbXsrv_session_auth0 *r)
1971 : {
1972 0 : ndr_print_struct(ndr, name, "smbXsrv_session_auth0");
1973 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1974 0 : ndr->depth++;
1975 0 : ndr_print_ptr(ndr, "prev", r->prev);
1976 : /* [ignore] 'prev' */
1977 0 : ndr_print_ptr(ndr, "next", r->next);
1978 0 : ndr->depth++;
1979 0 : if (r->next) {
1980 0 : ndr_print_smbXsrv_session_auth0(ndr, "next", r->next);
1981 : }
1982 0 : ndr->depth--;
1983 0 : ndr_print_ptr(ndr, "session", r->session);
1984 : /* [ignore] 'session' */
1985 0 : ndr_print_ptr(ndr, "connection", r->connection);
1986 : /* [ignore] 'connection' */
1987 0 : ndr_print_ptr(ndr, "gensec", r->gensec);
1988 : /* [ignore] 'gensec' */
1989 0 : ndr_print_ptr(ndr, "preauth", r->preauth);
1990 : /* [ignore] 'preauth' */
1991 0 : ndr_print_uint8(ndr, "in_flags", r->in_flags);
1992 0 : ndr_print_uint8(ndr, "in_security_mode", r->in_security_mode);
1993 0 : ndr_print_NTTIME(ndr, "creation_time", r->creation_time);
1994 0 : ndr_print_NTTIME(ndr, "idle_time", r->idle_time);
1995 0 : ndr_print_hyper(ndr, "channel_id", r->channel_id);
1996 0 : ndr->depth--;
1997 : }
1998 :
1999 0 : static enum ndr_err_code ndr_push_smbXsrv_session(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_session *r)
2000 : {
2001 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2002 0 : if (ndr_flags & NDR_SCALARS) {
2003 0 : if (r->global == NULL) {
2004 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2005 : }
2006 0 : NDR_CHECK(ndr_push_align(ndr, 8));
2007 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2008 : /* [ignore] 'table' */
2009 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2010 : /* [ignore] 'db_rec' */
2011 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2012 : /* [ignore] 'client' */
2013 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->local_id));
2014 0 : NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->global */
2015 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status));
2016 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->idle_time));
2017 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->nonce_high_random));
2018 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->nonce_high_max));
2019 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->nonce_high));
2020 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->nonce_low));
2021 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2022 : /* [ignore] 'tcon_table' */
2023 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->homes_snum));
2024 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pending_auth));
2025 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
2026 : }
2027 0 : if (ndr_flags & NDR_BUFFERS) {
2028 : /* [ignore] 'table' */
2029 : /* [ignore] 'db_rec' */
2030 : /* [ignore] 'client' */
2031 0 : NDR_CHECK(ndr_push_smbXsrv_session_global0(ndr, NDR_SCALARS|NDR_BUFFERS, r->global));
2032 : /* [ignore] 'tcon_table' */
2033 0 : if (r->pending_auth) {
2034 0 : NDR_CHECK(ndr_push_smbXsrv_session_auth0(ndr, NDR_SCALARS|NDR_BUFFERS, r->pending_auth));
2035 : }
2036 : }
2037 0 : return NDR_ERR_SUCCESS;
2038 : }
2039 :
2040 0 : static enum ndr_err_code ndr_pull_smbXsrv_session(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_session *r)
2041 : {
2042 : uint32_t _ptr_table;
2043 : uint32_t _ptr_db_rec;
2044 : uint32_t _ptr_client;
2045 : uint32_t _ptr_global;
2046 0 : TALLOC_CTX *_mem_save_global_0 = NULL;
2047 : uint32_t _ptr_tcon_table;
2048 : uint32_t _ptr_pending_auth;
2049 0 : TALLOC_CTX *_mem_save_pending_auth_0 = NULL;
2050 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2051 0 : if (ndr_flags & NDR_SCALARS) {
2052 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
2053 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_table));
2054 0 : _ptr_table = 0;
2055 0 : if (_ptr_table) {
2056 : } else {
2057 0 : r->table = NULL;
2058 : }
2059 : /* [ignore] 'table' */
2060 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_db_rec));
2061 0 : _ptr_db_rec = 0;
2062 0 : if (_ptr_db_rec) {
2063 : } else {
2064 0 : r->db_rec = NULL;
2065 : }
2066 : /* [ignore] 'db_rec' */
2067 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_client));
2068 0 : _ptr_client = 0;
2069 0 : if (_ptr_client) {
2070 : } else {
2071 0 : r->client = NULL;
2072 : }
2073 : /* [ignore] 'client' */
2074 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->local_id));
2075 0 : NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_global));
2076 0 : if (_ptr_global) {
2077 0 : NDR_PULL_ALLOC(ndr, r->global);
2078 : } else {
2079 0 : r->global = NULL;
2080 : }
2081 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
2082 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->idle_time));
2083 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->nonce_high_random));
2084 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->nonce_high_max));
2085 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->nonce_high));
2086 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->nonce_low));
2087 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_tcon_table));
2088 0 : _ptr_tcon_table = 0;
2089 0 : if (_ptr_tcon_table) {
2090 : } else {
2091 0 : r->tcon_table = NULL;
2092 : }
2093 : /* [ignore] 'tcon_table' */
2094 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->homes_snum));
2095 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pending_auth));
2096 0 : if (_ptr_pending_auth) {
2097 0 : NDR_PULL_ALLOC(ndr, r->pending_auth);
2098 : } else {
2099 0 : r->pending_auth = NULL;
2100 : }
2101 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
2102 : }
2103 0 : if (ndr_flags & NDR_BUFFERS) {
2104 : /* [ignore] 'table' */
2105 : /* [ignore] 'db_rec' */
2106 : /* [ignore] 'client' */
2107 0 : _mem_save_global_0 = NDR_PULL_GET_MEM_CTX(ndr);
2108 0 : NDR_PULL_SET_MEM_CTX(ndr, r->global, 0);
2109 0 : NDR_CHECK(ndr_pull_smbXsrv_session_global0(ndr, NDR_SCALARS|NDR_BUFFERS, r->global));
2110 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_global_0, 0);
2111 : /* [ignore] 'tcon_table' */
2112 0 : if (r->pending_auth) {
2113 0 : _mem_save_pending_auth_0 = NDR_PULL_GET_MEM_CTX(ndr);
2114 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pending_auth, 0);
2115 0 : NDR_CHECK(ndr_pull_smbXsrv_session_auth0(ndr, NDR_SCALARS|NDR_BUFFERS, r->pending_auth));
2116 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pending_auth_0, 0);
2117 : }
2118 : }
2119 0 : return NDR_ERR_SUCCESS;
2120 : }
2121 :
2122 0 : _PUBLIC_ void ndr_print_smbXsrv_session(struct ndr_print *ndr, const char *name, const struct smbXsrv_session *r)
2123 : {
2124 0 : ndr_print_struct(ndr, name, "smbXsrv_session");
2125 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2126 0 : ndr->depth++;
2127 0 : ndr_print_ptr(ndr, "table", r->table);
2128 : /* [ignore] 'table' */
2129 0 : ndr_print_ptr(ndr, "db_rec", r->db_rec);
2130 : /* [ignore] 'db_rec' */
2131 0 : ndr_print_ptr(ndr, "client", r->client);
2132 : /* [ignore] 'client' */
2133 0 : ndr_print_uint32(ndr, "local_id", r->local_id);
2134 0 : ndr_print_ptr(ndr, "global", r->global);
2135 0 : ndr->depth++;
2136 0 : ndr_print_smbXsrv_session_global0(ndr, "global", r->global);
2137 0 : ndr->depth--;
2138 0 : ndr_print_NTSTATUS(ndr, "status", r->status);
2139 0 : ndr_print_NTTIME(ndr, "idle_time", r->idle_time);
2140 0 : ndr_print_hyper(ndr, "nonce_high_random", r->nonce_high_random);
2141 0 : ndr_print_hyper(ndr, "nonce_high_max", r->nonce_high_max);
2142 0 : ndr_print_hyper(ndr, "nonce_high", r->nonce_high);
2143 0 : ndr_print_hyper(ndr, "nonce_low", r->nonce_low);
2144 0 : ndr_print_ptr(ndr, "tcon_table", r->tcon_table);
2145 : /* [ignore] 'tcon_table' */
2146 0 : ndr_print_uint32(ndr, "homes_snum", r->homes_snum);
2147 0 : ndr_print_ptr(ndr, "pending_auth", r->pending_auth);
2148 0 : ndr->depth++;
2149 0 : if (r->pending_auth) {
2150 0 : ndr_print_smbXsrv_session_auth0(ndr, "pending_auth", r->pending_auth);
2151 : }
2152 0 : ndr->depth--;
2153 0 : ndr->depth--;
2154 : }
2155 :
2156 0 : static enum ndr_err_code ndr_push_smbXsrv_sessionU(struct ndr_push *ndr, int ndr_flags, const union smbXsrv_sessionU *r)
2157 : {
2158 : uint32_t level;
2159 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2160 0 : if (ndr_flags & NDR_SCALARS) {
2161 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2162 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2163 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
2164 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2165 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
2166 0 : switch (level) {
2167 0 : case 0: {
2168 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
2169 0 : break; }
2170 :
2171 0 : default: {
2172 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy));
2173 0 : break; }
2174 :
2175 : }
2176 0 : }
2177 0 : if (ndr_flags & NDR_BUFFERS) {
2178 0 : if (!(ndr_flags & NDR_SCALARS)) {
2179 : /* We didn't get it above, and the token is not needed after this. */
2180 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2181 : }
2182 0 : switch (level) {
2183 0 : case 0:
2184 0 : if (r->info0) {
2185 0 : NDR_CHECK(ndr_push_smbXsrv_session(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
2186 : }
2187 0 : break;
2188 :
2189 0 : default:
2190 0 : if (r->dummy) {
2191 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->dummy));
2192 : }
2193 0 : break;
2194 :
2195 : }
2196 0 : }
2197 0 : return NDR_ERR_SUCCESS;
2198 : }
2199 :
2200 0 : static enum ndr_err_code ndr_pull_smbXsrv_sessionU(struct ndr_pull *ndr, int ndr_flags, union smbXsrv_sessionU *r)
2201 : {
2202 : uint32_t level;
2203 : uint32_t _level;
2204 0 : TALLOC_CTX *_mem_save_info0_0 = NULL;
2205 : uint32_t _ptr_info0;
2206 0 : TALLOC_CTX *_mem_save_dummy_0 = NULL;
2207 : uint32_t _ptr_dummy;
2208 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2209 0 : if (ndr_flags & NDR_SCALARS) {
2210 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2211 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2212 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
2213 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2214 0 : if (_level != level) {
2215 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
2216 : }
2217 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
2218 0 : switch (level) {
2219 0 : case 0: {
2220 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
2221 0 : if (_ptr_info0) {
2222 0 : NDR_PULL_ALLOC(ndr, r->info0);
2223 : } else {
2224 0 : r->info0 = NULL;
2225 : }
2226 0 : break; }
2227 :
2228 0 : default: {
2229 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy));
2230 0 : if (_ptr_dummy) {
2231 0 : NDR_PULL_ALLOC(ndr, r->dummy);
2232 : } else {
2233 0 : r->dummy = NULL;
2234 : }
2235 0 : break; }
2236 :
2237 : }
2238 0 : }
2239 0 : if (ndr_flags & NDR_BUFFERS) {
2240 0 : if (!(ndr_flags & NDR_SCALARS)) {
2241 : /* We didn't get it above, and the token is not needed after this. */
2242 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2243 : }
2244 0 : switch (level) {
2245 0 : case 0:
2246 0 : if (r->info0) {
2247 0 : _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
2248 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
2249 0 : NDR_CHECK(ndr_pull_smbXsrv_session(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
2250 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
2251 : }
2252 0 : break;
2253 :
2254 0 : default:
2255 0 : if (r->dummy) {
2256 0 : _mem_save_dummy_0 = NDR_PULL_GET_MEM_CTX(ndr);
2257 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dummy, 0);
2258 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->dummy));
2259 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy_0, 0);
2260 : }
2261 0 : break;
2262 :
2263 : }
2264 0 : }
2265 0 : return NDR_ERR_SUCCESS;
2266 : }
2267 :
2268 0 : _PUBLIC_ void ndr_print_smbXsrv_sessionU(struct ndr_print *ndr, const char *name, const union smbXsrv_sessionU *r)
2269 : {
2270 : uint32_t level;
2271 0 : level = ndr_print_steal_switch_value(ndr, r);
2272 0 : ndr_print_union(ndr, name, level, "smbXsrv_sessionU");
2273 0 : switch (level) {
2274 0 : case 0:
2275 0 : ndr_print_ptr(ndr, "info0", r->info0);
2276 0 : ndr->depth++;
2277 0 : if (r->info0) {
2278 0 : ndr_print_smbXsrv_session(ndr, "info0", r->info0);
2279 : }
2280 0 : ndr->depth--;
2281 0 : break;
2282 :
2283 0 : default:
2284 0 : ndr_print_ptr(ndr, "dummy", r->dummy);
2285 0 : ndr->depth++;
2286 0 : if (r->dummy) {
2287 0 : ndr_print_hyper(ndr, "dummy", *r->dummy);
2288 : }
2289 0 : ndr->depth--;
2290 0 : break;
2291 :
2292 : }
2293 0 : }
2294 :
2295 0 : _PUBLIC_ enum ndr_err_code ndr_push_smbXsrv_sessionB(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_sessionB *r)
2296 : {
2297 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2298 0 : if (ndr_flags & NDR_SCALARS) {
2299 0 : NDR_CHECK(ndr_push_align(ndr, 5));
2300 0 : NDR_CHECK(ndr_push_smbXsrv_version_values(ndr, NDR_SCALARS, r->version));
2301 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2302 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
2303 0 : NDR_CHECK(ndr_push_smbXsrv_sessionU(ndr, NDR_SCALARS, &r->info));
2304 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2305 : }
2306 0 : if (ndr_flags & NDR_BUFFERS) {
2307 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
2308 0 : NDR_CHECK(ndr_push_smbXsrv_sessionU(ndr, NDR_BUFFERS, &r->info));
2309 : }
2310 0 : return NDR_ERR_SUCCESS;
2311 : }
2312 :
2313 0 : _PUBLIC_ enum ndr_err_code ndr_pull_smbXsrv_sessionB(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_sessionB *r)
2314 : {
2315 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2316 0 : if (ndr_flags & NDR_SCALARS) {
2317 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
2318 0 : NDR_CHECK(ndr_pull_smbXsrv_version_values(ndr, NDR_SCALARS, &r->version));
2319 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
2320 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
2321 0 : NDR_CHECK(ndr_pull_smbXsrv_sessionU(ndr, NDR_SCALARS, &r->info));
2322 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2323 : }
2324 0 : if (ndr_flags & NDR_BUFFERS) {
2325 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
2326 0 : NDR_CHECK(ndr_pull_smbXsrv_sessionU(ndr, NDR_BUFFERS, &r->info));
2327 : }
2328 0 : return NDR_ERR_SUCCESS;
2329 : }
2330 :
2331 0 : static void ndr_print_flags_smbXsrv_sessionB(struct ndr_print *ndr, const char *name, int unused, const struct smbXsrv_sessionB *r)
2332 : {
2333 0 : ndr_print_smbXsrv_sessionB(ndr, name, r);
2334 0 : }
2335 :
2336 0 : _PUBLIC_ void ndr_print_smbXsrv_sessionB(struct ndr_print *ndr, const char *name, const struct smbXsrv_sessionB *r)
2337 : {
2338 0 : ndr_print_struct(ndr, name, "smbXsrv_sessionB");
2339 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2340 0 : ndr->depth++;
2341 0 : ndr_print_smbXsrv_version_values(ndr, "version", r->version);
2342 0 : ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
2343 0 : ndr_print_set_switch_value(ndr, &r->info, r->version);
2344 0 : ndr_print_smbXsrv_sessionU(ndr, "info", &r->info);
2345 0 : ndr->depth--;
2346 : }
2347 :
2348 52 : static enum ndr_err_code ndr_push_smbXsrv_session_close0(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_session_close0 *r)
2349 : {
2350 52 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2351 52 : if (ndr_flags & NDR_SCALARS) {
2352 52 : NDR_CHECK(ndr_push_align(ndr, 8));
2353 52 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->old_session_global_id));
2354 52 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->old_session_wire_id));
2355 52 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->old_creation_time));
2356 52 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->new_session_wire_id));
2357 52 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
2358 : }
2359 52 : if (ndr_flags & NDR_BUFFERS) {
2360 : }
2361 52 : return NDR_ERR_SUCCESS;
2362 : }
2363 :
2364 50 : static enum ndr_err_code ndr_pull_smbXsrv_session_close0(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_session_close0 *r)
2365 : {
2366 50 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2367 50 : if (ndr_flags & NDR_SCALARS) {
2368 50 : NDR_CHECK(ndr_pull_align(ndr, 8));
2369 50 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->old_session_global_id));
2370 50 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->old_session_wire_id));
2371 50 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->old_creation_time));
2372 50 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->new_session_wire_id));
2373 50 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
2374 : }
2375 50 : if (ndr_flags & NDR_BUFFERS) {
2376 : }
2377 50 : return NDR_ERR_SUCCESS;
2378 : }
2379 :
2380 0 : _PUBLIC_ void ndr_print_smbXsrv_session_close0(struct ndr_print *ndr, const char *name, const struct smbXsrv_session_close0 *r)
2381 : {
2382 0 : ndr_print_struct(ndr, name, "smbXsrv_session_close0");
2383 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2384 0 : ndr->depth++;
2385 0 : ndr_print_uint32(ndr, "old_session_global_id", r->old_session_global_id);
2386 0 : ndr_print_hyper(ndr, "old_session_wire_id", r->old_session_wire_id);
2387 0 : ndr_print_NTTIME(ndr, "old_creation_time", r->old_creation_time);
2388 0 : ndr_print_hyper(ndr, "new_session_wire_id", r->new_session_wire_id);
2389 0 : ndr->depth--;
2390 : }
2391 :
2392 104 : static enum ndr_err_code ndr_push_smbXsrv_session_closeU(struct ndr_push *ndr, int ndr_flags, const union smbXsrv_session_closeU *r)
2393 : {
2394 : uint32_t level;
2395 104 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2396 104 : if (ndr_flags & NDR_SCALARS) {
2397 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2398 52 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2399 52 : NDR_CHECK(ndr_push_union_align(ndr, 5));
2400 52 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2401 52 : NDR_CHECK(ndr_push_union_align(ndr, 5));
2402 52 : switch (level) {
2403 52 : case 0: {
2404 52 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
2405 52 : break; }
2406 :
2407 0 : default: {
2408 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy));
2409 0 : break; }
2410 :
2411 : }
2412 40 : }
2413 104 : if (ndr_flags & NDR_BUFFERS) {
2414 52 : if (!(ndr_flags & NDR_SCALARS)) {
2415 : /* We didn't get it above, and the token is not needed after this. */
2416 52 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2417 : }
2418 52 : switch (level) {
2419 52 : case 0:
2420 52 : if (r->info0) {
2421 52 : NDR_CHECK(ndr_push_smbXsrv_session_close0(ndr, NDR_SCALARS, r->info0));
2422 : }
2423 52 : break;
2424 :
2425 0 : default:
2426 0 : if (r->dummy) {
2427 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->dummy));
2428 : }
2429 0 : break;
2430 :
2431 : }
2432 40 : }
2433 104 : return NDR_ERR_SUCCESS;
2434 : }
2435 :
2436 100 : static enum ndr_err_code ndr_pull_smbXsrv_session_closeU(struct ndr_pull *ndr, int ndr_flags, union smbXsrv_session_closeU *r)
2437 : {
2438 : uint32_t level;
2439 : uint32_t _level;
2440 100 : TALLOC_CTX *_mem_save_info0_0 = NULL;
2441 : uint32_t _ptr_info0;
2442 100 : TALLOC_CTX *_mem_save_dummy_0 = NULL;
2443 : uint32_t _ptr_dummy;
2444 100 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2445 100 : if (ndr_flags & NDR_SCALARS) {
2446 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2447 50 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2448 50 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
2449 50 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2450 50 : if (_level != level) {
2451 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
2452 : }
2453 50 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
2454 50 : switch (level) {
2455 50 : case 0: {
2456 50 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
2457 50 : if (_ptr_info0) {
2458 50 : NDR_PULL_ALLOC(ndr, r->info0);
2459 : } else {
2460 0 : r->info0 = NULL;
2461 : }
2462 50 : break; }
2463 :
2464 0 : default: {
2465 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy));
2466 0 : if (_ptr_dummy) {
2467 0 : NDR_PULL_ALLOC(ndr, r->dummy);
2468 : } else {
2469 0 : r->dummy = NULL;
2470 : }
2471 0 : break; }
2472 :
2473 : }
2474 38 : }
2475 100 : if (ndr_flags & NDR_BUFFERS) {
2476 50 : if (!(ndr_flags & NDR_SCALARS)) {
2477 : /* We didn't get it above, and the token is not needed after this. */
2478 50 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2479 : }
2480 50 : switch (level) {
2481 50 : case 0:
2482 50 : if (r->info0) {
2483 50 : _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
2484 50 : NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
2485 50 : NDR_CHECK(ndr_pull_smbXsrv_session_close0(ndr, NDR_SCALARS, r->info0));
2486 50 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
2487 : }
2488 50 : break;
2489 :
2490 0 : default:
2491 0 : if (r->dummy) {
2492 0 : _mem_save_dummy_0 = NDR_PULL_GET_MEM_CTX(ndr);
2493 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dummy, 0);
2494 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->dummy));
2495 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy_0, 0);
2496 : }
2497 0 : break;
2498 :
2499 : }
2500 38 : }
2501 100 : return NDR_ERR_SUCCESS;
2502 : }
2503 :
2504 0 : _PUBLIC_ void ndr_print_smbXsrv_session_closeU(struct ndr_print *ndr, const char *name, const union smbXsrv_session_closeU *r)
2505 : {
2506 : uint32_t level;
2507 0 : level = ndr_print_steal_switch_value(ndr, r);
2508 0 : ndr_print_union(ndr, name, level, "smbXsrv_session_closeU");
2509 0 : switch (level) {
2510 0 : case 0:
2511 0 : ndr_print_ptr(ndr, "info0", r->info0);
2512 0 : ndr->depth++;
2513 0 : if (r->info0) {
2514 0 : ndr_print_smbXsrv_session_close0(ndr, "info0", r->info0);
2515 : }
2516 0 : ndr->depth--;
2517 0 : break;
2518 :
2519 0 : default:
2520 0 : ndr_print_ptr(ndr, "dummy", r->dummy);
2521 0 : ndr->depth++;
2522 0 : if (r->dummy) {
2523 0 : ndr_print_hyper(ndr, "dummy", *r->dummy);
2524 : }
2525 0 : ndr->depth--;
2526 0 : break;
2527 :
2528 : }
2529 0 : }
2530 :
2531 52 : _PUBLIC_ enum ndr_err_code ndr_push_smbXsrv_session_closeB(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_session_closeB *r)
2532 : {
2533 52 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2534 52 : if (ndr_flags & NDR_SCALARS) {
2535 52 : NDR_CHECK(ndr_push_align(ndr, 5));
2536 52 : NDR_CHECK(ndr_push_smbXsrv_version_values(ndr, NDR_SCALARS, r->version));
2537 52 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2538 52 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
2539 52 : NDR_CHECK(ndr_push_smbXsrv_session_closeU(ndr, NDR_SCALARS, &r->info));
2540 52 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2541 : }
2542 52 : if (ndr_flags & NDR_BUFFERS) {
2543 52 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
2544 52 : NDR_CHECK(ndr_push_smbXsrv_session_closeU(ndr, NDR_BUFFERS, &r->info));
2545 : }
2546 52 : return NDR_ERR_SUCCESS;
2547 : }
2548 :
2549 50 : _PUBLIC_ enum ndr_err_code ndr_pull_smbXsrv_session_closeB(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_session_closeB *r)
2550 : {
2551 50 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2552 50 : if (ndr_flags & NDR_SCALARS) {
2553 50 : NDR_CHECK(ndr_pull_align(ndr, 5));
2554 50 : NDR_CHECK(ndr_pull_smbXsrv_version_values(ndr, NDR_SCALARS, &r->version));
2555 50 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
2556 50 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
2557 50 : NDR_CHECK(ndr_pull_smbXsrv_session_closeU(ndr, NDR_SCALARS, &r->info));
2558 50 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2559 : }
2560 50 : if (ndr_flags & NDR_BUFFERS) {
2561 50 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
2562 50 : NDR_CHECK(ndr_pull_smbXsrv_session_closeU(ndr, NDR_BUFFERS, &r->info));
2563 : }
2564 50 : return NDR_ERR_SUCCESS;
2565 : }
2566 :
2567 0 : static void ndr_print_flags_smbXsrv_session_closeB(struct ndr_print *ndr, const char *name, int unused, const struct smbXsrv_session_closeB *r)
2568 : {
2569 0 : ndr_print_smbXsrv_session_closeB(ndr, name, r);
2570 0 : }
2571 :
2572 0 : _PUBLIC_ void ndr_print_smbXsrv_session_closeB(struct ndr_print *ndr, const char *name, const struct smbXsrv_session_closeB *r)
2573 : {
2574 0 : ndr_print_struct(ndr, name, "smbXsrv_session_closeB");
2575 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2576 0 : ndr->depth++;
2577 0 : ndr_print_smbXsrv_version_values(ndr, "version", r->version);
2578 0 : ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
2579 0 : ndr_print_set_switch_value(ndr, &r->info, r->version);
2580 0 : ndr_print_smbXsrv_session_closeU(ndr, "info", &r->info);
2581 0 : ndr->depth--;
2582 : }
2583 :
2584 126211 : static enum ndr_err_code ndr_push_smbXsrv_tcon_global0(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_tcon_global0 *r)
2585 : {
2586 126211 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2587 126211 : if (ndr_flags & NDR_SCALARS) {
2588 126211 : NDR_CHECK(ndr_push_align(ndr, 8));
2589 126211 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2590 : /* [ignore] 'db_rec' */
2591 126211 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->tcon_global_id));
2592 126211 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->tcon_wire_id));
2593 126211 : NDR_CHECK(ndr_push_server_id(ndr, NDR_SCALARS, &r->server_id));
2594 126211 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->creation_time));
2595 126211 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share_name, CH_UTF8)));
2596 126211 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2597 126211 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share_name, CH_UTF8)));
2598 126211 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share_name, ndr_charset_length(r->share_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
2599 126211 : NDR_CHECK(ndr_push_smbXsrv_encrpytion_flags(ndr, NDR_SCALARS, r->encryption_flags));
2600 126211 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->session_global_id));
2601 126211 : NDR_CHECK(ndr_push_smbXsrv_signing_flags(ndr, NDR_SCALARS, r->signing_flags));
2602 126211 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
2603 : }
2604 124655 : if (ndr_flags & NDR_BUFFERS) {
2605 : /* [ignore] 'db_rec' */
2606 : }
2607 126211 : return NDR_ERR_SUCCESS;
2608 : }
2609 :
2610 157 : static enum ndr_err_code ndr_pull_smbXsrv_tcon_global0(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_tcon_global0 *r)
2611 : {
2612 : uint32_t _ptr_db_rec;
2613 157 : uint32_t size_share_name_0 = 0;
2614 157 : uint32_t length_share_name_0 = 0;
2615 157 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2616 157 : if (ndr_flags & NDR_SCALARS) {
2617 157 : NDR_CHECK(ndr_pull_align(ndr, 8));
2618 157 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_db_rec));
2619 157 : _ptr_db_rec = 0;
2620 157 : if (_ptr_db_rec) {
2621 : } else {
2622 157 : r->db_rec = NULL;
2623 : }
2624 : /* [ignore] 'db_rec' */
2625 157 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->tcon_global_id));
2626 157 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->tcon_wire_id));
2627 157 : NDR_CHECK(ndr_pull_server_id(ndr, NDR_SCALARS, &r->server_id));
2628 157 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->creation_time));
2629 157 : NDR_CHECK(ndr_pull_array_size(ndr, &r->share_name));
2630 157 : NDR_CHECK(ndr_pull_array_length(ndr, &r->share_name));
2631 157 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->share_name, &size_share_name_0));
2632 157 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->share_name, &length_share_name_0));
2633 157 : if (length_share_name_0 > size_share_name_0) {
2634 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_name_0, length_share_name_0);
2635 : }
2636 157 : NDR_CHECK(ndr_check_string_terminator(ndr, length_share_name_0, sizeof(uint8_t)));
2637 157 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share_name, length_share_name_0, sizeof(uint8_t), CH_UTF8));
2638 157 : NDR_CHECK(ndr_pull_smbXsrv_encrpytion_flags(ndr, NDR_SCALARS, &r->encryption_flags));
2639 157 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->session_global_id));
2640 157 : NDR_CHECK(ndr_pull_smbXsrv_signing_flags(ndr, NDR_SCALARS, &r->signing_flags));
2641 157 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
2642 : }
2643 157 : if (ndr_flags & NDR_BUFFERS) {
2644 : /* [ignore] 'db_rec' */
2645 : }
2646 157 : return NDR_ERR_SUCCESS;
2647 : }
2648 :
2649 0 : _PUBLIC_ void ndr_print_smbXsrv_tcon_global0(struct ndr_print *ndr, const char *name, const struct smbXsrv_tcon_global0 *r)
2650 : {
2651 0 : ndr_print_struct(ndr, name, "smbXsrv_tcon_global0");
2652 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2653 0 : ndr->depth++;
2654 0 : ndr_print_ptr(ndr, "db_rec", r->db_rec);
2655 : /* [ignore] 'db_rec' */
2656 0 : ndr_print_uint32(ndr, "tcon_global_id", r->tcon_global_id);
2657 0 : ndr_print_uint32(ndr, "tcon_wire_id", r->tcon_wire_id);
2658 0 : ndr_print_server_id(ndr, "server_id", &r->server_id);
2659 0 : ndr_print_NTTIME(ndr, "creation_time", r->creation_time);
2660 0 : ndr_print_string(ndr, "share_name", r->share_name);
2661 0 : ndr_print_smbXsrv_encrpytion_flags(ndr, "encryption_flags", r->encryption_flags);
2662 0 : ndr_print_uint32(ndr, "session_global_id", r->session_global_id);
2663 0 : ndr_print_smbXsrv_signing_flags(ndr, "signing_flags", r->signing_flags);
2664 0 : ndr->depth--;
2665 : }
2666 :
2667 252422 : static enum ndr_err_code ndr_push_smbXsrv_tcon_globalU(struct ndr_push *ndr, int ndr_flags, const union smbXsrv_tcon_globalU *r)
2668 : {
2669 : uint32_t level;
2670 252422 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2671 252422 : if (ndr_flags & NDR_SCALARS) {
2672 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2673 126211 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2674 126211 : NDR_CHECK(ndr_push_union_align(ndr, 5));
2675 126211 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2676 126211 : NDR_CHECK(ndr_push_union_align(ndr, 5));
2677 126211 : switch (level) {
2678 126211 : case 0: {
2679 126211 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
2680 124655 : break; }
2681 :
2682 0 : default: {
2683 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy));
2684 0 : break; }
2685 :
2686 : }
2687 115771 : }
2688 252422 : if (ndr_flags & NDR_BUFFERS) {
2689 126211 : if (!(ndr_flags & NDR_SCALARS)) {
2690 : /* We didn't get it above, and the token is not needed after this. */
2691 126211 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2692 : }
2693 126211 : switch (level) {
2694 126211 : case 0:
2695 126211 : if (r->info0) {
2696 126211 : NDR_CHECK(ndr_push_smbXsrv_tcon_global0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
2697 : }
2698 124655 : break;
2699 :
2700 0 : default:
2701 0 : if (r->dummy) {
2702 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->dummy));
2703 : }
2704 0 : break;
2705 :
2706 : }
2707 115771 : }
2708 249310 : return NDR_ERR_SUCCESS;
2709 : }
2710 :
2711 314 : static enum ndr_err_code ndr_pull_smbXsrv_tcon_globalU(struct ndr_pull *ndr, int ndr_flags, union smbXsrv_tcon_globalU *r)
2712 : {
2713 : uint32_t level;
2714 : uint32_t _level;
2715 314 : TALLOC_CTX *_mem_save_info0_0 = NULL;
2716 : uint32_t _ptr_info0;
2717 314 : TALLOC_CTX *_mem_save_dummy_0 = NULL;
2718 : uint32_t _ptr_dummy;
2719 314 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2720 314 : if (ndr_flags & NDR_SCALARS) {
2721 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2722 157 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2723 157 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
2724 157 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2725 157 : if (_level != level) {
2726 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
2727 : }
2728 157 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
2729 157 : switch (level) {
2730 157 : case 0: {
2731 157 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
2732 157 : if (_ptr_info0) {
2733 157 : NDR_PULL_ALLOC(ndr, r->info0);
2734 : } else {
2735 0 : r->info0 = NULL;
2736 : }
2737 157 : break; }
2738 :
2739 0 : default: {
2740 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy));
2741 0 : if (_ptr_dummy) {
2742 0 : NDR_PULL_ALLOC(ndr, r->dummy);
2743 : } else {
2744 0 : r->dummy = NULL;
2745 : }
2746 0 : break; }
2747 :
2748 : }
2749 101 : }
2750 314 : if (ndr_flags & NDR_BUFFERS) {
2751 157 : if (!(ndr_flags & NDR_SCALARS)) {
2752 : /* We didn't get it above, and the token is not needed after this. */
2753 157 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2754 : }
2755 157 : switch (level) {
2756 157 : case 0:
2757 157 : if (r->info0) {
2758 157 : _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
2759 157 : NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
2760 157 : NDR_CHECK(ndr_pull_smbXsrv_tcon_global0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
2761 157 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
2762 : }
2763 157 : break;
2764 :
2765 0 : default:
2766 0 : if (r->dummy) {
2767 0 : _mem_save_dummy_0 = NDR_PULL_GET_MEM_CTX(ndr);
2768 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dummy, 0);
2769 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->dummy));
2770 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy_0, 0);
2771 : }
2772 0 : break;
2773 :
2774 : }
2775 101 : }
2776 314 : return NDR_ERR_SUCCESS;
2777 : }
2778 :
2779 0 : _PUBLIC_ void ndr_print_smbXsrv_tcon_globalU(struct ndr_print *ndr, const char *name, const union smbXsrv_tcon_globalU *r)
2780 : {
2781 : uint32_t level;
2782 0 : level = ndr_print_steal_switch_value(ndr, r);
2783 0 : ndr_print_union(ndr, name, level, "smbXsrv_tcon_globalU");
2784 0 : switch (level) {
2785 0 : case 0:
2786 0 : ndr_print_ptr(ndr, "info0", r->info0);
2787 0 : ndr->depth++;
2788 0 : if (r->info0) {
2789 0 : ndr_print_smbXsrv_tcon_global0(ndr, "info0", r->info0);
2790 : }
2791 0 : ndr->depth--;
2792 0 : break;
2793 :
2794 0 : default:
2795 0 : ndr_print_ptr(ndr, "dummy", r->dummy);
2796 0 : ndr->depth++;
2797 0 : if (r->dummy) {
2798 0 : ndr_print_hyper(ndr, "dummy", *r->dummy);
2799 : }
2800 0 : ndr->depth--;
2801 0 : break;
2802 :
2803 : }
2804 0 : }
2805 :
2806 126211 : _PUBLIC_ enum ndr_err_code ndr_push_smbXsrv_tcon_globalB(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_tcon_globalB *r)
2807 : {
2808 126211 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2809 126211 : if (ndr_flags & NDR_SCALARS) {
2810 126211 : NDR_CHECK(ndr_push_align(ndr, 5));
2811 127767 : NDR_CHECK(ndr_push_smbXsrv_version_values(ndr, NDR_SCALARS, r->version));
2812 126211 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->seqnum));
2813 126211 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
2814 126211 : NDR_CHECK(ndr_push_smbXsrv_tcon_globalU(ndr, NDR_SCALARS, &r->info));
2815 126211 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2816 : }
2817 126211 : if (ndr_flags & NDR_BUFFERS) {
2818 126211 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
2819 126211 : NDR_CHECK(ndr_push_smbXsrv_tcon_globalU(ndr, NDR_BUFFERS, &r->info));
2820 : }
2821 124655 : return NDR_ERR_SUCCESS;
2822 : }
2823 :
2824 157 : _PUBLIC_ enum ndr_err_code ndr_pull_smbXsrv_tcon_globalB(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_tcon_globalB *r)
2825 : {
2826 157 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2827 157 : if (ndr_flags & NDR_SCALARS) {
2828 157 : NDR_CHECK(ndr_pull_align(ndr, 5));
2829 157 : NDR_CHECK(ndr_pull_smbXsrv_version_values(ndr, NDR_SCALARS, &r->version));
2830 157 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->seqnum));
2831 157 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
2832 157 : NDR_CHECK(ndr_pull_smbXsrv_tcon_globalU(ndr, NDR_SCALARS, &r->info));
2833 157 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2834 : }
2835 157 : if (ndr_flags & NDR_BUFFERS) {
2836 157 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
2837 157 : NDR_CHECK(ndr_pull_smbXsrv_tcon_globalU(ndr, NDR_BUFFERS, &r->info));
2838 : }
2839 157 : return NDR_ERR_SUCCESS;
2840 : }
2841 :
2842 0 : static void ndr_print_flags_smbXsrv_tcon_globalB(struct ndr_print *ndr, const char *name, int unused, const struct smbXsrv_tcon_globalB *r)
2843 : {
2844 0 : ndr_print_smbXsrv_tcon_globalB(ndr, name, r);
2845 0 : }
2846 :
2847 0 : _PUBLIC_ void ndr_print_smbXsrv_tcon_globalB(struct ndr_print *ndr, const char *name, const struct smbXsrv_tcon_globalB *r)
2848 : {
2849 0 : ndr_print_struct(ndr, name, "smbXsrv_tcon_globalB");
2850 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2851 0 : ndr->depth++;
2852 0 : ndr_print_smbXsrv_version_values(ndr, "version", r->version);
2853 0 : ndr_print_uint32(ndr, "seqnum", r->seqnum);
2854 0 : ndr_print_set_switch_value(ndr, &r->info, r->version);
2855 0 : ndr_print_smbXsrv_tcon_globalU(ndr, "info", &r->info);
2856 0 : ndr->depth--;
2857 : }
2858 :
2859 0 : static enum ndr_err_code ndr_push_smbXsrv_tcon(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_tcon *r)
2860 : {
2861 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2862 0 : if (ndr_flags & NDR_SCALARS) {
2863 0 : if (r->global == NULL) {
2864 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2865 : }
2866 0 : NDR_CHECK(ndr_push_align(ndr, 5));
2867 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2868 : /* [ignore] 'table' */
2869 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2870 : /* [ignore] 'db_rec' */
2871 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->local_id));
2872 0 : NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->global */
2873 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status));
2874 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->idle_time));
2875 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2876 : /* [ignore] 'compat' */
2877 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2878 : }
2879 0 : if (ndr_flags & NDR_BUFFERS) {
2880 : /* [ignore] 'table' */
2881 : /* [ignore] 'db_rec' */
2882 0 : NDR_CHECK(ndr_push_smbXsrv_tcon_global0(ndr, NDR_SCALARS|NDR_BUFFERS, r->global));
2883 : /* [ignore] 'compat' */
2884 : }
2885 0 : return NDR_ERR_SUCCESS;
2886 : }
2887 :
2888 0 : static enum ndr_err_code ndr_pull_smbXsrv_tcon(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_tcon *r)
2889 : {
2890 : uint32_t _ptr_table;
2891 : uint32_t _ptr_db_rec;
2892 : uint32_t _ptr_global;
2893 0 : TALLOC_CTX *_mem_save_global_0 = NULL;
2894 : uint32_t _ptr_compat;
2895 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2896 0 : if (ndr_flags & NDR_SCALARS) {
2897 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
2898 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_table));
2899 0 : _ptr_table = 0;
2900 0 : if (_ptr_table) {
2901 : } else {
2902 0 : r->table = NULL;
2903 : }
2904 : /* [ignore] 'table' */
2905 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_db_rec));
2906 0 : _ptr_db_rec = 0;
2907 0 : if (_ptr_db_rec) {
2908 : } else {
2909 0 : r->db_rec = NULL;
2910 : }
2911 : /* [ignore] 'db_rec' */
2912 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->local_id));
2913 0 : NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_global));
2914 0 : if (_ptr_global) {
2915 0 : NDR_PULL_ALLOC(ndr, r->global);
2916 : } else {
2917 0 : r->global = NULL;
2918 : }
2919 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
2920 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->idle_time));
2921 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_compat));
2922 0 : _ptr_compat = 0;
2923 0 : if (_ptr_compat) {
2924 : } else {
2925 0 : r->compat = NULL;
2926 : }
2927 : /* [ignore] 'compat' */
2928 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2929 : }
2930 0 : if (ndr_flags & NDR_BUFFERS) {
2931 : /* [ignore] 'table' */
2932 : /* [ignore] 'db_rec' */
2933 0 : _mem_save_global_0 = NDR_PULL_GET_MEM_CTX(ndr);
2934 0 : NDR_PULL_SET_MEM_CTX(ndr, r->global, 0);
2935 0 : NDR_CHECK(ndr_pull_smbXsrv_tcon_global0(ndr, NDR_SCALARS|NDR_BUFFERS, r->global));
2936 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_global_0, 0);
2937 : /* [ignore] 'compat' */
2938 : }
2939 0 : return NDR_ERR_SUCCESS;
2940 : }
2941 :
2942 0 : _PUBLIC_ void ndr_print_smbXsrv_tcon(struct ndr_print *ndr, const char *name, const struct smbXsrv_tcon *r)
2943 : {
2944 0 : ndr_print_struct(ndr, name, "smbXsrv_tcon");
2945 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2946 0 : ndr->depth++;
2947 0 : ndr_print_ptr(ndr, "table", r->table);
2948 : /* [ignore] 'table' */
2949 0 : ndr_print_ptr(ndr, "db_rec", r->db_rec);
2950 : /* [ignore] 'db_rec' */
2951 0 : ndr_print_uint32(ndr, "local_id", r->local_id);
2952 0 : ndr_print_ptr(ndr, "global", r->global);
2953 0 : ndr->depth++;
2954 0 : ndr_print_smbXsrv_tcon_global0(ndr, "global", r->global);
2955 0 : ndr->depth--;
2956 0 : ndr_print_NTSTATUS(ndr, "status", r->status);
2957 0 : ndr_print_NTTIME(ndr, "idle_time", r->idle_time);
2958 0 : ndr_print_ptr(ndr, "compat", r->compat);
2959 : /* [ignore] 'compat' */
2960 0 : ndr->depth--;
2961 : }
2962 :
2963 0 : static enum ndr_err_code ndr_push_smbXsrv_tconU(struct ndr_push *ndr, int ndr_flags, const union smbXsrv_tconU *r)
2964 : {
2965 : uint32_t level;
2966 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2967 0 : if (ndr_flags & NDR_SCALARS) {
2968 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2969 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2970 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
2971 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2972 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
2973 0 : switch (level) {
2974 0 : case 0: {
2975 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
2976 0 : break; }
2977 :
2978 0 : default: {
2979 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy));
2980 0 : break; }
2981 :
2982 : }
2983 0 : }
2984 0 : if (ndr_flags & NDR_BUFFERS) {
2985 0 : if (!(ndr_flags & NDR_SCALARS)) {
2986 : /* We didn't get it above, and the token is not needed after this. */
2987 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2988 : }
2989 0 : switch (level) {
2990 0 : case 0:
2991 0 : if (r->info0) {
2992 0 : NDR_CHECK(ndr_push_smbXsrv_tcon(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
2993 : }
2994 0 : break;
2995 :
2996 0 : default:
2997 0 : if (r->dummy) {
2998 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->dummy));
2999 : }
3000 0 : break;
3001 :
3002 : }
3003 0 : }
3004 0 : return NDR_ERR_SUCCESS;
3005 : }
3006 :
3007 0 : static enum ndr_err_code ndr_pull_smbXsrv_tconU(struct ndr_pull *ndr, int ndr_flags, union smbXsrv_tconU *r)
3008 : {
3009 : uint32_t level;
3010 : uint32_t _level;
3011 0 : TALLOC_CTX *_mem_save_info0_0 = NULL;
3012 : uint32_t _ptr_info0;
3013 0 : TALLOC_CTX *_mem_save_dummy_0 = NULL;
3014 : uint32_t _ptr_dummy;
3015 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3016 0 : if (ndr_flags & NDR_SCALARS) {
3017 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3018 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3019 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
3020 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
3021 0 : if (_level != level) {
3022 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
3023 : }
3024 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
3025 0 : switch (level) {
3026 0 : case 0: {
3027 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
3028 0 : if (_ptr_info0) {
3029 0 : NDR_PULL_ALLOC(ndr, r->info0);
3030 : } else {
3031 0 : r->info0 = NULL;
3032 : }
3033 0 : break; }
3034 :
3035 0 : default: {
3036 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy));
3037 0 : if (_ptr_dummy) {
3038 0 : NDR_PULL_ALLOC(ndr, r->dummy);
3039 : } else {
3040 0 : r->dummy = NULL;
3041 : }
3042 0 : break; }
3043 :
3044 : }
3045 0 : }
3046 0 : if (ndr_flags & NDR_BUFFERS) {
3047 0 : if (!(ndr_flags & NDR_SCALARS)) {
3048 : /* We didn't get it above, and the token is not needed after this. */
3049 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3050 : }
3051 0 : switch (level) {
3052 0 : case 0:
3053 0 : if (r->info0) {
3054 0 : _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
3055 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
3056 0 : NDR_CHECK(ndr_pull_smbXsrv_tcon(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
3057 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
3058 : }
3059 0 : break;
3060 :
3061 0 : default:
3062 0 : if (r->dummy) {
3063 0 : _mem_save_dummy_0 = NDR_PULL_GET_MEM_CTX(ndr);
3064 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dummy, 0);
3065 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->dummy));
3066 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy_0, 0);
3067 : }
3068 0 : break;
3069 :
3070 : }
3071 0 : }
3072 0 : return NDR_ERR_SUCCESS;
3073 : }
3074 :
3075 0 : _PUBLIC_ void ndr_print_smbXsrv_tconU(struct ndr_print *ndr, const char *name, const union smbXsrv_tconU *r)
3076 : {
3077 : uint32_t level;
3078 0 : level = ndr_print_steal_switch_value(ndr, r);
3079 0 : ndr_print_union(ndr, name, level, "smbXsrv_tconU");
3080 0 : switch (level) {
3081 0 : case 0:
3082 0 : ndr_print_ptr(ndr, "info0", r->info0);
3083 0 : ndr->depth++;
3084 0 : if (r->info0) {
3085 0 : ndr_print_smbXsrv_tcon(ndr, "info0", r->info0);
3086 : }
3087 0 : ndr->depth--;
3088 0 : break;
3089 :
3090 0 : default:
3091 0 : ndr_print_ptr(ndr, "dummy", r->dummy);
3092 0 : ndr->depth++;
3093 0 : if (r->dummy) {
3094 0 : ndr_print_hyper(ndr, "dummy", *r->dummy);
3095 : }
3096 0 : ndr->depth--;
3097 0 : break;
3098 :
3099 : }
3100 0 : }
3101 :
3102 0 : _PUBLIC_ enum ndr_err_code ndr_push_smbXsrv_tconB(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_tconB *r)
3103 : {
3104 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3105 0 : if (ndr_flags & NDR_SCALARS) {
3106 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3107 0 : NDR_CHECK(ndr_push_smbXsrv_version_values(ndr, NDR_SCALARS, r->version));
3108 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3109 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
3110 0 : NDR_CHECK(ndr_push_smbXsrv_tconU(ndr, NDR_SCALARS, &r->info));
3111 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3112 : }
3113 0 : if (ndr_flags & NDR_BUFFERS) {
3114 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
3115 0 : NDR_CHECK(ndr_push_smbXsrv_tconU(ndr, NDR_BUFFERS, &r->info));
3116 : }
3117 0 : return NDR_ERR_SUCCESS;
3118 : }
3119 :
3120 0 : _PUBLIC_ enum ndr_err_code ndr_pull_smbXsrv_tconB(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_tconB *r)
3121 : {
3122 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3123 0 : if (ndr_flags & NDR_SCALARS) {
3124 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3125 0 : NDR_CHECK(ndr_pull_smbXsrv_version_values(ndr, NDR_SCALARS, &r->version));
3126 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
3127 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
3128 0 : NDR_CHECK(ndr_pull_smbXsrv_tconU(ndr, NDR_SCALARS, &r->info));
3129 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3130 : }
3131 0 : if (ndr_flags & NDR_BUFFERS) {
3132 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
3133 0 : NDR_CHECK(ndr_pull_smbXsrv_tconU(ndr, NDR_BUFFERS, &r->info));
3134 : }
3135 0 : return NDR_ERR_SUCCESS;
3136 : }
3137 :
3138 0 : static void ndr_print_flags_smbXsrv_tconB(struct ndr_print *ndr, const char *name, int unused, const struct smbXsrv_tconB *r)
3139 : {
3140 0 : ndr_print_smbXsrv_tconB(ndr, name, r);
3141 0 : }
3142 :
3143 0 : _PUBLIC_ void ndr_print_smbXsrv_tconB(struct ndr_print *ndr, const char *name, const struct smbXsrv_tconB *r)
3144 : {
3145 0 : ndr_print_struct(ndr, name, "smbXsrv_tconB");
3146 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3147 0 : ndr->depth++;
3148 0 : ndr_print_smbXsrv_version_values(ndr, "version", r->version);
3149 0 : ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
3150 0 : ndr_print_set_switch_value(ndr, &r->info, r->version);
3151 0 : ndr_print_smbXsrv_tconU(ndr, "info", &r->info);
3152 0 : ndr->depth--;
3153 : }
3154 :
3155 0 : _PUBLIC_ enum ndr_err_code ndr_push_smbXsrv_open_flags(struct ndr_push *ndr, int ndr_flags, uint8_t r)
3156 : {
3157 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
3158 0 : return NDR_ERR_SUCCESS;
3159 : }
3160 :
3161 0 : _PUBLIC_ enum ndr_err_code ndr_pull_smbXsrv_open_flags(struct ndr_pull *ndr, int ndr_flags, uint8_t *r)
3162 : {
3163 : uint8_t v;
3164 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
3165 0 : *r = v;
3166 0 : return NDR_ERR_SUCCESS;
3167 : }
3168 :
3169 0 : _PUBLIC_ void ndr_print_smbXsrv_open_flags(struct ndr_print *ndr, const char *name, uint8_t r)
3170 : {
3171 0 : ndr_print_uint8(ndr, name, r);
3172 0 : ndr->depth++;
3173 0 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SMBXSRV_OPEN_NEED_REPLAY_CACHE", SMBXSRV_OPEN_NEED_REPLAY_CACHE, r);
3174 0 : ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SMBXSRV_OPEN_HAVE_REPLAY_CACHE", SMBXSRV_OPEN_HAVE_REPLAY_CACHE, r);
3175 0 : ndr->depth--;
3176 0 : }
3177 :
3178 556563 : static enum ndr_err_code ndr_push_smbXsrv_open_global0(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_open_global0 *r)
3179 : {
3180 556563 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3181 556563 : if (ndr_flags & NDR_SCALARS) {
3182 556563 : NDR_CHECK(ndr_push_align(ndr, 8));
3183 556563 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3184 : /* [ignore] 'db_rec' */
3185 556563 : NDR_CHECK(ndr_push_server_id(ndr, NDR_SCALARS, &r->server_id));
3186 556563 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->open_global_id));
3187 556563 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->open_persistent_id));
3188 556563 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->open_volatile_id));
3189 556563 : NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->open_owner));
3190 556563 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->open_time));
3191 556563 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->create_guid));
3192 556563 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->client_guid));
3193 556563 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->app_instance_id));
3194 556563 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->disconnect_time));
3195 556563 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->durable_timeout_msec));
3196 556563 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->durable));
3197 556563 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->backend_cookie));
3198 556563 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->channel_sequence));
3199 556563 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->channel_generation));
3200 : {
3201 556563 : uint32_t _flags_save_uint8 = ndr->flags;
3202 556563 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3203 556563 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->lock_sequence_array, 64));
3204 556563 : ndr->flags = _flags_save_uint8;
3205 : }
3206 556563 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
3207 : }
3208 554819 : if (ndr_flags & NDR_BUFFERS) {
3209 : /* [ignore] 'db_rec' */
3210 : }
3211 556563 : return NDR_ERR_SUCCESS;
3212 : }
3213 :
3214 192 : static enum ndr_err_code ndr_pull_smbXsrv_open_global0(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_open_global0 *r)
3215 : {
3216 : uint32_t _ptr_db_rec;
3217 192 : uint32_t size_lock_sequence_array_0 = 0;
3218 192 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3219 192 : if (ndr_flags & NDR_SCALARS) {
3220 192 : NDR_CHECK(ndr_pull_align(ndr, 8));
3221 192 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_db_rec));
3222 192 : _ptr_db_rec = 0;
3223 192 : if (_ptr_db_rec) {
3224 : } else {
3225 192 : r->db_rec = NULL;
3226 : }
3227 : /* [ignore] 'db_rec' */
3228 192 : NDR_CHECK(ndr_pull_server_id(ndr, NDR_SCALARS, &r->server_id));
3229 192 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->open_global_id));
3230 192 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->open_persistent_id));
3231 192 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->open_volatile_id));
3232 192 : NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->open_owner));
3233 192 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->open_time));
3234 192 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->create_guid));
3235 192 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->client_guid));
3236 192 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->app_instance_id));
3237 192 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->disconnect_time));
3238 192 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->durable_timeout_msec));
3239 192 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->durable));
3240 192 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->backend_cookie));
3241 192 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->channel_sequence));
3242 192 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->channel_generation));
3243 : {
3244 192 : uint32_t _flags_save_uint8 = ndr->flags;
3245 192 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3246 192 : size_lock_sequence_array_0 = 64;
3247 192 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->lock_sequence_array, size_lock_sequence_array_0));
3248 192 : ndr->flags = _flags_save_uint8;
3249 : }
3250 192 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
3251 : }
3252 192 : if (ndr_flags & NDR_BUFFERS) {
3253 : /* [ignore] 'db_rec' */
3254 : }
3255 192 : return NDR_ERR_SUCCESS;
3256 : }
3257 :
3258 0 : _PUBLIC_ void ndr_print_smbXsrv_open_global0(struct ndr_print *ndr, const char *name, const struct smbXsrv_open_global0 *r)
3259 : {
3260 0 : ndr_print_struct(ndr, name, "smbXsrv_open_global0");
3261 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3262 0 : ndr->depth++;
3263 0 : ndr_print_ptr(ndr, "db_rec", r->db_rec);
3264 : /* [ignore] 'db_rec' */
3265 0 : ndr_print_server_id(ndr, "server_id", &r->server_id);
3266 0 : ndr_print_uint32(ndr, "open_global_id", r->open_global_id);
3267 0 : ndr_print_hyper(ndr, "open_persistent_id", r->open_persistent_id);
3268 0 : ndr_print_hyper(ndr, "open_volatile_id", r->open_volatile_id);
3269 0 : ndr_print_dom_sid(ndr, "open_owner", &r->open_owner);
3270 0 : ndr_print_NTTIME(ndr, "open_time", r->open_time);
3271 0 : ndr_print_GUID(ndr, "create_guid", &r->create_guid);
3272 0 : ndr_print_GUID(ndr, "client_guid", &r->client_guid);
3273 0 : ndr_print_GUID(ndr, "app_instance_id", &r->app_instance_id);
3274 0 : ndr_print_NTTIME(ndr, "disconnect_time", r->disconnect_time);
3275 0 : ndr_print_uint32(ndr, "durable_timeout_msec", r->durable_timeout_msec);
3276 0 : ndr_print_uint8(ndr, "durable", r->durable);
3277 0 : ndr_print_DATA_BLOB(ndr, "backend_cookie", r->backend_cookie);
3278 0 : ndr_print_uint16(ndr, "channel_sequence", r->channel_sequence);
3279 0 : ndr_print_hyper(ndr, "channel_generation", r->channel_generation);
3280 : {
3281 0 : uint32_t _flags_save_uint8 = ndr->flags;
3282 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3283 0 : ndr_print_array_uint8(ndr, "lock_sequence_array", r->lock_sequence_array, 64);
3284 0 : ndr->flags = _flags_save_uint8;
3285 : }
3286 0 : ndr->depth--;
3287 : }
3288 :
3289 1113126 : static enum ndr_err_code ndr_push_smbXsrv_open_globalU(struct ndr_push *ndr, int ndr_flags, const union smbXsrv_open_globalU *r)
3290 : {
3291 : uint32_t level;
3292 1113126 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3293 1113126 : if (ndr_flags & NDR_SCALARS) {
3294 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3295 556563 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3296 556563 : NDR_CHECK(ndr_push_union_align(ndr, 5));
3297 556563 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
3298 556563 : NDR_CHECK(ndr_push_union_align(ndr, 5));
3299 556563 : switch (level) {
3300 556563 : case 0: {
3301 556563 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
3302 554819 : break; }
3303 :
3304 0 : default: {
3305 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy));
3306 0 : break; }
3307 :
3308 : }
3309 471291 : }
3310 1113126 : if (ndr_flags & NDR_BUFFERS) {
3311 556563 : if (!(ndr_flags & NDR_SCALARS)) {
3312 : /* We didn't get it above, and the token is not needed after this. */
3313 556563 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3314 : }
3315 556563 : switch (level) {
3316 556563 : case 0:
3317 556563 : if (r->info0) {
3318 556563 : NDR_CHECK(ndr_push_smbXsrv_open_global0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
3319 : }
3320 554819 : break;
3321 :
3322 0 : default:
3323 0 : if (r->dummy) {
3324 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->dummy));
3325 : }
3326 0 : break;
3327 :
3328 : }
3329 471291 : }
3330 1109638 : return NDR_ERR_SUCCESS;
3331 : }
3332 :
3333 384 : static enum ndr_err_code ndr_pull_smbXsrv_open_globalU(struct ndr_pull *ndr, int ndr_flags, union smbXsrv_open_globalU *r)
3334 : {
3335 : uint32_t level;
3336 : uint32_t _level;
3337 384 : TALLOC_CTX *_mem_save_info0_0 = NULL;
3338 : uint32_t _ptr_info0;
3339 384 : TALLOC_CTX *_mem_save_dummy_0 = NULL;
3340 : uint32_t _ptr_dummy;
3341 384 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3342 384 : if (ndr_flags & NDR_SCALARS) {
3343 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3344 192 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3345 192 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
3346 192 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
3347 192 : if (_level != level) {
3348 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
3349 : }
3350 192 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
3351 192 : switch (level) {
3352 192 : case 0: {
3353 192 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
3354 192 : if (_ptr_info0) {
3355 192 : NDR_PULL_ALLOC(ndr, r->info0);
3356 : } else {
3357 0 : r->info0 = NULL;
3358 : }
3359 192 : break; }
3360 :
3361 0 : default: {
3362 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy));
3363 0 : if (_ptr_dummy) {
3364 0 : NDR_PULL_ALLOC(ndr, r->dummy);
3365 : } else {
3366 0 : r->dummy = NULL;
3367 : }
3368 0 : break; }
3369 :
3370 : }
3371 163 : }
3372 384 : if (ndr_flags & NDR_BUFFERS) {
3373 192 : if (!(ndr_flags & NDR_SCALARS)) {
3374 : /* We didn't get it above, and the token is not needed after this. */
3375 192 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3376 : }
3377 192 : switch (level) {
3378 192 : case 0:
3379 192 : if (r->info0) {
3380 192 : _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
3381 192 : NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
3382 192 : NDR_CHECK(ndr_pull_smbXsrv_open_global0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
3383 192 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
3384 : }
3385 192 : break;
3386 :
3387 0 : default:
3388 0 : if (r->dummy) {
3389 0 : _mem_save_dummy_0 = NDR_PULL_GET_MEM_CTX(ndr);
3390 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dummy, 0);
3391 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->dummy));
3392 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy_0, 0);
3393 : }
3394 0 : break;
3395 :
3396 : }
3397 163 : }
3398 384 : return NDR_ERR_SUCCESS;
3399 : }
3400 :
3401 0 : _PUBLIC_ void ndr_print_smbXsrv_open_globalU(struct ndr_print *ndr, const char *name, const union smbXsrv_open_globalU *r)
3402 : {
3403 : uint32_t level;
3404 0 : level = ndr_print_steal_switch_value(ndr, r);
3405 0 : ndr_print_union(ndr, name, level, "smbXsrv_open_globalU");
3406 0 : switch (level) {
3407 0 : case 0:
3408 0 : ndr_print_ptr(ndr, "info0", r->info0);
3409 0 : ndr->depth++;
3410 0 : if (r->info0) {
3411 0 : ndr_print_smbXsrv_open_global0(ndr, "info0", r->info0);
3412 : }
3413 0 : ndr->depth--;
3414 0 : break;
3415 :
3416 0 : default:
3417 0 : ndr_print_ptr(ndr, "dummy", r->dummy);
3418 0 : ndr->depth++;
3419 0 : if (r->dummy) {
3420 0 : ndr_print_hyper(ndr, "dummy", *r->dummy);
3421 : }
3422 0 : ndr->depth--;
3423 0 : break;
3424 :
3425 : }
3426 0 : }
3427 :
3428 556563 : _PUBLIC_ enum ndr_err_code ndr_push_smbXsrv_open_globalB(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_open_globalB *r)
3429 : {
3430 556563 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3431 556563 : if (ndr_flags & NDR_SCALARS) {
3432 556563 : NDR_CHECK(ndr_push_align(ndr, 5));
3433 558307 : NDR_CHECK(ndr_push_smbXsrv_version_values(ndr, NDR_SCALARS, r->version));
3434 556563 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->seqnum));
3435 556563 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
3436 556563 : NDR_CHECK(ndr_push_smbXsrv_open_globalU(ndr, NDR_SCALARS, &r->info));
3437 556563 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3438 : }
3439 556563 : if (ndr_flags & NDR_BUFFERS) {
3440 556563 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
3441 556563 : NDR_CHECK(ndr_push_smbXsrv_open_globalU(ndr, NDR_BUFFERS, &r->info));
3442 : }
3443 554819 : return NDR_ERR_SUCCESS;
3444 : }
3445 :
3446 192 : _PUBLIC_ enum ndr_err_code ndr_pull_smbXsrv_open_globalB(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_open_globalB *r)
3447 : {
3448 192 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3449 192 : if (ndr_flags & NDR_SCALARS) {
3450 192 : NDR_CHECK(ndr_pull_align(ndr, 5));
3451 192 : NDR_CHECK(ndr_pull_smbXsrv_version_values(ndr, NDR_SCALARS, &r->version));
3452 192 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->seqnum));
3453 192 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
3454 192 : NDR_CHECK(ndr_pull_smbXsrv_open_globalU(ndr, NDR_SCALARS, &r->info));
3455 192 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3456 : }
3457 192 : if (ndr_flags & NDR_BUFFERS) {
3458 192 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
3459 192 : NDR_CHECK(ndr_pull_smbXsrv_open_globalU(ndr, NDR_BUFFERS, &r->info));
3460 : }
3461 192 : return NDR_ERR_SUCCESS;
3462 : }
3463 :
3464 0 : static void ndr_print_flags_smbXsrv_open_globalB(struct ndr_print *ndr, const char *name, int unused, const struct smbXsrv_open_globalB *r)
3465 : {
3466 0 : ndr_print_smbXsrv_open_globalB(ndr, name, r);
3467 0 : }
3468 :
3469 0 : _PUBLIC_ void ndr_print_smbXsrv_open_globalB(struct ndr_print *ndr, const char *name, const struct smbXsrv_open_globalB *r)
3470 : {
3471 0 : ndr_print_struct(ndr, name, "smbXsrv_open_globalB");
3472 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3473 0 : ndr->depth++;
3474 0 : ndr_print_smbXsrv_version_values(ndr, "version", r->version);
3475 0 : ndr_print_uint32(ndr, "seqnum", r->seqnum);
3476 0 : ndr_print_set_switch_value(ndr, &r->info, r->version);
3477 0 : ndr_print_smbXsrv_open_globalU(ndr, "info", &r->info);
3478 0 : ndr->depth--;
3479 : }
3480 :
3481 0 : static enum ndr_err_code ndr_push_smbXsrv_open(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_open *r)
3482 : {
3483 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3484 0 : if (ndr_flags & NDR_SCALARS) {
3485 0 : if (r->global == NULL) {
3486 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3487 : }
3488 0 : NDR_CHECK(ndr_push_align(ndr, 8));
3489 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3490 : /* [ignore] 'table' */
3491 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3492 : /* [ignore] 'db_rec' */
3493 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->local_id));
3494 0 : NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->global */
3495 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status));
3496 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->idle_time));
3497 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3498 : /* [ignore] 'compat' */
3499 0 : NDR_CHECK(ndr_push_smbXsrv_open_flags(ndr, NDR_SCALARS, r->flags));
3500 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->create_action));
3501 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->request_count));
3502 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->pre_request_count));
3503 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
3504 : }
3505 0 : if (ndr_flags & NDR_BUFFERS) {
3506 : /* [ignore] 'table' */
3507 : /* [ignore] 'db_rec' */
3508 0 : NDR_CHECK(ndr_push_smbXsrv_open_global0(ndr, NDR_SCALARS|NDR_BUFFERS, r->global));
3509 : /* [ignore] 'compat' */
3510 : }
3511 0 : return NDR_ERR_SUCCESS;
3512 : }
3513 :
3514 0 : static enum ndr_err_code ndr_pull_smbXsrv_open(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_open *r)
3515 : {
3516 : uint32_t _ptr_table;
3517 : uint32_t _ptr_db_rec;
3518 : uint32_t _ptr_global;
3519 0 : TALLOC_CTX *_mem_save_global_0 = NULL;
3520 : uint32_t _ptr_compat;
3521 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3522 0 : if (ndr_flags & NDR_SCALARS) {
3523 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
3524 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_table));
3525 0 : _ptr_table = 0;
3526 0 : if (_ptr_table) {
3527 : } else {
3528 0 : r->table = NULL;
3529 : }
3530 : /* [ignore] 'table' */
3531 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_db_rec));
3532 0 : _ptr_db_rec = 0;
3533 0 : if (_ptr_db_rec) {
3534 : } else {
3535 0 : r->db_rec = NULL;
3536 : }
3537 : /* [ignore] 'db_rec' */
3538 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->local_id));
3539 0 : NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_global));
3540 0 : if (_ptr_global) {
3541 0 : NDR_PULL_ALLOC(ndr, r->global);
3542 : } else {
3543 0 : r->global = NULL;
3544 : }
3545 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
3546 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->idle_time));
3547 0 : NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &_ptr_compat));
3548 0 : _ptr_compat = 0;
3549 0 : if (_ptr_compat) {
3550 : } else {
3551 0 : r->compat = NULL;
3552 : }
3553 : /* [ignore] 'compat' */
3554 0 : NDR_CHECK(ndr_pull_smbXsrv_open_flags(ndr, NDR_SCALARS, &r->flags));
3555 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->create_action));
3556 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->request_count));
3557 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->pre_request_count));
3558 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
3559 : }
3560 0 : if (ndr_flags & NDR_BUFFERS) {
3561 : /* [ignore] 'table' */
3562 : /* [ignore] 'db_rec' */
3563 0 : _mem_save_global_0 = NDR_PULL_GET_MEM_CTX(ndr);
3564 0 : NDR_PULL_SET_MEM_CTX(ndr, r->global, 0);
3565 0 : NDR_CHECK(ndr_pull_smbXsrv_open_global0(ndr, NDR_SCALARS|NDR_BUFFERS, r->global));
3566 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_global_0, 0);
3567 : /* [ignore] 'compat' */
3568 : }
3569 0 : return NDR_ERR_SUCCESS;
3570 : }
3571 :
3572 0 : _PUBLIC_ void ndr_print_smbXsrv_open(struct ndr_print *ndr, const char *name, const struct smbXsrv_open *r)
3573 : {
3574 0 : ndr_print_struct(ndr, name, "smbXsrv_open");
3575 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3576 0 : ndr->depth++;
3577 0 : ndr_print_ptr(ndr, "table", r->table);
3578 : /* [ignore] 'table' */
3579 0 : ndr_print_ptr(ndr, "db_rec", r->db_rec);
3580 : /* [ignore] 'db_rec' */
3581 0 : ndr_print_uint32(ndr, "local_id", r->local_id);
3582 0 : ndr_print_ptr(ndr, "global", r->global);
3583 0 : ndr->depth++;
3584 0 : ndr_print_smbXsrv_open_global0(ndr, "global", r->global);
3585 0 : ndr->depth--;
3586 0 : ndr_print_NTSTATUS(ndr, "status", r->status);
3587 0 : ndr_print_NTTIME(ndr, "idle_time", r->idle_time);
3588 0 : ndr_print_ptr(ndr, "compat", r->compat);
3589 : /* [ignore] 'compat' */
3590 0 : ndr_print_smbXsrv_open_flags(ndr, "flags", r->flags);
3591 0 : ndr_print_uint32(ndr, "create_action", r->create_action);
3592 0 : ndr_print_hyper(ndr, "request_count", r->request_count);
3593 0 : ndr_print_hyper(ndr, "pre_request_count", r->pre_request_count);
3594 0 : ndr->depth--;
3595 : }
3596 :
3597 0 : static enum ndr_err_code ndr_push_smbXsrv_openU(struct ndr_push *ndr, int ndr_flags, const union smbXsrv_openU *r)
3598 : {
3599 : uint32_t level;
3600 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3601 0 : if (ndr_flags & NDR_SCALARS) {
3602 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3603 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3604 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
3605 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
3606 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
3607 0 : switch (level) {
3608 0 : case 0: {
3609 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
3610 0 : break; }
3611 :
3612 0 : default: {
3613 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy));
3614 0 : break; }
3615 :
3616 : }
3617 0 : }
3618 0 : if (ndr_flags & NDR_BUFFERS) {
3619 0 : if (!(ndr_flags & NDR_SCALARS)) {
3620 : /* We didn't get it above, and the token is not needed after this. */
3621 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3622 : }
3623 0 : switch (level) {
3624 0 : case 0:
3625 0 : if (r->info0) {
3626 0 : NDR_CHECK(ndr_push_smbXsrv_open(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
3627 : }
3628 0 : break;
3629 :
3630 0 : default:
3631 0 : if (r->dummy) {
3632 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->dummy));
3633 : }
3634 0 : break;
3635 :
3636 : }
3637 0 : }
3638 0 : return NDR_ERR_SUCCESS;
3639 : }
3640 :
3641 0 : static enum ndr_err_code ndr_pull_smbXsrv_openU(struct ndr_pull *ndr, int ndr_flags, union smbXsrv_openU *r)
3642 : {
3643 : uint32_t level;
3644 : uint32_t _level;
3645 0 : TALLOC_CTX *_mem_save_info0_0 = NULL;
3646 : uint32_t _ptr_info0;
3647 0 : TALLOC_CTX *_mem_save_dummy_0 = NULL;
3648 : uint32_t _ptr_dummy;
3649 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3650 0 : if (ndr_flags & NDR_SCALARS) {
3651 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3652 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3653 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
3654 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
3655 0 : if (_level != level) {
3656 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
3657 : }
3658 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
3659 0 : switch (level) {
3660 0 : case 0: {
3661 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
3662 0 : if (_ptr_info0) {
3663 0 : NDR_PULL_ALLOC(ndr, r->info0);
3664 : } else {
3665 0 : r->info0 = NULL;
3666 : }
3667 0 : break; }
3668 :
3669 0 : default: {
3670 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy));
3671 0 : if (_ptr_dummy) {
3672 0 : NDR_PULL_ALLOC(ndr, r->dummy);
3673 : } else {
3674 0 : r->dummy = NULL;
3675 : }
3676 0 : break; }
3677 :
3678 : }
3679 0 : }
3680 0 : if (ndr_flags & NDR_BUFFERS) {
3681 0 : if (!(ndr_flags & NDR_SCALARS)) {
3682 : /* We didn't get it above, and the token is not needed after this. */
3683 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3684 : }
3685 0 : switch (level) {
3686 0 : case 0:
3687 0 : if (r->info0) {
3688 0 : _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
3689 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
3690 0 : NDR_CHECK(ndr_pull_smbXsrv_open(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
3691 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
3692 : }
3693 0 : break;
3694 :
3695 0 : default:
3696 0 : if (r->dummy) {
3697 0 : _mem_save_dummy_0 = NDR_PULL_GET_MEM_CTX(ndr);
3698 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dummy, 0);
3699 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->dummy));
3700 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy_0, 0);
3701 : }
3702 0 : break;
3703 :
3704 : }
3705 0 : }
3706 0 : return NDR_ERR_SUCCESS;
3707 : }
3708 :
3709 0 : _PUBLIC_ void ndr_print_smbXsrv_openU(struct ndr_print *ndr, const char *name, const union smbXsrv_openU *r)
3710 : {
3711 : uint32_t level;
3712 0 : level = ndr_print_steal_switch_value(ndr, r);
3713 0 : ndr_print_union(ndr, name, level, "smbXsrv_openU");
3714 0 : switch (level) {
3715 0 : case 0:
3716 0 : ndr_print_ptr(ndr, "info0", r->info0);
3717 0 : ndr->depth++;
3718 0 : if (r->info0) {
3719 0 : ndr_print_smbXsrv_open(ndr, "info0", r->info0);
3720 : }
3721 0 : ndr->depth--;
3722 0 : break;
3723 :
3724 0 : default:
3725 0 : ndr_print_ptr(ndr, "dummy", r->dummy);
3726 0 : ndr->depth++;
3727 0 : if (r->dummy) {
3728 0 : ndr_print_hyper(ndr, "dummy", *r->dummy);
3729 : }
3730 0 : ndr->depth--;
3731 0 : break;
3732 :
3733 : }
3734 0 : }
3735 :
3736 0 : _PUBLIC_ enum ndr_err_code ndr_push_smbXsrv_openB(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_openB *r)
3737 : {
3738 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3739 0 : if (ndr_flags & NDR_SCALARS) {
3740 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3741 0 : NDR_CHECK(ndr_push_smbXsrv_version_values(ndr, NDR_SCALARS, r->version));
3742 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3743 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
3744 0 : NDR_CHECK(ndr_push_smbXsrv_openU(ndr, NDR_SCALARS, &r->info));
3745 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3746 : }
3747 0 : if (ndr_flags & NDR_BUFFERS) {
3748 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
3749 0 : NDR_CHECK(ndr_push_smbXsrv_openU(ndr, NDR_BUFFERS, &r->info));
3750 : }
3751 0 : return NDR_ERR_SUCCESS;
3752 : }
3753 :
3754 0 : _PUBLIC_ enum ndr_err_code ndr_pull_smbXsrv_openB(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_openB *r)
3755 : {
3756 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3757 0 : if (ndr_flags & NDR_SCALARS) {
3758 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3759 0 : NDR_CHECK(ndr_pull_smbXsrv_version_values(ndr, NDR_SCALARS, &r->version));
3760 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
3761 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
3762 0 : NDR_CHECK(ndr_pull_smbXsrv_openU(ndr, NDR_SCALARS, &r->info));
3763 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3764 : }
3765 0 : if (ndr_flags & NDR_BUFFERS) {
3766 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
3767 0 : NDR_CHECK(ndr_pull_smbXsrv_openU(ndr, NDR_BUFFERS, &r->info));
3768 : }
3769 0 : return NDR_ERR_SUCCESS;
3770 : }
3771 :
3772 0 : static void ndr_print_flags_smbXsrv_openB(struct ndr_print *ndr, const char *name, int unused, const struct smbXsrv_openB *r)
3773 : {
3774 0 : ndr_print_smbXsrv_openB(ndr, name, r);
3775 0 : }
3776 :
3777 0 : _PUBLIC_ void ndr_print_smbXsrv_openB(struct ndr_print *ndr, const char *name, const struct smbXsrv_openB *r)
3778 : {
3779 0 : ndr_print_struct(ndr, name, "smbXsrv_openB");
3780 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3781 0 : ndr->depth++;
3782 0 : ndr_print_smbXsrv_version_values(ndr, "version", r->version);
3783 0 : ndr_print_uint32(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
3784 0 : ndr_print_set_switch_value(ndr, &r->info, r->version);
3785 0 : ndr_print_smbXsrv_openU(ndr, "info", &r->info);
3786 0 : ndr->depth--;
3787 : }
3788 :
3789 1550 : _PUBLIC_ enum ndr_err_code ndr_push_smbXsrv_open_replay_cache(struct ndr_push *ndr, int ndr_flags, const struct smbXsrv_open_replay_cache *r)
3790 : {
3791 1550 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3792 1550 : if (ndr_flags & NDR_SCALARS) {
3793 1550 : NDR_CHECK(ndr_push_align(ndr, 4));
3794 1550 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->holder_req_guid));
3795 1550 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->idle_time));
3796 1550 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->local_id));
3797 1550 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3798 : }
3799 1550 : if (ndr_flags & NDR_BUFFERS) {
3800 : }
3801 1550 : return NDR_ERR_SUCCESS;
3802 : }
3803 :
3804 316 : _PUBLIC_ enum ndr_err_code ndr_pull_smbXsrv_open_replay_cache(struct ndr_pull *ndr, int ndr_flags, struct smbXsrv_open_replay_cache *r)
3805 : {
3806 316 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3807 316 : if (ndr_flags & NDR_SCALARS) {
3808 316 : NDR_CHECK(ndr_pull_align(ndr, 4));
3809 316 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->holder_req_guid));
3810 316 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->idle_time));
3811 316 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->local_id));
3812 316 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3813 : }
3814 316 : if (ndr_flags & NDR_BUFFERS) {
3815 : }
3816 316 : return NDR_ERR_SUCCESS;
3817 : }
3818 :
3819 0 : static void ndr_print_flags_smbXsrv_open_replay_cache(struct ndr_print *ndr, const char *name, int unused, const struct smbXsrv_open_replay_cache *r)
3820 : {
3821 0 : ndr_print_smbXsrv_open_replay_cache(ndr, name, r);
3822 0 : }
3823 :
3824 0 : _PUBLIC_ void ndr_print_smbXsrv_open_replay_cache(struct ndr_print *ndr, const char *name, const struct smbXsrv_open_replay_cache *r)
3825 : {
3826 0 : ndr_print_struct(ndr, name, "smbXsrv_open_replay_cache");
3827 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3828 0 : ndr->depth++;
3829 0 : ndr_print_GUID(ndr, "holder_req_guid", &r->holder_req_guid);
3830 0 : ndr_print_NTTIME(ndr, "idle_time", r->idle_time);
3831 0 : ndr_print_uint32(ndr, "local_id", r->local_id);
3832 0 : ndr->depth--;
3833 : }
3834 :
3835 0 : static enum ndr_err_code ndr_push_smbXsrv_version_global_decode(struct ndr_push *ndr, int flags, const struct smbXsrv_version_global_decode *r)
3836 : {
3837 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3838 0 : if (flags & NDR_IN) {
3839 0 : NDR_CHECK(ndr_push_smbXsrv_version_globalB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3840 : }
3841 0 : if (flags & NDR_OUT) {
3842 : }
3843 0 : return NDR_ERR_SUCCESS;
3844 : }
3845 :
3846 0 : static enum ndr_err_code ndr_pull_smbXsrv_version_global_decode(struct ndr_pull *ndr, int flags, struct smbXsrv_version_global_decode *r)
3847 : {
3848 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3849 0 : if (flags & NDR_IN) {
3850 0 : NDR_CHECK(ndr_pull_smbXsrv_version_globalB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3851 : }
3852 0 : if (flags & NDR_OUT) {
3853 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3854 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3855 : }
3856 0 : return NDR_ERR_SUCCESS;
3857 : }
3858 :
3859 0 : _PUBLIC_ void ndr_print_smbXsrv_version_global_decode(struct ndr_print *ndr, const char *name, int flags, const struct smbXsrv_version_global_decode *r)
3860 : {
3861 0 : ndr_print_struct(ndr, name, "smbXsrv_version_global_decode");
3862 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3863 0 : ndr->depth++;
3864 0 : if (flags & NDR_SET_VALUES) {
3865 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3866 : }
3867 0 : if (flags & NDR_IN) {
3868 0 : ndr_print_struct(ndr, "in", "smbXsrv_version_global_decode");
3869 0 : ndr->depth++;
3870 0 : ndr_print_smbXsrv_version_globalB(ndr, "blob", &r->in.blob);
3871 0 : ndr->depth--;
3872 : }
3873 0 : if (flags & NDR_OUT) {
3874 0 : ndr_print_struct(ndr, "out", "smbXsrv_version_global_decode");
3875 0 : ndr->depth++;
3876 0 : ndr->depth--;
3877 : }
3878 0 : ndr->depth--;
3879 : }
3880 :
3881 0 : static enum ndr_err_code ndr_push_smbXsrv_client_global_decode(struct ndr_push *ndr, int flags, const struct smbXsrv_client_global_decode *r)
3882 : {
3883 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3884 0 : if (flags & NDR_IN) {
3885 0 : NDR_CHECK(ndr_push_smbXsrv_client_globalB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3886 : }
3887 0 : if (flags & NDR_OUT) {
3888 : }
3889 0 : return NDR_ERR_SUCCESS;
3890 : }
3891 :
3892 0 : static enum ndr_err_code ndr_pull_smbXsrv_client_global_decode(struct ndr_pull *ndr, int flags, struct smbXsrv_client_global_decode *r)
3893 : {
3894 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3895 0 : if (flags & NDR_IN) {
3896 0 : NDR_CHECK(ndr_pull_smbXsrv_client_globalB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3897 : }
3898 0 : if (flags & NDR_OUT) {
3899 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3900 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3901 : }
3902 0 : return NDR_ERR_SUCCESS;
3903 : }
3904 :
3905 0 : _PUBLIC_ void ndr_print_smbXsrv_client_global_decode(struct ndr_print *ndr, const char *name, int flags, const struct smbXsrv_client_global_decode *r)
3906 : {
3907 0 : ndr_print_struct(ndr, name, "smbXsrv_client_global_decode");
3908 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3909 0 : ndr->depth++;
3910 0 : if (flags & NDR_SET_VALUES) {
3911 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3912 : }
3913 0 : if (flags & NDR_IN) {
3914 0 : ndr_print_struct(ndr, "in", "smbXsrv_client_global_decode");
3915 0 : ndr->depth++;
3916 0 : ndr_print_smbXsrv_client_globalB(ndr, "blob", &r->in.blob);
3917 0 : ndr->depth--;
3918 : }
3919 0 : if (flags & NDR_OUT) {
3920 0 : ndr_print_struct(ndr, "out", "smbXsrv_client_global_decode");
3921 0 : ndr->depth++;
3922 0 : ndr->depth--;
3923 : }
3924 0 : ndr->depth--;
3925 : }
3926 :
3927 0 : static enum ndr_err_code ndr_push_smbXsrv_client_decode(struct ndr_push *ndr, int flags, const struct smbXsrv_client_decode *r)
3928 : {
3929 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3930 0 : if (flags & NDR_IN) {
3931 0 : NDR_CHECK(ndr_push_smbXsrv_clientB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3932 : }
3933 0 : if (flags & NDR_OUT) {
3934 : }
3935 0 : return NDR_ERR_SUCCESS;
3936 : }
3937 :
3938 0 : static enum ndr_err_code ndr_pull_smbXsrv_client_decode(struct ndr_pull *ndr, int flags, struct smbXsrv_client_decode *r)
3939 : {
3940 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3941 0 : if (flags & NDR_IN) {
3942 0 : NDR_CHECK(ndr_pull_smbXsrv_clientB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3943 : }
3944 0 : if (flags & NDR_OUT) {
3945 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3946 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3947 : }
3948 0 : return NDR_ERR_SUCCESS;
3949 : }
3950 :
3951 0 : _PUBLIC_ void ndr_print_smbXsrv_client_decode(struct ndr_print *ndr, const char *name, int flags, const struct smbXsrv_client_decode *r)
3952 : {
3953 0 : ndr_print_struct(ndr, name, "smbXsrv_client_decode");
3954 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3955 0 : ndr->depth++;
3956 0 : if (flags & NDR_SET_VALUES) {
3957 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3958 : }
3959 0 : if (flags & NDR_IN) {
3960 0 : ndr_print_struct(ndr, "in", "smbXsrv_client_decode");
3961 0 : ndr->depth++;
3962 0 : ndr_print_smbXsrv_clientB(ndr, "blob", &r->in.blob);
3963 0 : ndr->depth--;
3964 : }
3965 0 : if (flags & NDR_OUT) {
3966 0 : ndr_print_struct(ndr, "out", "smbXsrv_client_decode");
3967 0 : ndr->depth++;
3968 0 : ndr->depth--;
3969 : }
3970 0 : ndr->depth--;
3971 : }
3972 :
3973 0 : static enum ndr_err_code ndr_push_smbXsrv_connection_pass_decode(struct ndr_push *ndr, int flags, const struct smbXsrv_connection_pass_decode *r)
3974 : {
3975 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3976 0 : if (flags & NDR_IN) {
3977 0 : NDR_CHECK(ndr_push_smbXsrv_connection_passB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3978 : }
3979 0 : if (flags & NDR_OUT) {
3980 : }
3981 0 : return NDR_ERR_SUCCESS;
3982 : }
3983 :
3984 0 : static enum ndr_err_code ndr_pull_smbXsrv_connection_pass_decode(struct ndr_pull *ndr, int flags, struct smbXsrv_connection_pass_decode *r)
3985 : {
3986 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3987 0 : if (flags & NDR_IN) {
3988 0 : NDR_CHECK(ndr_pull_smbXsrv_connection_passB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3989 : }
3990 0 : if (flags & NDR_OUT) {
3991 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3992 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3993 : }
3994 0 : return NDR_ERR_SUCCESS;
3995 : }
3996 :
3997 0 : _PUBLIC_ void ndr_print_smbXsrv_connection_pass_decode(struct ndr_print *ndr, const char *name, int flags, const struct smbXsrv_connection_pass_decode *r)
3998 : {
3999 0 : ndr_print_struct(ndr, name, "smbXsrv_connection_pass_decode");
4000 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4001 0 : ndr->depth++;
4002 0 : if (flags & NDR_SET_VALUES) {
4003 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4004 : }
4005 0 : if (flags & NDR_IN) {
4006 0 : ndr_print_struct(ndr, "in", "smbXsrv_connection_pass_decode");
4007 0 : ndr->depth++;
4008 0 : ndr_print_smbXsrv_connection_passB(ndr, "blob", &r->in.blob);
4009 0 : ndr->depth--;
4010 : }
4011 0 : if (flags & NDR_OUT) {
4012 0 : ndr_print_struct(ndr, "out", "smbXsrv_connection_pass_decode");
4013 0 : ndr->depth++;
4014 0 : ndr->depth--;
4015 : }
4016 0 : ndr->depth--;
4017 : }
4018 :
4019 0 : static enum ndr_err_code ndr_push_smbXsrv_session_global_decode(struct ndr_push *ndr, int flags, const struct smbXsrv_session_global_decode *r)
4020 : {
4021 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4022 0 : if (flags & NDR_IN) {
4023 0 : NDR_CHECK(ndr_push_smbXsrv_session_globalB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4024 : }
4025 0 : if (flags & NDR_OUT) {
4026 : }
4027 0 : return NDR_ERR_SUCCESS;
4028 : }
4029 :
4030 0 : static enum ndr_err_code ndr_pull_smbXsrv_session_global_decode(struct ndr_pull *ndr, int flags, struct smbXsrv_session_global_decode *r)
4031 : {
4032 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4033 0 : if (flags & NDR_IN) {
4034 0 : NDR_CHECK(ndr_pull_smbXsrv_session_globalB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4035 : }
4036 0 : if (flags & NDR_OUT) {
4037 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4038 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4039 : }
4040 0 : return NDR_ERR_SUCCESS;
4041 : }
4042 :
4043 0 : _PUBLIC_ void ndr_print_smbXsrv_session_global_decode(struct ndr_print *ndr, const char *name, int flags, const struct smbXsrv_session_global_decode *r)
4044 : {
4045 0 : ndr_print_struct(ndr, name, "smbXsrv_session_global_decode");
4046 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4047 0 : ndr->depth++;
4048 0 : if (flags & NDR_SET_VALUES) {
4049 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4050 : }
4051 0 : if (flags & NDR_IN) {
4052 0 : ndr_print_struct(ndr, "in", "smbXsrv_session_global_decode");
4053 0 : ndr->depth++;
4054 0 : ndr_print_smbXsrv_session_globalB(ndr, "blob", &r->in.blob);
4055 0 : ndr->depth--;
4056 : }
4057 0 : if (flags & NDR_OUT) {
4058 0 : ndr_print_struct(ndr, "out", "smbXsrv_session_global_decode");
4059 0 : ndr->depth++;
4060 0 : ndr->depth--;
4061 : }
4062 0 : ndr->depth--;
4063 : }
4064 :
4065 0 : static enum ndr_err_code ndr_push_smbXsrv_session_decode(struct ndr_push *ndr, int flags, const struct smbXsrv_session_decode *r)
4066 : {
4067 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4068 0 : if (flags & NDR_IN) {
4069 0 : NDR_CHECK(ndr_push_smbXsrv_sessionB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4070 : }
4071 0 : if (flags & NDR_OUT) {
4072 : }
4073 0 : return NDR_ERR_SUCCESS;
4074 : }
4075 :
4076 0 : static enum ndr_err_code ndr_pull_smbXsrv_session_decode(struct ndr_pull *ndr, int flags, struct smbXsrv_session_decode *r)
4077 : {
4078 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4079 0 : if (flags & NDR_IN) {
4080 0 : NDR_CHECK(ndr_pull_smbXsrv_sessionB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4081 : }
4082 0 : if (flags & NDR_OUT) {
4083 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4084 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4085 : }
4086 0 : return NDR_ERR_SUCCESS;
4087 : }
4088 :
4089 0 : _PUBLIC_ void ndr_print_smbXsrv_session_decode(struct ndr_print *ndr, const char *name, int flags, const struct smbXsrv_session_decode *r)
4090 : {
4091 0 : ndr_print_struct(ndr, name, "smbXsrv_session_decode");
4092 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4093 0 : ndr->depth++;
4094 0 : if (flags & NDR_SET_VALUES) {
4095 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4096 : }
4097 0 : if (flags & NDR_IN) {
4098 0 : ndr_print_struct(ndr, "in", "smbXsrv_session_decode");
4099 0 : ndr->depth++;
4100 0 : ndr_print_smbXsrv_sessionB(ndr, "blob", &r->in.blob);
4101 0 : ndr->depth--;
4102 : }
4103 0 : if (flags & NDR_OUT) {
4104 0 : ndr_print_struct(ndr, "out", "smbXsrv_session_decode");
4105 0 : ndr->depth++;
4106 0 : ndr->depth--;
4107 : }
4108 0 : ndr->depth--;
4109 : }
4110 :
4111 0 : static enum ndr_err_code ndr_push_smbXsrv_session_close_decode(struct ndr_push *ndr, int flags, const struct smbXsrv_session_close_decode *r)
4112 : {
4113 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4114 0 : if (flags & NDR_IN) {
4115 0 : NDR_CHECK(ndr_push_smbXsrv_session_closeB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4116 : }
4117 0 : if (flags & NDR_OUT) {
4118 : }
4119 0 : return NDR_ERR_SUCCESS;
4120 : }
4121 :
4122 0 : static enum ndr_err_code ndr_pull_smbXsrv_session_close_decode(struct ndr_pull *ndr, int flags, struct smbXsrv_session_close_decode *r)
4123 : {
4124 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4125 0 : if (flags & NDR_IN) {
4126 0 : NDR_CHECK(ndr_pull_smbXsrv_session_closeB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4127 : }
4128 0 : if (flags & NDR_OUT) {
4129 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4130 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4131 : }
4132 0 : return NDR_ERR_SUCCESS;
4133 : }
4134 :
4135 0 : _PUBLIC_ void ndr_print_smbXsrv_session_close_decode(struct ndr_print *ndr, const char *name, int flags, const struct smbXsrv_session_close_decode *r)
4136 : {
4137 0 : ndr_print_struct(ndr, name, "smbXsrv_session_close_decode");
4138 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4139 0 : ndr->depth++;
4140 0 : if (flags & NDR_SET_VALUES) {
4141 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4142 : }
4143 0 : if (flags & NDR_IN) {
4144 0 : ndr_print_struct(ndr, "in", "smbXsrv_session_close_decode");
4145 0 : ndr->depth++;
4146 0 : ndr_print_smbXsrv_session_closeB(ndr, "blob", &r->in.blob);
4147 0 : ndr->depth--;
4148 : }
4149 0 : if (flags & NDR_OUT) {
4150 0 : ndr_print_struct(ndr, "out", "smbXsrv_session_close_decode");
4151 0 : ndr->depth++;
4152 0 : ndr->depth--;
4153 : }
4154 0 : ndr->depth--;
4155 : }
4156 :
4157 0 : static enum ndr_err_code ndr_push_smbXsrv_tcon_global_decode(struct ndr_push *ndr, int flags, const struct smbXsrv_tcon_global_decode *r)
4158 : {
4159 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4160 0 : if (flags & NDR_IN) {
4161 0 : NDR_CHECK(ndr_push_smbXsrv_tcon_globalB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4162 : }
4163 0 : if (flags & NDR_OUT) {
4164 : }
4165 0 : return NDR_ERR_SUCCESS;
4166 : }
4167 :
4168 0 : static enum ndr_err_code ndr_pull_smbXsrv_tcon_global_decode(struct ndr_pull *ndr, int flags, struct smbXsrv_tcon_global_decode *r)
4169 : {
4170 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4171 0 : if (flags & NDR_IN) {
4172 0 : NDR_CHECK(ndr_pull_smbXsrv_tcon_globalB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4173 : }
4174 0 : if (flags & NDR_OUT) {
4175 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4176 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4177 : }
4178 0 : return NDR_ERR_SUCCESS;
4179 : }
4180 :
4181 0 : _PUBLIC_ void ndr_print_smbXsrv_tcon_global_decode(struct ndr_print *ndr, const char *name, int flags, const struct smbXsrv_tcon_global_decode *r)
4182 : {
4183 0 : ndr_print_struct(ndr, name, "smbXsrv_tcon_global_decode");
4184 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4185 0 : ndr->depth++;
4186 0 : if (flags & NDR_SET_VALUES) {
4187 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4188 : }
4189 0 : if (flags & NDR_IN) {
4190 0 : ndr_print_struct(ndr, "in", "smbXsrv_tcon_global_decode");
4191 0 : ndr->depth++;
4192 0 : ndr_print_smbXsrv_tcon_globalB(ndr, "blob", &r->in.blob);
4193 0 : ndr->depth--;
4194 : }
4195 0 : if (flags & NDR_OUT) {
4196 0 : ndr_print_struct(ndr, "out", "smbXsrv_tcon_global_decode");
4197 0 : ndr->depth++;
4198 0 : ndr->depth--;
4199 : }
4200 0 : ndr->depth--;
4201 : }
4202 :
4203 0 : static enum ndr_err_code ndr_push_smbXsrv_tcon_decode(struct ndr_push *ndr, int flags, const struct smbXsrv_tcon_decode *r)
4204 : {
4205 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4206 0 : if (flags & NDR_IN) {
4207 0 : NDR_CHECK(ndr_push_smbXsrv_tconB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4208 : }
4209 0 : if (flags & NDR_OUT) {
4210 : }
4211 0 : return NDR_ERR_SUCCESS;
4212 : }
4213 :
4214 0 : static enum ndr_err_code ndr_pull_smbXsrv_tcon_decode(struct ndr_pull *ndr, int flags, struct smbXsrv_tcon_decode *r)
4215 : {
4216 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4217 0 : if (flags & NDR_IN) {
4218 0 : NDR_CHECK(ndr_pull_smbXsrv_tconB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4219 : }
4220 0 : if (flags & NDR_OUT) {
4221 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4222 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4223 : }
4224 0 : return NDR_ERR_SUCCESS;
4225 : }
4226 :
4227 0 : _PUBLIC_ void ndr_print_smbXsrv_tcon_decode(struct ndr_print *ndr, const char *name, int flags, const struct smbXsrv_tcon_decode *r)
4228 : {
4229 0 : ndr_print_struct(ndr, name, "smbXsrv_tcon_decode");
4230 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4231 0 : ndr->depth++;
4232 0 : if (flags & NDR_SET_VALUES) {
4233 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4234 : }
4235 0 : if (flags & NDR_IN) {
4236 0 : ndr_print_struct(ndr, "in", "smbXsrv_tcon_decode");
4237 0 : ndr->depth++;
4238 0 : ndr_print_smbXsrv_tconB(ndr, "blob", &r->in.blob);
4239 0 : ndr->depth--;
4240 : }
4241 0 : if (flags & NDR_OUT) {
4242 0 : ndr_print_struct(ndr, "out", "smbXsrv_tcon_decode");
4243 0 : ndr->depth++;
4244 0 : ndr->depth--;
4245 : }
4246 0 : ndr->depth--;
4247 : }
4248 :
4249 0 : static enum ndr_err_code ndr_push_smbXsrv_open_global_decode(struct ndr_push *ndr, int flags, const struct smbXsrv_open_global_decode *r)
4250 : {
4251 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4252 0 : if (flags & NDR_IN) {
4253 0 : NDR_CHECK(ndr_push_smbXsrv_open_globalB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4254 : }
4255 0 : if (flags & NDR_OUT) {
4256 : }
4257 0 : return NDR_ERR_SUCCESS;
4258 : }
4259 :
4260 0 : static enum ndr_err_code ndr_pull_smbXsrv_open_global_decode(struct ndr_pull *ndr, int flags, struct smbXsrv_open_global_decode *r)
4261 : {
4262 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4263 0 : if (flags & NDR_IN) {
4264 0 : NDR_CHECK(ndr_pull_smbXsrv_open_globalB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4265 : }
4266 0 : if (flags & NDR_OUT) {
4267 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4268 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4269 : }
4270 0 : return NDR_ERR_SUCCESS;
4271 : }
4272 :
4273 0 : _PUBLIC_ void ndr_print_smbXsrv_open_global_decode(struct ndr_print *ndr, const char *name, int flags, const struct smbXsrv_open_global_decode *r)
4274 : {
4275 0 : ndr_print_struct(ndr, name, "smbXsrv_open_global_decode");
4276 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4277 0 : ndr->depth++;
4278 0 : if (flags & NDR_SET_VALUES) {
4279 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4280 : }
4281 0 : if (flags & NDR_IN) {
4282 0 : ndr_print_struct(ndr, "in", "smbXsrv_open_global_decode");
4283 0 : ndr->depth++;
4284 0 : ndr_print_smbXsrv_open_globalB(ndr, "blob", &r->in.blob);
4285 0 : ndr->depth--;
4286 : }
4287 0 : if (flags & NDR_OUT) {
4288 0 : ndr_print_struct(ndr, "out", "smbXsrv_open_global_decode");
4289 0 : ndr->depth++;
4290 0 : ndr->depth--;
4291 : }
4292 0 : ndr->depth--;
4293 : }
4294 :
4295 0 : static enum ndr_err_code ndr_push_smbXsrv_open_decode(struct ndr_push *ndr, int flags, const struct smbXsrv_open_decode *r)
4296 : {
4297 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4298 0 : if (flags & NDR_IN) {
4299 0 : NDR_CHECK(ndr_push_smbXsrv_openB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4300 : }
4301 0 : if (flags & NDR_OUT) {
4302 : }
4303 0 : return NDR_ERR_SUCCESS;
4304 : }
4305 :
4306 0 : static enum ndr_err_code ndr_pull_smbXsrv_open_decode(struct ndr_pull *ndr, int flags, struct smbXsrv_open_decode *r)
4307 : {
4308 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4309 0 : if (flags & NDR_IN) {
4310 0 : NDR_CHECK(ndr_pull_smbXsrv_openB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4311 : }
4312 0 : if (flags & NDR_OUT) {
4313 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4314 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4315 : }
4316 0 : return NDR_ERR_SUCCESS;
4317 : }
4318 :
4319 0 : _PUBLIC_ void ndr_print_smbXsrv_open_decode(struct ndr_print *ndr, const char *name, int flags, const struct smbXsrv_open_decode *r)
4320 : {
4321 0 : ndr_print_struct(ndr, name, "smbXsrv_open_decode");
4322 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4323 0 : ndr->depth++;
4324 0 : if (flags & NDR_SET_VALUES) {
4325 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4326 : }
4327 0 : if (flags & NDR_IN) {
4328 0 : ndr_print_struct(ndr, "in", "smbXsrv_open_decode");
4329 0 : ndr->depth++;
4330 0 : ndr_print_smbXsrv_openB(ndr, "blob", &r->in.blob);
4331 0 : ndr->depth--;
4332 : }
4333 0 : if (flags & NDR_OUT) {
4334 0 : ndr_print_struct(ndr, "out", "smbXsrv_open_decode");
4335 0 : ndr->depth++;
4336 0 : ndr->depth--;
4337 : }
4338 0 : ndr->depth--;
4339 : }
4340 :
4341 : #ifndef SKIP_NDR_TABLE_smbXsrv
4342 : static const struct ndr_interface_public_struct smbXsrv_public_structs[] = {
4343 : {
4344 : .name = "smbXsrv_version_globalB",
4345 : .struct_size = sizeof(struct smbXsrv_version_globalB ),
4346 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_smbXsrv_version_globalB,
4347 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_version_globalB,
4348 : .ndr_print = (ndr_print_function_t) ndr_print_flags_smbXsrv_version_globalB,
4349 : },
4350 : {
4351 : .name = "smbXsrv_client_globalB",
4352 : .struct_size = sizeof(struct smbXsrv_client_globalB ),
4353 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_smbXsrv_client_globalB,
4354 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_client_globalB,
4355 : .ndr_print = (ndr_print_function_t) ndr_print_flags_smbXsrv_client_globalB,
4356 : },
4357 : {
4358 : .name = "smbXsrv_client",
4359 : .struct_size = sizeof(struct smbXsrv_client ),
4360 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_smbXsrv_client,
4361 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_client,
4362 : .ndr_print = (ndr_print_function_t) ndr_print_flags_smbXsrv_client,
4363 : },
4364 : {
4365 : .name = "smbXsrv_clientB",
4366 : .struct_size = sizeof(struct smbXsrv_clientB ),
4367 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_smbXsrv_clientB,
4368 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_clientB,
4369 : .ndr_print = (ndr_print_function_t) ndr_print_flags_smbXsrv_clientB,
4370 : },
4371 : {
4372 : .name = "smbXsrv_connection_passB",
4373 : .struct_size = sizeof(struct smbXsrv_connection_passB ),
4374 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_smbXsrv_connection_passB,
4375 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_connection_passB,
4376 : .ndr_print = (ndr_print_function_t) ndr_print_flags_smbXsrv_connection_passB,
4377 : },
4378 : {
4379 : .name = "smbXsrv_session_globalB",
4380 : .struct_size = sizeof(struct smbXsrv_session_globalB ),
4381 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_smbXsrv_session_globalB,
4382 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_session_globalB,
4383 : .ndr_print = (ndr_print_function_t) ndr_print_flags_smbXsrv_session_globalB,
4384 : },
4385 : {
4386 : .name = "smbXsrv_sessionB",
4387 : .struct_size = sizeof(struct smbXsrv_sessionB ),
4388 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_smbXsrv_sessionB,
4389 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_sessionB,
4390 : .ndr_print = (ndr_print_function_t) ndr_print_flags_smbXsrv_sessionB,
4391 : },
4392 : {
4393 : .name = "smbXsrv_session_closeB",
4394 : .struct_size = sizeof(struct smbXsrv_session_closeB ),
4395 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_smbXsrv_session_closeB,
4396 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_session_closeB,
4397 : .ndr_print = (ndr_print_function_t) ndr_print_flags_smbXsrv_session_closeB,
4398 : },
4399 : {
4400 : .name = "smbXsrv_tcon_globalB",
4401 : .struct_size = sizeof(struct smbXsrv_tcon_globalB ),
4402 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_smbXsrv_tcon_globalB,
4403 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_tcon_globalB,
4404 : .ndr_print = (ndr_print_function_t) ndr_print_flags_smbXsrv_tcon_globalB,
4405 : },
4406 : {
4407 : .name = "smbXsrv_tconB",
4408 : .struct_size = sizeof(struct smbXsrv_tconB ),
4409 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_smbXsrv_tconB,
4410 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_tconB,
4411 : .ndr_print = (ndr_print_function_t) ndr_print_flags_smbXsrv_tconB,
4412 : },
4413 : {
4414 : .name = "smbXsrv_open_globalB",
4415 : .struct_size = sizeof(struct smbXsrv_open_globalB ),
4416 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_smbXsrv_open_globalB,
4417 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_open_globalB,
4418 : .ndr_print = (ndr_print_function_t) ndr_print_flags_smbXsrv_open_globalB,
4419 : },
4420 : {
4421 : .name = "smbXsrv_openB",
4422 : .struct_size = sizeof(struct smbXsrv_openB ),
4423 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_smbXsrv_openB,
4424 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_openB,
4425 : .ndr_print = (ndr_print_function_t) ndr_print_flags_smbXsrv_openB,
4426 : },
4427 : {
4428 : .name = "smbXsrv_open_replay_cache",
4429 : .struct_size = sizeof(struct smbXsrv_open_replay_cache ),
4430 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_smbXsrv_open_replay_cache,
4431 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_open_replay_cache,
4432 : .ndr_print = (ndr_print_function_t) ndr_print_flags_smbXsrv_open_replay_cache,
4433 : },
4434 : { .name = NULL }
4435 : };
4436 :
4437 : static const struct ndr_interface_call smbXsrv_calls[] = {
4438 : {
4439 : "smbXsrv_version_global_decode",
4440 : sizeof(struct smbXsrv_version_global_decode),
4441 : (ndr_push_flags_fn_t) ndr_push_smbXsrv_version_global_decode,
4442 : (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_version_global_decode,
4443 : (ndr_print_function_t) ndr_print_smbXsrv_version_global_decode,
4444 : { 0, NULL },
4445 : { 0, NULL },
4446 : },
4447 : {
4448 : "smbXsrv_client_global_decode",
4449 : sizeof(struct smbXsrv_client_global_decode),
4450 : (ndr_push_flags_fn_t) ndr_push_smbXsrv_client_global_decode,
4451 : (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_client_global_decode,
4452 : (ndr_print_function_t) ndr_print_smbXsrv_client_global_decode,
4453 : { 0, NULL },
4454 : { 0, NULL },
4455 : },
4456 : {
4457 : "smbXsrv_client_decode",
4458 : sizeof(struct smbXsrv_client_decode),
4459 : (ndr_push_flags_fn_t) ndr_push_smbXsrv_client_decode,
4460 : (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_client_decode,
4461 : (ndr_print_function_t) ndr_print_smbXsrv_client_decode,
4462 : { 0, NULL },
4463 : { 0, NULL },
4464 : },
4465 : {
4466 : "smbXsrv_connection_pass_decode",
4467 : sizeof(struct smbXsrv_connection_pass_decode),
4468 : (ndr_push_flags_fn_t) ndr_push_smbXsrv_connection_pass_decode,
4469 : (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_connection_pass_decode,
4470 : (ndr_print_function_t) ndr_print_smbXsrv_connection_pass_decode,
4471 : { 0, NULL },
4472 : { 0, NULL },
4473 : },
4474 : {
4475 : "smbXsrv_session_global_decode",
4476 : sizeof(struct smbXsrv_session_global_decode),
4477 : (ndr_push_flags_fn_t) ndr_push_smbXsrv_session_global_decode,
4478 : (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_session_global_decode,
4479 : (ndr_print_function_t) ndr_print_smbXsrv_session_global_decode,
4480 : { 0, NULL },
4481 : { 0, NULL },
4482 : },
4483 : {
4484 : "smbXsrv_session_decode",
4485 : sizeof(struct smbXsrv_session_decode),
4486 : (ndr_push_flags_fn_t) ndr_push_smbXsrv_session_decode,
4487 : (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_session_decode,
4488 : (ndr_print_function_t) ndr_print_smbXsrv_session_decode,
4489 : { 0, NULL },
4490 : { 0, NULL },
4491 : },
4492 : {
4493 : "smbXsrv_session_close_decode",
4494 : sizeof(struct smbXsrv_session_close_decode),
4495 : (ndr_push_flags_fn_t) ndr_push_smbXsrv_session_close_decode,
4496 : (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_session_close_decode,
4497 : (ndr_print_function_t) ndr_print_smbXsrv_session_close_decode,
4498 : { 0, NULL },
4499 : { 0, NULL },
4500 : },
4501 : {
4502 : "smbXsrv_tcon_global_decode",
4503 : sizeof(struct smbXsrv_tcon_global_decode),
4504 : (ndr_push_flags_fn_t) ndr_push_smbXsrv_tcon_global_decode,
4505 : (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_tcon_global_decode,
4506 : (ndr_print_function_t) ndr_print_smbXsrv_tcon_global_decode,
4507 : { 0, NULL },
4508 : { 0, NULL },
4509 : },
4510 : {
4511 : "smbXsrv_tcon_decode",
4512 : sizeof(struct smbXsrv_tcon_decode),
4513 : (ndr_push_flags_fn_t) ndr_push_smbXsrv_tcon_decode,
4514 : (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_tcon_decode,
4515 : (ndr_print_function_t) ndr_print_smbXsrv_tcon_decode,
4516 : { 0, NULL },
4517 : { 0, NULL },
4518 : },
4519 : {
4520 : "smbXsrv_open_global_decode",
4521 : sizeof(struct smbXsrv_open_global_decode),
4522 : (ndr_push_flags_fn_t) ndr_push_smbXsrv_open_global_decode,
4523 : (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_open_global_decode,
4524 : (ndr_print_function_t) ndr_print_smbXsrv_open_global_decode,
4525 : { 0, NULL },
4526 : { 0, NULL },
4527 : },
4528 : {
4529 : "smbXsrv_open_decode",
4530 : sizeof(struct smbXsrv_open_decode),
4531 : (ndr_push_flags_fn_t) ndr_push_smbXsrv_open_decode,
4532 : (ndr_pull_flags_fn_t) ndr_pull_smbXsrv_open_decode,
4533 : (ndr_print_function_t) ndr_print_smbXsrv_open_decode,
4534 : { 0, NULL },
4535 : { 0, NULL },
4536 : },
4537 : { .name = NULL }
4538 : };
4539 :
4540 : static const char * const smbXsrv_endpoint_strings[] = {
4541 : "ncacn_np:[\\pipe\\smbXsrv]",
4542 : };
4543 :
4544 : static const struct ndr_interface_string_array smbXsrv_endpoints = {
4545 : .count = 1,
4546 : .names = smbXsrv_endpoint_strings
4547 : };
4548 :
4549 : static const char * const smbXsrv_authservice_strings[] = {
4550 : "host",
4551 : };
4552 :
4553 : static const struct ndr_interface_string_array smbXsrv_authservices = {
4554 : .count = 1,
4555 : .names = smbXsrv_authservice_strings
4556 : };
4557 :
4558 :
4559 : const struct ndr_interface_table ndr_table_smbXsrv = {
4560 : .name = "smbXsrv",
4561 : .syntax_id = {
4562 : {0x07408340,0xae31,0x11e1,{0x97,0xdc},{0x53,0x9f,0x7f,0xdd,0xc0,0x6f}},
4563 : NDR_SMBXSRV_VERSION
4564 : },
4565 : .helpstring = NDR_SMBXSRV_HELPSTRING,
4566 : .num_calls = 11,
4567 : .calls = smbXsrv_calls,
4568 : .num_public_structs = 13,
4569 : .public_structs = smbXsrv_public_structs,
4570 : .endpoints = &smbXsrv_endpoints,
4571 : .authservices = &smbXsrv_authservices
4572 : };
4573 :
4574 : #endif /* SKIP_NDR_TABLE_smbXsrv */
|