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