Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_wkssvc.h"
5 :
6 : #include "librpc/gen_ndr/ndr_srvsvc.h"
7 : #include "librpc/gen_ndr/ndr_lsa.h"
8 11 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo100(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo100 *r)
9 : {
10 11 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
11 11 : if (ndr_flags & NDR_SCALARS) {
12 11 : NDR_CHECK(ndr_push_align(ndr, 5));
13 11 : NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
14 11 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
15 11 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_name));
16 11 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_major));
17 11 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor));
18 11 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
19 : }
20 11 : if (ndr_flags & NDR_BUFFERS) {
21 11 : if (r->server_name) {
22 11 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
23 11 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
24 11 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
25 11 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
26 : }
27 11 : if (r->domain_name) {
28 11 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
29 11 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
30 11 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
31 11 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain_name, ndr_charset_length(r->domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
32 : }
33 : }
34 11 : return NDR_ERR_SUCCESS;
35 : }
36 :
37 10 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo100(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo100 *r)
38 : {
39 0 : uint32_t _ptr_server_name;
40 10 : uint32_t size_server_name_1 = 0;
41 10 : uint32_t length_server_name_1 = 0;
42 10 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
43 0 : uint32_t _ptr_domain_name;
44 10 : uint32_t size_domain_name_1 = 0;
45 10 : uint32_t length_domain_name_1 = 0;
46 10 : TALLOC_CTX *_mem_save_domain_name_0 = NULL;
47 10 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
48 10 : if (ndr_flags & NDR_SCALARS) {
49 10 : NDR_CHECK(ndr_pull_align(ndr, 5));
50 10 : NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
51 10 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
52 10 : if (_ptr_server_name) {
53 10 : NDR_PULL_ALLOC(ndr, r->server_name);
54 : } else {
55 0 : r->server_name = NULL;
56 : }
57 10 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
58 10 : if (_ptr_domain_name) {
59 10 : NDR_PULL_ALLOC(ndr, r->domain_name);
60 : } else {
61 0 : r->domain_name = NULL;
62 : }
63 10 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_major));
64 10 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_minor));
65 10 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
66 : }
67 10 : if (ndr_flags & NDR_BUFFERS) {
68 10 : if (r->server_name) {
69 10 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
70 10 : NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
71 10 : NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
72 10 : NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
73 10 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_name, &size_server_name_1));
74 10 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_name, &length_server_name_1));
75 10 : if (length_server_name_1 > size_server_name_1) {
76 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
77 : }
78 10 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
79 10 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
80 10 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
81 : }
82 10 : if (r->domain_name) {
83 10 : _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
84 10 : NDR_PULL_SET_MEM_CTX(ndr, r->domain_name, 0);
85 10 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain_name));
86 10 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain_name));
87 10 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain_name, &size_domain_name_1));
88 10 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain_name, &length_domain_name_1));
89 10 : if (length_domain_name_1 > size_domain_name_1) {
90 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
91 : }
92 10 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
93 10 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
94 10 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
95 : }
96 : }
97 10 : return NDR_ERR_SUCCESS;
98 : }
99 :
100 2 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo100(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo100 *r)
101 : {
102 2 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo100");
103 2 : if (r == NULL) { ndr_print_null(ndr); return; }
104 2 : ndr->depth++;
105 2 : ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
106 2 : ndr_print_ptr(ndr, "server_name", r->server_name);
107 2 : ndr->depth++;
108 2 : if (r->server_name) {
109 2 : ndr_print_string(ndr, "server_name", r->server_name);
110 : }
111 2 : ndr->depth--;
112 2 : ndr_print_ptr(ndr, "domain_name", r->domain_name);
113 2 : ndr->depth++;
114 2 : if (r->domain_name) {
115 2 : ndr_print_string(ndr, "domain_name", r->domain_name);
116 : }
117 2 : ndr->depth--;
118 2 : ndr_print_uint32(ndr, "version_major", r->version_major);
119 2 : ndr_print_uint32(ndr, "version_minor", r->version_minor);
120 2 : ndr->depth--;
121 : }
122 :
123 7 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo101(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo101 *r)
124 : {
125 7 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
126 7 : if (ndr_flags & NDR_SCALARS) {
127 7 : NDR_CHECK(ndr_push_align(ndr, 5));
128 7 : NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
129 7 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
130 7 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_name));
131 7 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_major));
132 7 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor));
133 7 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->lan_root));
134 7 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
135 : }
136 7 : if (ndr_flags & NDR_BUFFERS) {
137 7 : if (r->server_name) {
138 7 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
139 7 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
140 7 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
141 7 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
142 : }
143 7 : if (r->domain_name) {
144 7 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
145 7 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
146 7 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
147 7 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain_name, ndr_charset_length(r->domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
148 : }
149 7 : if (r->lan_root) {
150 7 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->lan_root, CH_UTF16)));
151 7 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
152 7 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->lan_root, CH_UTF16)));
153 7 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->lan_root, ndr_charset_length(r->lan_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
154 : }
155 : }
156 7 : return NDR_ERR_SUCCESS;
157 : }
158 :
159 6 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo101(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo101 *r)
160 : {
161 0 : uint32_t _ptr_server_name;
162 6 : uint32_t size_server_name_1 = 0;
163 6 : uint32_t length_server_name_1 = 0;
164 6 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
165 0 : uint32_t _ptr_domain_name;
166 6 : uint32_t size_domain_name_1 = 0;
167 6 : uint32_t length_domain_name_1 = 0;
168 6 : TALLOC_CTX *_mem_save_domain_name_0 = NULL;
169 0 : uint32_t _ptr_lan_root;
170 6 : uint32_t size_lan_root_1 = 0;
171 6 : uint32_t length_lan_root_1 = 0;
172 6 : TALLOC_CTX *_mem_save_lan_root_0 = NULL;
173 6 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
174 6 : if (ndr_flags & NDR_SCALARS) {
175 6 : NDR_CHECK(ndr_pull_align(ndr, 5));
176 6 : NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
177 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
178 6 : if (_ptr_server_name) {
179 6 : NDR_PULL_ALLOC(ndr, r->server_name);
180 : } else {
181 0 : r->server_name = NULL;
182 : }
183 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
184 6 : if (_ptr_domain_name) {
185 6 : NDR_PULL_ALLOC(ndr, r->domain_name);
186 : } else {
187 0 : r->domain_name = NULL;
188 : }
189 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_major));
190 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_minor));
191 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lan_root));
192 6 : if (_ptr_lan_root) {
193 6 : NDR_PULL_ALLOC(ndr, r->lan_root);
194 : } else {
195 0 : r->lan_root = NULL;
196 : }
197 6 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
198 : }
199 6 : if (ndr_flags & NDR_BUFFERS) {
200 6 : if (r->server_name) {
201 6 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
202 6 : NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
203 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
204 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
205 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_name, &size_server_name_1));
206 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_name, &length_server_name_1));
207 6 : if (length_server_name_1 > size_server_name_1) {
208 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
209 : }
210 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
211 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
212 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
213 : }
214 6 : if (r->domain_name) {
215 6 : _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
216 6 : NDR_PULL_SET_MEM_CTX(ndr, r->domain_name, 0);
217 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain_name));
218 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain_name));
219 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain_name, &size_domain_name_1));
220 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain_name, &length_domain_name_1));
221 6 : if (length_domain_name_1 > size_domain_name_1) {
222 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
223 : }
224 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
225 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
226 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
227 : }
228 6 : if (r->lan_root) {
229 6 : _mem_save_lan_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
230 6 : NDR_PULL_SET_MEM_CTX(ndr, r->lan_root, 0);
231 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->lan_root));
232 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->lan_root));
233 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->lan_root, &size_lan_root_1));
234 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->lan_root, &length_lan_root_1));
235 6 : if (length_lan_root_1 > size_lan_root_1) {
236 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_lan_root_1, length_lan_root_1);
237 : }
238 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_lan_root_1, sizeof(uint16_t)));
239 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->lan_root, length_lan_root_1, sizeof(uint16_t), CH_UTF16));
240 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lan_root_0, 0);
241 : }
242 : }
243 6 : return NDR_ERR_SUCCESS;
244 : }
245 :
246 2 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo101(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo101 *r)
247 : {
248 2 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo101");
249 2 : if (r == NULL) { ndr_print_null(ndr); return; }
250 2 : ndr->depth++;
251 2 : ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
252 2 : ndr_print_ptr(ndr, "server_name", r->server_name);
253 2 : ndr->depth++;
254 2 : if (r->server_name) {
255 2 : ndr_print_string(ndr, "server_name", r->server_name);
256 : }
257 2 : ndr->depth--;
258 2 : ndr_print_ptr(ndr, "domain_name", r->domain_name);
259 2 : ndr->depth++;
260 2 : if (r->domain_name) {
261 2 : ndr_print_string(ndr, "domain_name", r->domain_name);
262 : }
263 2 : ndr->depth--;
264 2 : ndr_print_uint32(ndr, "version_major", r->version_major);
265 2 : ndr_print_uint32(ndr, "version_minor", r->version_minor);
266 2 : ndr_print_ptr(ndr, "lan_root", r->lan_root);
267 2 : ndr->depth++;
268 2 : if (r->lan_root) {
269 2 : ndr_print_string(ndr, "lan_root", r->lan_root);
270 : }
271 2 : ndr->depth--;
272 2 : ndr->depth--;
273 : }
274 :
275 2 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo102(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo102 *r)
276 : {
277 2 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
278 2 : if (ndr_flags & NDR_SCALARS) {
279 2 : NDR_CHECK(ndr_push_align(ndr, 5));
280 2 : NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
281 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
282 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_name));
283 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_major));
284 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor));
285 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->lan_root));
286 2 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logged_on_users));
287 2 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
288 : }
289 2 : if (ndr_flags & NDR_BUFFERS) {
290 2 : if (r->server_name) {
291 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
292 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
293 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
294 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
295 : }
296 2 : if (r->domain_name) {
297 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
298 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
299 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
300 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain_name, ndr_charset_length(r->domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
301 : }
302 2 : if (r->lan_root) {
303 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->lan_root, CH_UTF16)));
304 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
305 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->lan_root, CH_UTF16)));
306 2 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->lan_root, ndr_charset_length(r->lan_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
307 : }
308 : }
309 2 : return NDR_ERR_SUCCESS;
310 : }
311 :
312 2 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo102(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo102 *r)
313 : {
314 0 : uint32_t _ptr_server_name;
315 2 : uint32_t size_server_name_1 = 0;
316 2 : uint32_t length_server_name_1 = 0;
317 2 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
318 0 : uint32_t _ptr_domain_name;
319 2 : uint32_t size_domain_name_1 = 0;
320 2 : uint32_t length_domain_name_1 = 0;
321 2 : TALLOC_CTX *_mem_save_domain_name_0 = NULL;
322 0 : uint32_t _ptr_lan_root;
323 2 : uint32_t size_lan_root_1 = 0;
324 2 : uint32_t length_lan_root_1 = 0;
325 2 : TALLOC_CTX *_mem_save_lan_root_0 = NULL;
326 2 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
327 2 : if (ndr_flags & NDR_SCALARS) {
328 2 : NDR_CHECK(ndr_pull_align(ndr, 5));
329 2 : NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
330 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
331 2 : if (_ptr_server_name) {
332 2 : NDR_PULL_ALLOC(ndr, r->server_name);
333 : } else {
334 0 : r->server_name = NULL;
335 : }
336 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
337 2 : if (_ptr_domain_name) {
338 2 : NDR_PULL_ALLOC(ndr, r->domain_name);
339 : } else {
340 0 : r->domain_name = NULL;
341 : }
342 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_major));
343 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_minor));
344 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lan_root));
345 2 : if (_ptr_lan_root) {
346 2 : NDR_PULL_ALLOC(ndr, r->lan_root);
347 : } else {
348 0 : r->lan_root = NULL;
349 : }
350 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logged_on_users));
351 2 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
352 : }
353 2 : if (ndr_flags & NDR_BUFFERS) {
354 2 : if (r->server_name) {
355 2 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
356 2 : NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
357 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
358 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
359 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_name, &size_server_name_1));
360 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_name, &length_server_name_1));
361 2 : if (length_server_name_1 > size_server_name_1) {
362 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
363 : }
364 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
365 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
366 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
367 : }
368 2 : if (r->domain_name) {
369 2 : _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
370 2 : NDR_PULL_SET_MEM_CTX(ndr, r->domain_name, 0);
371 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain_name));
372 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain_name));
373 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain_name, &size_domain_name_1));
374 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain_name, &length_domain_name_1));
375 2 : if (length_domain_name_1 > size_domain_name_1) {
376 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
377 : }
378 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
379 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
380 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
381 : }
382 2 : if (r->lan_root) {
383 2 : _mem_save_lan_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
384 2 : NDR_PULL_SET_MEM_CTX(ndr, r->lan_root, 0);
385 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->lan_root));
386 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->lan_root));
387 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->lan_root, &size_lan_root_1));
388 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->lan_root, &length_lan_root_1));
389 2 : if (length_lan_root_1 > size_lan_root_1) {
390 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_lan_root_1, length_lan_root_1);
391 : }
392 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_lan_root_1, sizeof(uint16_t)));
393 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->lan_root, length_lan_root_1, sizeof(uint16_t), CH_UTF16));
394 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lan_root_0, 0);
395 : }
396 : }
397 2 : return NDR_ERR_SUCCESS;
398 : }
399 :
400 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo102(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo102 *r)
401 : {
402 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo102");
403 0 : if (r == NULL) { ndr_print_null(ndr); return; }
404 0 : ndr->depth++;
405 0 : ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
406 0 : ndr_print_ptr(ndr, "server_name", r->server_name);
407 0 : ndr->depth++;
408 0 : if (r->server_name) {
409 0 : ndr_print_string(ndr, "server_name", r->server_name);
410 : }
411 0 : ndr->depth--;
412 0 : ndr_print_ptr(ndr, "domain_name", r->domain_name);
413 0 : ndr->depth++;
414 0 : if (r->domain_name) {
415 0 : ndr_print_string(ndr, "domain_name", r->domain_name);
416 : }
417 0 : ndr->depth--;
418 0 : ndr_print_uint32(ndr, "version_major", r->version_major);
419 0 : ndr_print_uint32(ndr, "version_minor", r->version_minor);
420 0 : ndr_print_ptr(ndr, "lan_root", r->lan_root);
421 0 : ndr->depth++;
422 0 : if (r->lan_root) {
423 0 : ndr_print_string(ndr, "lan_root", r->lan_root);
424 : }
425 0 : ndr->depth--;
426 0 : ndr_print_uint32(ndr, "logged_on_users", r->logged_on_users);
427 0 : ndr->depth--;
428 : }
429 :
430 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo502(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo502 *r)
431 : {
432 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
433 0 : if (ndr_flags & NDR_SCALARS) {
434 0 : NDR_CHECK(ndr_push_align(ndr, 4));
435 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->char_wait));
436 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->collection_time));
437 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maximum_collection_count));
438 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->keep_connection));
439 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_commands));
440 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->session_timeout));
441 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size_char_buf));
442 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_threads));
443 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lock_quota));
444 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lock_increment));
445 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lock_maximum));
446 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pipe_increment));
447 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pipe_maximum));
448 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cache_file_timeout));
449 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dormant_file_limit));
450 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->read_ahead_throughput));
451 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_mailslot_buffers));
452 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_srv_announce_buffers));
453 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_illegal_dgram_events));
454 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dgram_event_reset_freq));
455 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->log_election_packets));
456 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_opportunistic_locking));
457 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_unlock_behind));
458 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_close_behind));
459 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->buf_named_pipes));
460 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_lock_read_unlock));
461 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->utilize_nt_caching));
462 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_raw_read));
463 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_raw_write));
464 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_write_raw_data));
465 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_encryption));
466 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->buf_files_deny_write));
467 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->buf_read_only_files));
468 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->force_core_create_mode));
469 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_512_byte_max_transfer));
470 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
471 : }
472 0 : if (ndr_flags & NDR_BUFFERS) {
473 0 : }
474 0 : return NDR_ERR_SUCCESS;
475 : }
476 :
477 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo502(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo502 *r)
478 : {
479 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
480 0 : if (ndr_flags & NDR_SCALARS) {
481 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
482 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->char_wait));
483 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->collection_time));
484 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maximum_collection_count));
485 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->keep_connection));
486 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_commands));
487 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->session_timeout));
488 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size_char_buf));
489 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_threads));
490 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lock_quota));
491 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lock_increment));
492 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lock_maximum));
493 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pipe_increment));
494 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pipe_maximum));
495 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cache_file_timeout));
496 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dormant_file_limit));
497 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->read_ahead_throughput));
498 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_mailslot_buffers));
499 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_srv_announce_buffers));
500 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_illegal_dgram_events));
501 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dgram_event_reset_freq));
502 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->log_election_packets));
503 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_opportunistic_locking));
504 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_unlock_behind));
505 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_close_behind));
506 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->buf_named_pipes));
507 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_lock_read_unlock));
508 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->utilize_nt_caching));
509 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_raw_read));
510 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_raw_write));
511 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_write_raw_data));
512 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_encryption));
513 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->buf_files_deny_write));
514 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->buf_read_only_files));
515 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->force_core_create_mode));
516 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_512_byte_max_transfer));
517 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
518 : }
519 0 : if (ndr_flags & NDR_BUFFERS) {
520 0 : }
521 0 : return NDR_ERR_SUCCESS;
522 : }
523 :
524 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo502(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo502 *r)
525 : {
526 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo502");
527 0 : if (r == NULL) { ndr_print_null(ndr); return; }
528 0 : ndr->depth++;
529 0 : ndr_print_uint32(ndr, "char_wait", r->char_wait);
530 0 : ndr_print_uint32(ndr, "collection_time", r->collection_time);
531 0 : ndr_print_uint32(ndr, "maximum_collection_count", r->maximum_collection_count);
532 0 : ndr_print_uint32(ndr, "keep_connection", r->keep_connection);
533 0 : ndr_print_uint32(ndr, "max_commands", r->max_commands);
534 0 : ndr_print_uint32(ndr, "session_timeout", r->session_timeout);
535 0 : ndr_print_uint32(ndr, "size_char_buf", r->size_char_buf);
536 0 : ndr_print_uint32(ndr, "max_threads", r->max_threads);
537 0 : ndr_print_uint32(ndr, "lock_quota", r->lock_quota);
538 0 : ndr_print_uint32(ndr, "lock_increment", r->lock_increment);
539 0 : ndr_print_uint32(ndr, "lock_maximum", r->lock_maximum);
540 0 : ndr_print_uint32(ndr, "pipe_increment", r->pipe_increment);
541 0 : ndr_print_uint32(ndr, "pipe_maximum", r->pipe_maximum);
542 0 : ndr_print_uint32(ndr, "cache_file_timeout", r->cache_file_timeout);
543 0 : ndr_print_uint32(ndr, "dormant_file_limit", r->dormant_file_limit);
544 0 : ndr_print_uint32(ndr, "read_ahead_throughput", r->read_ahead_throughput);
545 0 : ndr_print_uint32(ndr, "num_mailslot_buffers", r->num_mailslot_buffers);
546 0 : ndr_print_uint32(ndr, "num_srv_announce_buffers", r->num_srv_announce_buffers);
547 0 : ndr_print_uint32(ndr, "max_illegal_dgram_events", r->max_illegal_dgram_events);
548 0 : ndr_print_uint32(ndr, "dgram_event_reset_freq", r->dgram_event_reset_freq);
549 0 : ndr_print_uint32(ndr, "log_election_packets", r->log_election_packets);
550 0 : ndr_print_uint32(ndr, "use_opportunistic_locking", r->use_opportunistic_locking);
551 0 : ndr_print_uint32(ndr, "use_unlock_behind", r->use_unlock_behind);
552 0 : ndr_print_uint32(ndr, "use_close_behind", r->use_close_behind);
553 0 : ndr_print_uint32(ndr, "buf_named_pipes", r->buf_named_pipes);
554 0 : ndr_print_uint32(ndr, "use_lock_read_unlock", r->use_lock_read_unlock);
555 0 : ndr_print_uint32(ndr, "utilize_nt_caching", r->utilize_nt_caching);
556 0 : ndr_print_uint32(ndr, "use_raw_read", r->use_raw_read);
557 0 : ndr_print_uint32(ndr, "use_raw_write", r->use_raw_write);
558 0 : ndr_print_uint32(ndr, "use_write_raw_data", r->use_write_raw_data);
559 0 : ndr_print_uint32(ndr, "use_encryption", r->use_encryption);
560 0 : ndr_print_uint32(ndr, "buf_files_deny_write", r->buf_files_deny_write);
561 0 : ndr_print_uint32(ndr, "buf_read_only_files", r->buf_read_only_files);
562 0 : ndr_print_uint32(ndr, "force_core_create_mode", r->force_core_create_mode);
563 0 : ndr_print_uint32(ndr, "use_512_byte_max_transfer", r->use_512_byte_max_transfer);
564 0 : ndr->depth--;
565 : }
566 :
567 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1010(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1010 *r)
568 : {
569 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
570 0 : if (ndr_flags & NDR_SCALARS) {
571 0 : NDR_CHECK(ndr_push_align(ndr, 4));
572 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->char_wait));
573 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
574 : }
575 0 : if (ndr_flags & NDR_BUFFERS) {
576 0 : }
577 0 : return NDR_ERR_SUCCESS;
578 : }
579 :
580 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1010(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1010 *r)
581 : {
582 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
583 0 : if (ndr_flags & NDR_SCALARS) {
584 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
585 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->char_wait));
586 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
587 : }
588 0 : if (ndr_flags & NDR_BUFFERS) {
589 0 : }
590 0 : return NDR_ERR_SUCCESS;
591 : }
592 :
593 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1010(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1010 *r)
594 : {
595 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1010");
596 0 : if (r == NULL) { ndr_print_null(ndr); return; }
597 0 : ndr->depth++;
598 0 : ndr_print_uint32(ndr, "char_wait", r->char_wait);
599 0 : ndr->depth--;
600 : }
601 :
602 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1011(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1011 *r)
603 : {
604 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
605 0 : if (ndr_flags & NDR_SCALARS) {
606 0 : NDR_CHECK(ndr_push_align(ndr, 4));
607 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->collection_time));
608 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
609 : }
610 0 : if (ndr_flags & NDR_BUFFERS) {
611 0 : }
612 0 : return NDR_ERR_SUCCESS;
613 : }
614 :
615 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1011(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1011 *r)
616 : {
617 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
618 0 : if (ndr_flags & NDR_SCALARS) {
619 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
620 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->collection_time));
621 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
622 : }
623 0 : if (ndr_flags & NDR_BUFFERS) {
624 0 : }
625 0 : return NDR_ERR_SUCCESS;
626 : }
627 :
628 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1011(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1011 *r)
629 : {
630 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1011");
631 0 : if (r == NULL) { ndr_print_null(ndr); return; }
632 0 : ndr->depth++;
633 0 : ndr_print_uint32(ndr, "collection_time", r->collection_time);
634 0 : ndr->depth--;
635 : }
636 :
637 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1012(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1012 *r)
638 : {
639 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
640 0 : if (ndr_flags & NDR_SCALARS) {
641 0 : NDR_CHECK(ndr_push_align(ndr, 4));
642 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maximum_collection_count));
643 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
644 : }
645 0 : if (ndr_flags & NDR_BUFFERS) {
646 0 : }
647 0 : return NDR_ERR_SUCCESS;
648 : }
649 :
650 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1012(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1012 *r)
651 : {
652 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
653 0 : if (ndr_flags & NDR_SCALARS) {
654 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
655 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maximum_collection_count));
656 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
657 : }
658 0 : if (ndr_flags & NDR_BUFFERS) {
659 0 : }
660 0 : return NDR_ERR_SUCCESS;
661 : }
662 :
663 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1012(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1012 *r)
664 : {
665 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1012");
666 0 : if (r == NULL) { ndr_print_null(ndr); return; }
667 0 : ndr->depth++;
668 0 : ndr_print_uint32(ndr, "maximum_collection_count", r->maximum_collection_count);
669 0 : ndr->depth--;
670 : }
671 :
672 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1013(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1013 *r)
673 : {
674 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
675 0 : if (ndr_flags & NDR_SCALARS) {
676 0 : NDR_CHECK(ndr_push_align(ndr, 4));
677 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->keep_connection));
678 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
679 : }
680 0 : if (ndr_flags & NDR_BUFFERS) {
681 0 : }
682 0 : return NDR_ERR_SUCCESS;
683 : }
684 :
685 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1013(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1013 *r)
686 : {
687 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
688 0 : if (ndr_flags & NDR_SCALARS) {
689 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
690 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->keep_connection));
691 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
692 : }
693 0 : if (ndr_flags & NDR_BUFFERS) {
694 0 : }
695 0 : return NDR_ERR_SUCCESS;
696 : }
697 :
698 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1013(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1013 *r)
699 : {
700 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1013");
701 0 : if (r == NULL) { ndr_print_null(ndr); return; }
702 0 : ndr->depth++;
703 0 : ndr_print_uint32(ndr, "keep_connection", r->keep_connection);
704 0 : ndr->depth--;
705 : }
706 :
707 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1018(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1018 *r)
708 : {
709 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
710 0 : if (ndr_flags & NDR_SCALARS) {
711 0 : NDR_CHECK(ndr_push_align(ndr, 4));
712 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->session_timeout));
713 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
714 : }
715 0 : if (ndr_flags & NDR_BUFFERS) {
716 0 : }
717 0 : return NDR_ERR_SUCCESS;
718 : }
719 :
720 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1018(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1018 *r)
721 : {
722 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
723 0 : if (ndr_flags & NDR_SCALARS) {
724 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
725 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->session_timeout));
726 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
727 : }
728 0 : if (ndr_flags & NDR_BUFFERS) {
729 0 : }
730 0 : return NDR_ERR_SUCCESS;
731 : }
732 :
733 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1018(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1018 *r)
734 : {
735 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1018");
736 0 : if (r == NULL) { ndr_print_null(ndr); return; }
737 0 : ndr->depth++;
738 0 : ndr_print_uint32(ndr, "session_timeout", r->session_timeout);
739 0 : ndr->depth--;
740 : }
741 :
742 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1023(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1023 *r)
743 : {
744 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
745 0 : if (ndr_flags & NDR_SCALARS) {
746 0 : NDR_CHECK(ndr_push_align(ndr, 4));
747 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size_char_buf));
748 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
749 : }
750 0 : if (ndr_flags & NDR_BUFFERS) {
751 0 : }
752 0 : return NDR_ERR_SUCCESS;
753 : }
754 :
755 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1023(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1023 *r)
756 : {
757 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
758 0 : if (ndr_flags & NDR_SCALARS) {
759 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
760 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size_char_buf));
761 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
762 : }
763 0 : if (ndr_flags & NDR_BUFFERS) {
764 0 : }
765 0 : return NDR_ERR_SUCCESS;
766 : }
767 :
768 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1023(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1023 *r)
769 : {
770 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1023");
771 0 : if (r == NULL) { ndr_print_null(ndr); return; }
772 0 : ndr->depth++;
773 0 : ndr_print_uint32(ndr, "size_char_buf", r->size_char_buf);
774 0 : ndr->depth--;
775 : }
776 :
777 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1027(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1027 *r)
778 : {
779 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
780 0 : if (ndr_flags & NDR_SCALARS) {
781 0 : NDR_CHECK(ndr_push_align(ndr, 4));
782 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->errorlog_sz));
783 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
784 : }
785 0 : if (ndr_flags & NDR_BUFFERS) {
786 0 : }
787 0 : return NDR_ERR_SUCCESS;
788 : }
789 :
790 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1027(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1027 *r)
791 : {
792 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
793 0 : if (ndr_flags & NDR_SCALARS) {
794 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
795 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->errorlog_sz));
796 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
797 : }
798 0 : if (ndr_flags & NDR_BUFFERS) {
799 0 : }
800 0 : return NDR_ERR_SUCCESS;
801 : }
802 :
803 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1027(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1027 *r)
804 : {
805 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1027");
806 0 : if (r == NULL) { ndr_print_null(ndr); return; }
807 0 : ndr->depth++;
808 0 : ndr_print_uint32(ndr, "errorlog_sz", r->errorlog_sz);
809 0 : ndr->depth--;
810 : }
811 :
812 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1028(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1028 *r)
813 : {
814 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
815 0 : if (ndr_flags & NDR_SCALARS) {
816 0 : NDR_CHECK(ndr_push_align(ndr, 4));
817 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->print_buf_time));
818 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
819 : }
820 0 : if (ndr_flags & NDR_BUFFERS) {
821 0 : }
822 0 : return NDR_ERR_SUCCESS;
823 : }
824 :
825 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1028(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1028 *r)
826 : {
827 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
828 0 : if (ndr_flags & NDR_SCALARS) {
829 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
830 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->print_buf_time));
831 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
832 : }
833 0 : if (ndr_flags & NDR_BUFFERS) {
834 0 : }
835 0 : return NDR_ERR_SUCCESS;
836 : }
837 :
838 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1028(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1028 *r)
839 : {
840 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1028");
841 0 : if (r == NULL) { ndr_print_null(ndr); return; }
842 0 : ndr->depth++;
843 0 : ndr_print_uint32(ndr, "print_buf_time", r->print_buf_time);
844 0 : ndr->depth--;
845 : }
846 :
847 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1032(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1032 *r)
848 : {
849 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
850 0 : if (ndr_flags & NDR_SCALARS) {
851 0 : NDR_CHECK(ndr_push_align(ndr, 4));
852 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->wrk_heuristics));
853 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
854 : }
855 0 : if (ndr_flags & NDR_BUFFERS) {
856 0 : }
857 0 : return NDR_ERR_SUCCESS;
858 : }
859 :
860 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1032(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1032 *r)
861 : {
862 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
863 0 : if (ndr_flags & NDR_SCALARS) {
864 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
865 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->wrk_heuristics));
866 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
867 : }
868 0 : if (ndr_flags & NDR_BUFFERS) {
869 0 : }
870 0 : return NDR_ERR_SUCCESS;
871 : }
872 :
873 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1032(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1032 *r)
874 : {
875 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1032");
876 0 : if (r == NULL) { ndr_print_null(ndr); return; }
877 0 : ndr->depth++;
878 0 : ndr_print_uint32(ndr, "wrk_heuristics", r->wrk_heuristics);
879 0 : ndr->depth--;
880 : }
881 :
882 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1033(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1033 *r)
883 : {
884 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
885 0 : if (ndr_flags & NDR_SCALARS) {
886 0 : NDR_CHECK(ndr_push_align(ndr, 4));
887 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_threads));
888 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
889 : }
890 0 : if (ndr_flags & NDR_BUFFERS) {
891 0 : }
892 0 : return NDR_ERR_SUCCESS;
893 : }
894 :
895 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1033(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1033 *r)
896 : {
897 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
898 0 : if (ndr_flags & NDR_SCALARS) {
899 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
900 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_threads));
901 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
902 : }
903 0 : if (ndr_flags & NDR_BUFFERS) {
904 0 : }
905 0 : return NDR_ERR_SUCCESS;
906 : }
907 :
908 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1033(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1033 *r)
909 : {
910 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1033");
911 0 : if (r == NULL) { ndr_print_null(ndr); return; }
912 0 : ndr->depth++;
913 0 : ndr_print_uint32(ndr, "max_threads", r->max_threads);
914 0 : ndr->depth--;
915 : }
916 :
917 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1041(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1041 *r)
918 : {
919 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
920 0 : if (ndr_flags & NDR_SCALARS) {
921 0 : NDR_CHECK(ndr_push_align(ndr, 4));
922 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lock_quota));
923 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
924 : }
925 0 : if (ndr_flags & NDR_BUFFERS) {
926 0 : }
927 0 : return NDR_ERR_SUCCESS;
928 : }
929 :
930 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1041(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1041 *r)
931 : {
932 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
933 0 : if (ndr_flags & NDR_SCALARS) {
934 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
935 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lock_quota));
936 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
937 : }
938 0 : if (ndr_flags & NDR_BUFFERS) {
939 0 : }
940 0 : return NDR_ERR_SUCCESS;
941 : }
942 :
943 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1041(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1041 *r)
944 : {
945 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1041");
946 0 : if (r == NULL) { ndr_print_null(ndr); return; }
947 0 : ndr->depth++;
948 0 : ndr_print_uint32(ndr, "lock_quota", r->lock_quota);
949 0 : ndr->depth--;
950 : }
951 :
952 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1042(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1042 *r)
953 : {
954 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
955 0 : if (ndr_flags & NDR_SCALARS) {
956 0 : NDR_CHECK(ndr_push_align(ndr, 4));
957 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lock_increment));
958 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
959 : }
960 0 : if (ndr_flags & NDR_BUFFERS) {
961 0 : }
962 0 : return NDR_ERR_SUCCESS;
963 : }
964 :
965 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1042(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1042 *r)
966 : {
967 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
968 0 : if (ndr_flags & NDR_SCALARS) {
969 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
970 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lock_increment));
971 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
972 : }
973 0 : if (ndr_flags & NDR_BUFFERS) {
974 0 : }
975 0 : return NDR_ERR_SUCCESS;
976 : }
977 :
978 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1042(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1042 *r)
979 : {
980 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1042");
981 0 : if (r == NULL) { ndr_print_null(ndr); return; }
982 0 : ndr->depth++;
983 0 : ndr_print_uint32(ndr, "lock_increment", r->lock_increment);
984 0 : ndr->depth--;
985 : }
986 :
987 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1043(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1043 *r)
988 : {
989 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
990 0 : if (ndr_flags & NDR_SCALARS) {
991 0 : NDR_CHECK(ndr_push_align(ndr, 4));
992 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lock_maximum));
993 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
994 : }
995 0 : if (ndr_flags & NDR_BUFFERS) {
996 0 : }
997 0 : return NDR_ERR_SUCCESS;
998 : }
999 :
1000 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1043(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1043 *r)
1001 : {
1002 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1003 0 : if (ndr_flags & NDR_SCALARS) {
1004 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1005 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lock_maximum));
1006 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1007 : }
1008 0 : if (ndr_flags & NDR_BUFFERS) {
1009 0 : }
1010 0 : return NDR_ERR_SUCCESS;
1011 : }
1012 :
1013 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1043(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1043 *r)
1014 : {
1015 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1043");
1016 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1017 0 : ndr->depth++;
1018 0 : ndr_print_uint32(ndr, "lock_maximum", r->lock_maximum);
1019 0 : ndr->depth--;
1020 : }
1021 :
1022 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1044(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1044 *r)
1023 : {
1024 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1025 0 : if (ndr_flags & NDR_SCALARS) {
1026 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1027 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pipe_increment));
1028 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1029 : }
1030 0 : if (ndr_flags & NDR_BUFFERS) {
1031 0 : }
1032 0 : return NDR_ERR_SUCCESS;
1033 : }
1034 :
1035 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1044(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1044 *r)
1036 : {
1037 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1038 0 : if (ndr_flags & NDR_SCALARS) {
1039 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1040 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pipe_increment));
1041 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1042 : }
1043 0 : if (ndr_flags & NDR_BUFFERS) {
1044 0 : }
1045 0 : return NDR_ERR_SUCCESS;
1046 : }
1047 :
1048 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1044(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1044 *r)
1049 : {
1050 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1044");
1051 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1052 0 : ndr->depth++;
1053 0 : ndr_print_uint32(ndr, "pipe_increment", r->pipe_increment);
1054 0 : ndr->depth--;
1055 : }
1056 :
1057 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1045(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1045 *r)
1058 : {
1059 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1060 0 : if (ndr_flags & NDR_SCALARS) {
1061 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1062 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pipe_maximum));
1063 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1064 : }
1065 0 : if (ndr_flags & NDR_BUFFERS) {
1066 0 : }
1067 0 : return NDR_ERR_SUCCESS;
1068 : }
1069 :
1070 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1045(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1045 *r)
1071 : {
1072 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1073 0 : if (ndr_flags & NDR_SCALARS) {
1074 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1075 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pipe_maximum));
1076 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1077 : }
1078 0 : if (ndr_flags & NDR_BUFFERS) {
1079 0 : }
1080 0 : return NDR_ERR_SUCCESS;
1081 : }
1082 :
1083 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1045(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1045 *r)
1084 : {
1085 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1045");
1086 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1087 0 : ndr->depth++;
1088 0 : ndr_print_uint32(ndr, "pipe_maximum", r->pipe_maximum);
1089 0 : ndr->depth--;
1090 : }
1091 :
1092 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1046(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1046 *r)
1093 : {
1094 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1095 0 : if (ndr_flags & NDR_SCALARS) {
1096 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1097 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dormant_file_limit));
1098 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1099 : }
1100 0 : if (ndr_flags & NDR_BUFFERS) {
1101 0 : }
1102 0 : return NDR_ERR_SUCCESS;
1103 : }
1104 :
1105 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1046(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1046 *r)
1106 : {
1107 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1108 0 : if (ndr_flags & NDR_SCALARS) {
1109 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1110 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dormant_file_limit));
1111 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1112 : }
1113 0 : if (ndr_flags & NDR_BUFFERS) {
1114 0 : }
1115 0 : return NDR_ERR_SUCCESS;
1116 : }
1117 :
1118 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1046(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1046 *r)
1119 : {
1120 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1046");
1121 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1122 0 : ndr->depth++;
1123 0 : ndr_print_uint32(ndr, "dormant_file_limit", r->dormant_file_limit);
1124 0 : ndr->depth--;
1125 : }
1126 :
1127 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1047(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1047 *r)
1128 : {
1129 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1130 0 : if (ndr_flags & NDR_SCALARS) {
1131 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1132 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cache_file_timeout));
1133 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1134 : }
1135 0 : if (ndr_flags & NDR_BUFFERS) {
1136 0 : }
1137 0 : return NDR_ERR_SUCCESS;
1138 : }
1139 :
1140 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1047(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1047 *r)
1141 : {
1142 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1143 0 : if (ndr_flags & NDR_SCALARS) {
1144 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1145 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cache_file_timeout));
1146 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1147 : }
1148 0 : if (ndr_flags & NDR_BUFFERS) {
1149 0 : }
1150 0 : return NDR_ERR_SUCCESS;
1151 : }
1152 :
1153 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1047(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1047 *r)
1154 : {
1155 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1047");
1156 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1157 0 : ndr->depth++;
1158 0 : ndr_print_uint32(ndr, "cache_file_timeout", r->cache_file_timeout);
1159 0 : ndr->depth--;
1160 : }
1161 :
1162 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1048(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1048 *r)
1163 : {
1164 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1165 0 : if (ndr_flags & NDR_SCALARS) {
1166 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1167 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_opportunistic_locking));
1168 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1169 : }
1170 0 : if (ndr_flags & NDR_BUFFERS) {
1171 0 : }
1172 0 : return NDR_ERR_SUCCESS;
1173 : }
1174 :
1175 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1048(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1048 *r)
1176 : {
1177 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1178 0 : if (ndr_flags & NDR_SCALARS) {
1179 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1180 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_opportunistic_locking));
1181 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1182 : }
1183 0 : if (ndr_flags & NDR_BUFFERS) {
1184 0 : }
1185 0 : return NDR_ERR_SUCCESS;
1186 : }
1187 :
1188 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1048(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1048 *r)
1189 : {
1190 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1048");
1191 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1192 0 : ndr->depth++;
1193 0 : ndr_print_uint32(ndr, "use_opportunistic_locking", r->use_opportunistic_locking);
1194 0 : ndr->depth--;
1195 : }
1196 :
1197 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1049(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1049 *r)
1198 : {
1199 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1200 0 : if (ndr_flags & NDR_SCALARS) {
1201 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1202 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_unlock_behind));
1203 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1204 : }
1205 0 : if (ndr_flags & NDR_BUFFERS) {
1206 0 : }
1207 0 : return NDR_ERR_SUCCESS;
1208 : }
1209 :
1210 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1049(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1049 *r)
1211 : {
1212 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1213 0 : if (ndr_flags & NDR_SCALARS) {
1214 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1215 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_unlock_behind));
1216 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1217 : }
1218 0 : if (ndr_flags & NDR_BUFFERS) {
1219 0 : }
1220 0 : return NDR_ERR_SUCCESS;
1221 : }
1222 :
1223 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1049(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1049 *r)
1224 : {
1225 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1049");
1226 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1227 0 : ndr->depth++;
1228 0 : ndr_print_uint32(ndr, "use_unlock_behind", r->use_unlock_behind);
1229 0 : ndr->depth--;
1230 : }
1231 :
1232 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1050(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1050 *r)
1233 : {
1234 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1235 0 : if (ndr_flags & NDR_SCALARS) {
1236 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1237 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_close_behind));
1238 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1239 : }
1240 0 : if (ndr_flags & NDR_BUFFERS) {
1241 0 : }
1242 0 : return NDR_ERR_SUCCESS;
1243 : }
1244 :
1245 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1050(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1050 *r)
1246 : {
1247 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1248 0 : if (ndr_flags & NDR_SCALARS) {
1249 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1250 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_close_behind));
1251 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1252 : }
1253 0 : if (ndr_flags & NDR_BUFFERS) {
1254 0 : }
1255 0 : return NDR_ERR_SUCCESS;
1256 : }
1257 :
1258 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1050(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1050 *r)
1259 : {
1260 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1050");
1261 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1262 0 : ndr->depth++;
1263 0 : ndr_print_uint32(ndr, "use_close_behind", r->use_close_behind);
1264 0 : ndr->depth--;
1265 : }
1266 :
1267 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1051(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1051 *r)
1268 : {
1269 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1270 0 : if (ndr_flags & NDR_SCALARS) {
1271 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1272 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->buf_named_pipes));
1273 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1274 : }
1275 0 : if (ndr_flags & NDR_BUFFERS) {
1276 0 : }
1277 0 : return NDR_ERR_SUCCESS;
1278 : }
1279 :
1280 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1051(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1051 *r)
1281 : {
1282 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1283 0 : if (ndr_flags & NDR_SCALARS) {
1284 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1285 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->buf_named_pipes));
1286 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1287 : }
1288 0 : if (ndr_flags & NDR_BUFFERS) {
1289 0 : }
1290 0 : return NDR_ERR_SUCCESS;
1291 : }
1292 :
1293 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1051(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1051 *r)
1294 : {
1295 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1051");
1296 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1297 0 : ndr->depth++;
1298 0 : ndr_print_uint32(ndr, "buf_named_pipes", r->buf_named_pipes);
1299 0 : ndr->depth--;
1300 : }
1301 :
1302 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1052(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1052 *r)
1303 : {
1304 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1305 0 : if (ndr_flags & NDR_SCALARS) {
1306 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1307 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_lock_read_unlock));
1308 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1309 : }
1310 0 : if (ndr_flags & NDR_BUFFERS) {
1311 0 : }
1312 0 : return NDR_ERR_SUCCESS;
1313 : }
1314 :
1315 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1052(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1052 *r)
1316 : {
1317 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1318 0 : if (ndr_flags & NDR_SCALARS) {
1319 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1320 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_lock_read_unlock));
1321 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1322 : }
1323 0 : if (ndr_flags & NDR_BUFFERS) {
1324 0 : }
1325 0 : return NDR_ERR_SUCCESS;
1326 : }
1327 :
1328 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1052(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1052 *r)
1329 : {
1330 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1052");
1331 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1332 0 : ndr->depth++;
1333 0 : ndr_print_uint32(ndr, "use_lock_read_unlock", r->use_lock_read_unlock);
1334 0 : ndr->depth--;
1335 : }
1336 :
1337 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1053(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1053 *r)
1338 : {
1339 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1340 0 : if (ndr_flags & NDR_SCALARS) {
1341 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1342 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->utilize_nt_caching));
1343 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1344 : }
1345 0 : if (ndr_flags & NDR_BUFFERS) {
1346 0 : }
1347 0 : return NDR_ERR_SUCCESS;
1348 : }
1349 :
1350 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1053(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1053 *r)
1351 : {
1352 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1353 0 : if (ndr_flags & NDR_SCALARS) {
1354 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1355 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->utilize_nt_caching));
1356 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1357 : }
1358 0 : if (ndr_flags & NDR_BUFFERS) {
1359 0 : }
1360 0 : return NDR_ERR_SUCCESS;
1361 : }
1362 :
1363 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1053(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1053 *r)
1364 : {
1365 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1053");
1366 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1367 0 : ndr->depth++;
1368 0 : ndr_print_uint32(ndr, "utilize_nt_caching", r->utilize_nt_caching);
1369 0 : ndr->depth--;
1370 : }
1371 :
1372 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1054(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1054 *r)
1373 : {
1374 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1375 0 : if (ndr_flags & NDR_SCALARS) {
1376 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1377 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_raw_read));
1378 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1379 : }
1380 0 : if (ndr_flags & NDR_BUFFERS) {
1381 0 : }
1382 0 : return NDR_ERR_SUCCESS;
1383 : }
1384 :
1385 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1054(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1054 *r)
1386 : {
1387 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1388 0 : if (ndr_flags & NDR_SCALARS) {
1389 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1390 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_raw_read));
1391 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1392 : }
1393 0 : if (ndr_flags & NDR_BUFFERS) {
1394 0 : }
1395 0 : return NDR_ERR_SUCCESS;
1396 : }
1397 :
1398 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1054(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1054 *r)
1399 : {
1400 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1054");
1401 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1402 0 : ndr->depth++;
1403 0 : ndr_print_uint32(ndr, "use_raw_read", r->use_raw_read);
1404 0 : ndr->depth--;
1405 : }
1406 :
1407 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1055(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1055 *r)
1408 : {
1409 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1410 0 : if (ndr_flags & NDR_SCALARS) {
1411 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1412 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_raw_write));
1413 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1414 : }
1415 0 : if (ndr_flags & NDR_BUFFERS) {
1416 0 : }
1417 0 : return NDR_ERR_SUCCESS;
1418 : }
1419 :
1420 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1055(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1055 *r)
1421 : {
1422 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1423 0 : if (ndr_flags & NDR_SCALARS) {
1424 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1425 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_raw_write));
1426 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1427 : }
1428 0 : if (ndr_flags & NDR_BUFFERS) {
1429 0 : }
1430 0 : return NDR_ERR_SUCCESS;
1431 : }
1432 :
1433 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1055(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1055 *r)
1434 : {
1435 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1055");
1436 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1437 0 : ndr->depth++;
1438 0 : ndr_print_uint32(ndr, "use_raw_write", r->use_raw_write);
1439 0 : ndr->depth--;
1440 : }
1441 :
1442 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1056(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1056 *r)
1443 : {
1444 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1445 0 : if (ndr_flags & NDR_SCALARS) {
1446 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1447 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_write_raw_data));
1448 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1449 : }
1450 0 : if (ndr_flags & NDR_BUFFERS) {
1451 0 : }
1452 0 : return NDR_ERR_SUCCESS;
1453 : }
1454 :
1455 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1056(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1056 *r)
1456 : {
1457 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1458 0 : if (ndr_flags & NDR_SCALARS) {
1459 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1460 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_write_raw_data));
1461 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1462 : }
1463 0 : if (ndr_flags & NDR_BUFFERS) {
1464 0 : }
1465 0 : return NDR_ERR_SUCCESS;
1466 : }
1467 :
1468 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1056(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1056 *r)
1469 : {
1470 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1056");
1471 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1472 0 : ndr->depth++;
1473 0 : ndr_print_uint32(ndr, "use_write_raw_data", r->use_write_raw_data);
1474 0 : ndr->depth--;
1475 : }
1476 :
1477 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1057(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1057 *r)
1478 : {
1479 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1480 0 : if (ndr_flags & NDR_SCALARS) {
1481 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1482 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_encryption));
1483 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1484 : }
1485 0 : if (ndr_flags & NDR_BUFFERS) {
1486 0 : }
1487 0 : return NDR_ERR_SUCCESS;
1488 : }
1489 :
1490 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1057(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1057 *r)
1491 : {
1492 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1493 0 : if (ndr_flags & NDR_SCALARS) {
1494 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1495 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_encryption));
1496 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1497 : }
1498 0 : if (ndr_flags & NDR_BUFFERS) {
1499 0 : }
1500 0 : return NDR_ERR_SUCCESS;
1501 : }
1502 :
1503 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1057(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1057 *r)
1504 : {
1505 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1057");
1506 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1507 0 : ndr->depth++;
1508 0 : ndr_print_uint32(ndr, "use_encryption", r->use_encryption);
1509 0 : ndr->depth--;
1510 : }
1511 :
1512 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1058(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1058 *r)
1513 : {
1514 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1515 0 : if (ndr_flags & NDR_SCALARS) {
1516 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1517 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->buf_files_deny_write));
1518 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1519 : }
1520 0 : if (ndr_flags & NDR_BUFFERS) {
1521 0 : }
1522 0 : return NDR_ERR_SUCCESS;
1523 : }
1524 :
1525 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1058(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1058 *r)
1526 : {
1527 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1528 0 : if (ndr_flags & NDR_SCALARS) {
1529 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1530 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->buf_files_deny_write));
1531 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1532 : }
1533 0 : if (ndr_flags & NDR_BUFFERS) {
1534 0 : }
1535 0 : return NDR_ERR_SUCCESS;
1536 : }
1537 :
1538 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1058(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1058 *r)
1539 : {
1540 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1058");
1541 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1542 0 : ndr->depth++;
1543 0 : ndr_print_uint32(ndr, "buf_files_deny_write", r->buf_files_deny_write);
1544 0 : ndr->depth--;
1545 : }
1546 :
1547 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1059(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1059 *r)
1548 : {
1549 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1550 0 : if (ndr_flags & NDR_SCALARS) {
1551 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1552 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->buf_read_only_files));
1553 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1554 : }
1555 0 : if (ndr_flags & NDR_BUFFERS) {
1556 0 : }
1557 0 : return NDR_ERR_SUCCESS;
1558 : }
1559 :
1560 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1059(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1059 *r)
1561 : {
1562 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1563 0 : if (ndr_flags & NDR_SCALARS) {
1564 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1565 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->buf_read_only_files));
1566 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1567 : }
1568 0 : if (ndr_flags & NDR_BUFFERS) {
1569 0 : }
1570 0 : return NDR_ERR_SUCCESS;
1571 : }
1572 :
1573 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1059(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1059 *r)
1574 : {
1575 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1059");
1576 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1577 0 : ndr->depth++;
1578 0 : ndr_print_uint32(ndr, "buf_read_only_files", r->buf_read_only_files);
1579 0 : ndr->depth--;
1580 : }
1581 :
1582 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1060(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1060 *r)
1583 : {
1584 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1585 0 : if (ndr_flags & NDR_SCALARS) {
1586 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1587 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->force_core_create_mode));
1588 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1589 : }
1590 0 : if (ndr_flags & NDR_BUFFERS) {
1591 0 : }
1592 0 : return NDR_ERR_SUCCESS;
1593 : }
1594 :
1595 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1060(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1060 *r)
1596 : {
1597 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1598 0 : if (ndr_flags & NDR_SCALARS) {
1599 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1600 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->force_core_create_mode));
1601 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1602 : }
1603 0 : if (ndr_flags & NDR_BUFFERS) {
1604 0 : }
1605 0 : return NDR_ERR_SUCCESS;
1606 : }
1607 :
1608 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1060(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1060 *r)
1609 : {
1610 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1060");
1611 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1612 0 : ndr->depth++;
1613 0 : ndr_print_uint32(ndr, "force_core_create_mode", r->force_core_create_mode);
1614 0 : ndr->depth--;
1615 : }
1616 :
1617 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1061(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1061 *r)
1618 : {
1619 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1620 0 : if (ndr_flags & NDR_SCALARS) {
1621 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1622 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_512_byte_max_transfer));
1623 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1624 : }
1625 0 : if (ndr_flags & NDR_BUFFERS) {
1626 0 : }
1627 0 : return NDR_ERR_SUCCESS;
1628 : }
1629 :
1630 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1061(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1061 *r)
1631 : {
1632 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1633 0 : if (ndr_flags & NDR_SCALARS) {
1634 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1635 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_512_byte_max_transfer));
1636 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1637 : }
1638 0 : if (ndr_flags & NDR_BUFFERS) {
1639 0 : }
1640 0 : return NDR_ERR_SUCCESS;
1641 : }
1642 :
1643 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1061(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1061 *r)
1644 : {
1645 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1061");
1646 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1647 0 : ndr->depth++;
1648 0 : ndr_print_uint32(ndr, "use_512_byte_max_transfer", r->use_512_byte_max_transfer);
1649 0 : ndr->depth--;
1650 : }
1651 :
1652 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1062(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaInfo1062 *r)
1653 : {
1654 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1655 0 : if (ndr_flags & NDR_SCALARS) {
1656 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1657 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->read_ahead_throughput));
1658 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1659 : }
1660 0 : if (ndr_flags & NDR_BUFFERS) {
1661 0 : }
1662 0 : return NDR_ERR_SUCCESS;
1663 : }
1664 :
1665 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1062(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaInfo1062 *r)
1666 : {
1667 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1668 0 : if (ndr_flags & NDR_SCALARS) {
1669 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1670 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->read_ahead_throughput));
1671 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1672 : }
1673 0 : if (ndr_flags & NDR_BUFFERS) {
1674 0 : }
1675 0 : return NDR_ERR_SUCCESS;
1676 : }
1677 :
1678 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1062(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaInfo1062 *r)
1679 : {
1680 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaInfo1062");
1681 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1682 0 : ndr->depth++;
1683 0 : ndr_print_uint32(ndr, "read_ahead_throughput", r->read_ahead_throughput);
1684 0 : ndr->depth--;
1685 : }
1686 :
1687 27 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union wkssvc_NetWkstaInfo *r)
1688 : {
1689 0 : uint32_t level;
1690 27 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1691 27 : if (ndr_flags & NDR_SCALARS) {
1692 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1693 27 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1694 27 : NDR_CHECK(ndr_push_union_align(ndr, 5));
1695 27 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1696 27 : NDR_CHECK(ndr_push_union_align(ndr, 5));
1697 27 : switch (level) {
1698 11 : case 100: {
1699 11 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100));
1700 11 : break; }
1701 :
1702 7 : case 101: {
1703 7 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101));
1704 7 : break; }
1705 :
1706 7 : case 102: {
1707 7 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102));
1708 7 : break; }
1709 :
1710 2 : case 502: {
1711 2 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info502));
1712 2 : break; }
1713 :
1714 0 : case 1010: {
1715 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1010));
1716 0 : break; }
1717 :
1718 0 : case 1011: {
1719 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1011));
1720 0 : break; }
1721 :
1722 0 : case 1012: {
1723 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1012));
1724 0 : break; }
1725 :
1726 0 : case 1013: {
1727 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1013));
1728 0 : break; }
1729 :
1730 0 : case 1018: {
1731 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1018));
1732 0 : break; }
1733 :
1734 0 : case 1023: {
1735 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1023));
1736 0 : break; }
1737 :
1738 0 : case 1027: {
1739 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1027));
1740 0 : break; }
1741 :
1742 0 : case 1028: {
1743 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1028));
1744 0 : break; }
1745 :
1746 0 : case 1032: {
1747 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1032));
1748 0 : break; }
1749 :
1750 0 : case 1033: {
1751 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1033));
1752 0 : break; }
1753 :
1754 0 : case 1041: {
1755 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1041));
1756 0 : break; }
1757 :
1758 0 : case 1042: {
1759 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1042));
1760 0 : break; }
1761 :
1762 0 : case 1043: {
1763 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1043));
1764 0 : break; }
1765 :
1766 0 : case 1044: {
1767 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1044));
1768 0 : break; }
1769 :
1770 0 : case 1045: {
1771 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1045));
1772 0 : break; }
1773 :
1774 0 : case 1046: {
1775 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1046));
1776 0 : break; }
1777 :
1778 0 : case 1047: {
1779 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1047));
1780 0 : break; }
1781 :
1782 0 : case 1048: {
1783 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1048));
1784 0 : break; }
1785 :
1786 0 : case 1049: {
1787 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1049));
1788 0 : break; }
1789 :
1790 0 : case 1050: {
1791 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1050));
1792 0 : break; }
1793 :
1794 0 : case 1051: {
1795 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1051));
1796 0 : break; }
1797 :
1798 0 : case 1052: {
1799 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1052));
1800 0 : break; }
1801 :
1802 0 : case 1053: {
1803 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1053));
1804 0 : break; }
1805 :
1806 0 : case 1054: {
1807 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1054));
1808 0 : break; }
1809 :
1810 0 : case 1055: {
1811 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1055));
1812 0 : break; }
1813 :
1814 0 : case 1056: {
1815 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1056));
1816 0 : break; }
1817 :
1818 0 : case 1057: {
1819 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1057));
1820 0 : break; }
1821 :
1822 0 : case 1058: {
1823 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1058));
1824 0 : break; }
1825 :
1826 0 : case 1059: {
1827 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1059));
1828 0 : break; }
1829 :
1830 0 : case 1060: {
1831 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1060));
1832 0 : break; }
1833 :
1834 0 : case 1061: {
1835 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1061));
1836 0 : break; }
1837 :
1838 0 : case 1062: {
1839 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1062));
1840 0 : break; }
1841 :
1842 0 : default: {
1843 0 : break; }
1844 :
1845 : }
1846 : }
1847 27 : if (ndr_flags & NDR_BUFFERS) {
1848 27 : if (!(ndr_flags & NDR_SCALARS)) {
1849 : /* We didn't get it above, and the token is not needed after this. */
1850 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1851 : }
1852 27 : switch (level) {
1853 11 : case 100:
1854 11 : if (r->info100) {
1855 11 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
1856 : }
1857 11 : break;
1858 :
1859 7 : case 101:
1860 7 : if (r->info101) {
1861 7 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo101(ndr, NDR_SCALARS|NDR_BUFFERS, r->info101));
1862 : }
1863 7 : break;
1864 :
1865 7 : case 102:
1866 7 : if (r->info102) {
1867 2 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo102(ndr, NDR_SCALARS|NDR_BUFFERS, r->info102));
1868 : }
1869 7 : break;
1870 :
1871 2 : case 502:
1872 2 : if (r->info502) {
1873 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo502(ndr, NDR_SCALARS, r->info502));
1874 : }
1875 2 : break;
1876 :
1877 0 : case 1010:
1878 0 : if (r->info1010) {
1879 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1010(ndr, NDR_SCALARS, r->info1010));
1880 : }
1881 0 : break;
1882 :
1883 0 : case 1011:
1884 0 : if (r->info1011) {
1885 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1011(ndr, NDR_SCALARS, r->info1011));
1886 : }
1887 0 : break;
1888 :
1889 0 : case 1012:
1890 0 : if (r->info1012) {
1891 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1012(ndr, NDR_SCALARS, r->info1012));
1892 : }
1893 0 : break;
1894 :
1895 0 : case 1013:
1896 0 : if (r->info1013) {
1897 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1013(ndr, NDR_SCALARS, r->info1013));
1898 : }
1899 0 : break;
1900 :
1901 0 : case 1018:
1902 0 : if (r->info1018) {
1903 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1018(ndr, NDR_SCALARS, r->info1018));
1904 : }
1905 0 : break;
1906 :
1907 0 : case 1023:
1908 0 : if (r->info1023) {
1909 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1023(ndr, NDR_SCALARS, r->info1023));
1910 : }
1911 0 : break;
1912 :
1913 0 : case 1027:
1914 0 : if (r->info1027) {
1915 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1027(ndr, NDR_SCALARS, r->info1027));
1916 : }
1917 0 : break;
1918 :
1919 0 : case 1028:
1920 0 : if (r->info1028) {
1921 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1028(ndr, NDR_SCALARS, r->info1028));
1922 : }
1923 0 : break;
1924 :
1925 0 : case 1032:
1926 0 : if (r->info1032) {
1927 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1032(ndr, NDR_SCALARS, r->info1032));
1928 : }
1929 0 : break;
1930 :
1931 0 : case 1033:
1932 0 : if (r->info1033) {
1933 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1033(ndr, NDR_SCALARS, r->info1033));
1934 : }
1935 0 : break;
1936 :
1937 0 : case 1041:
1938 0 : if (r->info1041) {
1939 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1041(ndr, NDR_SCALARS, r->info1041));
1940 : }
1941 0 : break;
1942 :
1943 0 : case 1042:
1944 0 : if (r->info1042) {
1945 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1042(ndr, NDR_SCALARS, r->info1042));
1946 : }
1947 0 : break;
1948 :
1949 0 : case 1043:
1950 0 : if (r->info1043) {
1951 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1043(ndr, NDR_SCALARS, r->info1043));
1952 : }
1953 0 : break;
1954 :
1955 0 : case 1044:
1956 0 : if (r->info1044) {
1957 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1044(ndr, NDR_SCALARS, r->info1044));
1958 : }
1959 0 : break;
1960 :
1961 0 : case 1045:
1962 0 : if (r->info1045) {
1963 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1045(ndr, NDR_SCALARS, r->info1045));
1964 : }
1965 0 : break;
1966 :
1967 0 : case 1046:
1968 0 : if (r->info1046) {
1969 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1046(ndr, NDR_SCALARS, r->info1046));
1970 : }
1971 0 : break;
1972 :
1973 0 : case 1047:
1974 0 : if (r->info1047) {
1975 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1047(ndr, NDR_SCALARS, r->info1047));
1976 : }
1977 0 : break;
1978 :
1979 0 : case 1048:
1980 0 : if (r->info1048) {
1981 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1048(ndr, NDR_SCALARS, r->info1048));
1982 : }
1983 0 : break;
1984 :
1985 0 : case 1049:
1986 0 : if (r->info1049) {
1987 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1049(ndr, NDR_SCALARS, r->info1049));
1988 : }
1989 0 : break;
1990 :
1991 0 : case 1050:
1992 0 : if (r->info1050) {
1993 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1050(ndr, NDR_SCALARS, r->info1050));
1994 : }
1995 0 : break;
1996 :
1997 0 : case 1051:
1998 0 : if (r->info1051) {
1999 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1051(ndr, NDR_SCALARS, r->info1051));
2000 : }
2001 0 : break;
2002 :
2003 0 : case 1052:
2004 0 : if (r->info1052) {
2005 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1052(ndr, NDR_SCALARS, r->info1052));
2006 : }
2007 0 : break;
2008 :
2009 0 : case 1053:
2010 0 : if (r->info1053) {
2011 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1053(ndr, NDR_SCALARS, r->info1053));
2012 : }
2013 0 : break;
2014 :
2015 0 : case 1054:
2016 0 : if (r->info1054) {
2017 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1054(ndr, NDR_SCALARS, r->info1054));
2018 : }
2019 0 : break;
2020 :
2021 0 : case 1055:
2022 0 : if (r->info1055) {
2023 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1055(ndr, NDR_SCALARS, r->info1055));
2024 : }
2025 0 : break;
2026 :
2027 0 : case 1056:
2028 0 : if (r->info1056) {
2029 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1056(ndr, NDR_SCALARS, r->info1056));
2030 : }
2031 0 : break;
2032 :
2033 0 : case 1057:
2034 0 : if (r->info1057) {
2035 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1057(ndr, NDR_SCALARS, r->info1057));
2036 : }
2037 0 : break;
2038 :
2039 0 : case 1058:
2040 0 : if (r->info1058) {
2041 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1058(ndr, NDR_SCALARS, r->info1058));
2042 : }
2043 0 : break;
2044 :
2045 0 : case 1059:
2046 0 : if (r->info1059) {
2047 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1059(ndr, NDR_SCALARS, r->info1059));
2048 : }
2049 0 : break;
2050 :
2051 0 : case 1060:
2052 0 : if (r->info1060) {
2053 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1060(ndr, NDR_SCALARS, r->info1060));
2054 : }
2055 0 : break;
2056 :
2057 0 : case 1061:
2058 0 : if (r->info1061) {
2059 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1061(ndr, NDR_SCALARS, r->info1061));
2060 : }
2061 0 : break;
2062 :
2063 0 : case 1062:
2064 0 : if (r->info1062) {
2065 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1062(ndr, NDR_SCALARS, r->info1062));
2066 : }
2067 0 : break;
2068 :
2069 0 : default:
2070 0 : break;
2071 :
2072 : }
2073 : }
2074 27 : return NDR_ERR_SUCCESS;
2075 : }
2076 :
2077 24 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union wkssvc_NetWkstaInfo *r)
2078 : {
2079 0 : uint32_t level;
2080 0 : uint32_t _level;
2081 24 : TALLOC_CTX *_mem_save_info100_0 = NULL;
2082 0 : uint32_t _ptr_info100;
2083 24 : TALLOC_CTX *_mem_save_info101_0 = NULL;
2084 0 : uint32_t _ptr_info101;
2085 24 : TALLOC_CTX *_mem_save_info102_0 = NULL;
2086 0 : uint32_t _ptr_info102;
2087 24 : TALLOC_CTX *_mem_save_info502_0 = NULL;
2088 0 : uint32_t _ptr_info502;
2089 24 : TALLOC_CTX *_mem_save_info1010_0 = NULL;
2090 0 : uint32_t _ptr_info1010;
2091 24 : TALLOC_CTX *_mem_save_info1011_0 = NULL;
2092 0 : uint32_t _ptr_info1011;
2093 24 : TALLOC_CTX *_mem_save_info1012_0 = NULL;
2094 0 : uint32_t _ptr_info1012;
2095 24 : TALLOC_CTX *_mem_save_info1013_0 = NULL;
2096 0 : uint32_t _ptr_info1013;
2097 24 : TALLOC_CTX *_mem_save_info1018_0 = NULL;
2098 0 : uint32_t _ptr_info1018;
2099 24 : TALLOC_CTX *_mem_save_info1023_0 = NULL;
2100 0 : uint32_t _ptr_info1023;
2101 24 : TALLOC_CTX *_mem_save_info1027_0 = NULL;
2102 0 : uint32_t _ptr_info1027;
2103 24 : TALLOC_CTX *_mem_save_info1028_0 = NULL;
2104 0 : uint32_t _ptr_info1028;
2105 24 : TALLOC_CTX *_mem_save_info1032_0 = NULL;
2106 0 : uint32_t _ptr_info1032;
2107 24 : TALLOC_CTX *_mem_save_info1033_0 = NULL;
2108 0 : uint32_t _ptr_info1033;
2109 24 : TALLOC_CTX *_mem_save_info1041_0 = NULL;
2110 0 : uint32_t _ptr_info1041;
2111 24 : TALLOC_CTX *_mem_save_info1042_0 = NULL;
2112 0 : uint32_t _ptr_info1042;
2113 24 : TALLOC_CTX *_mem_save_info1043_0 = NULL;
2114 0 : uint32_t _ptr_info1043;
2115 24 : TALLOC_CTX *_mem_save_info1044_0 = NULL;
2116 0 : uint32_t _ptr_info1044;
2117 24 : TALLOC_CTX *_mem_save_info1045_0 = NULL;
2118 0 : uint32_t _ptr_info1045;
2119 24 : TALLOC_CTX *_mem_save_info1046_0 = NULL;
2120 0 : uint32_t _ptr_info1046;
2121 24 : TALLOC_CTX *_mem_save_info1047_0 = NULL;
2122 0 : uint32_t _ptr_info1047;
2123 24 : TALLOC_CTX *_mem_save_info1048_0 = NULL;
2124 0 : uint32_t _ptr_info1048;
2125 24 : TALLOC_CTX *_mem_save_info1049_0 = NULL;
2126 0 : uint32_t _ptr_info1049;
2127 24 : TALLOC_CTX *_mem_save_info1050_0 = NULL;
2128 0 : uint32_t _ptr_info1050;
2129 24 : TALLOC_CTX *_mem_save_info1051_0 = NULL;
2130 0 : uint32_t _ptr_info1051;
2131 24 : TALLOC_CTX *_mem_save_info1052_0 = NULL;
2132 0 : uint32_t _ptr_info1052;
2133 24 : TALLOC_CTX *_mem_save_info1053_0 = NULL;
2134 0 : uint32_t _ptr_info1053;
2135 24 : TALLOC_CTX *_mem_save_info1054_0 = NULL;
2136 0 : uint32_t _ptr_info1054;
2137 24 : TALLOC_CTX *_mem_save_info1055_0 = NULL;
2138 0 : uint32_t _ptr_info1055;
2139 24 : TALLOC_CTX *_mem_save_info1056_0 = NULL;
2140 0 : uint32_t _ptr_info1056;
2141 24 : TALLOC_CTX *_mem_save_info1057_0 = NULL;
2142 0 : uint32_t _ptr_info1057;
2143 24 : TALLOC_CTX *_mem_save_info1058_0 = NULL;
2144 0 : uint32_t _ptr_info1058;
2145 24 : TALLOC_CTX *_mem_save_info1059_0 = NULL;
2146 0 : uint32_t _ptr_info1059;
2147 24 : TALLOC_CTX *_mem_save_info1060_0 = NULL;
2148 0 : uint32_t _ptr_info1060;
2149 24 : TALLOC_CTX *_mem_save_info1061_0 = NULL;
2150 0 : uint32_t _ptr_info1061;
2151 24 : TALLOC_CTX *_mem_save_info1062_0 = NULL;
2152 0 : uint32_t _ptr_info1062;
2153 24 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2154 24 : if (ndr_flags & NDR_SCALARS) {
2155 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2156 24 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2157 24 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
2158 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2159 24 : if (_level != level) {
2160 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
2161 : }
2162 24 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
2163 24 : switch (level) {
2164 10 : case 100: {
2165 10 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100));
2166 10 : if (_ptr_info100) {
2167 10 : NDR_PULL_ALLOC(ndr, r->info100);
2168 : } else {
2169 0 : r->info100 = NULL;
2170 : }
2171 10 : break; }
2172 :
2173 6 : case 101: {
2174 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info101));
2175 6 : if (_ptr_info101) {
2176 6 : NDR_PULL_ALLOC(ndr, r->info101);
2177 : } else {
2178 0 : r->info101 = NULL;
2179 : }
2180 6 : break; }
2181 :
2182 6 : case 102: {
2183 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info102));
2184 6 : if (_ptr_info102) {
2185 2 : NDR_PULL_ALLOC(ndr, r->info102);
2186 : } else {
2187 4 : r->info102 = NULL;
2188 : }
2189 6 : break; }
2190 :
2191 2 : case 502: {
2192 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info502));
2193 2 : if (_ptr_info502) {
2194 0 : NDR_PULL_ALLOC(ndr, r->info502);
2195 : } else {
2196 2 : r->info502 = NULL;
2197 : }
2198 2 : break; }
2199 :
2200 0 : case 1010: {
2201 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1010));
2202 0 : if (_ptr_info1010) {
2203 0 : NDR_PULL_ALLOC(ndr, r->info1010);
2204 : } else {
2205 0 : r->info1010 = NULL;
2206 : }
2207 0 : break; }
2208 :
2209 0 : case 1011: {
2210 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1011));
2211 0 : if (_ptr_info1011) {
2212 0 : NDR_PULL_ALLOC(ndr, r->info1011);
2213 : } else {
2214 0 : r->info1011 = NULL;
2215 : }
2216 0 : break; }
2217 :
2218 0 : case 1012: {
2219 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1012));
2220 0 : if (_ptr_info1012) {
2221 0 : NDR_PULL_ALLOC(ndr, r->info1012);
2222 : } else {
2223 0 : r->info1012 = NULL;
2224 : }
2225 0 : break; }
2226 :
2227 0 : case 1013: {
2228 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1013));
2229 0 : if (_ptr_info1013) {
2230 0 : NDR_PULL_ALLOC(ndr, r->info1013);
2231 : } else {
2232 0 : r->info1013 = NULL;
2233 : }
2234 0 : break; }
2235 :
2236 0 : case 1018: {
2237 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1018));
2238 0 : if (_ptr_info1018) {
2239 0 : NDR_PULL_ALLOC(ndr, r->info1018);
2240 : } else {
2241 0 : r->info1018 = NULL;
2242 : }
2243 0 : break; }
2244 :
2245 0 : case 1023: {
2246 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1023));
2247 0 : if (_ptr_info1023) {
2248 0 : NDR_PULL_ALLOC(ndr, r->info1023);
2249 : } else {
2250 0 : r->info1023 = NULL;
2251 : }
2252 0 : break; }
2253 :
2254 0 : case 1027: {
2255 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1027));
2256 0 : if (_ptr_info1027) {
2257 0 : NDR_PULL_ALLOC(ndr, r->info1027);
2258 : } else {
2259 0 : r->info1027 = NULL;
2260 : }
2261 0 : break; }
2262 :
2263 0 : case 1028: {
2264 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1028));
2265 0 : if (_ptr_info1028) {
2266 0 : NDR_PULL_ALLOC(ndr, r->info1028);
2267 : } else {
2268 0 : r->info1028 = NULL;
2269 : }
2270 0 : break; }
2271 :
2272 0 : case 1032: {
2273 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1032));
2274 0 : if (_ptr_info1032) {
2275 0 : NDR_PULL_ALLOC(ndr, r->info1032);
2276 : } else {
2277 0 : r->info1032 = NULL;
2278 : }
2279 0 : break; }
2280 :
2281 0 : case 1033: {
2282 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1033));
2283 0 : if (_ptr_info1033) {
2284 0 : NDR_PULL_ALLOC(ndr, r->info1033);
2285 : } else {
2286 0 : r->info1033 = NULL;
2287 : }
2288 0 : break; }
2289 :
2290 0 : case 1041: {
2291 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1041));
2292 0 : if (_ptr_info1041) {
2293 0 : NDR_PULL_ALLOC(ndr, r->info1041);
2294 : } else {
2295 0 : r->info1041 = NULL;
2296 : }
2297 0 : break; }
2298 :
2299 0 : case 1042: {
2300 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1042));
2301 0 : if (_ptr_info1042) {
2302 0 : NDR_PULL_ALLOC(ndr, r->info1042);
2303 : } else {
2304 0 : r->info1042 = NULL;
2305 : }
2306 0 : break; }
2307 :
2308 0 : case 1043: {
2309 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1043));
2310 0 : if (_ptr_info1043) {
2311 0 : NDR_PULL_ALLOC(ndr, r->info1043);
2312 : } else {
2313 0 : r->info1043 = NULL;
2314 : }
2315 0 : break; }
2316 :
2317 0 : case 1044: {
2318 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1044));
2319 0 : if (_ptr_info1044) {
2320 0 : NDR_PULL_ALLOC(ndr, r->info1044);
2321 : } else {
2322 0 : r->info1044 = NULL;
2323 : }
2324 0 : break; }
2325 :
2326 0 : case 1045: {
2327 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1045));
2328 0 : if (_ptr_info1045) {
2329 0 : NDR_PULL_ALLOC(ndr, r->info1045);
2330 : } else {
2331 0 : r->info1045 = NULL;
2332 : }
2333 0 : break; }
2334 :
2335 0 : case 1046: {
2336 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1046));
2337 0 : if (_ptr_info1046) {
2338 0 : NDR_PULL_ALLOC(ndr, r->info1046);
2339 : } else {
2340 0 : r->info1046 = NULL;
2341 : }
2342 0 : break; }
2343 :
2344 0 : case 1047: {
2345 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1047));
2346 0 : if (_ptr_info1047) {
2347 0 : NDR_PULL_ALLOC(ndr, r->info1047);
2348 : } else {
2349 0 : r->info1047 = NULL;
2350 : }
2351 0 : break; }
2352 :
2353 0 : case 1048: {
2354 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1048));
2355 0 : if (_ptr_info1048) {
2356 0 : NDR_PULL_ALLOC(ndr, r->info1048);
2357 : } else {
2358 0 : r->info1048 = NULL;
2359 : }
2360 0 : break; }
2361 :
2362 0 : case 1049: {
2363 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1049));
2364 0 : if (_ptr_info1049) {
2365 0 : NDR_PULL_ALLOC(ndr, r->info1049);
2366 : } else {
2367 0 : r->info1049 = NULL;
2368 : }
2369 0 : break; }
2370 :
2371 0 : case 1050: {
2372 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1050));
2373 0 : if (_ptr_info1050) {
2374 0 : NDR_PULL_ALLOC(ndr, r->info1050);
2375 : } else {
2376 0 : r->info1050 = NULL;
2377 : }
2378 0 : break; }
2379 :
2380 0 : case 1051: {
2381 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1051));
2382 0 : if (_ptr_info1051) {
2383 0 : NDR_PULL_ALLOC(ndr, r->info1051);
2384 : } else {
2385 0 : r->info1051 = NULL;
2386 : }
2387 0 : break; }
2388 :
2389 0 : case 1052: {
2390 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1052));
2391 0 : if (_ptr_info1052) {
2392 0 : NDR_PULL_ALLOC(ndr, r->info1052);
2393 : } else {
2394 0 : r->info1052 = NULL;
2395 : }
2396 0 : break; }
2397 :
2398 0 : case 1053: {
2399 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1053));
2400 0 : if (_ptr_info1053) {
2401 0 : NDR_PULL_ALLOC(ndr, r->info1053);
2402 : } else {
2403 0 : r->info1053 = NULL;
2404 : }
2405 0 : break; }
2406 :
2407 0 : case 1054: {
2408 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1054));
2409 0 : if (_ptr_info1054) {
2410 0 : NDR_PULL_ALLOC(ndr, r->info1054);
2411 : } else {
2412 0 : r->info1054 = NULL;
2413 : }
2414 0 : break; }
2415 :
2416 0 : case 1055: {
2417 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1055));
2418 0 : if (_ptr_info1055) {
2419 0 : NDR_PULL_ALLOC(ndr, r->info1055);
2420 : } else {
2421 0 : r->info1055 = NULL;
2422 : }
2423 0 : break; }
2424 :
2425 0 : case 1056: {
2426 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1056));
2427 0 : if (_ptr_info1056) {
2428 0 : NDR_PULL_ALLOC(ndr, r->info1056);
2429 : } else {
2430 0 : r->info1056 = NULL;
2431 : }
2432 0 : break; }
2433 :
2434 0 : case 1057: {
2435 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1057));
2436 0 : if (_ptr_info1057) {
2437 0 : NDR_PULL_ALLOC(ndr, r->info1057);
2438 : } else {
2439 0 : r->info1057 = NULL;
2440 : }
2441 0 : break; }
2442 :
2443 0 : case 1058: {
2444 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1058));
2445 0 : if (_ptr_info1058) {
2446 0 : NDR_PULL_ALLOC(ndr, r->info1058);
2447 : } else {
2448 0 : r->info1058 = NULL;
2449 : }
2450 0 : break; }
2451 :
2452 0 : case 1059: {
2453 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1059));
2454 0 : if (_ptr_info1059) {
2455 0 : NDR_PULL_ALLOC(ndr, r->info1059);
2456 : } else {
2457 0 : r->info1059 = NULL;
2458 : }
2459 0 : break; }
2460 :
2461 0 : case 1060: {
2462 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1060));
2463 0 : if (_ptr_info1060) {
2464 0 : NDR_PULL_ALLOC(ndr, r->info1060);
2465 : } else {
2466 0 : r->info1060 = NULL;
2467 : }
2468 0 : break; }
2469 :
2470 0 : case 1061: {
2471 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1061));
2472 0 : if (_ptr_info1061) {
2473 0 : NDR_PULL_ALLOC(ndr, r->info1061);
2474 : } else {
2475 0 : r->info1061 = NULL;
2476 : }
2477 0 : break; }
2478 :
2479 0 : case 1062: {
2480 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1062));
2481 0 : if (_ptr_info1062) {
2482 0 : NDR_PULL_ALLOC(ndr, r->info1062);
2483 : } else {
2484 0 : r->info1062 = NULL;
2485 : }
2486 0 : break; }
2487 :
2488 0 : default: {
2489 0 : break; }
2490 :
2491 : }
2492 : }
2493 24 : if (ndr_flags & NDR_BUFFERS) {
2494 24 : if (!(ndr_flags & NDR_SCALARS)) {
2495 : /* We didn't get it above, and the token is not needed after this. */
2496 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2497 : }
2498 24 : switch (level) {
2499 10 : case 100:
2500 10 : if (r->info100) {
2501 10 : _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr);
2502 10 : NDR_PULL_SET_MEM_CTX(ndr, r->info100, 0);
2503 10 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
2504 10 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info100_0, 0);
2505 : }
2506 10 : break;
2507 :
2508 6 : case 101:
2509 6 : if (r->info101) {
2510 6 : _mem_save_info101_0 = NDR_PULL_GET_MEM_CTX(ndr);
2511 6 : NDR_PULL_SET_MEM_CTX(ndr, r->info101, 0);
2512 6 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo101(ndr, NDR_SCALARS|NDR_BUFFERS, r->info101));
2513 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info101_0, 0);
2514 : }
2515 6 : break;
2516 :
2517 6 : case 102:
2518 6 : if (r->info102) {
2519 2 : _mem_save_info102_0 = NDR_PULL_GET_MEM_CTX(ndr);
2520 2 : NDR_PULL_SET_MEM_CTX(ndr, r->info102, 0);
2521 2 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo102(ndr, NDR_SCALARS|NDR_BUFFERS, r->info102));
2522 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info102_0, 0);
2523 : }
2524 6 : break;
2525 :
2526 2 : case 502:
2527 2 : if (r->info502) {
2528 0 : _mem_save_info502_0 = NDR_PULL_GET_MEM_CTX(ndr);
2529 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info502, 0);
2530 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo502(ndr, NDR_SCALARS, r->info502));
2531 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info502_0, 0);
2532 : }
2533 2 : break;
2534 :
2535 0 : case 1010:
2536 0 : if (r->info1010) {
2537 0 : _mem_save_info1010_0 = NDR_PULL_GET_MEM_CTX(ndr);
2538 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1010, 0);
2539 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1010(ndr, NDR_SCALARS, r->info1010));
2540 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1010_0, 0);
2541 : }
2542 0 : break;
2543 :
2544 0 : case 1011:
2545 0 : if (r->info1011) {
2546 0 : _mem_save_info1011_0 = NDR_PULL_GET_MEM_CTX(ndr);
2547 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1011, 0);
2548 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1011(ndr, NDR_SCALARS, r->info1011));
2549 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1011_0, 0);
2550 : }
2551 0 : break;
2552 :
2553 0 : case 1012:
2554 0 : if (r->info1012) {
2555 0 : _mem_save_info1012_0 = NDR_PULL_GET_MEM_CTX(ndr);
2556 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1012, 0);
2557 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1012(ndr, NDR_SCALARS, r->info1012));
2558 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1012_0, 0);
2559 : }
2560 0 : break;
2561 :
2562 0 : case 1013:
2563 0 : if (r->info1013) {
2564 0 : _mem_save_info1013_0 = NDR_PULL_GET_MEM_CTX(ndr);
2565 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1013, 0);
2566 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1013(ndr, NDR_SCALARS, r->info1013));
2567 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1013_0, 0);
2568 : }
2569 0 : break;
2570 :
2571 0 : case 1018:
2572 0 : if (r->info1018) {
2573 0 : _mem_save_info1018_0 = NDR_PULL_GET_MEM_CTX(ndr);
2574 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1018, 0);
2575 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1018(ndr, NDR_SCALARS, r->info1018));
2576 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1018_0, 0);
2577 : }
2578 0 : break;
2579 :
2580 0 : case 1023:
2581 0 : if (r->info1023) {
2582 0 : _mem_save_info1023_0 = NDR_PULL_GET_MEM_CTX(ndr);
2583 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1023, 0);
2584 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1023(ndr, NDR_SCALARS, r->info1023));
2585 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1023_0, 0);
2586 : }
2587 0 : break;
2588 :
2589 0 : case 1027:
2590 0 : if (r->info1027) {
2591 0 : _mem_save_info1027_0 = NDR_PULL_GET_MEM_CTX(ndr);
2592 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1027, 0);
2593 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1027(ndr, NDR_SCALARS, r->info1027));
2594 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1027_0, 0);
2595 : }
2596 0 : break;
2597 :
2598 0 : case 1028:
2599 0 : if (r->info1028) {
2600 0 : _mem_save_info1028_0 = NDR_PULL_GET_MEM_CTX(ndr);
2601 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1028, 0);
2602 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1028(ndr, NDR_SCALARS, r->info1028));
2603 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1028_0, 0);
2604 : }
2605 0 : break;
2606 :
2607 0 : case 1032:
2608 0 : if (r->info1032) {
2609 0 : _mem_save_info1032_0 = NDR_PULL_GET_MEM_CTX(ndr);
2610 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1032, 0);
2611 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1032(ndr, NDR_SCALARS, r->info1032));
2612 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1032_0, 0);
2613 : }
2614 0 : break;
2615 :
2616 0 : case 1033:
2617 0 : if (r->info1033) {
2618 0 : _mem_save_info1033_0 = NDR_PULL_GET_MEM_CTX(ndr);
2619 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1033, 0);
2620 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1033(ndr, NDR_SCALARS, r->info1033));
2621 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1033_0, 0);
2622 : }
2623 0 : break;
2624 :
2625 0 : case 1041:
2626 0 : if (r->info1041) {
2627 0 : _mem_save_info1041_0 = NDR_PULL_GET_MEM_CTX(ndr);
2628 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1041, 0);
2629 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1041(ndr, NDR_SCALARS, r->info1041));
2630 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1041_0, 0);
2631 : }
2632 0 : break;
2633 :
2634 0 : case 1042:
2635 0 : if (r->info1042) {
2636 0 : _mem_save_info1042_0 = NDR_PULL_GET_MEM_CTX(ndr);
2637 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1042, 0);
2638 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1042(ndr, NDR_SCALARS, r->info1042));
2639 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1042_0, 0);
2640 : }
2641 0 : break;
2642 :
2643 0 : case 1043:
2644 0 : if (r->info1043) {
2645 0 : _mem_save_info1043_0 = NDR_PULL_GET_MEM_CTX(ndr);
2646 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1043, 0);
2647 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1043(ndr, NDR_SCALARS, r->info1043));
2648 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1043_0, 0);
2649 : }
2650 0 : break;
2651 :
2652 0 : case 1044:
2653 0 : if (r->info1044) {
2654 0 : _mem_save_info1044_0 = NDR_PULL_GET_MEM_CTX(ndr);
2655 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1044, 0);
2656 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1044(ndr, NDR_SCALARS, r->info1044));
2657 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1044_0, 0);
2658 : }
2659 0 : break;
2660 :
2661 0 : case 1045:
2662 0 : if (r->info1045) {
2663 0 : _mem_save_info1045_0 = NDR_PULL_GET_MEM_CTX(ndr);
2664 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1045, 0);
2665 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1045(ndr, NDR_SCALARS, r->info1045));
2666 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1045_0, 0);
2667 : }
2668 0 : break;
2669 :
2670 0 : case 1046:
2671 0 : if (r->info1046) {
2672 0 : _mem_save_info1046_0 = NDR_PULL_GET_MEM_CTX(ndr);
2673 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1046, 0);
2674 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1046(ndr, NDR_SCALARS, r->info1046));
2675 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1046_0, 0);
2676 : }
2677 0 : break;
2678 :
2679 0 : case 1047:
2680 0 : if (r->info1047) {
2681 0 : _mem_save_info1047_0 = NDR_PULL_GET_MEM_CTX(ndr);
2682 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1047, 0);
2683 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1047(ndr, NDR_SCALARS, r->info1047));
2684 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1047_0, 0);
2685 : }
2686 0 : break;
2687 :
2688 0 : case 1048:
2689 0 : if (r->info1048) {
2690 0 : _mem_save_info1048_0 = NDR_PULL_GET_MEM_CTX(ndr);
2691 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1048, 0);
2692 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1048(ndr, NDR_SCALARS, r->info1048));
2693 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1048_0, 0);
2694 : }
2695 0 : break;
2696 :
2697 0 : case 1049:
2698 0 : if (r->info1049) {
2699 0 : _mem_save_info1049_0 = NDR_PULL_GET_MEM_CTX(ndr);
2700 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1049, 0);
2701 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1049(ndr, NDR_SCALARS, r->info1049));
2702 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1049_0, 0);
2703 : }
2704 0 : break;
2705 :
2706 0 : case 1050:
2707 0 : if (r->info1050) {
2708 0 : _mem_save_info1050_0 = NDR_PULL_GET_MEM_CTX(ndr);
2709 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1050, 0);
2710 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1050(ndr, NDR_SCALARS, r->info1050));
2711 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1050_0, 0);
2712 : }
2713 0 : break;
2714 :
2715 0 : case 1051:
2716 0 : if (r->info1051) {
2717 0 : _mem_save_info1051_0 = NDR_PULL_GET_MEM_CTX(ndr);
2718 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1051, 0);
2719 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1051(ndr, NDR_SCALARS, r->info1051));
2720 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1051_0, 0);
2721 : }
2722 0 : break;
2723 :
2724 0 : case 1052:
2725 0 : if (r->info1052) {
2726 0 : _mem_save_info1052_0 = NDR_PULL_GET_MEM_CTX(ndr);
2727 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1052, 0);
2728 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1052(ndr, NDR_SCALARS, r->info1052));
2729 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1052_0, 0);
2730 : }
2731 0 : break;
2732 :
2733 0 : case 1053:
2734 0 : if (r->info1053) {
2735 0 : _mem_save_info1053_0 = NDR_PULL_GET_MEM_CTX(ndr);
2736 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1053, 0);
2737 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1053(ndr, NDR_SCALARS, r->info1053));
2738 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1053_0, 0);
2739 : }
2740 0 : break;
2741 :
2742 0 : case 1054:
2743 0 : if (r->info1054) {
2744 0 : _mem_save_info1054_0 = NDR_PULL_GET_MEM_CTX(ndr);
2745 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1054, 0);
2746 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1054(ndr, NDR_SCALARS, r->info1054));
2747 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1054_0, 0);
2748 : }
2749 0 : break;
2750 :
2751 0 : case 1055:
2752 0 : if (r->info1055) {
2753 0 : _mem_save_info1055_0 = NDR_PULL_GET_MEM_CTX(ndr);
2754 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1055, 0);
2755 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1055(ndr, NDR_SCALARS, r->info1055));
2756 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1055_0, 0);
2757 : }
2758 0 : break;
2759 :
2760 0 : case 1056:
2761 0 : if (r->info1056) {
2762 0 : _mem_save_info1056_0 = NDR_PULL_GET_MEM_CTX(ndr);
2763 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1056, 0);
2764 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1056(ndr, NDR_SCALARS, r->info1056));
2765 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1056_0, 0);
2766 : }
2767 0 : break;
2768 :
2769 0 : case 1057:
2770 0 : if (r->info1057) {
2771 0 : _mem_save_info1057_0 = NDR_PULL_GET_MEM_CTX(ndr);
2772 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1057, 0);
2773 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1057(ndr, NDR_SCALARS, r->info1057));
2774 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1057_0, 0);
2775 : }
2776 0 : break;
2777 :
2778 0 : case 1058:
2779 0 : if (r->info1058) {
2780 0 : _mem_save_info1058_0 = NDR_PULL_GET_MEM_CTX(ndr);
2781 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1058, 0);
2782 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1058(ndr, NDR_SCALARS, r->info1058));
2783 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1058_0, 0);
2784 : }
2785 0 : break;
2786 :
2787 0 : case 1059:
2788 0 : if (r->info1059) {
2789 0 : _mem_save_info1059_0 = NDR_PULL_GET_MEM_CTX(ndr);
2790 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1059, 0);
2791 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1059(ndr, NDR_SCALARS, r->info1059));
2792 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1059_0, 0);
2793 : }
2794 0 : break;
2795 :
2796 0 : case 1060:
2797 0 : if (r->info1060) {
2798 0 : _mem_save_info1060_0 = NDR_PULL_GET_MEM_CTX(ndr);
2799 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1060, 0);
2800 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1060(ndr, NDR_SCALARS, r->info1060));
2801 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1060_0, 0);
2802 : }
2803 0 : break;
2804 :
2805 0 : case 1061:
2806 0 : if (r->info1061) {
2807 0 : _mem_save_info1061_0 = NDR_PULL_GET_MEM_CTX(ndr);
2808 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1061, 0);
2809 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1061(ndr, NDR_SCALARS, r->info1061));
2810 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1061_0, 0);
2811 : }
2812 0 : break;
2813 :
2814 0 : case 1062:
2815 0 : if (r->info1062) {
2816 0 : _mem_save_info1062_0 = NDR_PULL_GET_MEM_CTX(ndr);
2817 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1062, 0);
2818 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1062(ndr, NDR_SCALARS, r->info1062));
2819 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1062_0, 0);
2820 : }
2821 0 : break;
2822 :
2823 0 : default:
2824 0 : break;
2825 :
2826 : }
2827 : }
2828 24 : return NDR_ERR_SUCCESS;
2829 : }
2830 :
2831 6 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo(struct ndr_print *ndr, const char *name, const union wkssvc_NetWkstaInfo *r)
2832 : {
2833 0 : uint32_t level;
2834 6 : level = ndr_print_steal_switch_value(ndr, r);
2835 6 : ndr_print_union(ndr, name, level, "wkssvc_NetWkstaInfo");
2836 6 : switch (level) {
2837 2 : case 100:
2838 2 : ndr_print_ptr(ndr, "info100", r->info100);
2839 2 : ndr->depth++;
2840 2 : if (r->info100) {
2841 2 : ndr_print_wkssvc_NetWkstaInfo100(ndr, "info100", r->info100);
2842 : }
2843 2 : ndr->depth--;
2844 2 : break;
2845 :
2846 2 : case 101:
2847 2 : ndr_print_ptr(ndr, "info101", r->info101);
2848 2 : ndr->depth++;
2849 2 : if (r->info101) {
2850 2 : ndr_print_wkssvc_NetWkstaInfo101(ndr, "info101", r->info101);
2851 : }
2852 2 : ndr->depth--;
2853 2 : break;
2854 :
2855 2 : case 102:
2856 2 : ndr_print_ptr(ndr, "info102", r->info102);
2857 2 : ndr->depth++;
2858 2 : if (r->info102) {
2859 0 : ndr_print_wkssvc_NetWkstaInfo102(ndr, "info102", r->info102);
2860 : }
2861 2 : ndr->depth--;
2862 2 : break;
2863 :
2864 0 : case 502:
2865 0 : ndr_print_ptr(ndr, "info502", r->info502);
2866 0 : ndr->depth++;
2867 0 : if (r->info502) {
2868 0 : ndr_print_wkssvc_NetWkstaInfo502(ndr, "info502", r->info502);
2869 : }
2870 0 : ndr->depth--;
2871 0 : break;
2872 :
2873 0 : case 1010:
2874 0 : ndr_print_ptr(ndr, "info1010", r->info1010);
2875 0 : ndr->depth++;
2876 0 : if (r->info1010) {
2877 0 : ndr_print_wkssvc_NetWkstaInfo1010(ndr, "info1010", r->info1010);
2878 : }
2879 0 : ndr->depth--;
2880 0 : break;
2881 :
2882 0 : case 1011:
2883 0 : ndr_print_ptr(ndr, "info1011", r->info1011);
2884 0 : ndr->depth++;
2885 0 : if (r->info1011) {
2886 0 : ndr_print_wkssvc_NetWkstaInfo1011(ndr, "info1011", r->info1011);
2887 : }
2888 0 : ndr->depth--;
2889 0 : break;
2890 :
2891 0 : case 1012:
2892 0 : ndr_print_ptr(ndr, "info1012", r->info1012);
2893 0 : ndr->depth++;
2894 0 : if (r->info1012) {
2895 0 : ndr_print_wkssvc_NetWkstaInfo1012(ndr, "info1012", r->info1012);
2896 : }
2897 0 : ndr->depth--;
2898 0 : break;
2899 :
2900 0 : case 1013:
2901 0 : ndr_print_ptr(ndr, "info1013", r->info1013);
2902 0 : ndr->depth++;
2903 0 : if (r->info1013) {
2904 0 : ndr_print_wkssvc_NetWkstaInfo1013(ndr, "info1013", r->info1013);
2905 : }
2906 0 : ndr->depth--;
2907 0 : break;
2908 :
2909 0 : case 1018:
2910 0 : ndr_print_ptr(ndr, "info1018", r->info1018);
2911 0 : ndr->depth++;
2912 0 : if (r->info1018) {
2913 0 : ndr_print_wkssvc_NetWkstaInfo1018(ndr, "info1018", r->info1018);
2914 : }
2915 0 : ndr->depth--;
2916 0 : break;
2917 :
2918 0 : case 1023:
2919 0 : ndr_print_ptr(ndr, "info1023", r->info1023);
2920 0 : ndr->depth++;
2921 0 : if (r->info1023) {
2922 0 : ndr_print_wkssvc_NetWkstaInfo1023(ndr, "info1023", r->info1023);
2923 : }
2924 0 : ndr->depth--;
2925 0 : break;
2926 :
2927 0 : case 1027:
2928 0 : ndr_print_ptr(ndr, "info1027", r->info1027);
2929 0 : ndr->depth++;
2930 0 : if (r->info1027) {
2931 0 : ndr_print_wkssvc_NetWkstaInfo1027(ndr, "info1027", r->info1027);
2932 : }
2933 0 : ndr->depth--;
2934 0 : break;
2935 :
2936 0 : case 1028:
2937 0 : ndr_print_ptr(ndr, "info1028", r->info1028);
2938 0 : ndr->depth++;
2939 0 : if (r->info1028) {
2940 0 : ndr_print_wkssvc_NetWkstaInfo1028(ndr, "info1028", r->info1028);
2941 : }
2942 0 : ndr->depth--;
2943 0 : break;
2944 :
2945 0 : case 1032:
2946 0 : ndr_print_ptr(ndr, "info1032", r->info1032);
2947 0 : ndr->depth++;
2948 0 : if (r->info1032) {
2949 0 : ndr_print_wkssvc_NetWkstaInfo1032(ndr, "info1032", r->info1032);
2950 : }
2951 0 : ndr->depth--;
2952 0 : break;
2953 :
2954 0 : case 1033:
2955 0 : ndr_print_ptr(ndr, "info1033", r->info1033);
2956 0 : ndr->depth++;
2957 0 : if (r->info1033) {
2958 0 : ndr_print_wkssvc_NetWkstaInfo1033(ndr, "info1033", r->info1033);
2959 : }
2960 0 : ndr->depth--;
2961 0 : break;
2962 :
2963 0 : case 1041:
2964 0 : ndr_print_ptr(ndr, "info1041", r->info1041);
2965 0 : ndr->depth++;
2966 0 : if (r->info1041) {
2967 0 : ndr_print_wkssvc_NetWkstaInfo1041(ndr, "info1041", r->info1041);
2968 : }
2969 0 : ndr->depth--;
2970 0 : break;
2971 :
2972 0 : case 1042:
2973 0 : ndr_print_ptr(ndr, "info1042", r->info1042);
2974 0 : ndr->depth++;
2975 0 : if (r->info1042) {
2976 0 : ndr_print_wkssvc_NetWkstaInfo1042(ndr, "info1042", r->info1042);
2977 : }
2978 0 : ndr->depth--;
2979 0 : break;
2980 :
2981 0 : case 1043:
2982 0 : ndr_print_ptr(ndr, "info1043", r->info1043);
2983 0 : ndr->depth++;
2984 0 : if (r->info1043) {
2985 0 : ndr_print_wkssvc_NetWkstaInfo1043(ndr, "info1043", r->info1043);
2986 : }
2987 0 : ndr->depth--;
2988 0 : break;
2989 :
2990 0 : case 1044:
2991 0 : ndr_print_ptr(ndr, "info1044", r->info1044);
2992 0 : ndr->depth++;
2993 0 : if (r->info1044) {
2994 0 : ndr_print_wkssvc_NetWkstaInfo1044(ndr, "info1044", r->info1044);
2995 : }
2996 0 : ndr->depth--;
2997 0 : break;
2998 :
2999 0 : case 1045:
3000 0 : ndr_print_ptr(ndr, "info1045", r->info1045);
3001 0 : ndr->depth++;
3002 0 : if (r->info1045) {
3003 0 : ndr_print_wkssvc_NetWkstaInfo1045(ndr, "info1045", r->info1045);
3004 : }
3005 0 : ndr->depth--;
3006 0 : break;
3007 :
3008 0 : case 1046:
3009 0 : ndr_print_ptr(ndr, "info1046", r->info1046);
3010 0 : ndr->depth++;
3011 0 : if (r->info1046) {
3012 0 : ndr_print_wkssvc_NetWkstaInfo1046(ndr, "info1046", r->info1046);
3013 : }
3014 0 : ndr->depth--;
3015 0 : break;
3016 :
3017 0 : case 1047:
3018 0 : ndr_print_ptr(ndr, "info1047", r->info1047);
3019 0 : ndr->depth++;
3020 0 : if (r->info1047) {
3021 0 : ndr_print_wkssvc_NetWkstaInfo1047(ndr, "info1047", r->info1047);
3022 : }
3023 0 : ndr->depth--;
3024 0 : break;
3025 :
3026 0 : case 1048:
3027 0 : ndr_print_ptr(ndr, "info1048", r->info1048);
3028 0 : ndr->depth++;
3029 0 : if (r->info1048) {
3030 0 : ndr_print_wkssvc_NetWkstaInfo1048(ndr, "info1048", r->info1048);
3031 : }
3032 0 : ndr->depth--;
3033 0 : break;
3034 :
3035 0 : case 1049:
3036 0 : ndr_print_ptr(ndr, "info1049", r->info1049);
3037 0 : ndr->depth++;
3038 0 : if (r->info1049) {
3039 0 : ndr_print_wkssvc_NetWkstaInfo1049(ndr, "info1049", r->info1049);
3040 : }
3041 0 : ndr->depth--;
3042 0 : break;
3043 :
3044 0 : case 1050:
3045 0 : ndr_print_ptr(ndr, "info1050", r->info1050);
3046 0 : ndr->depth++;
3047 0 : if (r->info1050) {
3048 0 : ndr_print_wkssvc_NetWkstaInfo1050(ndr, "info1050", r->info1050);
3049 : }
3050 0 : ndr->depth--;
3051 0 : break;
3052 :
3053 0 : case 1051:
3054 0 : ndr_print_ptr(ndr, "info1051", r->info1051);
3055 0 : ndr->depth++;
3056 0 : if (r->info1051) {
3057 0 : ndr_print_wkssvc_NetWkstaInfo1051(ndr, "info1051", r->info1051);
3058 : }
3059 0 : ndr->depth--;
3060 0 : break;
3061 :
3062 0 : case 1052:
3063 0 : ndr_print_ptr(ndr, "info1052", r->info1052);
3064 0 : ndr->depth++;
3065 0 : if (r->info1052) {
3066 0 : ndr_print_wkssvc_NetWkstaInfo1052(ndr, "info1052", r->info1052);
3067 : }
3068 0 : ndr->depth--;
3069 0 : break;
3070 :
3071 0 : case 1053:
3072 0 : ndr_print_ptr(ndr, "info1053", r->info1053);
3073 0 : ndr->depth++;
3074 0 : if (r->info1053) {
3075 0 : ndr_print_wkssvc_NetWkstaInfo1053(ndr, "info1053", r->info1053);
3076 : }
3077 0 : ndr->depth--;
3078 0 : break;
3079 :
3080 0 : case 1054:
3081 0 : ndr_print_ptr(ndr, "info1054", r->info1054);
3082 0 : ndr->depth++;
3083 0 : if (r->info1054) {
3084 0 : ndr_print_wkssvc_NetWkstaInfo1054(ndr, "info1054", r->info1054);
3085 : }
3086 0 : ndr->depth--;
3087 0 : break;
3088 :
3089 0 : case 1055:
3090 0 : ndr_print_ptr(ndr, "info1055", r->info1055);
3091 0 : ndr->depth++;
3092 0 : if (r->info1055) {
3093 0 : ndr_print_wkssvc_NetWkstaInfo1055(ndr, "info1055", r->info1055);
3094 : }
3095 0 : ndr->depth--;
3096 0 : break;
3097 :
3098 0 : case 1056:
3099 0 : ndr_print_ptr(ndr, "info1056", r->info1056);
3100 0 : ndr->depth++;
3101 0 : if (r->info1056) {
3102 0 : ndr_print_wkssvc_NetWkstaInfo1056(ndr, "info1056", r->info1056);
3103 : }
3104 0 : ndr->depth--;
3105 0 : break;
3106 :
3107 0 : case 1057:
3108 0 : ndr_print_ptr(ndr, "info1057", r->info1057);
3109 0 : ndr->depth++;
3110 0 : if (r->info1057) {
3111 0 : ndr_print_wkssvc_NetWkstaInfo1057(ndr, "info1057", r->info1057);
3112 : }
3113 0 : ndr->depth--;
3114 0 : break;
3115 :
3116 0 : case 1058:
3117 0 : ndr_print_ptr(ndr, "info1058", r->info1058);
3118 0 : ndr->depth++;
3119 0 : if (r->info1058) {
3120 0 : ndr_print_wkssvc_NetWkstaInfo1058(ndr, "info1058", r->info1058);
3121 : }
3122 0 : ndr->depth--;
3123 0 : break;
3124 :
3125 0 : case 1059:
3126 0 : ndr_print_ptr(ndr, "info1059", r->info1059);
3127 0 : ndr->depth++;
3128 0 : if (r->info1059) {
3129 0 : ndr_print_wkssvc_NetWkstaInfo1059(ndr, "info1059", r->info1059);
3130 : }
3131 0 : ndr->depth--;
3132 0 : break;
3133 :
3134 0 : case 1060:
3135 0 : ndr_print_ptr(ndr, "info1060", r->info1060);
3136 0 : ndr->depth++;
3137 0 : if (r->info1060) {
3138 0 : ndr_print_wkssvc_NetWkstaInfo1060(ndr, "info1060", r->info1060);
3139 : }
3140 0 : ndr->depth--;
3141 0 : break;
3142 :
3143 0 : case 1061:
3144 0 : ndr_print_ptr(ndr, "info1061", r->info1061);
3145 0 : ndr->depth++;
3146 0 : if (r->info1061) {
3147 0 : ndr_print_wkssvc_NetWkstaInfo1061(ndr, "info1061", r->info1061);
3148 : }
3149 0 : ndr->depth--;
3150 0 : break;
3151 :
3152 0 : case 1062:
3153 0 : ndr_print_ptr(ndr, "info1062", r->info1062);
3154 0 : ndr->depth++;
3155 0 : if (r->info1062) {
3156 0 : ndr_print_wkssvc_NetWkstaInfo1062(ndr, "info1062", r->info1062);
3157 : }
3158 0 : ndr->depth--;
3159 0 : break;
3160 :
3161 0 : default:
3162 0 : break;
3163 :
3164 : }
3165 6 : }
3166 :
3167 0 : static enum ndr_err_code ndr_push_wkssvc_NetrWkstaUserInfo0(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetrWkstaUserInfo0 *r)
3168 : {
3169 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3170 0 : if (ndr_flags & NDR_SCALARS) {
3171 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3172 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->user_name));
3173 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3174 : }
3175 0 : if (ndr_flags & NDR_BUFFERS) {
3176 0 : if (r->user_name) {
3177 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
3178 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3179 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
3180 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user_name, ndr_charset_length(r->user_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3181 : }
3182 : }
3183 0 : return NDR_ERR_SUCCESS;
3184 : }
3185 :
3186 0 : static enum ndr_err_code ndr_pull_wkssvc_NetrWkstaUserInfo0(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetrWkstaUserInfo0 *r)
3187 : {
3188 0 : uint32_t _ptr_user_name;
3189 0 : uint32_t size_user_name_1 = 0;
3190 0 : uint32_t length_user_name_1 = 0;
3191 0 : TALLOC_CTX *_mem_save_user_name_0 = NULL;
3192 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3193 0 : if (ndr_flags & NDR_SCALARS) {
3194 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3195 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
3196 0 : if (_ptr_user_name) {
3197 0 : NDR_PULL_ALLOC(ndr, r->user_name);
3198 : } else {
3199 0 : r->user_name = NULL;
3200 : }
3201 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3202 : }
3203 0 : if (ndr_flags & NDR_BUFFERS) {
3204 0 : if (r->user_name) {
3205 0 : _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3206 0 : NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
3207 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->user_name));
3208 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->user_name));
3209 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user_name, &size_user_name_1));
3210 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user_name, &length_user_name_1));
3211 0 : if (length_user_name_1 > size_user_name_1) {
3212 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_user_name_1, length_user_name_1);
3213 : }
3214 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_user_name_1, sizeof(uint16_t)));
3215 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user_name, length_user_name_1, sizeof(uint16_t), CH_UTF16));
3216 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
3217 : }
3218 : }
3219 0 : return NDR_ERR_SUCCESS;
3220 : }
3221 :
3222 0 : _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserInfo0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrWkstaUserInfo0 *r)
3223 : {
3224 0 : ndr_print_struct(ndr, name, "wkssvc_NetrWkstaUserInfo0");
3225 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3226 0 : ndr->depth++;
3227 0 : ndr_print_ptr(ndr, "user_name", r->user_name);
3228 0 : ndr->depth++;
3229 0 : if (r->user_name) {
3230 0 : ndr_print_string(ndr, "user_name", r->user_name);
3231 : }
3232 0 : ndr->depth--;
3233 0 : ndr->depth--;
3234 : }
3235 :
3236 8 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaEnumUsersCtr0(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaEnumUsersCtr0 *r)
3237 : {
3238 0 : uint32_t cntr_user0_1;
3239 8 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3240 8 : if (ndr_flags & NDR_SCALARS) {
3241 8 : NDR_CHECK(ndr_push_align(ndr, 5));
3242 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entries_read));
3243 8 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->user0));
3244 8 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3245 : }
3246 8 : if (ndr_flags & NDR_BUFFERS) {
3247 8 : if (r->user0) {
3248 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->entries_read));
3249 2 : for (cntr_user0_1 = 0; cntr_user0_1 < (r->entries_read); cntr_user0_1++) {
3250 0 : NDR_CHECK(ndr_push_wkssvc_NetrWkstaUserInfo0(ndr, NDR_SCALARS, &r->user0[cntr_user0_1]));
3251 : }
3252 2 : for (cntr_user0_1 = 0; cntr_user0_1 < (r->entries_read); cntr_user0_1++) {
3253 0 : NDR_CHECK(ndr_push_wkssvc_NetrWkstaUserInfo0(ndr, NDR_BUFFERS, &r->user0[cntr_user0_1]));
3254 : }
3255 : }
3256 : }
3257 8 : return NDR_ERR_SUCCESS;
3258 : }
3259 :
3260 8 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaEnumUsersCtr0(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaEnumUsersCtr0 *r)
3261 : {
3262 0 : uint32_t _ptr_user0;
3263 8 : uint32_t size_user0_1 = 0;
3264 0 : uint32_t cntr_user0_1;
3265 8 : TALLOC_CTX *_mem_save_user0_0 = NULL;
3266 8 : TALLOC_CTX *_mem_save_user0_1 = NULL;
3267 8 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3268 8 : if (ndr_flags & NDR_SCALARS) {
3269 8 : NDR_CHECK(ndr_pull_align(ndr, 5));
3270 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->entries_read));
3271 8 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user0));
3272 8 : if (_ptr_user0) {
3273 2 : NDR_PULL_ALLOC(ndr, r->user0);
3274 : } else {
3275 6 : r->user0 = NULL;
3276 : }
3277 8 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3278 : }
3279 8 : if (ndr_flags & NDR_BUFFERS) {
3280 8 : if (r->user0) {
3281 2 : _mem_save_user0_0 = NDR_PULL_GET_MEM_CTX(ndr);
3282 2 : NDR_PULL_SET_MEM_CTX(ndr, r->user0, 0);
3283 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->user0));
3284 2 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->user0, &size_user0_1));
3285 2 : NDR_PULL_ALLOC_N(ndr, r->user0, size_user0_1);
3286 2 : _mem_save_user0_1 = NDR_PULL_GET_MEM_CTX(ndr);
3287 2 : NDR_PULL_SET_MEM_CTX(ndr, r->user0, 0);
3288 2 : for (cntr_user0_1 = 0; cntr_user0_1 < (size_user0_1); cntr_user0_1++) {
3289 0 : NDR_CHECK(ndr_pull_wkssvc_NetrWkstaUserInfo0(ndr, NDR_SCALARS, &r->user0[cntr_user0_1]));
3290 : }
3291 2 : for (cntr_user0_1 = 0; cntr_user0_1 < (size_user0_1); cntr_user0_1++) {
3292 0 : NDR_CHECK(ndr_pull_wkssvc_NetrWkstaUserInfo0(ndr, NDR_BUFFERS, &r->user0[cntr_user0_1]));
3293 : }
3294 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user0_1, 0);
3295 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user0_0, 0);
3296 : }
3297 8 : if (r->user0) {
3298 2 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->user0, r->entries_read));
3299 : }
3300 8 : for (cntr_user0_1 = 0; cntr_user0_1 < (size_user0_1); cntr_user0_1++) {
3301 0 : }
3302 : }
3303 8 : return NDR_ERR_SUCCESS;
3304 : }
3305 :
3306 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersCtr0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaEnumUsersCtr0 *r)
3307 : {
3308 0 : uint32_t cntr_user0_1;
3309 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaEnumUsersCtr0");
3310 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3311 0 : ndr->depth++;
3312 0 : ndr_print_uint32(ndr, "entries_read", r->entries_read);
3313 0 : ndr_print_ptr(ndr, "user0", r->user0);
3314 0 : ndr->depth++;
3315 0 : if (r->user0) {
3316 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "user0", (uint32_t)(r->entries_read));
3317 0 : ndr->depth++;
3318 0 : for (cntr_user0_1 = 0; cntr_user0_1 < (r->entries_read); cntr_user0_1++) {
3319 0 : ndr_print_wkssvc_NetrWkstaUserInfo0(ndr, "user0", &r->user0[cntr_user0_1]);
3320 : }
3321 0 : ndr->depth--;
3322 : }
3323 0 : ndr->depth--;
3324 0 : ndr->depth--;
3325 : }
3326 :
3327 0 : static enum ndr_err_code ndr_push_wkssvc_NetrWkstaUserInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetrWkstaUserInfo1 *r)
3328 : {
3329 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3330 0 : if (ndr_flags & NDR_SCALARS) {
3331 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3332 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->user_name));
3333 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->logon_domain));
3334 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->other_domains));
3335 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->logon_server));
3336 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3337 : }
3338 0 : if (ndr_flags & NDR_BUFFERS) {
3339 0 : if (r->user_name) {
3340 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
3341 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3342 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
3343 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user_name, ndr_charset_length(r->user_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3344 : }
3345 0 : if (r->logon_domain) {
3346 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->logon_domain, CH_UTF16)));
3347 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3348 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->logon_domain, CH_UTF16)));
3349 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->logon_domain, ndr_charset_length(r->logon_domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3350 : }
3351 0 : if (r->other_domains) {
3352 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->other_domains, CH_UTF16)));
3353 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3354 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->other_domains, CH_UTF16)));
3355 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->other_domains, ndr_charset_length(r->other_domains, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3356 : }
3357 0 : if (r->logon_server) {
3358 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->logon_server, CH_UTF16)));
3359 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3360 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->logon_server, CH_UTF16)));
3361 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->logon_server, ndr_charset_length(r->logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3362 : }
3363 : }
3364 0 : return NDR_ERR_SUCCESS;
3365 : }
3366 :
3367 0 : static enum ndr_err_code ndr_pull_wkssvc_NetrWkstaUserInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetrWkstaUserInfo1 *r)
3368 : {
3369 0 : uint32_t _ptr_user_name;
3370 0 : uint32_t size_user_name_1 = 0;
3371 0 : uint32_t length_user_name_1 = 0;
3372 0 : TALLOC_CTX *_mem_save_user_name_0 = NULL;
3373 0 : uint32_t _ptr_logon_domain;
3374 0 : uint32_t size_logon_domain_1 = 0;
3375 0 : uint32_t length_logon_domain_1 = 0;
3376 0 : TALLOC_CTX *_mem_save_logon_domain_0 = NULL;
3377 0 : uint32_t _ptr_other_domains;
3378 0 : uint32_t size_other_domains_1 = 0;
3379 0 : uint32_t length_other_domains_1 = 0;
3380 0 : TALLOC_CTX *_mem_save_other_domains_0 = NULL;
3381 0 : uint32_t _ptr_logon_server;
3382 0 : uint32_t size_logon_server_1 = 0;
3383 0 : uint32_t length_logon_server_1 = 0;
3384 0 : TALLOC_CTX *_mem_save_logon_server_0 = NULL;
3385 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3386 0 : if (ndr_flags & NDR_SCALARS) {
3387 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3388 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
3389 0 : if (_ptr_user_name) {
3390 0 : NDR_PULL_ALLOC(ndr, r->user_name);
3391 : } else {
3392 0 : r->user_name = NULL;
3393 : }
3394 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_domain));
3395 0 : if (_ptr_logon_domain) {
3396 0 : NDR_PULL_ALLOC(ndr, r->logon_domain);
3397 : } else {
3398 0 : r->logon_domain = NULL;
3399 : }
3400 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_other_domains));
3401 0 : if (_ptr_other_domains) {
3402 0 : NDR_PULL_ALLOC(ndr, r->other_domains);
3403 : } else {
3404 0 : r->other_domains = NULL;
3405 : }
3406 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
3407 0 : if (_ptr_logon_server) {
3408 0 : NDR_PULL_ALLOC(ndr, r->logon_server);
3409 : } else {
3410 0 : r->logon_server = NULL;
3411 : }
3412 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3413 : }
3414 0 : if (ndr_flags & NDR_BUFFERS) {
3415 0 : if (r->user_name) {
3416 0 : _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3417 0 : NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
3418 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->user_name));
3419 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->user_name));
3420 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user_name, &size_user_name_1));
3421 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user_name, &length_user_name_1));
3422 0 : if (length_user_name_1 > size_user_name_1) {
3423 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_user_name_1, length_user_name_1);
3424 : }
3425 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_user_name_1, sizeof(uint16_t)));
3426 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user_name, length_user_name_1, sizeof(uint16_t), CH_UTF16));
3427 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
3428 : }
3429 0 : if (r->logon_domain) {
3430 0 : _mem_save_logon_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
3431 0 : NDR_PULL_SET_MEM_CTX(ndr, r->logon_domain, 0);
3432 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->logon_domain));
3433 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->logon_domain));
3434 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->logon_domain, &size_logon_domain_1));
3435 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->logon_domain, &length_logon_domain_1));
3436 0 : if (length_logon_domain_1 > size_logon_domain_1) {
3437 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_domain_1, length_logon_domain_1);
3438 : }
3439 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_domain_1, sizeof(uint16_t)));
3440 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->logon_domain, length_logon_domain_1, sizeof(uint16_t), CH_UTF16));
3441 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_domain_0, 0);
3442 : }
3443 0 : if (r->other_domains) {
3444 0 : _mem_save_other_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
3445 0 : NDR_PULL_SET_MEM_CTX(ndr, r->other_domains, 0);
3446 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->other_domains));
3447 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->other_domains));
3448 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->other_domains, &size_other_domains_1));
3449 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->other_domains, &length_other_domains_1));
3450 0 : if (length_other_domains_1 > size_other_domains_1) {
3451 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_other_domains_1, length_other_domains_1);
3452 : }
3453 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_other_domains_1, sizeof(uint16_t)));
3454 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->other_domains, length_other_domains_1, sizeof(uint16_t), CH_UTF16));
3455 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_other_domains_0, 0);
3456 : }
3457 0 : if (r->logon_server) {
3458 0 : _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
3459 0 : NDR_PULL_SET_MEM_CTX(ndr, r->logon_server, 0);
3460 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->logon_server));
3461 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->logon_server));
3462 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->logon_server, &size_logon_server_1));
3463 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->logon_server, &length_logon_server_1));
3464 0 : if (length_logon_server_1 > size_logon_server_1) {
3465 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
3466 : }
3467 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
3468 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
3469 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
3470 : }
3471 : }
3472 0 : return NDR_ERR_SUCCESS;
3473 : }
3474 :
3475 0 : _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserInfo1(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrWkstaUserInfo1 *r)
3476 : {
3477 0 : ndr_print_struct(ndr, name, "wkssvc_NetrWkstaUserInfo1");
3478 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3479 0 : ndr->depth++;
3480 0 : ndr_print_ptr(ndr, "user_name", r->user_name);
3481 0 : ndr->depth++;
3482 0 : if (r->user_name) {
3483 0 : ndr_print_string(ndr, "user_name", r->user_name);
3484 : }
3485 0 : ndr->depth--;
3486 0 : ndr_print_ptr(ndr, "logon_domain", r->logon_domain);
3487 0 : ndr->depth++;
3488 0 : if (r->logon_domain) {
3489 0 : ndr_print_string(ndr, "logon_domain", r->logon_domain);
3490 : }
3491 0 : ndr->depth--;
3492 0 : ndr_print_ptr(ndr, "other_domains", r->other_domains);
3493 0 : ndr->depth++;
3494 0 : if (r->other_domains) {
3495 0 : ndr_print_string(ndr, "other_domains", r->other_domains);
3496 : }
3497 0 : ndr->depth--;
3498 0 : ndr_print_ptr(ndr, "logon_server", r->logon_server);
3499 0 : ndr->depth++;
3500 0 : if (r->logon_server) {
3501 0 : ndr_print_string(ndr, "logon_server", r->logon_server);
3502 : }
3503 0 : ndr->depth--;
3504 0 : ndr->depth--;
3505 : }
3506 :
3507 4 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaEnumUsersCtr1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaEnumUsersCtr1 *r)
3508 : {
3509 0 : uint32_t cntr_user1_1;
3510 4 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3511 4 : if (ndr_flags & NDR_SCALARS) {
3512 4 : NDR_CHECK(ndr_push_align(ndr, 5));
3513 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entries_read));
3514 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->user1));
3515 4 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3516 : }
3517 4 : if (ndr_flags & NDR_BUFFERS) {
3518 4 : if (r->user1) {
3519 2 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->entries_read));
3520 2 : for (cntr_user1_1 = 0; cntr_user1_1 < (r->entries_read); cntr_user1_1++) {
3521 0 : NDR_CHECK(ndr_push_wkssvc_NetrWkstaUserInfo1(ndr, NDR_SCALARS, &r->user1[cntr_user1_1]));
3522 : }
3523 2 : for (cntr_user1_1 = 0; cntr_user1_1 < (r->entries_read); cntr_user1_1++) {
3524 0 : NDR_CHECK(ndr_push_wkssvc_NetrWkstaUserInfo1(ndr, NDR_BUFFERS, &r->user1[cntr_user1_1]));
3525 : }
3526 : }
3527 : }
3528 4 : return NDR_ERR_SUCCESS;
3529 : }
3530 :
3531 4 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaEnumUsersCtr1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaEnumUsersCtr1 *r)
3532 : {
3533 0 : uint32_t _ptr_user1;
3534 4 : uint32_t size_user1_1 = 0;
3535 0 : uint32_t cntr_user1_1;
3536 4 : TALLOC_CTX *_mem_save_user1_0 = NULL;
3537 4 : TALLOC_CTX *_mem_save_user1_1 = NULL;
3538 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3539 4 : if (ndr_flags & NDR_SCALARS) {
3540 4 : NDR_CHECK(ndr_pull_align(ndr, 5));
3541 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->entries_read));
3542 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user1));
3543 4 : if (_ptr_user1) {
3544 2 : NDR_PULL_ALLOC(ndr, r->user1);
3545 : } else {
3546 2 : r->user1 = NULL;
3547 : }
3548 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3549 : }
3550 4 : if (ndr_flags & NDR_BUFFERS) {
3551 4 : if (r->user1) {
3552 2 : _mem_save_user1_0 = NDR_PULL_GET_MEM_CTX(ndr);
3553 2 : NDR_PULL_SET_MEM_CTX(ndr, r->user1, 0);
3554 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->user1));
3555 2 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->user1, &size_user1_1));
3556 2 : NDR_PULL_ALLOC_N(ndr, r->user1, size_user1_1);
3557 2 : _mem_save_user1_1 = NDR_PULL_GET_MEM_CTX(ndr);
3558 2 : NDR_PULL_SET_MEM_CTX(ndr, r->user1, 0);
3559 2 : for (cntr_user1_1 = 0; cntr_user1_1 < (size_user1_1); cntr_user1_1++) {
3560 0 : NDR_CHECK(ndr_pull_wkssvc_NetrWkstaUserInfo1(ndr, NDR_SCALARS, &r->user1[cntr_user1_1]));
3561 : }
3562 2 : for (cntr_user1_1 = 0; cntr_user1_1 < (size_user1_1); cntr_user1_1++) {
3563 0 : NDR_CHECK(ndr_pull_wkssvc_NetrWkstaUserInfo1(ndr, NDR_BUFFERS, &r->user1[cntr_user1_1]));
3564 : }
3565 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user1_1, 0);
3566 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user1_0, 0);
3567 : }
3568 4 : if (r->user1) {
3569 2 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->user1, r->entries_read));
3570 : }
3571 4 : for (cntr_user1_1 = 0; cntr_user1_1 < (size_user1_1); cntr_user1_1++) {
3572 0 : }
3573 : }
3574 4 : return NDR_ERR_SUCCESS;
3575 : }
3576 :
3577 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersCtr1(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaEnumUsersCtr1 *r)
3578 : {
3579 0 : uint32_t cntr_user1_1;
3580 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaEnumUsersCtr1");
3581 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3582 0 : ndr->depth++;
3583 0 : ndr_print_uint32(ndr, "entries_read", r->entries_read);
3584 0 : ndr_print_ptr(ndr, "user1", r->user1);
3585 0 : ndr->depth++;
3586 0 : if (r->user1) {
3587 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "user1", (uint32_t)(r->entries_read));
3588 0 : ndr->depth++;
3589 0 : for (cntr_user1_1 = 0; cntr_user1_1 < (r->entries_read); cntr_user1_1++) {
3590 0 : ndr_print_wkssvc_NetrWkstaUserInfo1(ndr, "user1", &r->user1[cntr_user1_1]);
3591 : }
3592 0 : ndr->depth--;
3593 : }
3594 0 : ndr->depth--;
3595 0 : ndr->depth--;
3596 : }
3597 :
3598 24 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaEnumUsersCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union wkssvc_NetWkstaEnumUsersCtr *r)
3599 : {
3600 0 : uint32_t level;
3601 24 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3602 24 : if (ndr_flags & NDR_SCALARS) {
3603 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3604 12 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3605 12 : NDR_CHECK(ndr_push_union_align(ndr, 5));
3606 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
3607 12 : NDR_CHECK(ndr_push_union_align(ndr, 5));
3608 12 : switch (level) {
3609 8 : case 0: {
3610 8 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->user0));
3611 8 : break; }
3612 :
3613 4 : case 1: {
3614 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->user1));
3615 4 : break; }
3616 :
3617 0 : default:
3618 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
3619 : }
3620 : }
3621 24 : if (ndr_flags & NDR_BUFFERS) {
3622 12 : if (!(ndr_flags & NDR_SCALARS)) {
3623 : /* We didn't get it above, and the token is not needed after this. */
3624 12 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3625 : }
3626 12 : switch (level) {
3627 8 : case 0:
3628 8 : if (r->user0) {
3629 8 : NDR_CHECK(ndr_push_wkssvc_NetWkstaEnumUsersCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->user0));
3630 : }
3631 8 : break;
3632 :
3633 4 : case 1:
3634 4 : if (r->user1) {
3635 4 : NDR_CHECK(ndr_push_wkssvc_NetWkstaEnumUsersCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->user1));
3636 : }
3637 4 : break;
3638 :
3639 0 : default:
3640 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
3641 : }
3642 : }
3643 24 : return NDR_ERR_SUCCESS;
3644 : }
3645 :
3646 24 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaEnumUsersCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union wkssvc_NetWkstaEnumUsersCtr *r)
3647 : {
3648 0 : uint32_t level;
3649 0 : uint32_t _level;
3650 24 : TALLOC_CTX *_mem_save_user0_0 = NULL;
3651 0 : uint32_t _ptr_user0;
3652 24 : TALLOC_CTX *_mem_save_user1_0 = NULL;
3653 0 : uint32_t _ptr_user1;
3654 24 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3655 24 : if (ndr_flags & NDR_SCALARS) {
3656 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3657 12 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3658 12 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
3659 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
3660 12 : if (_level != level) {
3661 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
3662 : }
3663 12 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
3664 12 : switch (level) {
3665 8 : case 0: {
3666 8 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user0));
3667 8 : if (_ptr_user0) {
3668 8 : NDR_PULL_ALLOC(ndr, r->user0);
3669 : } else {
3670 0 : r->user0 = NULL;
3671 : }
3672 8 : break; }
3673 :
3674 4 : case 1: {
3675 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user1));
3676 4 : if (_ptr_user1) {
3677 4 : NDR_PULL_ALLOC(ndr, r->user1);
3678 : } else {
3679 0 : r->user1 = NULL;
3680 : }
3681 4 : break; }
3682 :
3683 0 : default:
3684 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
3685 : }
3686 : }
3687 24 : if (ndr_flags & NDR_BUFFERS) {
3688 12 : if (!(ndr_flags & NDR_SCALARS)) {
3689 : /* We didn't get it above, and the token is not needed after this. */
3690 12 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3691 : }
3692 12 : switch (level) {
3693 8 : case 0:
3694 8 : if (r->user0) {
3695 8 : _mem_save_user0_0 = NDR_PULL_GET_MEM_CTX(ndr);
3696 8 : NDR_PULL_SET_MEM_CTX(ndr, r->user0, 0);
3697 8 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaEnumUsersCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->user0));
3698 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user0_0, 0);
3699 : }
3700 8 : break;
3701 :
3702 4 : case 1:
3703 4 : if (r->user1) {
3704 4 : _mem_save_user1_0 = NDR_PULL_GET_MEM_CTX(ndr);
3705 4 : NDR_PULL_SET_MEM_CTX(ndr, r->user1, 0);
3706 4 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaEnumUsersCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->user1));
3707 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user1_0, 0);
3708 : }
3709 4 : break;
3710 :
3711 0 : default:
3712 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
3713 : }
3714 : }
3715 24 : return NDR_ERR_SUCCESS;
3716 : }
3717 :
3718 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersCtr(struct ndr_print *ndr, const char *name, const union wkssvc_NetWkstaEnumUsersCtr *r)
3719 : {
3720 0 : uint32_t level;
3721 0 : level = ndr_print_steal_switch_value(ndr, r);
3722 0 : ndr_print_union(ndr, name, level, "wkssvc_NetWkstaEnumUsersCtr");
3723 0 : switch (level) {
3724 0 : case 0:
3725 0 : ndr_print_ptr(ndr, "user0", r->user0);
3726 0 : ndr->depth++;
3727 0 : if (r->user0) {
3728 0 : ndr_print_wkssvc_NetWkstaEnumUsersCtr0(ndr, "user0", r->user0);
3729 : }
3730 0 : ndr->depth--;
3731 0 : break;
3732 :
3733 0 : case 1:
3734 0 : ndr_print_ptr(ndr, "user1", r->user1);
3735 0 : ndr->depth++;
3736 0 : if (r->user1) {
3737 0 : ndr_print_wkssvc_NetWkstaEnumUsersCtr1(ndr, "user1", r->user1);
3738 : }
3739 0 : ndr->depth--;
3740 0 : break;
3741 :
3742 0 : default:
3743 0 : ndr_print_bad_level(ndr, name, level);
3744 : }
3745 0 : }
3746 :
3747 12 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaEnumUsersInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaEnumUsersInfo *r)
3748 : {
3749 12 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3750 12 : if (ndr_flags & NDR_SCALARS) {
3751 12 : NDR_CHECK(ndr_push_align(ndr, 5));
3752 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
3753 12 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
3754 12 : NDR_CHECK(ndr_push_wkssvc_NetWkstaEnumUsersCtr(ndr, NDR_SCALARS, &r->ctr));
3755 12 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3756 : }
3757 12 : if (ndr_flags & NDR_BUFFERS) {
3758 12 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
3759 12 : NDR_CHECK(ndr_push_wkssvc_NetWkstaEnumUsersCtr(ndr, NDR_BUFFERS, &r->ctr));
3760 : }
3761 12 : return NDR_ERR_SUCCESS;
3762 : }
3763 :
3764 12 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaEnumUsersInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaEnumUsersInfo *r)
3765 : {
3766 12 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3767 12 : if (ndr_flags & NDR_SCALARS) {
3768 12 : NDR_CHECK(ndr_pull_align(ndr, 5));
3769 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
3770 12 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
3771 12 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaEnumUsersCtr(ndr, NDR_SCALARS, &r->ctr));
3772 12 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3773 : }
3774 12 : if (ndr_flags & NDR_BUFFERS) {
3775 12 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
3776 12 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaEnumUsersCtr(ndr, NDR_BUFFERS, &r->ctr));
3777 : }
3778 12 : return NDR_ERR_SUCCESS;
3779 : }
3780 :
3781 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersInfo(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaEnumUsersInfo *r)
3782 : {
3783 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaEnumUsersInfo");
3784 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3785 0 : ndr->depth++;
3786 0 : ndr_print_uint32(ndr, "level", r->level);
3787 0 : ndr_print_set_switch_value(ndr, &r->ctr, r->level);
3788 0 : ndr_print_wkssvc_NetWkstaEnumUsersCtr(ndr, "ctr", &r->ctr);
3789 0 : ndr->depth--;
3790 : }
3791 :
3792 0 : static enum ndr_err_code ndr_push_wkssvc_NetrWkstaUserInfo1101(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetrWkstaUserInfo1101 *r)
3793 : {
3794 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3795 0 : if (ndr_flags & NDR_SCALARS) {
3796 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3797 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->other_domains));
3798 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3799 : }
3800 0 : if (ndr_flags & NDR_BUFFERS) {
3801 0 : if (r->other_domains) {
3802 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->other_domains, CH_UTF16)));
3803 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3804 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->other_domains, CH_UTF16)));
3805 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->other_domains, ndr_charset_length(r->other_domains, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3806 : }
3807 : }
3808 0 : return NDR_ERR_SUCCESS;
3809 : }
3810 :
3811 0 : static enum ndr_err_code ndr_pull_wkssvc_NetrWkstaUserInfo1101(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetrWkstaUserInfo1101 *r)
3812 : {
3813 0 : uint32_t _ptr_other_domains;
3814 0 : uint32_t size_other_domains_1 = 0;
3815 0 : uint32_t length_other_domains_1 = 0;
3816 0 : TALLOC_CTX *_mem_save_other_domains_0 = NULL;
3817 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3818 0 : if (ndr_flags & NDR_SCALARS) {
3819 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3820 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_other_domains));
3821 0 : if (_ptr_other_domains) {
3822 0 : NDR_PULL_ALLOC(ndr, r->other_domains);
3823 : } else {
3824 0 : r->other_domains = NULL;
3825 : }
3826 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3827 : }
3828 0 : if (ndr_flags & NDR_BUFFERS) {
3829 0 : if (r->other_domains) {
3830 0 : _mem_save_other_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
3831 0 : NDR_PULL_SET_MEM_CTX(ndr, r->other_domains, 0);
3832 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->other_domains));
3833 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->other_domains));
3834 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->other_domains, &size_other_domains_1));
3835 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->other_domains, &length_other_domains_1));
3836 0 : if (length_other_domains_1 > size_other_domains_1) {
3837 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_other_domains_1, length_other_domains_1);
3838 : }
3839 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_other_domains_1, sizeof(uint16_t)));
3840 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->other_domains, length_other_domains_1, sizeof(uint16_t), CH_UTF16));
3841 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_other_domains_0, 0);
3842 : }
3843 : }
3844 0 : return NDR_ERR_SUCCESS;
3845 : }
3846 :
3847 0 : _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserInfo1101(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrWkstaUserInfo1101 *r)
3848 : {
3849 0 : ndr_print_struct(ndr, name, "wkssvc_NetrWkstaUserInfo1101");
3850 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3851 0 : ndr->depth++;
3852 0 : ndr_print_ptr(ndr, "other_domains", r->other_domains);
3853 0 : ndr->depth++;
3854 0 : if (r->other_domains) {
3855 0 : ndr_print_string(ndr, "other_domains", r->other_domains);
3856 : }
3857 0 : ndr->depth--;
3858 0 : ndr->depth--;
3859 : }
3860 :
3861 0 : static enum ndr_err_code ndr_push_wkssvc_NetrWkstaUserInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union wkssvc_NetrWkstaUserInfo *r)
3862 : {
3863 0 : uint32_t level;
3864 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3865 0 : if (ndr_flags & NDR_SCALARS) {
3866 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3867 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3868 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
3869 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
3870 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
3871 0 : switch (level) {
3872 0 : case 0: {
3873 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
3874 0 : break; }
3875 :
3876 0 : case 1: {
3877 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
3878 0 : break; }
3879 :
3880 0 : case 1101: {
3881 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1101));
3882 0 : break; }
3883 :
3884 0 : default:
3885 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
3886 : }
3887 : }
3888 0 : if (ndr_flags & NDR_BUFFERS) {
3889 0 : if (!(ndr_flags & NDR_SCALARS)) {
3890 : /* We didn't get it above, and the token is not needed after this. */
3891 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3892 : }
3893 0 : switch (level) {
3894 0 : case 0:
3895 0 : if (r->info0) {
3896 0 : NDR_CHECK(ndr_push_wkssvc_NetrWkstaUserInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
3897 : }
3898 0 : break;
3899 :
3900 0 : case 1:
3901 0 : if (r->info1) {
3902 0 : NDR_CHECK(ndr_push_wkssvc_NetrWkstaUserInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
3903 : }
3904 0 : break;
3905 :
3906 0 : case 1101:
3907 0 : if (r->info1101) {
3908 0 : NDR_CHECK(ndr_push_wkssvc_NetrWkstaUserInfo1101(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1101));
3909 : }
3910 0 : break;
3911 :
3912 0 : default:
3913 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
3914 : }
3915 : }
3916 0 : return NDR_ERR_SUCCESS;
3917 : }
3918 :
3919 0 : static enum ndr_err_code ndr_pull_wkssvc_NetrWkstaUserInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union wkssvc_NetrWkstaUserInfo *r)
3920 : {
3921 0 : uint32_t level;
3922 0 : uint32_t _level;
3923 0 : TALLOC_CTX *_mem_save_info0_0 = NULL;
3924 0 : uint32_t _ptr_info0;
3925 0 : TALLOC_CTX *_mem_save_info1_0 = NULL;
3926 0 : uint32_t _ptr_info1;
3927 0 : TALLOC_CTX *_mem_save_info1101_0 = NULL;
3928 0 : uint32_t _ptr_info1101;
3929 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3930 0 : if (ndr_flags & NDR_SCALARS) {
3931 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3932 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3933 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
3934 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
3935 0 : if (_level != level) {
3936 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
3937 : }
3938 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
3939 0 : switch (level) {
3940 0 : case 0: {
3941 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
3942 0 : if (_ptr_info0) {
3943 0 : NDR_PULL_ALLOC(ndr, r->info0);
3944 : } else {
3945 0 : r->info0 = NULL;
3946 : }
3947 0 : break; }
3948 :
3949 0 : case 1: {
3950 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
3951 0 : if (_ptr_info1) {
3952 0 : NDR_PULL_ALLOC(ndr, r->info1);
3953 : } else {
3954 0 : r->info1 = NULL;
3955 : }
3956 0 : break; }
3957 :
3958 0 : case 1101: {
3959 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1101));
3960 0 : if (_ptr_info1101) {
3961 0 : NDR_PULL_ALLOC(ndr, r->info1101);
3962 : } else {
3963 0 : r->info1101 = NULL;
3964 : }
3965 0 : break; }
3966 :
3967 0 : default:
3968 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
3969 : }
3970 : }
3971 0 : if (ndr_flags & NDR_BUFFERS) {
3972 0 : if (!(ndr_flags & NDR_SCALARS)) {
3973 : /* We didn't get it above, and the token is not needed after this. */
3974 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3975 : }
3976 0 : switch (level) {
3977 0 : case 0:
3978 0 : if (r->info0) {
3979 0 : _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
3980 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
3981 0 : NDR_CHECK(ndr_pull_wkssvc_NetrWkstaUserInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
3982 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
3983 : }
3984 0 : break;
3985 :
3986 0 : case 1:
3987 0 : if (r->info1) {
3988 0 : _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
3989 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
3990 0 : NDR_CHECK(ndr_pull_wkssvc_NetrWkstaUserInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
3991 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
3992 : }
3993 0 : break;
3994 :
3995 0 : case 1101:
3996 0 : if (r->info1101) {
3997 0 : _mem_save_info1101_0 = NDR_PULL_GET_MEM_CTX(ndr);
3998 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1101, 0);
3999 0 : NDR_CHECK(ndr_pull_wkssvc_NetrWkstaUserInfo1101(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1101));
4000 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1101_0, 0);
4001 : }
4002 0 : break;
4003 :
4004 0 : default:
4005 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
4006 : }
4007 : }
4008 0 : return NDR_ERR_SUCCESS;
4009 : }
4010 :
4011 0 : _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserInfo(struct ndr_print *ndr, const char *name, const union wkssvc_NetrWkstaUserInfo *r)
4012 : {
4013 0 : uint32_t level;
4014 0 : level = ndr_print_steal_switch_value(ndr, r);
4015 0 : ndr_print_union(ndr, name, level, "wkssvc_NetrWkstaUserInfo");
4016 0 : switch (level) {
4017 0 : case 0:
4018 0 : ndr_print_ptr(ndr, "info0", r->info0);
4019 0 : ndr->depth++;
4020 0 : if (r->info0) {
4021 0 : ndr_print_wkssvc_NetrWkstaUserInfo0(ndr, "info0", r->info0);
4022 : }
4023 0 : ndr->depth--;
4024 0 : break;
4025 :
4026 0 : case 1:
4027 0 : ndr_print_ptr(ndr, "info1", r->info1);
4028 0 : ndr->depth++;
4029 0 : if (r->info1) {
4030 0 : ndr_print_wkssvc_NetrWkstaUserInfo1(ndr, "info1", r->info1);
4031 : }
4032 0 : ndr->depth--;
4033 0 : break;
4034 :
4035 0 : case 1101:
4036 0 : ndr_print_ptr(ndr, "info1101", r->info1101);
4037 0 : ndr->depth++;
4038 0 : if (r->info1101) {
4039 0 : ndr_print_wkssvc_NetrWkstaUserInfo1101(ndr, "info1101", r->info1101);
4040 : }
4041 0 : ndr->depth--;
4042 0 : break;
4043 :
4044 0 : default:
4045 0 : ndr_print_bad_level(ndr, name, level);
4046 : }
4047 0 : }
4048 :
4049 6 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaTransportInfo0(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaTransportInfo0 *r)
4050 : {
4051 6 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4052 6 : if (ndr_flags & NDR_SCALARS) {
4053 6 : NDR_CHECK(ndr_push_align(ndr, 5));
4054 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->quality_of_service));
4055 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vc_count));
4056 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
4057 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->address));
4058 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->wan_link));
4059 6 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4060 : }
4061 6 : if (ndr_flags & NDR_BUFFERS) {
4062 6 : if (r->name) {
4063 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4064 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4065 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4066 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4067 : }
4068 6 : if (r->address) {
4069 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->address, CH_UTF16)));
4070 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4071 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->address, CH_UTF16)));
4072 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->address, ndr_charset_length(r->address, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4073 : }
4074 : }
4075 6 : return NDR_ERR_SUCCESS;
4076 : }
4077 :
4078 6 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaTransportInfo0(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaTransportInfo0 *r)
4079 : {
4080 0 : uint32_t _ptr_name;
4081 6 : uint32_t size_name_1 = 0;
4082 6 : uint32_t length_name_1 = 0;
4083 6 : TALLOC_CTX *_mem_save_name_0 = NULL;
4084 0 : uint32_t _ptr_address;
4085 6 : uint32_t size_address_1 = 0;
4086 6 : uint32_t length_address_1 = 0;
4087 6 : TALLOC_CTX *_mem_save_address_0 = NULL;
4088 6 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4089 6 : if (ndr_flags & NDR_SCALARS) {
4090 6 : NDR_CHECK(ndr_pull_align(ndr, 5));
4091 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->quality_of_service));
4092 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vc_count));
4093 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
4094 6 : if (_ptr_name) {
4095 6 : NDR_PULL_ALLOC(ndr, r->name);
4096 : } else {
4097 0 : r->name = NULL;
4098 : }
4099 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_address));
4100 6 : if (_ptr_address) {
4101 6 : NDR_PULL_ALLOC(ndr, r->address);
4102 : } else {
4103 0 : r->address = NULL;
4104 : }
4105 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->wan_link));
4106 6 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4107 : }
4108 6 : if (ndr_flags & NDR_BUFFERS) {
4109 6 : if (r->name) {
4110 6 : _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4111 6 : NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
4112 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
4113 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
4114 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->name, &size_name_1));
4115 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->name, &length_name_1));
4116 6 : if (length_name_1 > size_name_1) {
4117 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_name_1, length_name_1);
4118 : }
4119 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
4120 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
4121 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
4122 : }
4123 6 : if (r->address) {
4124 6 : _mem_save_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
4125 6 : NDR_PULL_SET_MEM_CTX(ndr, r->address, 0);
4126 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->address));
4127 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->address));
4128 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->address, &size_address_1));
4129 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->address, &length_address_1));
4130 6 : if (length_address_1 > size_address_1) {
4131 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_address_1, length_address_1);
4132 : }
4133 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_address_1, sizeof(uint16_t)));
4134 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->address, length_address_1, sizeof(uint16_t), CH_UTF16));
4135 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_address_0, 0);
4136 : }
4137 : }
4138 6 : return NDR_ERR_SUCCESS;
4139 : }
4140 :
4141 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportInfo0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaTransportInfo0 *r)
4142 : {
4143 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaTransportInfo0");
4144 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4145 0 : ndr->depth++;
4146 0 : ndr_print_uint32(ndr, "quality_of_service", r->quality_of_service);
4147 0 : ndr_print_uint32(ndr, "vc_count", r->vc_count);
4148 0 : ndr_print_ptr(ndr, "name", r->name);
4149 0 : ndr->depth++;
4150 0 : if (r->name) {
4151 0 : ndr_print_string(ndr, "name", r->name);
4152 : }
4153 0 : ndr->depth--;
4154 0 : ndr_print_ptr(ndr, "address", r->address);
4155 0 : ndr->depth++;
4156 0 : if (r->address) {
4157 0 : ndr_print_string(ndr, "address", r->address);
4158 : }
4159 0 : ndr->depth--;
4160 0 : ndr_print_uint32(ndr, "wan_link", r->wan_link);
4161 0 : ndr->depth--;
4162 : }
4163 :
4164 11 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaTransportCtr0(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaTransportCtr0 *r)
4165 : {
4166 0 : uint32_t cntr_array_1;
4167 11 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4168 11 : if (ndr_flags & NDR_SCALARS) {
4169 11 : NDR_CHECK(ndr_push_align(ndr, 5));
4170 11 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4171 11 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4172 11 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4173 : }
4174 11 : if (ndr_flags & NDR_BUFFERS) {
4175 11 : if (r->array) {
4176 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4177 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
4178 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4179 : }
4180 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
4181 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4182 : }
4183 : }
4184 : }
4185 11 : return NDR_ERR_SUCCESS;
4186 : }
4187 :
4188 10 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaTransportCtr0(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaTransportCtr0 *r)
4189 : {
4190 0 : uint32_t _ptr_array;
4191 10 : uint32_t size_array_1 = 0;
4192 0 : uint32_t cntr_array_1;
4193 10 : TALLOC_CTX *_mem_save_array_0 = NULL;
4194 10 : TALLOC_CTX *_mem_save_array_1 = NULL;
4195 10 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4196 10 : if (ndr_flags & NDR_SCALARS) {
4197 10 : NDR_CHECK(ndr_pull_align(ndr, 5));
4198 10 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4199 10 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4200 10 : if (_ptr_array) {
4201 0 : NDR_PULL_ALLOC(ndr, r->array);
4202 : } else {
4203 10 : r->array = NULL;
4204 : }
4205 10 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4206 : }
4207 10 : if (ndr_flags & NDR_BUFFERS) {
4208 10 : if (r->array) {
4209 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4210 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4211 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4212 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
4213 0 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
4214 0 : _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4215 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4216 0 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
4217 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4218 : }
4219 0 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
4220 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4221 : }
4222 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4223 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4224 : }
4225 10 : if (r->array) {
4226 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4227 : }
4228 10 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
4229 0 : }
4230 : }
4231 10 : return NDR_ERR_SUCCESS;
4232 : }
4233 :
4234 2 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportCtr0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaTransportCtr0 *r)
4235 : {
4236 0 : uint32_t cntr_array_1;
4237 2 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaTransportCtr0");
4238 2 : if (r == NULL) { ndr_print_null(ndr); return; }
4239 2 : ndr->depth++;
4240 2 : ndr_print_uint32(ndr, "count", r->count);
4241 2 : ndr_print_ptr(ndr, "array", r->array);
4242 2 : ndr->depth++;
4243 2 : if (r->array) {
4244 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
4245 0 : ndr->depth++;
4246 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
4247 0 : ndr_print_wkssvc_NetWkstaTransportInfo0(ndr, "array", &r->array[cntr_array_1]);
4248 : }
4249 0 : ndr->depth--;
4250 : }
4251 2 : ndr->depth--;
4252 2 : ndr->depth--;
4253 : }
4254 :
4255 22 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaTransportCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union wkssvc_NetWkstaTransportCtr *r)
4256 : {
4257 0 : uint32_t level;
4258 22 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4259 22 : if (ndr_flags & NDR_SCALARS) {
4260 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4261 11 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4262 11 : NDR_CHECK(ndr_push_union_align(ndr, 5));
4263 11 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
4264 11 : NDR_CHECK(ndr_push_union_align(ndr, 5));
4265 11 : switch (level) {
4266 11 : case 0: {
4267 11 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
4268 11 : break; }
4269 :
4270 0 : default:
4271 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
4272 : }
4273 : }
4274 22 : if (ndr_flags & NDR_BUFFERS) {
4275 11 : if (!(ndr_flags & NDR_SCALARS)) {
4276 : /* We didn't get it above, and the token is not needed after this. */
4277 11 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
4278 : }
4279 11 : switch (level) {
4280 11 : case 0:
4281 11 : if (r->ctr0) {
4282 11 : NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
4283 : }
4284 11 : break;
4285 :
4286 0 : default:
4287 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
4288 : }
4289 : }
4290 22 : return NDR_ERR_SUCCESS;
4291 : }
4292 :
4293 20 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaTransportCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union wkssvc_NetWkstaTransportCtr *r)
4294 : {
4295 0 : uint32_t level;
4296 0 : uint32_t _level;
4297 20 : TALLOC_CTX *_mem_save_ctr0_0 = NULL;
4298 0 : uint32_t _ptr_ctr0;
4299 20 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4300 20 : if (ndr_flags & NDR_SCALARS) {
4301 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
4302 10 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4303 10 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
4304 10 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
4305 10 : if (_level != level) {
4306 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
4307 : }
4308 10 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
4309 10 : switch (level) {
4310 10 : case 0: {
4311 10 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
4312 10 : if (_ptr_ctr0) {
4313 10 : NDR_PULL_ALLOC(ndr, r->ctr0);
4314 : } else {
4315 0 : r->ctr0 = NULL;
4316 : }
4317 10 : break; }
4318 :
4319 0 : default:
4320 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
4321 : }
4322 : }
4323 20 : if (ndr_flags & NDR_BUFFERS) {
4324 10 : if (!(ndr_flags & NDR_SCALARS)) {
4325 : /* We didn't get it above, and the token is not needed after this. */
4326 10 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
4327 : }
4328 10 : switch (level) {
4329 10 : case 0:
4330 10 : if (r->ctr0) {
4331 10 : _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
4332 10 : NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
4333 10 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
4334 10 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
4335 : }
4336 10 : break;
4337 :
4338 0 : default:
4339 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
4340 : }
4341 : }
4342 20 : return NDR_ERR_SUCCESS;
4343 : }
4344 :
4345 2 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportCtr(struct ndr_print *ndr, const char *name, const union wkssvc_NetWkstaTransportCtr *r)
4346 : {
4347 0 : uint32_t level;
4348 2 : level = ndr_print_steal_switch_value(ndr, r);
4349 2 : ndr_print_union(ndr, name, level, "wkssvc_NetWkstaTransportCtr");
4350 2 : switch (level) {
4351 2 : case 0:
4352 2 : ndr_print_ptr(ndr, "ctr0", r->ctr0);
4353 2 : ndr->depth++;
4354 2 : if (r->ctr0) {
4355 2 : ndr_print_wkssvc_NetWkstaTransportCtr0(ndr, "ctr0", r->ctr0);
4356 : }
4357 2 : ndr->depth--;
4358 2 : break;
4359 :
4360 0 : default:
4361 0 : ndr_print_bad_level(ndr, name, level);
4362 : }
4363 2 : }
4364 :
4365 11 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaTransportInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetWkstaTransportInfo *r)
4366 : {
4367 11 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4368 11 : if (ndr_flags & NDR_SCALARS) {
4369 11 : NDR_CHECK(ndr_push_align(ndr, 5));
4370 11 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
4371 11 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
4372 11 : NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportCtr(ndr, NDR_SCALARS, &r->ctr));
4373 11 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4374 : }
4375 11 : if (ndr_flags & NDR_BUFFERS) {
4376 11 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
4377 11 : NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportCtr(ndr, NDR_BUFFERS, &r->ctr));
4378 : }
4379 11 : return NDR_ERR_SUCCESS;
4380 : }
4381 :
4382 10 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaTransportInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetWkstaTransportInfo *r)
4383 : {
4384 10 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4385 10 : if (ndr_flags & NDR_SCALARS) {
4386 10 : NDR_CHECK(ndr_pull_align(ndr, 5));
4387 10 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
4388 10 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
4389 10 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportCtr(ndr, NDR_SCALARS, &r->ctr));
4390 10 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4391 : }
4392 10 : if (ndr_flags & NDR_BUFFERS) {
4393 10 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
4394 10 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportCtr(ndr, NDR_BUFFERS, &r->ctr));
4395 : }
4396 10 : return NDR_ERR_SUCCESS;
4397 : }
4398 :
4399 2 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportInfo(struct ndr_print *ndr, const char *name, const struct wkssvc_NetWkstaTransportInfo *r)
4400 : {
4401 2 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaTransportInfo");
4402 2 : if (r == NULL) { ndr_print_null(ndr); return; }
4403 2 : ndr->depth++;
4404 2 : ndr_print_uint32(ndr, "level", r->level);
4405 2 : ndr_print_set_switch_value(ndr, &r->ctr, r->level);
4406 2 : ndr_print_wkssvc_NetWkstaTransportCtr(ndr, "ctr", &r->ctr);
4407 2 : ndr->depth--;
4408 : }
4409 :
4410 0 : static enum ndr_err_code ndr_push_wkssvc_NetrUseInfo3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetrUseInfo3 *r)
4411 : {
4412 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4413 0 : if (ndr_flags & NDR_SCALARS) {
4414 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4415 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown1));
4416 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown2));
4417 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4418 : }
4419 0 : if (ndr_flags & NDR_BUFFERS) {
4420 0 : if (r->unknown1) {
4421 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->unknown1, CH_UTF16)));
4422 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4423 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->unknown1, CH_UTF16)));
4424 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->unknown1, ndr_charset_length(r->unknown1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4425 : }
4426 0 : if (r->unknown2) {
4427 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
4428 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4429 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
4430 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->unknown2, ndr_charset_length(r->unknown2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4431 : }
4432 : }
4433 0 : return NDR_ERR_SUCCESS;
4434 : }
4435 :
4436 0 : static enum ndr_err_code ndr_pull_wkssvc_NetrUseInfo3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetrUseInfo3 *r)
4437 : {
4438 0 : uint32_t _ptr_unknown1;
4439 0 : uint32_t size_unknown1_1 = 0;
4440 0 : uint32_t length_unknown1_1 = 0;
4441 0 : TALLOC_CTX *_mem_save_unknown1_0 = NULL;
4442 0 : uint32_t _ptr_unknown2;
4443 0 : uint32_t size_unknown2_1 = 0;
4444 0 : uint32_t length_unknown2_1 = 0;
4445 0 : TALLOC_CTX *_mem_save_unknown2_0 = NULL;
4446 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4447 0 : if (ndr_flags & NDR_SCALARS) {
4448 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4449 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown1));
4450 0 : if (_ptr_unknown1) {
4451 0 : NDR_PULL_ALLOC(ndr, r->unknown1);
4452 : } else {
4453 0 : r->unknown1 = NULL;
4454 : }
4455 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4456 0 : if (_ptr_unknown2) {
4457 0 : NDR_PULL_ALLOC(ndr, r->unknown2);
4458 : } else {
4459 0 : r->unknown2 = NULL;
4460 : }
4461 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4462 : }
4463 0 : if (ndr_flags & NDR_BUFFERS) {
4464 0 : if (r->unknown1) {
4465 0 : _mem_save_unknown1_0 = NDR_PULL_GET_MEM_CTX(ndr);
4466 0 : NDR_PULL_SET_MEM_CTX(ndr, r->unknown1, 0);
4467 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->unknown1));
4468 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->unknown1));
4469 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->unknown1, &size_unknown1_1));
4470 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->unknown1, &length_unknown1_1));
4471 0 : if (length_unknown1_1 > size_unknown1_1) {
4472 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_unknown1_1, length_unknown1_1);
4473 : }
4474 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_unknown1_1, sizeof(uint16_t)));
4475 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->unknown1, length_unknown1_1, sizeof(uint16_t), CH_UTF16));
4476 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown1_0, 0);
4477 : }
4478 0 : if (r->unknown2) {
4479 0 : _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
4480 0 : NDR_PULL_SET_MEM_CTX(ndr, r->unknown2, 0);
4481 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->unknown2));
4482 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->unknown2));
4483 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->unknown2, &size_unknown2_1));
4484 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->unknown2, &length_unknown2_1));
4485 0 : if (length_unknown2_1 > size_unknown2_1) {
4486 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_unknown2_1, length_unknown2_1);
4487 : }
4488 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_unknown2_1, sizeof(uint16_t)));
4489 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->unknown2, length_unknown2_1, sizeof(uint16_t), CH_UTF16));
4490 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
4491 : }
4492 : }
4493 0 : return NDR_ERR_SUCCESS;
4494 : }
4495 :
4496 0 : _PUBLIC_ void ndr_print_wkssvc_NetrUseInfo3(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseInfo3 *r)
4497 : {
4498 0 : ndr_print_struct(ndr, name, "wkssvc_NetrUseInfo3");
4499 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4500 0 : ndr->depth++;
4501 0 : ndr_print_ptr(ndr, "unknown1", r->unknown1);
4502 0 : ndr->depth++;
4503 0 : if (r->unknown1) {
4504 0 : ndr_print_string(ndr, "unknown1", r->unknown1);
4505 : }
4506 0 : ndr->depth--;
4507 0 : ndr_print_ptr(ndr, "unknown2", r->unknown2);
4508 0 : ndr->depth++;
4509 0 : if (r->unknown2) {
4510 0 : ndr_print_string(ndr, "unknown2", r->unknown2);
4511 : }
4512 0 : ndr->depth--;
4513 0 : ndr->depth--;
4514 : }
4515 :
4516 0 : static enum ndr_err_code ndr_push_wkssvc_NetrUseInfo2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetrUseInfo2 *r)
4517 : {
4518 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4519 0 : if (ndr_flags & NDR_SCALARS) {
4520 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4521 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->local));
4522 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->remote));
4523 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
4524 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->status));
4525 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->asg_type));
4526 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ref_count));
4527 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_count));
4528 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->user_name));
4529 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_name));
4530 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4531 : }
4532 0 : if (ndr_flags & NDR_BUFFERS) {
4533 0 : if (r->local) {
4534 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->local, CH_UTF16)));
4535 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4536 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->local, CH_UTF16)));
4537 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->local, ndr_charset_length(r->local, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4538 : }
4539 0 : if (r->remote) {
4540 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote, CH_UTF16)));
4541 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4542 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote, CH_UTF16)));
4543 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->remote, ndr_charset_length(r->remote, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4544 : }
4545 0 : if (r->password) {
4546 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4547 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4548 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4549 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->password, ndr_charset_length(r->password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4550 : }
4551 0 : if (r->user_name) {
4552 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
4553 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4554 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
4555 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user_name, ndr_charset_length(r->user_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4556 : }
4557 0 : if (r->domain_name) {
4558 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
4559 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4560 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
4561 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain_name, ndr_charset_length(r->domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4562 : }
4563 : }
4564 0 : return NDR_ERR_SUCCESS;
4565 : }
4566 :
4567 0 : static enum ndr_err_code ndr_pull_wkssvc_NetrUseInfo2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetrUseInfo2 *r)
4568 : {
4569 0 : uint32_t _ptr_local;
4570 0 : uint32_t size_local_1 = 0;
4571 0 : uint32_t length_local_1 = 0;
4572 0 : TALLOC_CTX *_mem_save_local_0 = NULL;
4573 0 : uint32_t _ptr_remote;
4574 0 : uint32_t size_remote_1 = 0;
4575 0 : uint32_t length_remote_1 = 0;
4576 0 : TALLOC_CTX *_mem_save_remote_0 = NULL;
4577 0 : uint32_t _ptr_password;
4578 0 : uint32_t size_password_1 = 0;
4579 0 : uint32_t length_password_1 = 0;
4580 0 : TALLOC_CTX *_mem_save_password_0 = NULL;
4581 0 : uint32_t _ptr_user_name;
4582 0 : uint32_t size_user_name_1 = 0;
4583 0 : uint32_t length_user_name_1 = 0;
4584 0 : TALLOC_CTX *_mem_save_user_name_0 = NULL;
4585 0 : uint32_t _ptr_domain_name;
4586 0 : uint32_t size_domain_name_1 = 0;
4587 0 : uint32_t length_domain_name_1 = 0;
4588 0 : TALLOC_CTX *_mem_save_domain_name_0 = NULL;
4589 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4590 0 : if (ndr_flags & NDR_SCALARS) {
4591 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4592 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_local));
4593 0 : if (_ptr_local) {
4594 0 : NDR_PULL_ALLOC(ndr, r->local);
4595 : } else {
4596 0 : r->local = NULL;
4597 : }
4598 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_remote));
4599 0 : if (_ptr_remote) {
4600 0 : NDR_PULL_ALLOC(ndr, r->remote);
4601 : } else {
4602 0 : r->remote = NULL;
4603 : }
4604 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4605 0 : if (_ptr_password) {
4606 0 : NDR_PULL_ALLOC(ndr, r->password);
4607 : } else {
4608 0 : r->password = NULL;
4609 : }
4610 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->status));
4611 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->asg_type));
4612 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ref_count));
4613 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_count));
4614 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
4615 0 : if (_ptr_user_name) {
4616 0 : NDR_PULL_ALLOC(ndr, r->user_name);
4617 : } else {
4618 0 : r->user_name = NULL;
4619 : }
4620 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
4621 0 : if (_ptr_domain_name) {
4622 0 : NDR_PULL_ALLOC(ndr, r->domain_name);
4623 : } else {
4624 0 : r->domain_name = NULL;
4625 : }
4626 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4627 : }
4628 0 : if (ndr_flags & NDR_BUFFERS) {
4629 0 : if (r->local) {
4630 0 : _mem_save_local_0 = NDR_PULL_GET_MEM_CTX(ndr);
4631 0 : NDR_PULL_SET_MEM_CTX(ndr, r->local, 0);
4632 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->local));
4633 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->local));
4634 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->local, &size_local_1));
4635 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->local, &length_local_1));
4636 0 : if (length_local_1 > size_local_1) {
4637 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_local_1, length_local_1);
4638 : }
4639 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_local_1, sizeof(uint16_t)));
4640 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->local, length_local_1, sizeof(uint16_t), CH_UTF16));
4641 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_local_0, 0);
4642 : }
4643 0 : if (r->remote) {
4644 0 : _mem_save_remote_0 = NDR_PULL_GET_MEM_CTX(ndr);
4645 0 : NDR_PULL_SET_MEM_CTX(ndr, r->remote, 0);
4646 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->remote));
4647 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->remote));
4648 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->remote, &size_remote_1));
4649 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->remote, &length_remote_1));
4650 0 : if (length_remote_1 > size_remote_1) {
4651 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_remote_1, length_remote_1);
4652 : }
4653 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_remote_1, sizeof(uint16_t)));
4654 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->remote, length_remote_1, sizeof(uint16_t), CH_UTF16));
4655 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_remote_0, 0);
4656 : }
4657 0 : if (r->password) {
4658 0 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4659 0 : NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
4660 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->password));
4661 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->password));
4662 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->password, &size_password_1));
4663 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->password, &length_password_1));
4664 0 : if (length_password_1 > size_password_1) {
4665 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_password_1, length_password_1);
4666 : }
4667 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_password_1, sizeof(uint16_t)));
4668 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->password, length_password_1, sizeof(uint16_t), CH_UTF16));
4669 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4670 : }
4671 0 : if (r->user_name) {
4672 0 : _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4673 0 : NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
4674 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->user_name));
4675 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->user_name));
4676 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user_name, &size_user_name_1));
4677 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user_name, &length_user_name_1));
4678 0 : if (length_user_name_1 > size_user_name_1) {
4679 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_user_name_1, length_user_name_1);
4680 : }
4681 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_user_name_1, sizeof(uint16_t)));
4682 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user_name, length_user_name_1, sizeof(uint16_t), CH_UTF16));
4683 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
4684 : }
4685 0 : if (r->domain_name) {
4686 0 : _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4687 0 : NDR_PULL_SET_MEM_CTX(ndr, r->domain_name, 0);
4688 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->domain_name));
4689 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->domain_name));
4690 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain_name, &size_domain_name_1));
4691 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain_name, &length_domain_name_1));
4692 0 : if (length_domain_name_1 > size_domain_name_1) {
4693 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
4694 : }
4695 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
4696 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
4697 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
4698 : }
4699 : }
4700 0 : return NDR_ERR_SUCCESS;
4701 : }
4702 :
4703 0 : _PUBLIC_ void ndr_print_wkssvc_NetrUseInfo2(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseInfo2 *r)
4704 : {
4705 0 : ndr_print_struct(ndr, name, "wkssvc_NetrUseInfo2");
4706 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4707 0 : ndr->depth++;
4708 0 : ndr_print_ptr(ndr, "local", r->local);
4709 0 : ndr->depth++;
4710 0 : if (r->local) {
4711 0 : ndr_print_string(ndr, "local", r->local);
4712 : }
4713 0 : ndr->depth--;
4714 0 : ndr_print_ptr(ndr, "remote", r->remote);
4715 0 : ndr->depth++;
4716 0 : if (r->remote) {
4717 0 : ndr_print_string(ndr, "remote", r->remote);
4718 : }
4719 0 : ndr->depth--;
4720 0 : ndr_print_ptr(ndr, "password", r->password);
4721 0 : ndr->depth++;
4722 0 : if (r->password) {
4723 0 : ndr_print_string(ndr, "password", r->password);
4724 : }
4725 0 : ndr->depth--;
4726 0 : ndr_print_uint32(ndr, "status", r->status);
4727 0 : ndr_print_uint32(ndr, "asg_type", r->asg_type);
4728 0 : ndr_print_uint32(ndr, "ref_count", r->ref_count);
4729 0 : ndr_print_uint32(ndr, "use_count", r->use_count);
4730 0 : ndr_print_ptr(ndr, "user_name", r->user_name);
4731 0 : ndr->depth++;
4732 0 : if (r->user_name) {
4733 0 : ndr_print_string(ndr, "user_name", r->user_name);
4734 : }
4735 0 : ndr->depth--;
4736 0 : ndr_print_ptr(ndr, "domain_name", r->domain_name);
4737 0 : ndr->depth++;
4738 0 : if (r->domain_name) {
4739 0 : ndr_print_string(ndr, "domain_name", r->domain_name);
4740 : }
4741 0 : ndr->depth--;
4742 0 : ndr->depth--;
4743 : }
4744 :
4745 0 : static enum ndr_err_code ndr_push_wkssvc_NetrUseInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetrUseInfo1 *r)
4746 : {
4747 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4748 0 : if (ndr_flags & NDR_SCALARS) {
4749 0 : NDR_CHECK(ndr_push_align(ndr, 5));
4750 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->local));
4751 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->remote));
4752 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
4753 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->status));
4754 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->asg_type));
4755 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ref_count));
4756 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_count));
4757 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4758 : }
4759 0 : if (ndr_flags & NDR_BUFFERS) {
4760 0 : if (r->local) {
4761 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->local, CH_UTF16)));
4762 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4763 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->local, CH_UTF16)));
4764 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->local, ndr_charset_length(r->local, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4765 : }
4766 0 : if (r->remote) {
4767 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote, CH_UTF16)));
4768 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4769 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote, CH_UTF16)));
4770 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->remote, ndr_charset_length(r->remote, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4771 : }
4772 0 : if (r->password) {
4773 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4774 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4775 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4776 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->password, ndr_charset_length(r->password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4777 : }
4778 : }
4779 0 : return NDR_ERR_SUCCESS;
4780 : }
4781 :
4782 0 : static enum ndr_err_code ndr_pull_wkssvc_NetrUseInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetrUseInfo1 *r)
4783 : {
4784 0 : uint32_t _ptr_local;
4785 0 : uint32_t size_local_1 = 0;
4786 0 : uint32_t length_local_1 = 0;
4787 0 : TALLOC_CTX *_mem_save_local_0 = NULL;
4788 0 : uint32_t _ptr_remote;
4789 0 : uint32_t size_remote_1 = 0;
4790 0 : uint32_t length_remote_1 = 0;
4791 0 : TALLOC_CTX *_mem_save_remote_0 = NULL;
4792 0 : uint32_t _ptr_password;
4793 0 : uint32_t size_password_1 = 0;
4794 0 : uint32_t length_password_1 = 0;
4795 0 : TALLOC_CTX *_mem_save_password_0 = NULL;
4796 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4797 0 : if (ndr_flags & NDR_SCALARS) {
4798 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
4799 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_local));
4800 0 : if (_ptr_local) {
4801 0 : NDR_PULL_ALLOC(ndr, r->local);
4802 : } else {
4803 0 : r->local = NULL;
4804 : }
4805 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_remote));
4806 0 : if (_ptr_remote) {
4807 0 : NDR_PULL_ALLOC(ndr, r->remote);
4808 : } else {
4809 0 : r->remote = NULL;
4810 : }
4811 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4812 0 : if (_ptr_password) {
4813 0 : NDR_PULL_ALLOC(ndr, r->password);
4814 : } else {
4815 0 : r->password = NULL;
4816 : }
4817 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->status));
4818 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->asg_type));
4819 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ref_count));
4820 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_count));
4821 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4822 : }
4823 0 : if (ndr_flags & NDR_BUFFERS) {
4824 0 : if (r->local) {
4825 0 : _mem_save_local_0 = NDR_PULL_GET_MEM_CTX(ndr);
4826 0 : NDR_PULL_SET_MEM_CTX(ndr, r->local, 0);
4827 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->local));
4828 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->local));
4829 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->local, &size_local_1));
4830 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->local, &length_local_1));
4831 0 : if (length_local_1 > size_local_1) {
4832 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_local_1, length_local_1);
4833 : }
4834 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_local_1, sizeof(uint16_t)));
4835 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->local, length_local_1, sizeof(uint16_t), CH_UTF16));
4836 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_local_0, 0);
4837 : }
4838 0 : if (r->remote) {
4839 0 : _mem_save_remote_0 = NDR_PULL_GET_MEM_CTX(ndr);
4840 0 : NDR_PULL_SET_MEM_CTX(ndr, r->remote, 0);
4841 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->remote));
4842 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->remote));
4843 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->remote, &size_remote_1));
4844 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->remote, &length_remote_1));
4845 0 : if (length_remote_1 > size_remote_1) {
4846 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_remote_1, length_remote_1);
4847 : }
4848 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_remote_1, sizeof(uint16_t)));
4849 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->remote, length_remote_1, sizeof(uint16_t), CH_UTF16));
4850 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_remote_0, 0);
4851 : }
4852 0 : if (r->password) {
4853 0 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4854 0 : NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
4855 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->password));
4856 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->password));
4857 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->password, &size_password_1));
4858 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->password, &length_password_1));
4859 0 : if (length_password_1 > size_password_1) {
4860 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_password_1, length_password_1);
4861 : }
4862 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_password_1, sizeof(uint16_t)));
4863 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->password, length_password_1, sizeof(uint16_t), CH_UTF16));
4864 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4865 : }
4866 : }
4867 0 : return NDR_ERR_SUCCESS;
4868 : }
4869 :
4870 0 : _PUBLIC_ void ndr_print_wkssvc_NetrUseInfo1(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseInfo1 *r)
4871 : {
4872 0 : ndr_print_struct(ndr, name, "wkssvc_NetrUseInfo1");
4873 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4874 0 : ndr->depth++;
4875 0 : ndr_print_ptr(ndr, "local", r->local);
4876 0 : ndr->depth++;
4877 0 : if (r->local) {
4878 0 : ndr_print_string(ndr, "local", r->local);
4879 : }
4880 0 : ndr->depth--;
4881 0 : ndr_print_ptr(ndr, "remote", r->remote);
4882 0 : ndr->depth++;
4883 0 : if (r->remote) {
4884 0 : ndr_print_string(ndr, "remote", r->remote);
4885 : }
4886 0 : ndr->depth--;
4887 0 : ndr_print_ptr(ndr, "password", r->password);
4888 0 : ndr->depth++;
4889 0 : if (r->password) {
4890 0 : ndr_print_string(ndr, "password", r->password);
4891 : }
4892 0 : ndr->depth--;
4893 0 : ndr_print_uint32(ndr, "status", r->status);
4894 0 : ndr_print_uint32(ndr, "asg_type", r->asg_type);
4895 0 : ndr_print_uint32(ndr, "ref_count", r->ref_count);
4896 0 : ndr_print_uint32(ndr, "use_count", r->use_count);
4897 0 : ndr->depth--;
4898 : }
4899 :
4900 6 : static enum ndr_err_code ndr_push_wkssvc_NetrUseInfo0(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetrUseInfo0 *r)
4901 : {
4902 6 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
4903 6 : if (ndr_flags & NDR_SCALARS) {
4904 6 : NDR_CHECK(ndr_push_align(ndr, 5));
4905 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->local));
4906 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->remote));
4907 6 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4908 : }
4909 6 : if (ndr_flags & NDR_BUFFERS) {
4910 6 : if (r->local) {
4911 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->local, CH_UTF16)));
4912 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4913 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->local, CH_UTF16)));
4914 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->local, ndr_charset_length(r->local, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4915 : }
4916 6 : if (r->remote) {
4917 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote, CH_UTF16)));
4918 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4919 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote, CH_UTF16)));
4920 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->remote, ndr_charset_length(r->remote, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4921 : }
4922 : }
4923 6 : return NDR_ERR_SUCCESS;
4924 : }
4925 :
4926 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrUseInfo0(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetrUseInfo0 *r)
4927 : {
4928 0 : uint32_t _ptr_local;
4929 6 : uint32_t size_local_1 = 0;
4930 6 : uint32_t length_local_1 = 0;
4931 6 : TALLOC_CTX *_mem_save_local_0 = NULL;
4932 0 : uint32_t _ptr_remote;
4933 6 : uint32_t size_remote_1 = 0;
4934 6 : uint32_t length_remote_1 = 0;
4935 6 : TALLOC_CTX *_mem_save_remote_0 = NULL;
4936 6 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
4937 6 : if (ndr_flags & NDR_SCALARS) {
4938 6 : NDR_CHECK(ndr_pull_align(ndr, 5));
4939 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_local));
4940 6 : if (_ptr_local) {
4941 6 : NDR_PULL_ALLOC(ndr, r->local);
4942 : } else {
4943 0 : r->local = NULL;
4944 : }
4945 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_remote));
4946 6 : if (_ptr_remote) {
4947 6 : NDR_PULL_ALLOC(ndr, r->remote);
4948 : } else {
4949 0 : r->remote = NULL;
4950 : }
4951 6 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4952 : }
4953 6 : if (ndr_flags & NDR_BUFFERS) {
4954 6 : if (r->local) {
4955 6 : _mem_save_local_0 = NDR_PULL_GET_MEM_CTX(ndr);
4956 6 : NDR_PULL_SET_MEM_CTX(ndr, r->local, 0);
4957 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->local));
4958 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->local));
4959 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->local, &size_local_1));
4960 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->local, &length_local_1));
4961 6 : if (length_local_1 > size_local_1) {
4962 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_local_1, length_local_1);
4963 : }
4964 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_local_1, sizeof(uint16_t)));
4965 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->local, length_local_1, sizeof(uint16_t), CH_UTF16));
4966 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_local_0, 0);
4967 : }
4968 6 : if (r->remote) {
4969 6 : _mem_save_remote_0 = NDR_PULL_GET_MEM_CTX(ndr);
4970 6 : NDR_PULL_SET_MEM_CTX(ndr, r->remote, 0);
4971 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->remote));
4972 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->remote));
4973 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->remote, &size_remote_1));
4974 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->remote, &length_remote_1));
4975 6 : if (length_remote_1 > size_remote_1) {
4976 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_remote_1, length_remote_1);
4977 : }
4978 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_remote_1, sizeof(uint16_t)));
4979 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->remote, length_remote_1, sizeof(uint16_t), CH_UTF16));
4980 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_remote_0, 0);
4981 : }
4982 : }
4983 6 : return NDR_ERR_SUCCESS;
4984 : }
4985 :
4986 0 : _PUBLIC_ void ndr_print_wkssvc_NetrUseInfo0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseInfo0 *r)
4987 : {
4988 0 : ndr_print_struct(ndr, name, "wkssvc_NetrUseInfo0");
4989 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4990 0 : ndr->depth++;
4991 0 : ndr_print_ptr(ndr, "local", r->local);
4992 0 : ndr->depth++;
4993 0 : if (r->local) {
4994 0 : ndr_print_string(ndr, "local", r->local);
4995 : }
4996 0 : ndr->depth--;
4997 0 : ndr_print_ptr(ndr, "remote", r->remote);
4998 0 : ndr->depth++;
4999 0 : if (r->remote) {
5000 0 : ndr_print_string(ndr, "remote", r->remote);
5001 : }
5002 0 : ndr->depth--;
5003 0 : ndr->depth--;
5004 : }
5005 :
5006 6 : static enum ndr_err_code ndr_push_wkssvc_NetrUseGetInfoCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union wkssvc_NetrUseGetInfoCtr *r)
5007 : {
5008 0 : uint32_t level;
5009 6 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5010 6 : if (ndr_flags & NDR_SCALARS) {
5011 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5012 6 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5013 6 : NDR_CHECK(ndr_push_union_align(ndr, 5));
5014 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
5015 6 : NDR_CHECK(ndr_push_union_align(ndr, 5));
5016 6 : switch (level) {
5017 6 : case 0: {
5018 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
5019 6 : break; }
5020 :
5021 0 : case 1: {
5022 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
5023 0 : break; }
5024 :
5025 0 : case 2: {
5026 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
5027 0 : break; }
5028 :
5029 0 : case 3: {
5030 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
5031 0 : break; }
5032 :
5033 0 : default:
5034 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
5035 : }
5036 : }
5037 6 : if (ndr_flags & NDR_BUFFERS) {
5038 6 : if (!(ndr_flags & NDR_SCALARS)) {
5039 : /* We didn't get it above, and the token is not needed after this. */
5040 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5041 : }
5042 6 : switch (level) {
5043 6 : case 0:
5044 6 : if (r->info0) {
5045 6 : NDR_CHECK(ndr_push_wkssvc_NetrUseInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
5046 : }
5047 6 : break;
5048 :
5049 0 : case 1:
5050 0 : if (r->info1) {
5051 0 : NDR_CHECK(ndr_push_wkssvc_NetrUseInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
5052 : }
5053 0 : break;
5054 :
5055 0 : case 2:
5056 0 : if (r->info2) {
5057 0 : NDR_CHECK(ndr_push_wkssvc_NetrUseInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
5058 : }
5059 0 : break;
5060 :
5061 0 : case 3:
5062 0 : if (r->info3) {
5063 0 : NDR_CHECK(ndr_push_wkssvc_NetrUseInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
5064 : }
5065 0 : break;
5066 :
5067 0 : default:
5068 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
5069 : }
5070 : }
5071 6 : return NDR_ERR_SUCCESS;
5072 : }
5073 :
5074 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrUseGetInfoCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union wkssvc_NetrUseGetInfoCtr *r)
5075 : {
5076 0 : uint32_t level;
5077 0 : uint32_t _level;
5078 6 : TALLOC_CTX *_mem_save_info0_0 = NULL;
5079 0 : uint32_t _ptr_info0;
5080 6 : TALLOC_CTX *_mem_save_info1_0 = NULL;
5081 0 : uint32_t _ptr_info1;
5082 6 : TALLOC_CTX *_mem_save_info2_0 = NULL;
5083 0 : uint32_t _ptr_info2;
5084 6 : TALLOC_CTX *_mem_save_info3_0 = NULL;
5085 0 : uint32_t _ptr_info3;
5086 6 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5087 6 : if (ndr_flags & NDR_SCALARS) {
5088 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5089 6 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5090 6 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
5091 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
5092 6 : if (_level != level) {
5093 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
5094 : }
5095 6 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
5096 6 : switch (level) {
5097 6 : case 0: {
5098 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
5099 6 : if (_ptr_info0) {
5100 6 : NDR_PULL_ALLOC(ndr, r->info0);
5101 : } else {
5102 0 : r->info0 = NULL;
5103 : }
5104 6 : break; }
5105 :
5106 0 : case 1: {
5107 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
5108 0 : if (_ptr_info1) {
5109 0 : NDR_PULL_ALLOC(ndr, r->info1);
5110 : } else {
5111 0 : r->info1 = NULL;
5112 : }
5113 0 : break; }
5114 :
5115 0 : case 2: {
5116 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
5117 0 : if (_ptr_info2) {
5118 0 : NDR_PULL_ALLOC(ndr, r->info2);
5119 : } else {
5120 0 : r->info2 = NULL;
5121 : }
5122 0 : break; }
5123 :
5124 0 : case 3: {
5125 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
5126 0 : if (_ptr_info3) {
5127 0 : NDR_PULL_ALLOC(ndr, r->info3);
5128 : } else {
5129 0 : r->info3 = NULL;
5130 : }
5131 0 : break; }
5132 :
5133 0 : default:
5134 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
5135 : }
5136 : }
5137 6 : if (ndr_flags & NDR_BUFFERS) {
5138 6 : if (!(ndr_flags & NDR_SCALARS)) {
5139 : /* We didn't get it above, and the token is not needed after this. */
5140 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5141 : }
5142 6 : switch (level) {
5143 6 : case 0:
5144 6 : if (r->info0) {
5145 6 : _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
5146 6 : NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
5147 6 : NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
5148 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
5149 : }
5150 6 : break;
5151 :
5152 0 : case 1:
5153 0 : if (r->info1) {
5154 0 : _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
5155 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
5156 0 : NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
5157 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
5158 : }
5159 0 : break;
5160 :
5161 0 : case 2:
5162 0 : if (r->info2) {
5163 0 : _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
5164 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
5165 0 : NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
5166 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
5167 : }
5168 0 : break;
5169 :
5170 0 : case 3:
5171 0 : if (r->info3) {
5172 0 : _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
5173 0 : NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
5174 0 : NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
5175 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
5176 : }
5177 0 : break;
5178 :
5179 0 : default:
5180 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
5181 : }
5182 : }
5183 6 : return NDR_ERR_SUCCESS;
5184 : }
5185 :
5186 0 : _PUBLIC_ void ndr_print_wkssvc_NetrUseGetInfoCtr(struct ndr_print *ndr, const char *name, const union wkssvc_NetrUseGetInfoCtr *r)
5187 : {
5188 0 : uint32_t level;
5189 0 : level = ndr_print_steal_switch_value(ndr, r);
5190 0 : ndr_print_union(ndr, name, level, "wkssvc_NetrUseGetInfoCtr");
5191 0 : switch (level) {
5192 0 : case 0:
5193 0 : ndr_print_ptr(ndr, "info0", r->info0);
5194 0 : ndr->depth++;
5195 0 : if (r->info0) {
5196 0 : ndr_print_wkssvc_NetrUseInfo0(ndr, "info0", r->info0);
5197 : }
5198 0 : ndr->depth--;
5199 0 : break;
5200 :
5201 0 : case 1:
5202 0 : ndr_print_ptr(ndr, "info1", r->info1);
5203 0 : ndr->depth++;
5204 0 : if (r->info1) {
5205 0 : ndr_print_wkssvc_NetrUseInfo1(ndr, "info1", r->info1);
5206 : }
5207 0 : ndr->depth--;
5208 0 : break;
5209 :
5210 0 : case 2:
5211 0 : ndr_print_ptr(ndr, "info2", r->info2);
5212 0 : ndr->depth++;
5213 0 : if (r->info2) {
5214 0 : ndr_print_wkssvc_NetrUseInfo2(ndr, "info2", r->info2);
5215 : }
5216 0 : ndr->depth--;
5217 0 : break;
5218 :
5219 0 : case 3:
5220 0 : ndr_print_ptr(ndr, "info3", r->info3);
5221 0 : ndr->depth++;
5222 0 : if (r->info3) {
5223 0 : ndr_print_wkssvc_NetrUseInfo3(ndr, "info3", r->info3);
5224 : }
5225 0 : ndr->depth--;
5226 0 : break;
5227 :
5228 0 : default:
5229 0 : ndr_print_bad_level(ndr, name, level);
5230 : }
5231 0 : }
5232 :
5233 0 : static enum ndr_err_code ndr_push_wkssvc_NetrUseEnumCtr2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetrUseEnumCtr2 *r)
5234 : {
5235 0 : uint32_t cntr_array_1;
5236 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5237 0 : if (ndr_flags & NDR_SCALARS) {
5238 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5239 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5240 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5241 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5242 : }
5243 0 : if (ndr_flags & NDR_BUFFERS) {
5244 0 : if (r->array) {
5245 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
5246 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
5247 0 : NDR_CHECK(ndr_push_wkssvc_NetrUseInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5248 : }
5249 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
5250 0 : NDR_CHECK(ndr_push_wkssvc_NetrUseInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5251 : }
5252 : }
5253 : }
5254 0 : return NDR_ERR_SUCCESS;
5255 : }
5256 :
5257 0 : static enum ndr_err_code ndr_pull_wkssvc_NetrUseEnumCtr2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetrUseEnumCtr2 *r)
5258 : {
5259 0 : uint32_t _ptr_array;
5260 0 : uint32_t size_array_1 = 0;
5261 0 : uint32_t cntr_array_1;
5262 0 : TALLOC_CTX *_mem_save_array_0 = NULL;
5263 0 : TALLOC_CTX *_mem_save_array_1 = NULL;
5264 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5265 0 : if (ndr_flags & NDR_SCALARS) {
5266 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5267 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5268 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5269 0 : if (_ptr_array) {
5270 0 : NDR_PULL_ALLOC(ndr, r->array);
5271 : } else {
5272 0 : r->array = NULL;
5273 : }
5274 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5275 : }
5276 0 : if (ndr_flags & NDR_BUFFERS) {
5277 0 : if (r->array) {
5278 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5279 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5280 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5281 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
5282 0 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
5283 0 : _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5284 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5285 0 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
5286 0 : NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5287 : }
5288 0 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
5289 0 : NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5290 : }
5291 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5292 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5293 : }
5294 0 : if (r->array) {
5295 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5296 : }
5297 0 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
5298 0 : }
5299 : }
5300 0 : return NDR_ERR_SUCCESS;
5301 : }
5302 :
5303 0 : _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr2(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseEnumCtr2 *r)
5304 : {
5305 0 : uint32_t cntr_array_1;
5306 0 : ndr_print_struct(ndr, name, "wkssvc_NetrUseEnumCtr2");
5307 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5308 0 : ndr->depth++;
5309 0 : ndr_print_uint32(ndr, "count", r->count);
5310 0 : ndr_print_ptr(ndr, "array", r->array);
5311 0 : ndr->depth++;
5312 0 : if (r->array) {
5313 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
5314 0 : ndr->depth++;
5315 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
5316 0 : ndr_print_wkssvc_NetrUseInfo2(ndr, "array", &r->array[cntr_array_1]);
5317 : }
5318 0 : ndr->depth--;
5319 : }
5320 0 : ndr->depth--;
5321 0 : ndr->depth--;
5322 : }
5323 :
5324 0 : static enum ndr_err_code ndr_push_wkssvc_NetrUseEnumCtr1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetrUseEnumCtr1 *r)
5325 : {
5326 0 : uint32_t cntr_array_1;
5327 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5328 0 : if (ndr_flags & NDR_SCALARS) {
5329 0 : NDR_CHECK(ndr_push_align(ndr, 5));
5330 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5331 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5332 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5333 : }
5334 0 : if (ndr_flags & NDR_BUFFERS) {
5335 0 : if (r->array) {
5336 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
5337 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
5338 0 : NDR_CHECK(ndr_push_wkssvc_NetrUseInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5339 : }
5340 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
5341 0 : NDR_CHECK(ndr_push_wkssvc_NetrUseInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5342 : }
5343 : }
5344 : }
5345 0 : return NDR_ERR_SUCCESS;
5346 : }
5347 :
5348 0 : static enum ndr_err_code ndr_pull_wkssvc_NetrUseEnumCtr1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetrUseEnumCtr1 *r)
5349 : {
5350 0 : uint32_t _ptr_array;
5351 0 : uint32_t size_array_1 = 0;
5352 0 : uint32_t cntr_array_1;
5353 0 : TALLOC_CTX *_mem_save_array_0 = NULL;
5354 0 : TALLOC_CTX *_mem_save_array_1 = NULL;
5355 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5356 0 : if (ndr_flags & NDR_SCALARS) {
5357 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
5358 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5359 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5360 0 : if (_ptr_array) {
5361 0 : NDR_PULL_ALLOC(ndr, r->array);
5362 : } else {
5363 0 : r->array = NULL;
5364 : }
5365 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5366 : }
5367 0 : if (ndr_flags & NDR_BUFFERS) {
5368 0 : if (r->array) {
5369 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5370 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5371 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5372 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
5373 0 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
5374 0 : _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5375 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5376 0 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
5377 0 : NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5378 : }
5379 0 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
5380 0 : NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5381 : }
5382 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5383 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5384 : }
5385 0 : if (r->array) {
5386 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5387 : }
5388 0 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
5389 0 : }
5390 : }
5391 0 : return NDR_ERR_SUCCESS;
5392 : }
5393 :
5394 0 : _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr1(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseEnumCtr1 *r)
5395 : {
5396 0 : uint32_t cntr_array_1;
5397 0 : ndr_print_struct(ndr, name, "wkssvc_NetrUseEnumCtr1");
5398 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5399 0 : ndr->depth++;
5400 0 : ndr_print_uint32(ndr, "count", r->count);
5401 0 : ndr_print_ptr(ndr, "array", r->array);
5402 0 : ndr->depth++;
5403 0 : if (r->array) {
5404 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
5405 0 : ndr->depth++;
5406 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
5407 0 : ndr_print_wkssvc_NetrUseInfo1(ndr, "array", &r->array[cntr_array_1]);
5408 : }
5409 0 : ndr->depth--;
5410 : }
5411 0 : ndr->depth--;
5412 0 : ndr->depth--;
5413 : }
5414 :
5415 12 : static enum ndr_err_code ndr_push_wkssvc_NetrUseEnumCtr0(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetrUseEnumCtr0 *r)
5416 : {
5417 0 : uint32_t cntr_array_1;
5418 12 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5419 12 : if (ndr_flags & NDR_SCALARS) {
5420 12 : NDR_CHECK(ndr_push_align(ndr, 5));
5421 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5422 12 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5423 12 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5424 : }
5425 12 : if (ndr_flags & NDR_BUFFERS) {
5426 12 : if (r->array) {
5427 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
5428 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
5429 0 : NDR_CHECK(ndr_push_wkssvc_NetrUseInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5430 : }
5431 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
5432 0 : NDR_CHECK(ndr_push_wkssvc_NetrUseInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5433 : }
5434 : }
5435 : }
5436 12 : return NDR_ERR_SUCCESS;
5437 : }
5438 :
5439 12 : static enum ndr_err_code ndr_pull_wkssvc_NetrUseEnumCtr0(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetrUseEnumCtr0 *r)
5440 : {
5441 0 : uint32_t _ptr_array;
5442 12 : uint32_t size_array_1 = 0;
5443 0 : uint32_t cntr_array_1;
5444 12 : TALLOC_CTX *_mem_save_array_0 = NULL;
5445 12 : TALLOC_CTX *_mem_save_array_1 = NULL;
5446 12 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5447 12 : if (ndr_flags & NDR_SCALARS) {
5448 12 : NDR_CHECK(ndr_pull_align(ndr, 5));
5449 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5450 12 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5451 12 : if (_ptr_array) {
5452 0 : NDR_PULL_ALLOC(ndr, r->array);
5453 : } else {
5454 12 : r->array = NULL;
5455 : }
5456 12 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5457 : }
5458 12 : if (ndr_flags & NDR_BUFFERS) {
5459 12 : if (r->array) {
5460 0 : _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5461 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5462 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5463 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
5464 0 : NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
5465 0 : _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5466 0 : NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5467 0 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
5468 0 : NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5469 : }
5470 0 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
5471 0 : NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5472 : }
5473 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5474 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5475 : }
5476 12 : if (r->array) {
5477 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5478 : }
5479 12 : for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
5480 0 : }
5481 : }
5482 12 : return NDR_ERR_SUCCESS;
5483 : }
5484 :
5485 0 : _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr0(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseEnumCtr0 *r)
5486 : {
5487 0 : uint32_t cntr_array_1;
5488 0 : ndr_print_struct(ndr, name, "wkssvc_NetrUseEnumCtr0");
5489 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5490 0 : ndr->depth++;
5491 0 : ndr_print_uint32(ndr, "count", r->count);
5492 0 : ndr_print_ptr(ndr, "array", r->array);
5493 0 : ndr->depth++;
5494 0 : if (r->array) {
5495 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
5496 0 : ndr->depth++;
5497 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
5498 0 : ndr_print_wkssvc_NetrUseInfo0(ndr, "array", &r->array[cntr_array_1]);
5499 : }
5500 0 : ndr->depth--;
5501 : }
5502 0 : ndr->depth--;
5503 0 : ndr->depth--;
5504 : }
5505 :
5506 24 : static enum ndr_err_code ndr_push_wkssvc_NetrUseEnumCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union wkssvc_NetrUseEnumCtr *r)
5507 : {
5508 0 : uint32_t level;
5509 24 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5510 24 : if (ndr_flags & NDR_SCALARS) {
5511 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5512 12 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5513 12 : NDR_CHECK(ndr_push_union_align(ndr, 5));
5514 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
5515 12 : NDR_CHECK(ndr_push_union_align(ndr, 5));
5516 12 : switch (level) {
5517 12 : case 0: {
5518 12 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
5519 12 : break; }
5520 :
5521 0 : case 1: {
5522 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
5523 0 : break; }
5524 :
5525 0 : case 2: {
5526 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
5527 0 : break; }
5528 :
5529 0 : default:
5530 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
5531 : }
5532 : }
5533 24 : if (ndr_flags & NDR_BUFFERS) {
5534 12 : if (!(ndr_flags & NDR_SCALARS)) {
5535 : /* We didn't get it above, and the token is not needed after this. */
5536 12 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
5537 : }
5538 12 : switch (level) {
5539 12 : case 0:
5540 12 : if (r->ctr0) {
5541 12 : NDR_CHECK(ndr_push_wkssvc_NetrUseEnumCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
5542 : }
5543 12 : break;
5544 :
5545 0 : case 1:
5546 0 : if (r->ctr1) {
5547 0 : NDR_CHECK(ndr_push_wkssvc_NetrUseEnumCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
5548 : }
5549 0 : break;
5550 :
5551 0 : case 2:
5552 0 : if (r->ctr2) {
5553 0 : NDR_CHECK(ndr_push_wkssvc_NetrUseEnumCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
5554 : }
5555 0 : break;
5556 :
5557 0 : default:
5558 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
5559 : }
5560 : }
5561 24 : return NDR_ERR_SUCCESS;
5562 : }
5563 :
5564 24 : static enum ndr_err_code ndr_pull_wkssvc_NetrUseEnumCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union wkssvc_NetrUseEnumCtr *r)
5565 : {
5566 0 : uint32_t level;
5567 0 : uint32_t _level;
5568 24 : TALLOC_CTX *_mem_save_ctr0_0 = NULL;
5569 0 : uint32_t _ptr_ctr0;
5570 24 : TALLOC_CTX *_mem_save_ctr1_0 = NULL;
5571 0 : uint32_t _ptr_ctr1;
5572 24 : TALLOC_CTX *_mem_save_ctr2_0 = NULL;
5573 0 : uint32_t _ptr_ctr2;
5574 24 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5575 24 : if (ndr_flags & NDR_SCALARS) {
5576 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
5577 12 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5578 12 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
5579 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
5580 12 : if (_level != level) {
5581 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
5582 : }
5583 12 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
5584 12 : switch (level) {
5585 12 : case 0: {
5586 12 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
5587 12 : if (_ptr_ctr0) {
5588 12 : NDR_PULL_ALLOC(ndr, r->ctr0);
5589 : } else {
5590 0 : r->ctr0 = NULL;
5591 : }
5592 12 : break; }
5593 :
5594 0 : case 1: {
5595 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
5596 0 : if (_ptr_ctr1) {
5597 0 : NDR_PULL_ALLOC(ndr, r->ctr1);
5598 : } else {
5599 0 : r->ctr1 = NULL;
5600 : }
5601 0 : break; }
5602 :
5603 0 : case 2: {
5604 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
5605 0 : if (_ptr_ctr2) {
5606 0 : NDR_PULL_ALLOC(ndr, r->ctr2);
5607 : } else {
5608 0 : r->ctr2 = NULL;
5609 : }
5610 0 : break; }
5611 :
5612 0 : default:
5613 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
5614 : }
5615 : }
5616 24 : if (ndr_flags & NDR_BUFFERS) {
5617 12 : if (!(ndr_flags & NDR_SCALARS)) {
5618 : /* We didn't get it above, and the token is not needed after this. */
5619 12 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
5620 : }
5621 12 : switch (level) {
5622 12 : case 0:
5623 12 : if (r->ctr0) {
5624 12 : _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
5625 12 : NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
5626 12 : NDR_CHECK(ndr_pull_wkssvc_NetrUseEnumCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
5627 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
5628 : }
5629 12 : break;
5630 :
5631 0 : case 1:
5632 0 : if (r->ctr1) {
5633 0 : _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
5634 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
5635 0 : NDR_CHECK(ndr_pull_wkssvc_NetrUseEnumCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
5636 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
5637 : }
5638 0 : break;
5639 :
5640 0 : case 2:
5641 0 : if (r->ctr2) {
5642 0 : _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
5643 0 : NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
5644 0 : NDR_CHECK(ndr_pull_wkssvc_NetrUseEnumCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
5645 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
5646 : }
5647 0 : break;
5648 :
5649 0 : default:
5650 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
5651 : }
5652 : }
5653 24 : return NDR_ERR_SUCCESS;
5654 : }
5655 :
5656 0 : _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr(struct ndr_print *ndr, const char *name, const union wkssvc_NetrUseEnumCtr *r)
5657 : {
5658 0 : uint32_t level;
5659 0 : level = ndr_print_steal_switch_value(ndr, r);
5660 0 : ndr_print_union(ndr, name, level, "wkssvc_NetrUseEnumCtr");
5661 0 : switch (level) {
5662 0 : case 0:
5663 0 : ndr_print_ptr(ndr, "ctr0", r->ctr0);
5664 0 : ndr->depth++;
5665 0 : if (r->ctr0) {
5666 0 : ndr_print_wkssvc_NetrUseEnumCtr0(ndr, "ctr0", r->ctr0);
5667 : }
5668 0 : ndr->depth--;
5669 0 : break;
5670 :
5671 0 : case 1:
5672 0 : ndr_print_ptr(ndr, "ctr1", r->ctr1);
5673 0 : ndr->depth++;
5674 0 : if (r->ctr1) {
5675 0 : ndr_print_wkssvc_NetrUseEnumCtr1(ndr, "ctr1", r->ctr1);
5676 : }
5677 0 : ndr->depth--;
5678 0 : break;
5679 :
5680 0 : case 2:
5681 0 : ndr_print_ptr(ndr, "ctr2", r->ctr2);
5682 0 : ndr->depth++;
5683 0 : if (r->ctr2) {
5684 0 : ndr_print_wkssvc_NetrUseEnumCtr2(ndr, "ctr2", r->ctr2);
5685 : }
5686 0 : ndr->depth--;
5687 0 : break;
5688 :
5689 0 : default:
5690 0 : ndr_print_bad_level(ndr, name, level);
5691 : }
5692 0 : }
5693 :
5694 12 : static enum ndr_err_code ndr_push_wkssvc_NetrUseEnumInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetrUseEnumInfo *r)
5695 : {
5696 12 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5697 12 : if (ndr_flags & NDR_SCALARS) {
5698 12 : NDR_CHECK(ndr_push_align(ndr, 5));
5699 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
5700 12 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
5701 12 : NDR_CHECK(ndr_push_wkssvc_NetrUseEnumCtr(ndr, NDR_SCALARS, &r->ctr));
5702 12 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5703 : }
5704 12 : if (ndr_flags & NDR_BUFFERS) {
5705 12 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
5706 12 : NDR_CHECK(ndr_push_wkssvc_NetrUseEnumCtr(ndr, NDR_BUFFERS, &r->ctr));
5707 : }
5708 12 : return NDR_ERR_SUCCESS;
5709 : }
5710 :
5711 12 : static enum ndr_err_code ndr_pull_wkssvc_NetrUseEnumInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetrUseEnumInfo *r)
5712 : {
5713 12 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5714 12 : if (ndr_flags & NDR_SCALARS) {
5715 12 : NDR_CHECK(ndr_pull_align(ndr, 5));
5716 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
5717 12 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
5718 12 : NDR_CHECK(ndr_pull_wkssvc_NetrUseEnumCtr(ndr, NDR_SCALARS, &r->ctr));
5719 12 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5720 : }
5721 12 : if (ndr_flags & NDR_BUFFERS) {
5722 12 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
5723 12 : NDR_CHECK(ndr_pull_wkssvc_NetrUseEnumCtr(ndr, NDR_BUFFERS, &r->ctr));
5724 : }
5725 12 : return NDR_ERR_SUCCESS;
5726 : }
5727 :
5728 0 : _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumInfo(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrUseEnumInfo *r)
5729 : {
5730 0 : ndr_print_struct(ndr, name, "wkssvc_NetrUseEnumInfo");
5731 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5732 0 : ndr->depth++;
5733 0 : ndr_print_uint32(ndr, "level", r->level);
5734 0 : ndr_print_set_switch_value(ndr, &r->ctr, r->level);
5735 0 : ndr_print_wkssvc_NetrUseEnumCtr(ndr, "ctr", &r->ctr);
5736 0 : ndr->depth--;
5737 : }
5738 :
5739 0 : static enum ndr_err_code ndr_push_wkssvc_NetrWorkstationStatistics(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_NetrWorkstationStatistics *r)
5740 : {
5741 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5742 0 : if (ndr_flags & NDR_SCALARS) {
5743 0 : NDR_CHECK(ndr_push_align(ndr, 8));
5744 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown1));
5745 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown2));
5746 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown3));
5747 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown4));
5748 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown5));
5749 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown6));
5750 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown7));
5751 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown8));
5752 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown9));
5753 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown10));
5754 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown11));
5755 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown12));
5756 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown13));
5757 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown14));
5758 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown15));
5759 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown16));
5760 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown17));
5761 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown18));
5762 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown19));
5763 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown20));
5764 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown21));
5765 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown22));
5766 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown23));
5767 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown24));
5768 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown25));
5769 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown26));
5770 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown27));
5771 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown28));
5772 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown29));
5773 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown30));
5774 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown31));
5775 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown32));
5776 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown33));
5777 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown34));
5778 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown35));
5779 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown36));
5780 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown37));
5781 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown38));
5782 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown39));
5783 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown40));
5784 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
5785 : }
5786 0 : if (ndr_flags & NDR_BUFFERS) {
5787 0 : }
5788 0 : return NDR_ERR_SUCCESS;
5789 : }
5790 :
5791 0 : static enum ndr_err_code ndr_pull_wkssvc_NetrWorkstationStatistics(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_NetrWorkstationStatistics *r)
5792 : {
5793 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5794 0 : if (ndr_flags & NDR_SCALARS) {
5795 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
5796 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown1));
5797 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown2));
5798 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown3));
5799 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown4));
5800 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown5));
5801 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown6));
5802 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown7));
5803 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown8));
5804 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown9));
5805 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown10));
5806 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown11));
5807 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown12));
5808 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown13));
5809 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown14));
5810 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown15));
5811 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown16));
5812 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown17));
5813 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown18));
5814 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown19));
5815 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown20));
5816 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown21));
5817 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown22));
5818 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown23));
5819 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown24));
5820 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown25));
5821 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown26));
5822 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown27));
5823 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown28));
5824 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown29));
5825 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown30));
5826 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown31));
5827 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown32));
5828 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown33));
5829 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown34));
5830 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown35));
5831 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown36));
5832 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown37));
5833 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown38));
5834 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown39));
5835 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown40));
5836 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
5837 : }
5838 0 : if (ndr_flags & NDR_BUFFERS) {
5839 0 : }
5840 0 : return NDR_ERR_SUCCESS;
5841 : }
5842 :
5843 0 : _PUBLIC_ void ndr_print_wkssvc_NetrWorkstationStatistics(struct ndr_print *ndr, const char *name, const struct wkssvc_NetrWorkstationStatistics *r)
5844 : {
5845 0 : ndr_print_struct(ndr, name, "wkssvc_NetrWorkstationStatistics");
5846 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5847 0 : ndr->depth++;
5848 0 : ndr_print_hyper(ndr, "unknown1", r->unknown1);
5849 0 : ndr_print_hyper(ndr, "unknown2", r->unknown2);
5850 0 : ndr_print_hyper(ndr, "unknown3", r->unknown3);
5851 0 : ndr_print_hyper(ndr, "unknown4", r->unknown4);
5852 0 : ndr_print_hyper(ndr, "unknown5", r->unknown5);
5853 0 : ndr_print_hyper(ndr, "unknown6", r->unknown6);
5854 0 : ndr_print_hyper(ndr, "unknown7", r->unknown7);
5855 0 : ndr_print_hyper(ndr, "unknown8", r->unknown8);
5856 0 : ndr_print_hyper(ndr, "unknown9", r->unknown9);
5857 0 : ndr_print_hyper(ndr, "unknown10", r->unknown10);
5858 0 : ndr_print_hyper(ndr, "unknown11", r->unknown11);
5859 0 : ndr_print_hyper(ndr, "unknown12", r->unknown12);
5860 0 : ndr_print_hyper(ndr, "unknown13", r->unknown13);
5861 0 : ndr_print_uint32(ndr, "unknown14", r->unknown14);
5862 0 : ndr_print_uint32(ndr, "unknown15", r->unknown15);
5863 0 : ndr_print_uint32(ndr, "unknown16", r->unknown16);
5864 0 : ndr_print_uint32(ndr, "unknown17", r->unknown17);
5865 0 : ndr_print_uint32(ndr, "unknown18", r->unknown18);
5866 0 : ndr_print_uint32(ndr, "unknown19", r->unknown19);
5867 0 : ndr_print_uint32(ndr, "unknown20", r->unknown20);
5868 0 : ndr_print_uint32(ndr, "unknown21", r->unknown21);
5869 0 : ndr_print_uint32(ndr, "unknown22", r->unknown22);
5870 0 : ndr_print_uint32(ndr, "unknown23", r->unknown23);
5871 0 : ndr_print_uint32(ndr, "unknown24", r->unknown24);
5872 0 : ndr_print_uint32(ndr, "unknown25", r->unknown25);
5873 0 : ndr_print_uint32(ndr, "unknown26", r->unknown26);
5874 0 : ndr_print_uint32(ndr, "unknown27", r->unknown27);
5875 0 : ndr_print_uint32(ndr, "unknown28", r->unknown28);
5876 0 : ndr_print_uint32(ndr, "unknown29", r->unknown29);
5877 0 : ndr_print_uint32(ndr, "unknown30", r->unknown30);
5878 0 : ndr_print_uint32(ndr, "unknown31", r->unknown31);
5879 0 : ndr_print_uint32(ndr, "unknown32", r->unknown32);
5880 0 : ndr_print_uint32(ndr, "unknown33", r->unknown33);
5881 0 : ndr_print_uint32(ndr, "unknown34", r->unknown34);
5882 0 : ndr_print_uint32(ndr, "unknown35", r->unknown35);
5883 0 : ndr_print_uint32(ndr, "unknown36", r->unknown36);
5884 0 : ndr_print_uint32(ndr, "unknown37", r->unknown37);
5885 0 : ndr_print_uint32(ndr, "unknown38", r->unknown38);
5886 0 : ndr_print_uint32(ndr, "unknown39", r->unknown39);
5887 0 : ndr_print_uint32(ndr, "unknown40", r->unknown40);
5888 0 : ndr->depth--;
5889 : }
5890 :
5891 0 : static enum ndr_err_code ndr_push_wkssvc_renameflags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
5892 : {
5893 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
5894 0 : return NDR_ERR_SUCCESS;
5895 : }
5896 :
5897 0 : static enum ndr_err_code ndr_pull_wkssvc_renameflags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
5898 : {
5899 0 : uint32_t v;
5900 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
5901 0 : *r = v;
5902 0 : return NDR_ERR_SUCCESS;
5903 : }
5904 :
5905 0 : _PUBLIC_ void ndr_print_wkssvc_renameflags(struct ndr_print *ndr, const char *name, uint32_t r)
5906 : {
5907 0 : ndr_print_uint32(ndr, name, r);
5908 0 : ndr->depth++;
5909 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE", WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE, r);
5910 0 : ndr->depth--;
5911 0 : }
5912 :
5913 12 : static enum ndr_err_code ndr_push_wkssvc_NetValidateNameType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum wkssvc_NetValidateNameType r)
5914 : {
5915 12 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
5916 12 : return NDR_ERR_SUCCESS;
5917 : }
5918 :
5919 12 : static enum ndr_err_code ndr_pull_wkssvc_NetValidateNameType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum wkssvc_NetValidateNameType *r)
5920 : {
5921 0 : uint16_t v;
5922 12 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
5923 12 : *r = v;
5924 12 : return NDR_ERR_SUCCESS;
5925 : }
5926 :
5927 0 : _PUBLIC_ void ndr_print_wkssvc_NetValidateNameType(struct ndr_print *ndr, const char *name, enum wkssvc_NetValidateNameType r)
5928 : {
5929 0 : const char *val = NULL;
5930 :
5931 0 : switch (r) {
5932 0 : case NetSetupUnknown: val = "NetSetupUnknown"; break;
5933 0 : case NetSetupMachine: val = "NetSetupMachine"; break;
5934 0 : case NetSetupWorkgroup: val = "NetSetupWorkgroup"; break;
5935 0 : case NetSetupDomain: val = "NetSetupDomain"; break;
5936 0 : case NetSetupNonExistentDomain: val = "NetSetupNonExistentDomain"; break;
5937 0 : case NetSetupDnsMachine: val = "NetSetupDnsMachine"; break;
5938 : }
5939 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
5940 0 : }
5941 :
5942 0 : static enum ndr_err_code ndr_push_wkssvc_NetJoinStatus(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum wkssvc_NetJoinStatus r)
5943 : {
5944 0 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
5945 0 : return NDR_ERR_SUCCESS;
5946 : }
5947 :
5948 0 : static enum ndr_err_code ndr_pull_wkssvc_NetJoinStatus(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum wkssvc_NetJoinStatus *r)
5949 : {
5950 0 : uint16_t v;
5951 0 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
5952 0 : *r = v;
5953 0 : return NDR_ERR_SUCCESS;
5954 : }
5955 :
5956 0 : _PUBLIC_ void ndr_print_wkssvc_NetJoinStatus(struct ndr_print *ndr, const char *name, enum wkssvc_NetJoinStatus r)
5957 : {
5958 0 : const char *val = NULL;
5959 :
5960 0 : switch (r) {
5961 0 : case NET_SETUP_UNKNOWN_STATUS: val = "NET_SETUP_UNKNOWN_STATUS"; break;
5962 0 : case NET_SETUP_UNJOINED: val = "NET_SETUP_UNJOINED"; break;
5963 0 : case NET_SETUP_WORKGROUP_NAME: val = "NET_SETUP_WORKGROUP_NAME"; break;
5964 0 : case NET_SETUP_DOMAIN_NAME: val = "NET_SETUP_DOMAIN_NAME"; break;
5965 : }
5966 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
5967 0 : }
5968 :
5969 0 : static enum ndr_err_code ndr_push_wkssvc_PasswordBuffer(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_PasswordBuffer *r)
5970 : {
5971 : {
5972 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
5973 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
5974 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
5975 0 : if (ndr_flags & NDR_SCALARS) {
5976 0 : NDR_CHECK(ndr_push_align(ndr, 1));
5977 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 524));
5978 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
5979 : }
5980 0 : if (ndr_flags & NDR_BUFFERS) {
5981 0 : }
5982 0 : ndr->flags = _flags_save_STRUCT;
5983 : }
5984 0 : return NDR_ERR_SUCCESS;
5985 : }
5986 :
5987 0 : static enum ndr_err_code ndr_pull_wkssvc_PasswordBuffer(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_PasswordBuffer *r)
5988 : {
5989 0 : uint32_t size_data_0 = 0;
5990 : {
5991 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
5992 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
5993 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
5994 0 : if (ndr_flags & NDR_SCALARS) {
5995 0 : NDR_CHECK(ndr_pull_align(ndr, 1));
5996 0 : size_data_0 = 524;
5997 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_0));
5998 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
5999 : }
6000 0 : if (ndr_flags & NDR_BUFFERS) {
6001 0 : }
6002 0 : ndr->flags = _flags_save_STRUCT;
6003 : }
6004 0 : return NDR_ERR_SUCCESS;
6005 : }
6006 :
6007 0 : _PUBLIC_ void ndr_print_wkssvc_PasswordBuffer(struct ndr_print *ndr, const char *name, const struct wkssvc_PasswordBuffer *r)
6008 : {
6009 0 : ndr_print_struct(ndr, name, "wkssvc_PasswordBuffer");
6010 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6011 : {
6012 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
6013 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
6014 0 : ndr->depth++;
6015 0 : ndr_print_array_uint8(ndr, "data", r->data, 524);
6016 0 : ndr->depth--;
6017 0 : ndr->flags = _flags_save_STRUCT;
6018 : }
6019 : }
6020 :
6021 12 : static enum ndr_err_code ndr_push_wkssvc_joinflags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
6022 : {
6023 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
6024 12 : return NDR_ERR_SUCCESS;
6025 : }
6026 :
6027 12 : static enum ndr_err_code ndr_pull_wkssvc_joinflags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
6028 : {
6029 0 : uint32_t v;
6030 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
6031 12 : *r = v;
6032 12 : return NDR_ERR_SUCCESS;
6033 : }
6034 :
6035 126 : _PUBLIC_ void ndr_print_wkssvc_joinflags(struct ndr_print *ndr, const char *name, uint32_t r)
6036 : {
6037 126 : ndr_print_uint32(ndr, name, r);
6038 126 : ndr->depth++;
6039 126 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_IGNORE_UNSUPPORTED_FLAGS", WKSSVC_JOIN_FLAGS_IGNORE_UNSUPPORTED_FLAGS, r);
6040 126 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_JOIN_WITH_NEW_NAME", WKSSVC_JOIN_FLAGS_JOIN_WITH_NEW_NAME, r);
6041 126 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_JOIN_DC_ACCOUNT", WKSSVC_JOIN_FLAGS_JOIN_DC_ACCOUNT, r);
6042 126 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_DEFER_SPN", WKSSVC_JOIN_FLAGS_DEFER_SPN, r);
6043 126 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_MACHINE_PWD_PASSED", WKSSVC_JOIN_FLAGS_MACHINE_PWD_PASSED, r);
6044 126 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_JOIN_UNSECURE", WKSSVC_JOIN_FLAGS_JOIN_UNSECURE, r);
6045 126 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_DOMAIN_JOIN_IF_JOINED", WKSSVC_JOIN_FLAGS_DOMAIN_JOIN_IF_JOINED, r);
6046 126 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_WIN9X_UPGRADE", WKSSVC_JOIN_FLAGS_WIN9X_UPGRADE, r);
6047 126 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE", WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE, r);
6048 126 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE", WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE, r);
6049 126 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_JOIN_TYPE", WKSSVC_JOIN_FLAGS_JOIN_TYPE, r);
6050 126 : ndr->depth--;
6051 126 : }
6052 :
6053 6 : static enum ndr_err_code ndr_push_wkssvc_ComputerNameType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum wkssvc_ComputerNameType r)
6054 : {
6055 6 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
6056 6 : return NDR_ERR_SUCCESS;
6057 : }
6058 :
6059 6 : static enum ndr_err_code ndr_pull_wkssvc_ComputerNameType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum wkssvc_ComputerNameType *r)
6060 : {
6061 0 : uint16_t v;
6062 6 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
6063 6 : *r = v;
6064 6 : return NDR_ERR_SUCCESS;
6065 : }
6066 :
6067 0 : _PUBLIC_ void ndr_print_wkssvc_ComputerNameType(struct ndr_print *ndr, const char *name, enum wkssvc_ComputerNameType r)
6068 : {
6069 0 : const char *val = NULL;
6070 :
6071 0 : switch (r) {
6072 0 : case NetPrimaryComputerName: val = "NetPrimaryComputerName"; break;
6073 0 : case NetAlternateComputerNames: val = "NetAlternateComputerNames"; break;
6074 0 : case NetAllComputerNames: val = "NetAllComputerNames"; break;
6075 0 : case NetComputerNameTypeMax: val = "NetComputerNameTypeMax"; break;
6076 : }
6077 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
6078 0 : }
6079 :
6080 0 : static enum ndr_err_code ndr_push_wkssvc_ComputerNamesCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct wkssvc_ComputerNamesCtr *r)
6081 : {
6082 0 : uint32_t cntr_computer_name_1;
6083 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
6084 0 : if (ndr_flags & NDR_SCALARS) {
6085 0 : NDR_CHECK(ndr_push_align(ndr, 5));
6086 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
6087 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->computer_name));
6088 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6089 : }
6090 0 : if (ndr_flags & NDR_BUFFERS) {
6091 0 : if (r->computer_name) {
6092 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
6093 0 : for (cntr_computer_name_1 = 0; cntr_computer_name_1 < (r->count); cntr_computer_name_1++) {
6094 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->computer_name[cntr_computer_name_1]));
6095 : }
6096 0 : for (cntr_computer_name_1 = 0; cntr_computer_name_1 < (r->count); cntr_computer_name_1++) {
6097 0 : NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->computer_name[cntr_computer_name_1]));
6098 : }
6099 : }
6100 : }
6101 0 : return NDR_ERR_SUCCESS;
6102 : }
6103 :
6104 0 : static enum ndr_err_code ndr_pull_wkssvc_ComputerNamesCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct wkssvc_ComputerNamesCtr *r)
6105 : {
6106 0 : uint32_t _ptr_computer_name;
6107 0 : uint32_t size_computer_name_1 = 0;
6108 0 : uint32_t cntr_computer_name_1;
6109 0 : TALLOC_CTX *_mem_save_computer_name_0 = NULL;
6110 0 : TALLOC_CTX *_mem_save_computer_name_1 = NULL;
6111 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
6112 0 : if (ndr_flags & NDR_SCALARS) {
6113 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
6114 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
6115 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
6116 0 : if (_ptr_computer_name) {
6117 0 : NDR_PULL_ALLOC(ndr, r->computer_name);
6118 : } else {
6119 0 : r->computer_name = NULL;
6120 : }
6121 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6122 : }
6123 0 : if (ndr_flags & NDR_BUFFERS) {
6124 0 : if (r->computer_name) {
6125 0 : _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6126 0 : NDR_PULL_SET_MEM_CTX(ndr, r->computer_name, 0);
6127 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->computer_name));
6128 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->computer_name, &size_computer_name_1));
6129 0 : NDR_PULL_ALLOC_N(ndr, r->computer_name, size_computer_name_1);
6130 0 : _mem_save_computer_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
6131 0 : NDR_PULL_SET_MEM_CTX(ndr, r->computer_name, 0);
6132 0 : for (cntr_computer_name_1 = 0; cntr_computer_name_1 < (size_computer_name_1); cntr_computer_name_1++) {
6133 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->computer_name[cntr_computer_name_1]));
6134 : }
6135 0 : for (cntr_computer_name_1 = 0; cntr_computer_name_1 < (size_computer_name_1); cntr_computer_name_1++) {
6136 0 : NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->computer_name[cntr_computer_name_1]));
6137 : }
6138 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_1, 0);
6139 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
6140 : }
6141 0 : if (r->computer_name) {
6142 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->computer_name, r->count));
6143 : }
6144 0 : for (cntr_computer_name_1 = 0; cntr_computer_name_1 < (size_computer_name_1); cntr_computer_name_1++) {
6145 0 : }
6146 : }
6147 0 : return NDR_ERR_SUCCESS;
6148 : }
6149 :
6150 0 : _PUBLIC_ void ndr_print_wkssvc_ComputerNamesCtr(struct ndr_print *ndr, const char *name, const struct wkssvc_ComputerNamesCtr *r)
6151 : {
6152 0 : uint32_t cntr_computer_name_1;
6153 0 : ndr_print_struct(ndr, name, "wkssvc_ComputerNamesCtr");
6154 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6155 0 : ndr->depth++;
6156 0 : ndr_print_uint32(ndr, "count", r->count);
6157 0 : ndr_print_ptr(ndr, "computer_name", r->computer_name);
6158 0 : ndr->depth++;
6159 0 : if (r->computer_name) {
6160 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "computer_name", (uint32_t)(r->count));
6161 0 : ndr->depth++;
6162 0 : for (cntr_computer_name_1 = 0; cntr_computer_name_1 < (r->count); cntr_computer_name_1++) {
6163 0 : ndr_print_lsa_String(ndr, "computer_name", &r->computer_name[cntr_computer_name_1]);
6164 : }
6165 0 : ndr->depth--;
6166 : }
6167 0 : ndr->depth--;
6168 0 : ndr->depth--;
6169 : }
6170 :
6171 51 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaGetInfo(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetWkstaGetInfo *r)
6172 : {
6173 51 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6174 51 : if (flags & NDR_IN) {
6175 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
6176 24 : if (r->in.server_name) {
6177 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
6178 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6179 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
6180 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6181 : }
6182 24 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
6183 : }
6184 51 : if (flags & NDR_OUT) {
6185 27 : if (r->out.info == NULL) {
6186 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6187 : }
6188 27 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
6189 27 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
6190 27 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6191 : }
6192 51 : return NDR_ERR_SUCCESS;
6193 : }
6194 :
6195 48 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaGetInfo(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetWkstaGetInfo *r)
6196 : {
6197 0 : uint32_t _ptr_server_name;
6198 48 : uint32_t size_server_name_1 = 0;
6199 48 : uint32_t length_server_name_1 = 0;
6200 48 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
6201 48 : TALLOC_CTX *_mem_save_info_0 = NULL;
6202 48 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6203 48 : if (flags & NDR_IN) {
6204 24 : NDR_ZERO_STRUCT(r->out);
6205 :
6206 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6207 24 : if (_ptr_server_name) {
6208 24 : NDR_PULL_ALLOC(ndr, r->in.server_name);
6209 : } else {
6210 0 : r->in.server_name = NULL;
6211 : }
6212 24 : if (r->in.server_name) {
6213 24 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6214 24 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
6215 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
6216 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
6217 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
6218 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
6219 24 : if (length_server_name_1 > size_server_name_1) {
6220 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
6221 : }
6222 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
6223 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
6224 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6225 : }
6226 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
6227 24 : NDR_PULL_ALLOC(ndr, r->out.info);
6228 24 : NDR_ZERO_STRUCTP(r->out.info);
6229 : }
6230 48 : if (flags & NDR_OUT) {
6231 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6232 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6233 24 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6234 3 : NDR_PULL_ALLOC(ndr, r->out.info);
6235 : }
6236 24 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6237 24 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
6238 24 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
6239 24 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
6240 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
6241 24 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6242 : }
6243 48 : return NDR_ERR_SUCCESS;
6244 : }
6245 :
6246 6 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaGetInfo(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetWkstaGetInfo *r)
6247 : {
6248 6 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaGetInfo");
6249 6 : if (r == NULL) { ndr_print_null(ndr); return; }
6250 6 : ndr->depth++;
6251 6 : if (flags & NDR_SET_VALUES) {
6252 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6253 : }
6254 6 : if (flags & NDR_IN) {
6255 0 : ndr_print_struct(ndr, "in", "wkssvc_NetWkstaGetInfo");
6256 0 : ndr->depth++;
6257 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
6258 0 : ndr->depth++;
6259 0 : if (r->in.server_name) {
6260 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
6261 : }
6262 0 : ndr->depth--;
6263 0 : ndr_print_uint32(ndr, "level", r->in.level);
6264 0 : ndr->depth--;
6265 : }
6266 6 : if (flags & NDR_OUT) {
6267 6 : ndr_print_struct(ndr, "out", "wkssvc_NetWkstaGetInfo");
6268 6 : ndr->depth++;
6269 6 : ndr_print_ptr(ndr, "info", r->out.info);
6270 6 : ndr->depth++;
6271 6 : ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
6272 6 : ndr_print_wkssvc_NetWkstaInfo(ndr, "info", r->out.info);
6273 6 : ndr->depth--;
6274 6 : ndr_print_WERROR(ndr, "result", r->out.result);
6275 6 : ndr->depth--;
6276 : }
6277 6 : ndr->depth--;
6278 : }
6279 :
6280 0 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaSetInfo(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetWkstaSetInfo *r)
6281 : {
6282 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6283 0 : if (flags & NDR_IN) {
6284 0 : if (r->in.info == NULL) {
6285 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6286 : }
6287 0 : if (r->in.parm_error == NULL) {
6288 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6289 : }
6290 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
6291 0 : if (r->in.server_name) {
6292 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
6293 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6294 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
6295 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6296 : }
6297 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
6298 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
6299 0 : NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6300 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
6301 : }
6302 0 : if (flags & NDR_OUT) {
6303 0 : if (r->out.parm_error == NULL) {
6304 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6305 : }
6306 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
6307 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6308 : }
6309 0 : return NDR_ERR_SUCCESS;
6310 : }
6311 :
6312 0 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaSetInfo(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetWkstaSetInfo *r)
6313 : {
6314 0 : uint32_t _ptr_server_name;
6315 0 : uint32_t size_server_name_1 = 0;
6316 0 : uint32_t length_server_name_1 = 0;
6317 0 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
6318 0 : TALLOC_CTX *_mem_save_info_0 = NULL;
6319 0 : TALLOC_CTX *_mem_save_parm_error_0 = NULL;
6320 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6321 0 : if (flags & NDR_IN) {
6322 0 : NDR_ZERO_STRUCT(r->out);
6323 :
6324 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6325 0 : if (_ptr_server_name) {
6326 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
6327 : } else {
6328 0 : r->in.server_name = NULL;
6329 : }
6330 0 : if (r->in.server_name) {
6331 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6332 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
6333 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
6334 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
6335 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
6336 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
6337 0 : if (length_server_name_1 > size_server_name_1) {
6338 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
6339 : }
6340 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
6341 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
6342 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6343 : }
6344 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
6345 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6346 0 : NDR_PULL_ALLOC(ndr, r->in.info);
6347 : }
6348 0 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6349 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
6350 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
6351 0 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6352 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
6353 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6354 0 : NDR_PULL_ALLOC(ndr, r->in.parm_error);
6355 : }
6356 0 : _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
6357 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, LIBNDR_FLAG_REF_ALLOC);
6358 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
6359 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, LIBNDR_FLAG_REF_ALLOC);
6360 0 : NDR_PULL_ALLOC(ndr, r->out.parm_error);
6361 0 : *r->out.parm_error = *r->in.parm_error;
6362 : }
6363 0 : if (flags & NDR_OUT) {
6364 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6365 : if (r->in.info == NULL) {
6366 : NDR_PULL_ALLOC(ndr, r->in.info);
6367 : NDR_ZERO_STRUCTP(r->in.info);
6368 : }
6369 : if (r->in.parm_error == NULL) {
6370 : NDR_PULL_ALLOC(ndr, r->in.parm_error);
6371 : NDR_ZERO_STRUCTP(r->in.parm_error);
6372 : }
6373 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6374 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6375 0 : NDR_PULL_ALLOC(ndr, r->out.parm_error);
6376 : }
6377 0 : _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
6378 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, LIBNDR_FLAG_REF_ALLOC);
6379 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
6380 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, LIBNDR_FLAG_REF_ALLOC);
6381 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6382 : }
6383 0 : return NDR_ERR_SUCCESS;
6384 : }
6385 :
6386 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaSetInfo(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetWkstaSetInfo *r)
6387 : {
6388 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaSetInfo");
6389 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6390 0 : ndr->depth++;
6391 0 : if (flags & NDR_SET_VALUES) {
6392 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6393 : }
6394 0 : if (flags & NDR_IN) {
6395 0 : ndr_print_struct(ndr, "in", "wkssvc_NetWkstaSetInfo");
6396 0 : ndr->depth++;
6397 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
6398 0 : ndr->depth++;
6399 0 : if (r->in.server_name) {
6400 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
6401 : }
6402 0 : ndr->depth--;
6403 0 : ndr_print_uint32(ndr, "level", r->in.level);
6404 0 : ndr_print_ptr(ndr, "info", r->in.info);
6405 0 : ndr->depth++;
6406 0 : ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
6407 0 : ndr_print_wkssvc_NetWkstaInfo(ndr, "info", r->in.info);
6408 0 : ndr->depth--;
6409 0 : ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
6410 0 : ndr->depth++;
6411 0 : ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
6412 0 : ndr->depth--;
6413 0 : ndr->depth--;
6414 : }
6415 0 : if (flags & NDR_OUT) {
6416 0 : ndr_print_struct(ndr, "out", "wkssvc_NetWkstaSetInfo");
6417 0 : ndr->depth++;
6418 0 : ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
6419 0 : ndr->depth++;
6420 0 : ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
6421 0 : ndr->depth--;
6422 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6423 0 : ndr->depth--;
6424 : }
6425 0 : ndr->depth--;
6426 : }
6427 :
6428 12 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaEnumUsers(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetWkstaEnumUsers *r)
6429 : {
6430 12 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6431 12 : if (flags & NDR_IN) {
6432 8 : if (r->in.info == NULL) {
6433 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6434 : }
6435 8 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
6436 8 : if (r->in.server_name) {
6437 8 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
6438 8 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6439 8 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
6440 8 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6441 : }
6442 8 : NDR_CHECK(ndr_push_wkssvc_NetWkstaEnumUsersInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6443 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.prefmaxlen));
6444 8 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
6445 8 : if (r->in.resume_handle) {
6446 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6447 : }
6448 : }
6449 12 : if (flags & NDR_OUT) {
6450 4 : if (r->out.info == NULL) {
6451 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6452 : }
6453 4 : if (r->out.entries_read == NULL) {
6454 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6455 : }
6456 4 : NDR_CHECK(ndr_push_wkssvc_NetWkstaEnumUsersInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
6457 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.entries_read));
6458 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
6459 4 : if (r->out.resume_handle) {
6460 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6461 : }
6462 4 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6463 : }
6464 12 : return NDR_ERR_SUCCESS;
6465 : }
6466 :
6467 12 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaEnumUsers(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetWkstaEnumUsers *r)
6468 : {
6469 0 : uint32_t _ptr_server_name;
6470 12 : uint32_t size_server_name_1 = 0;
6471 12 : uint32_t length_server_name_1 = 0;
6472 0 : uint32_t _ptr_resume_handle;
6473 12 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
6474 12 : TALLOC_CTX *_mem_save_info_0 = NULL;
6475 12 : TALLOC_CTX *_mem_save_entries_read_0 = NULL;
6476 12 : TALLOC_CTX *_mem_save_resume_handle_0 = NULL;
6477 12 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6478 12 : if (flags & NDR_IN) {
6479 8 : NDR_ZERO_STRUCT(r->out);
6480 :
6481 8 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6482 8 : if (_ptr_server_name) {
6483 8 : NDR_PULL_ALLOC(ndr, r->in.server_name);
6484 : } else {
6485 0 : r->in.server_name = NULL;
6486 : }
6487 8 : if (r->in.server_name) {
6488 8 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6489 8 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
6490 8 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
6491 8 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
6492 8 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
6493 8 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
6494 8 : if (length_server_name_1 > size_server_name_1) {
6495 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
6496 : }
6497 8 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
6498 8 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
6499 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6500 : }
6501 8 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6502 8 : NDR_PULL_ALLOC(ndr, r->in.info);
6503 : }
6504 8 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6505 8 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
6506 8 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaEnumUsersInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6507 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
6508 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.prefmaxlen));
6509 8 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
6510 8 : if (_ptr_resume_handle) {
6511 8 : NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6512 : } else {
6513 0 : r->in.resume_handle = NULL;
6514 : }
6515 8 : if (r->in.resume_handle) {
6516 8 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6517 8 : NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
6518 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6519 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
6520 : }
6521 8 : NDR_PULL_ALLOC(ndr, r->out.info);
6522 8 : *r->out.info = *r->in.info;
6523 8 : NDR_PULL_ALLOC(ndr, r->out.entries_read);
6524 8 : NDR_ZERO_STRUCTP(r->out.entries_read);
6525 : }
6526 12 : if (flags & NDR_OUT) {
6527 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6528 : if (r->in.info == NULL) {
6529 : NDR_PULL_ALLOC(ndr, r->in.info);
6530 : NDR_ZERO_STRUCTP(r->in.info);
6531 : }
6532 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6533 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6534 0 : NDR_PULL_ALLOC(ndr, r->out.info);
6535 : }
6536 4 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6537 4 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
6538 4 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaEnumUsersInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
6539 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
6540 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6541 0 : NDR_PULL_ALLOC(ndr, r->out.entries_read);
6542 : }
6543 4 : _mem_save_entries_read_0 = NDR_PULL_GET_MEM_CTX(ndr);
6544 4 : NDR_PULL_SET_MEM_CTX(ndr, r->out.entries_read, LIBNDR_FLAG_REF_ALLOC);
6545 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.entries_read));
6546 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_read_0, LIBNDR_FLAG_REF_ALLOC);
6547 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
6548 4 : if (_ptr_resume_handle) {
6549 4 : NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6550 : } else {
6551 0 : r->out.resume_handle = NULL;
6552 : }
6553 4 : if (r->out.resume_handle) {
6554 4 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6555 4 : NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
6556 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6557 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
6558 : }
6559 4 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6560 : }
6561 12 : return NDR_ERR_SUCCESS;
6562 : }
6563 :
6564 0 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsers(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetWkstaEnumUsers *r)
6565 : {
6566 0 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaEnumUsers");
6567 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6568 0 : ndr->depth++;
6569 0 : if (flags & NDR_SET_VALUES) {
6570 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6571 : }
6572 0 : if (flags & NDR_IN) {
6573 0 : ndr_print_struct(ndr, "in", "wkssvc_NetWkstaEnumUsers");
6574 0 : ndr->depth++;
6575 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
6576 0 : ndr->depth++;
6577 0 : if (r->in.server_name) {
6578 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
6579 : }
6580 0 : ndr->depth--;
6581 0 : ndr_print_ptr(ndr, "info", r->in.info);
6582 0 : ndr->depth++;
6583 0 : ndr_print_wkssvc_NetWkstaEnumUsersInfo(ndr, "info", r->in.info);
6584 0 : ndr->depth--;
6585 0 : ndr_print_uint32(ndr, "prefmaxlen", r->in.prefmaxlen);
6586 0 : ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6587 0 : ndr->depth++;
6588 0 : if (r->in.resume_handle) {
6589 0 : ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6590 : }
6591 0 : ndr->depth--;
6592 0 : ndr->depth--;
6593 : }
6594 0 : if (flags & NDR_OUT) {
6595 0 : ndr_print_struct(ndr, "out", "wkssvc_NetWkstaEnumUsers");
6596 0 : ndr->depth++;
6597 0 : ndr_print_ptr(ndr, "info", r->out.info);
6598 0 : ndr->depth++;
6599 0 : ndr_print_wkssvc_NetWkstaEnumUsersInfo(ndr, "info", r->out.info);
6600 0 : ndr->depth--;
6601 0 : ndr_print_ptr(ndr, "entries_read", r->out.entries_read);
6602 0 : ndr->depth++;
6603 0 : ndr_print_uint32(ndr, "entries_read", *r->out.entries_read);
6604 0 : ndr->depth--;
6605 0 : ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6606 0 : ndr->depth++;
6607 0 : if (r->out.resume_handle) {
6608 0 : ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6609 : }
6610 0 : ndr->depth--;
6611 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6612 0 : ndr->depth--;
6613 : }
6614 0 : ndr->depth--;
6615 : }
6616 :
6617 6 : static enum ndr_err_code ndr_push_wkssvc_NetrWkstaUserGetInfo(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrWkstaUserGetInfo *r)
6618 : {
6619 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6620 6 : if (flags & NDR_IN) {
6621 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown));
6622 6 : if (r->in.unknown) {
6623 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.unknown, CH_UTF16)));
6624 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6625 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.unknown, CH_UTF16)));
6626 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.unknown, ndr_charset_length(r->in.unknown, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6627 : }
6628 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
6629 : }
6630 6 : if (flags & NDR_OUT) {
6631 0 : if (r->out.info == NULL) {
6632 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6633 : }
6634 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
6635 0 : NDR_CHECK(ndr_push_wkssvc_NetrWkstaUserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
6636 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6637 : }
6638 6 : return NDR_ERR_SUCCESS;
6639 : }
6640 :
6641 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrWkstaUserGetInfo(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrWkstaUserGetInfo *r)
6642 : {
6643 0 : uint32_t _ptr_unknown;
6644 6 : uint32_t size_unknown_1 = 0;
6645 6 : uint32_t length_unknown_1 = 0;
6646 6 : TALLOC_CTX *_mem_save_unknown_0 = NULL;
6647 6 : TALLOC_CTX *_mem_save_info_0 = NULL;
6648 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6649 6 : if (flags & NDR_IN) {
6650 6 : NDR_ZERO_STRUCT(r->out);
6651 :
6652 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
6653 6 : if (_ptr_unknown) {
6654 0 : NDR_PULL_ALLOC(ndr, r->in.unknown);
6655 : } else {
6656 6 : r->in.unknown = NULL;
6657 : }
6658 6 : if (r->in.unknown) {
6659 0 : _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
6660 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown, 0);
6661 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.unknown));
6662 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.unknown));
6663 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.unknown, &size_unknown_1));
6664 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.unknown, &length_unknown_1));
6665 0 : if (length_unknown_1 > size_unknown_1) {
6666 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_unknown_1, length_unknown_1);
6667 : }
6668 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_unknown_1, sizeof(uint16_t)));
6669 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.unknown, length_unknown_1, sizeof(uint16_t), CH_UTF16));
6670 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
6671 : }
6672 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
6673 6 : NDR_PULL_ALLOC(ndr, r->out.info);
6674 6 : NDR_ZERO_STRUCTP(r->out.info);
6675 : }
6676 6 : if (flags & NDR_OUT) {
6677 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6678 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6679 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6680 0 : NDR_PULL_ALLOC(ndr, r->out.info);
6681 : }
6682 0 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6683 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
6684 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
6685 0 : NDR_CHECK(ndr_pull_wkssvc_NetrWkstaUserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
6686 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
6687 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6688 : }
6689 6 : return NDR_ERR_SUCCESS;
6690 : }
6691 :
6692 0 : _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserGetInfo(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrWkstaUserGetInfo *r)
6693 : {
6694 0 : ndr_print_struct(ndr, name, "wkssvc_NetrWkstaUserGetInfo");
6695 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6696 0 : ndr->depth++;
6697 0 : if (flags & NDR_SET_VALUES) {
6698 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6699 : }
6700 0 : if (flags & NDR_IN) {
6701 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrWkstaUserGetInfo");
6702 0 : ndr->depth++;
6703 0 : ndr_print_ptr(ndr, "unknown", r->in.unknown);
6704 0 : ndr->depth++;
6705 0 : if (r->in.unknown) {
6706 0 : ndr_print_string(ndr, "unknown", r->in.unknown);
6707 : }
6708 0 : ndr->depth--;
6709 0 : ndr_print_uint32(ndr, "level", r->in.level);
6710 0 : ndr->depth--;
6711 : }
6712 0 : if (flags & NDR_OUT) {
6713 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrWkstaUserGetInfo");
6714 0 : ndr->depth++;
6715 0 : ndr_print_ptr(ndr, "info", r->out.info);
6716 0 : ndr->depth++;
6717 0 : ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
6718 0 : ndr_print_wkssvc_NetrWkstaUserInfo(ndr, "info", r->out.info);
6719 0 : ndr->depth--;
6720 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6721 0 : ndr->depth--;
6722 : }
6723 0 : ndr->depth--;
6724 : }
6725 :
6726 0 : static enum ndr_err_code ndr_push_wkssvc_NetrWkstaUserSetInfo(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrWkstaUserSetInfo *r)
6727 : {
6728 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6729 0 : if (flags & NDR_IN) {
6730 0 : if (r->in.info == NULL) {
6731 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6732 : }
6733 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown));
6734 0 : if (r->in.unknown) {
6735 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.unknown, CH_UTF16)));
6736 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6737 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.unknown, CH_UTF16)));
6738 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.unknown, ndr_charset_length(r->in.unknown, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6739 : }
6740 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
6741 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
6742 0 : NDR_CHECK(ndr_push_wkssvc_NetrWkstaUserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6743 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_err));
6744 0 : if (r->in.parm_err) {
6745 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_err));
6746 : }
6747 : }
6748 0 : if (flags & NDR_OUT) {
6749 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_err));
6750 0 : if (r->out.parm_err) {
6751 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_err));
6752 : }
6753 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6754 : }
6755 0 : return NDR_ERR_SUCCESS;
6756 : }
6757 :
6758 0 : static enum ndr_err_code ndr_pull_wkssvc_NetrWkstaUserSetInfo(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrWkstaUserSetInfo *r)
6759 : {
6760 0 : uint32_t _ptr_unknown;
6761 0 : uint32_t size_unknown_1 = 0;
6762 0 : uint32_t length_unknown_1 = 0;
6763 0 : uint32_t _ptr_parm_err;
6764 0 : TALLOC_CTX *_mem_save_unknown_0 = NULL;
6765 0 : TALLOC_CTX *_mem_save_info_0 = NULL;
6766 0 : TALLOC_CTX *_mem_save_parm_err_0 = NULL;
6767 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6768 0 : if (flags & NDR_IN) {
6769 0 : NDR_ZERO_STRUCT(r->out);
6770 :
6771 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
6772 0 : if (_ptr_unknown) {
6773 0 : NDR_PULL_ALLOC(ndr, r->in.unknown);
6774 : } else {
6775 0 : r->in.unknown = NULL;
6776 : }
6777 0 : if (r->in.unknown) {
6778 0 : _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
6779 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown, 0);
6780 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.unknown));
6781 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.unknown));
6782 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.unknown, &size_unknown_1));
6783 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.unknown, &length_unknown_1));
6784 0 : if (length_unknown_1 > size_unknown_1) {
6785 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_unknown_1, length_unknown_1);
6786 : }
6787 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_unknown_1, sizeof(uint16_t)));
6788 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.unknown, length_unknown_1, sizeof(uint16_t), CH_UTF16));
6789 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
6790 : }
6791 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
6792 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6793 0 : NDR_PULL_ALLOC(ndr, r->in.info);
6794 : }
6795 0 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6796 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
6797 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
6798 0 : NDR_CHECK(ndr_pull_wkssvc_NetrWkstaUserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6799 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
6800 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_err));
6801 0 : if (_ptr_parm_err) {
6802 0 : NDR_PULL_ALLOC(ndr, r->in.parm_err);
6803 : } else {
6804 0 : r->in.parm_err = NULL;
6805 : }
6806 0 : if (r->in.parm_err) {
6807 0 : _mem_save_parm_err_0 = NDR_PULL_GET_MEM_CTX(ndr);
6808 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_err, 0);
6809 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_err));
6810 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_err_0, 0);
6811 : }
6812 : }
6813 0 : if (flags & NDR_OUT) {
6814 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6815 : if (r->in.info == NULL) {
6816 : NDR_PULL_ALLOC(ndr, r->in.info);
6817 : NDR_ZERO_STRUCTP(r->in.info);
6818 : }
6819 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6820 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_err));
6821 0 : if (_ptr_parm_err) {
6822 0 : NDR_PULL_ALLOC(ndr, r->out.parm_err);
6823 : } else {
6824 0 : r->out.parm_err = NULL;
6825 : }
6826 0 : if (r->out.parm_err) {
6827 0 : _mem_save_parm_err_0 = NDR_PULL_GET_MEM_CTX(ndr);
6828 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_err, 0);
6829 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_err));
6830 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_err_0, 0);
6831 : }
6832 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6833 : }
6834 0 : return NDR_ERR_SUCCESS;
6835 : }
6836 :
6837 0 : _PUBLIC_ void ndr_print_wkssvc_NetrWkstaUserSetInfo(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrWkstaUserSetInfo *r)
6838 : {
6839 0 : ndr_print_struct(ndr, name, "wkssvc_NetrWkstaUserSetInfo");
6840 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6841 0 : ndr->depth++;
6842 0 : if (flags & NDR_SET_VALUES) {
6843 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6844 : }
6845 0 : if (flags & NDR_IN) {
6846 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrWkstaUserSetInfo");
6847 0 : ndr->depth++;
6848 0 : ndr_print_ptr(ndr, "unknown", r->in.unknown);
6849 0 : ndr->depth++;
6850 0 : if (r->in.unknown) {
6851 0 : ndr_print_string(ndr, "unknown", r->in.unknown);
6852 : }
6853 0 : ndr->depth--;
6854 0 : ndr_print_uint32(ndr, "level", r->in.level);
6855 0 : ndr_print_ptr(ndr, "info", r->in.info);
6856 0 : ndr->depth++;
6857 0 : ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
6858 0 : ndr_print_wkssvc_NetrWkstaUserInfo(ndr, "info", r->in.info);
6859 0 : ndr->depth--;
6860 0 : ndr_print_ptr(ndr, "parm_err", r->in.parm_err);
6861 0 : ndr->depth++;
6862 0 : if (r->in.parm_err) {
6863 0 : ndr_print_uint32(ndr, "parm_err", *r->in.parm_err);
6864 : }
6865 0 : ndr->depth--;
6866 0 : ndr->depth--;
6867 : }
6868 0 : if (flags & NDR_OUT) {
6869 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrWkstaUserSetInfo");
6870 0 : ndr->depth++;
6871 0 : ndr_print_ptr(ndr, "parm_err", r->out.parm_err);
6872 0 : ndr->depth++;
6873 0 : if (r->out.parm_err) {
6874 0 : ndr_print_uint32(ndr, "parm_err", *r->out.parm_err);
6875 : }
6876 0 : ndr->depth--;
6877 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6878 0 : ndr->depth--;
6879 : }
6880 0 : ndr->depth--;
6881 : }
6882 :
6883 11 : static enum ndr_err_code ndr_push_wkssvc_NetWkstaTransportEnum(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetWkstaTransportEnum *r)
6884 : {
6885 11 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6886 11 : if (flags & NDR_IN) {
6887 6 : if (r->in.info == NULL) {
6888 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6889 : }
6890 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
6891 6 : if (r->in.server_name) {
6892 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
6893 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6894 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
6895 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6896 : }
6897 6 : NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6898 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
6899 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
6900 6 : if (r->in.resume_handle) {
6901 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6902 : }
6903 : }
6904 11 : if (flags & NDR_OUT) {
6905 5 : if (r->out.info == NULL) {
6906 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6907 : }
6908 5 : if (r->out.total_entries == NULL) {
6909 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6910 : }
6911 5 : NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
6912 5 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_entries));
6913 5 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
6914 5 : if (r->out.resume_handle) {
6915 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6916 : }
6917 5 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6918 : }
6919 11 : return NDR_ERR_SUCCESS;
6920 : }
6921 :
6922 10 : static enum ndr_err_code ndr_pull_wkssvc_NetWkstaTransportEnum(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetWkstaTransportEnum *r)
6923 : {
6924 0 : uint32_t _ptr_server_name;
6925 10 : uint32_t size_server_name_1 = 0;
6926 10 : uint32_t length_server_name_1 = 0;
6927 0 : uint32_t _ptr_resume_handle;
6928 10 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
6929 10 : TALLOC_CTX *_mem_save_info_0 = NULL;
6930 10 : TALLOC_CTX *_mem_save_total_entries_0 = NULL;
6931 10 : TALLOC_CTX *_mem_save_resume_handle_0 = NULL;
6932 10 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6933 10 : if (flags & NDR_IN) {
6934 6 : NDR_ZERO_STRUCT(r->out);
6935 :
6936 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6937 6 : if (_ptr_server_name) {
6938 6 : NDR_PULL_ALLOC(ndr, r->in.server_name);
6939 : } else {
6940 0 : r->in.server_name = NULL;
6941 : }
6942 6 : if (r->in.server_name) {
6943 6 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6944 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
6945 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
6946 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
6947 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
6948 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
6949 6 : if (length_server_name_1 > size_server_name_1) {
6950 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
6951 : }
6952 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
6953 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
6954 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6955 : }
6956 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6957 6 : NDR_PULL_ALLOC(ndr, r->in.info);
6958 : }
6959 6 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6960 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
6961 6 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6962 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
6963 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
6964 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
6965 6 : if (_ptr_resume_handle) {
6966 6 : NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6967 : } else {
6968 0 : r->in.resume_handle = NULL;
6969 : }
6970 6 : if (r->in.resume_handle) {
6971 6 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6972 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
6973 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6974 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
6975 : }
6976 6 : NDR_PULL_ALLOC(ndr, r->out.info);
6977 6 : *r->out.info = *r->in.info;
6978 6 : NDR_PULL_ALLOC(ndr, r->out.total_entries);
6979 6 : NDR_ZERO_STRUCTP(r->out.total_entries);
6980 : }
6981 10 : if (flags & NDR_OUT) {
6982 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6983 : if (r->in.info == NULL) {
6984 : NDR_PULL_ALLOC(ndr, r->in.info);
6985 : NDR_ZERO_STRUCTP(r->in.info);
6986 : }
6987 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6988 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6989 1 : NDR_PULL_ALLOC(ndr, r->out.info);
6990 : }
6991 4 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6992 4 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
6993 4 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
6994 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
6995 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6996 1 : NDR_PULL_ALLOC(ndr, r->out.total_entries);
6997 : }
6998 4 : _mem_save_total_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
6999 4 : NDR_PULL_SET_MEM_CTX(ndr, r->out.total_entries, LIBNDR_FLAG_REF_ALLOC);
7000 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_entries));
7001 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_entries_0, LIBNDR_FLAG_REF_ALLOC);
7002 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
7003 4 : if (_ptr_resume_handle) {
7004 0 : NDR_PULL_ALLOC(ndr, r->out.resume_handle);
7005 : } else {
7006 4 : r->out.resume_handle = NULL;
7007 : }
7008 4 : if (r->out.resume_handle) {
7009 0 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7010 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
7011 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
7012 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
7013 : }
7014 4 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7015 : }
7016 10 : return NDR_ERR_SUCCESS;
7017 : }
7018 :
7019 2 : _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportEnum(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetWkstaTransportEnum *r)
7020 : {
7021 2 : ndr_print_struct(ndr, name, "wkssvc_NetWkstaTransportEnum");
7022 2 : if (r == NULL) { ndr_print_null(ndr); return; }
7023 2 : ndr->depth++;
7024 2 : if (flags & NDR_SET_VALUES) {
7025 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7026 : }
7027 2 : if (flags & NDR_IN) {
7028 0 : ndr_print_struct(ndr, "in", "wkssvc_NetWkstaTransportEnum");
7029 0 : ndr->depth++;
7030 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
7031 0 : ndr->depth++;
7032 0 : if (r->in.server_name) {
7033 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
7034 : }
7035 0 : ndr->depth--;
7036 0 : ndr_print_ptr(ndr, "info", r->in.info);
7037 0 : ndr->depth++;
7038 0 : ndr_print_wkssvc_NetWkstaTransportInfo(ndr, "info", r->in.info);
7039 0 : ndr->depth--;
7040 0 : ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
7041 0 : ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
7042 0 : ndr->depth++;
7043 0 : if (r->in.resume_handle) {
7044 0 : ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
7045 : }
7046 0 : ndr->depth--;
7047 0 : ndr->depth--;
7048 : }
7049 2 : if (flags & NDR_OUT) {
7050 2 : ndr_print_struct(ndr, "out", "wkssvc_NetWkstaTransportEnum");
7051 2 : ndr->depth++;
7052 2 : ndr_print_ptr(ndr, "info", r->out.info);
7053 2 : ndr->depth++;
7054 2 : ndr_print_wkssvc_NetWkstaTransportInfo(ndr, "info", r->out.info);
7055 2 : ndr->depth--;
7056 2 : ndr_print_ptr(ndr, "total_entries", r->out.total_entries);
7057 2 : ndr->depth++;
7058 2 : ndr_print_uint32(ndr, "total_entries", *r->out.total_entries);
7059 2 : ndr->depth--;
7060 2 : ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
7061 2 : ndr->depth++;
7062 2 : if (r->out.resume_handle) {
7063 0 : ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
7064 : }
7065 2 : ndr->depth--;
7066 2 : ndr_print_WERROR(ndr, "result", r->out.result);
7067 2 : ndr->depth--;
7068 : }
7069 2 : ndr->depth--;
7070 : }
7071 :
7072 6 : static enum ndr_err_code ndr_push_wkssvc_NetrWkstaTransportAdd(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrWkstaTransportAdd *r)
7073 : {
7074 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7075 6 : if (flags & NDR_IN) {
7076 6 : if (r->in.info0 == NULL) {
7077 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7078 : }
7079 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
7080 6 : if (r->in.server_name) {
7081 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
7082 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7083 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
7084 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7085 : }
7086 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
7087 6 : NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info0));
7088 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_err));
7089 6 : if (r->in.parm_err) {
7090 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_err));
7091 : }
7092 : }
7093 6 : if (flags & NDR_OUT) {
7094 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_err));
7095 0 : if (r->out.parm_err) {
7096 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_err));
7097 : }
7098 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7099 : }
7100 6 : return NDR_ERR_SUCCESS;
7101 : }
7102 :
7103 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrWkstaTransportAdd(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrWkstaTransportAdd *r)
7104 : {
7105 0 : uint32_t _ptr_server_name;
7106 6 : uint32_t size_server_name_1 = 0;
7107 6 : uint32_t length_server_name_1 = 0;
7108 0 : uint32_t _ptr_parm_err;
7109 6 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
7110 6 : TALLOC_CTX *_mem_save_info0_0 = NULL;
7111 6 : TALLOC_CTX *_mem_save_parm_err_0 = NULL;
7112 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7113 6 : if (flags & NDR_IN) {
7114 6 : NDR_ZERO_STRUCT(r->out);
7115 :
7116 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
7117 6 : if (_ptr_server_name) {
7118 6 : NDR_PULL_ALLOC(ndr, r->in.server_name);
7119 : } else {
7120 0 : r->in.server_name = NULL;
7121 : }
7122 6 : if (r->in.server_name) {
7123 6 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7124 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
7125 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
7126 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
7127 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
7128 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
7129 6 : if (length_server_name_1 > size_server_name_1) {
7130 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
7131 : }
7132 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
7133 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
7134 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
7135 : }
7136 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
7137 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7138 6 : NDR_PULL_ALLOC(ndr, r->in.info0);
7139 : }
7140 6 : _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
7141 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info0, LIBNDR_FLAG_REF_ALLOC);
7142 6 : NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info0));
7143 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, LIBNDR_FLAG_REF_ALLOC);
7144 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_err));
7145 6 : if (_ptr_parm_err) {
7146 6 : NDR_PULL_ALLOC(ndr, r->in.parm_err);
7147 : } else {
7148 0 : r->in.parm_err = NULL;
7149 : }
7150 6 : if (r->in.parm_err) {
7151 6 : _mem_save_parm_err_0 = NDR_PULL_GET_MEM_CTX(ndr);
7152 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_err, 0);
7153 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_err));
7154 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_err_0, 0);
7155 : }
7156 : }
7157 6 : if (flags & NDR_OUT) {
7158 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7159 : if (r->in.info0 == NULL) {
7160 : NDR_PULL_ALLOC(ndr, r->in.info0);
7161 : NDR_ZERO_STRUCTP(r->in.info0);
7162 : }
7163 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7164 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_err));
7165 0 : if (_ptr_parm_err) {
7166 0 : NDR_PULL_ALLOC(ndr, r->out.parm_err);
7167 : } else {
7168 0 : r->out.parm_err = NULL;
7169 : }
7170 0 : if (r->out.parm_err) {
7171 0 : _mem_save_parm_err_0 = NDR_PULL_GET_MEM_CTX(ndr);
7172 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_err, 0);
7173 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_err));
7174 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_err_0, 0);
7175 : }
7176 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7177 : }
7178 6 : return NDR_ERR_SUCCESS;
7179 : }
7180 :
7181 0 : _PUBLIC_ void ndr_print_wkssvc_NetrWkstaTransportAdd(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrWkstaTransportAdd *r)
7182 : {
7183 0 : ndr_print_struct(ndr, name, "wkssvc_NetrWkstaTransportAdd");
7184 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7185 0 : ndr->depth++;
7186 0 : if (flags & NDR_SET_VALUES) {
7187 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7188 : }
7189 0 : if (flags & NDR_IN) {
7190 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrWkstaTransportAdd");
7191 0 : ndr->depth++;
7192 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
7193 0 : ndr->depth++;
7194 0 : if (r->in.server_name) {
7195 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
7196 : }
7197 0 : ndr->depth--;
7198 0 : ndr_print_uint32(ndr, "level", r->in.level);
7199 0 : ndr_print_ptr(ndr, "info0", r->in.info0);
7200 0 : ndr->depth++;
7201 0 : ndr_print_wkssvc_NetWkstaTransportInfo0(ndr, "info0", r->in.info0);
7202 0 : ndr->depth--;
7203 0 : ndr_print_ptr(ndr, "parm_err", r->in.parm_err);
7204 0 : ndr->depth++;
7205 0 : if (r->in.parm_err) {
7206 0 : ndr_print_uint32(ndr, "parm_err", *r->in.parm_err);
7207 : }
7208 0 : ndr->depth--;
7209 0 : ndr->depth--;
7210 : }
7211 0 : if (flags & NDR_OUT) {
7212 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrWkstaTransportAdd");
7213 0 : ndr->depth++;
7214 0 : ndr_print_ptr(ndr, "parm_err", r->out.parm_err);
7215 0 : ndr->depth++;
7216 0 : if (r->out.parm_err) {
7217 0 : ndr_print_uint32(ndr, "parm_err", *r->out.parm_err);
7218 : }
7219 0 : ndr->depth--;
7220 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7221 0 : ndr->depth--;
7222 : }
7223 0 : ndr->depth--;
7224 : }
7225 :
7226 6 : static enum ndr_err_code ndr_push_wkssvc_NetrWkstaTransportDel(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrWkstaTransportDel *r)
7227 : {
7228 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7229 6 : if (flags & NDR_IN) {
7230 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
7231 6 : if (r->in.server_name) {
7232 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
7233 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7234 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
7235 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7236 : }
7237 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.transport_name));
7238 6 : if (r->in.transport_name) {
7239 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport_name, CH_UTF16)));
7240 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7241 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport_name, CH_UTF16)));
7242 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.transport_name, ndr_charset_length(r->in.transport_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7243 : }
7244 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown3));
7245 : }
7246 6 : if (flags & NDR_OUT) {
7247 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7248 : }
7249 6 : return NDR_ERR_SUCCESS;
7250 : }
7251 :
7252 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrWkstaTransportDel(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrWkstaTransportDel *r)
7253 : {
7254 0 : uint32_t _ptr_server_name;
7255 6 : uint32_t size_server_name_1 = 0;
7256 6 : uint32_t length_server_name_1 = 0;
7257 0 : uint32_t _ptr_transport_name;
7258 6 : uint32_t size_transport_name_1 = 0;
7259 6 : uint32_t length_transport_name_1 = 0;
7260 6 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
7261 6 : TALLOC_CTX *_mem_save_transport_name_0 = NULL;
7262 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7263 6 : if (flags & NDR_IN) {
7264 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
7265 6 : if (_ptr_server_name) {
7266 6 : NDR_PULL_ALLOC(ndr, r->in.server_name);
7267 : } else {
7268 0 : r->in.server_name = NULL;
7269 : }
7270 6 : if (r->in.server_name) {
7271 6 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7272 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
7273 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
7274 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
7275 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
7276 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
7277 6 : if (length_server_name_1 > size_server_name_1) {
7278 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
7279 : }
7280 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
7281 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
7282 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
7283 : }
7284 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport_name));
7285 6 : if (_ptr_transport_name) {
7286 6 : NDR_PULL_ALLOC(ndr, r->in.transport_name);
7287 : } else {
7288 0 : r->in.transport_name = NULL;
7289 : }
7290 6 : if (r->in.transport_name) {
7291 6 : _mem_save_transport_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7292 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.transport_name, 0);
7293 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.transport_name));
7294 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.transport_name));
7295 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.transport_name, &size_transport_name_1));
7296 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.transport_name, &length_transport_name_1));
7297 6 : if (length_transport_name_1 > size_transport_name_1) {
7298 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_transport_name_1, length_transport_name_1);
7299 : }
7300 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_transport_name_1, sizeof(uint16_t)));
7301 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.transport_name, length_transport_name_1, sizeof(uint16_t), CH_UTF16));
7302 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_name_0, 0);
7303 : }
7304 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown3));
7305 : }
7306 6 : if (flags & NDR_OUT) {
7307 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7308 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7309 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7310 : }
7311 6 : return NDR_ERR_SUCCESS;
7312 : }
7313 :
7314 0 : _PUBLIC_ void ndr_print_wkssvc_NetrWkstaTransportDel(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrWkstaTransportDel *r)
7315 : {
7316 0 : ndr_print_struct(ndr, name, "wkssvc_NetrWkstaTransportDel");
7317 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7318 0 : ndr->depth++;
7319 0 : if (flags & NDR_SET_VALUES) {
7320 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7321 : }
7322 0 : if (flags & NDR_IN) {
7323 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrWkstaTransportDel");
7324 0 : ndr->depth++;
7325 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
7326 0 : ndr->depth++;
7327 0 : if (r->in.server_name) {
7328 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
7329 : }
7330 0 : ndr->depth--;
7331 0 : ndr_print_ptr(ndr, "transport_name", r->in.transport_name);
7332 0 : ndr->depth++;
7333 0 : if (r->in.transport_name) {
7334 0 : ndr_print_string(ndr, "transport_name", r->in.transport_name);
7335 : }
7336 0 : ndr->depth--;
7337 0 : ndr_print_uint32(ndr, "unknown3", r->in.unknown3);
7338 0 : ndr->depth--;
7339 : }
7340 0 : if (flags & NDR_OUT) {
7341 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrWkstaTransportDel");
7342 0 : ndr->depth++;
7343 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7344 0 : ndr->depth--;
7345 : }
7346 0 : ndr->depth--;
7347 : }
7348 :
7349 6 : static enum ndr_err_code ndr_push_wkssvc_NetrUseAdd(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrUseAdd *r)
7350 : {
7351 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7352 6 : if (flags & NDR_IN) {
7353 6 : if (r->in.ctr == NULL) {
7354 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7355 : }
7356 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
7357 6 : if (r->in.server_name) {
7358 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
7359 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7360 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
7361 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7362 : }
7363 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
7364 6 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, r->in.level));
7365 6 : NDR_CHECK(ndr_push_wkssvc_NetrUseGetInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
7366 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_err));
7367 6 : if (r->in.parm_err) {
7368 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_err));
7369 : }
7370 : }
7371 6 : if (flags & NDR_OUT) {
7372 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_err));
7373 0 : if (r->out.parm_err) {
7374 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_err));
7375 : }
7376 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7377 : }
7378 6 : return NDR_ERR_SUCCESS;
7379 : }
7380 :
7381 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrUseAdd(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrUseAdd *r)
7382 : {
7383 0 : uint32_t _ptr_server_name;
7384 6 : uint32_t size_server_name_1 = 0;
7385 6 : uint32_t length_server_name_1 = 0;
7386 0 : uint32_t _ptr_parm_err;
7387 6 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
7388 6 : TALLOC_CTX *_mem_save_ctr_0 = NULL;
7389 6 : TALLOC_CTX *_mem_save_parm_err_0 = NULL;
7390 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7391 6 : if (flags & NDR_IN) {
7392 6 : NDR_ZERO_STRUCT(r->out);
7393 :
7394 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
7395 6 : if (_ptr_server_name) {
7396 6 : NDR_PULL_ALLOC(ndr, r->in.server_name);
7397 : } else {
7398 0 : r->in.server_name = NULL;
7399 : }
7400 6 : if (r->in.server_name) {
7401 6 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7402 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
7403 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
7404 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
7405 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
7406 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
7407 6 : if (length_server_name_1 > size_server_name_1) {
7408 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
7409 : }
7410 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
7411 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
7412 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
7413 : }
7414 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
7415 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7416 6 : NDR_PULL_ALLOC(ndr, r->in.ctr);
7417 : }
7418 6 : _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
7419 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
7420 6 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, r->in.level));
7421 6 : NDR_CHECK(ndr_pull_wkssvc_NetrUseGetInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
7422 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
7423 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_err));
7424 6 : if (_ptr_parm_err) {
7425 6 : NDR_PULL_ALLOC(ndr, r->in.parm_err);
7426 : } else {
7427 0 : r->in.parm_err = NULL;
7428 : }
7429 6 : if (r->in.parm_err) {
7430 6 : _mem_save_parm_err_0 = NDR_PULL_GET_MEM_CTX(ndr);
7431 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_err, 0);
7432 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_err));
7433 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_err_0, 0);
7434 : }
7435 : }
7436 6 : if (flags & NDR_OUT) {
7437 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7438 : if (r->in.ctr == NULL) {
7439 : NDR_PULL_ALLOC(ndr, r->in.ctr);
7440 : NDR_ZERO_STRUCTP(r->in.ctr);
7441 : }
7442 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7443 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_err));
7444 0 : if (_ptr_parm_err) {
7445 0 : NDR_PULL_ALLOC(ndr, r->out.parm_err);
7446 : } else {
7447 0 : r->out.parm_err = NULL;
7448 : }
7449 0 : if (r->out.parm_err) {
7450 0 : _mem_save_parm_err_0 = NDR_PULL_GET_MEM_CTX(ndr);
7451 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_err, 0);
7452 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_err));
7453 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_err_0, 0);
7454 : }
7455 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7456 : }
7457 6 : return NDR_ERR_SUCCESS;
7458 : }
7459 :
7460 0 : _PUBLIC_ void ndr_print_wkssvc_NetrUseAdd(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrUseAdd *r)
7461 : {
7462 0 : ndr_print_struct(ndr, name, "wkssvc_NetrUseAdd");
7463 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7464 0 : ndr->depth++;
7465 0 : if (flags & NDR_SET_VALUES) {
7466 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7467 : }
7468 0 : if (flags & NDR_IN) {
7469 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrUseAdd");
7470 0 : ndr->depth++;
7471 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
7472 0 : ndr->depth++;
7473 0 : if (r->in.server_name) {
7474 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
7475 : }
7476 0 : ndr->depth--;
7477 0 : ndr_print_uint32(ndr, "level", r->in.level);
7478 0 : ndr_print_ptr(ndr, "ctr", r->in.ctr);
7479 0 : ndr->depth++;
7480 0 : ndr_print_set_switch_value(ndr, r->in.ctr, r->in.level);
7481 0 : ndr_print_wkssvc_NetrUseGetInfoCtr(ndr, "ctr", r->in.ctr);
7482 0 : ndr->depth--;
7483 0 : ndr_print_ptr(ndr, "parm_err", r->in.parm_err);
7484 0 : ndr->depth++;
7485 0 : if (r->in.parm_err) {
7486 0 : ndr_print_uint32(ndr, "parm_err", *r->in.parm_err);
7487 : }
7488 0 : ndr->depth--;
7489 0 : ndr->depth--;
7490 : }
7491 0 : if (flags & NDR_OUT) {
7492 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrUseAdd");
7493 0 : ndr->depth++;
7494 0 : ndr_print_ptr(ndr, "parm_err", r->out.parm_err);
7495 0 : ndr->depth++;
7496 0 : if (r->out.parm_err) {
7497 0 : ndr_print_uint32(ndr, "parm_err", *r->out.parm_err);
7498 : }
7499 0 : ndr->depth--;
7500 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7501 0 : ndr->depth--;
7502 : }
7503 0 : ndr->depth--;
7504 : }
7505 :
7506 0 : static enum ndr_err_code ndr_push_wkssvc_NetrUseGetInfo(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrUseGetInfo *r)
7507 : {
7508 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7509 0 : if (flags & NDR_IN) {
7510 0 : if (r->in.use_name == NULL) {
7511 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7512 : }
7513 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
7514 0 : if (r->in.server_name) {
7515 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
7516 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7517 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
7518 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7519 : }
7520 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.use_name, CH_UTF16)));
7521 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7522 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.use_name, CH_UTF16)));
7523 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.use_name, ndr_charset_length(r->in.use_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7524 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
7525 : }
7526 0 : if (flags & NDR_OUT) {
7527 0 : if (r->out.ctr == NULL) {
7528 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7529 : }
7530 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, r->in.level));
7531 0 : NDR_CHECK(ndr_push_wkssvc_NetrUseGetInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
7532 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7533 : }
7534 0 : return NDR_ERR_SUCCESS;
7535 : }
7536 :
7537 0 : static enum ndr_err_code ndr_pull_wkssvc_NetrUseGetInfo(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrUseGetInfo *r)
7538 : {
7539 0 : uint32_t _ptr_server_name;
7540 0 : uint32_t size_server_name_1 = 0;
7541 0 : uint32_t length_server_name_1 = 0;
7542 0 : uint32_t size_use_name_1 = 0;
7543 0 : uint32_t length_use_name_1 = 0;
7544 0 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
7545 0 : TALLOC_CTX *_mem_save_ctr_0 = NULL;
7546 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7547 0 : if (flags & NDR_IN) {
7548 0 : NDR_ZERO_STRUCT(r->out);
7549 :
7550 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
7551 0 : if (_ptr_server_name) {
7552 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
7553 : } else {
7554 0 : r->in.server_name = NULL;
7555 : }
7556 0 : if (r->in.server_name) {
7557 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7558 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
7559 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
7560 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
7561 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
7562 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
7563 0 : if (length_server_name_1 > size_server_name_1) {
7564 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
7565 : }
7566 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
7567 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
7568 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
7569 : }
7570 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.use_name));
7571 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.use_name));
7572 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.use_name, &size_use_name_1));
7573 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.use_name, &length_use_name_1));
7574 0 : if (length_use_name_1 > size_use_name_1) {
7575 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_use_name_1, length_use_name_1);
7576 : }
7577 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_use_name_1, sizeof(uint16_t)));
7578 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.use_name, length_use_name_1, sizeof(uint16_t), CH_UTF16));
7579 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
7580 0 : NDR_PULL_ALLOC(ndr, r->out.ctr);
7581 0 : NDR_ZERO_STRUCTP(r->out.ctr);
7582 : }
7583 0 : if (flags & NDR_OUT) {
7584 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7585 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7586 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7587 0 : NDR_PULL_ALLOC(ndr, r->out.ctr);
7588 : }
7589 0 : _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
7590 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
7591 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, r->in.level));
7592 0 : NDR_CHECK(ndr_pull_wkssvc_NetrUseGetInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
7593 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
7594 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7595 : }
7596 0 : return NDR_ERR_SUCCESS;
7597 : }
7598 :
7599 0 : _PUBLIC_ void ndr_print_wkssvc_NetrUseGetInfo(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrUseGetInfo *r)
7600 : {
7601 0 : ndr_print_struct(ndr, name, "wkssvc_NetrUseGetInfo");
7602 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7603 0 : ndr->depth++;
7604 0 : if (flags & NDR_SET_VALUES) {
7605 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7606 : }
7607 0 : if (flags & NDR_IN) {
7608 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrUseGetInfo");
7609 0 : ndr->depth++;
7610 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
7611 0 : ndr->depth++;
7612 0 : if (r->in.server_name) {
7613 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
7614 : }
7615 0 : ndr->depth--;
7616 0 : ndr_print_ptr(ndr, "use_name", r->in.use_name);
7617 0 : ndr->depth++;
7618 0 : ndr_print_string(ndr, "use_name", r->in.use_name);
7619 0 : ndr->depth--;
7620 0 : ndr_print_uint32(ndr, "level", r->in.level);
7621 0 : ndr->depth--;
7622 : }
7623 0 : if (flags & NDR_OUT) {
7624 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrUseGetInfo");
7625 0 : ndr->depth++;
7626 0 : ndr_print_ptr(ndr, "ctr", r->out.ctr);
7627 0 : ndr->depth++;
7628 0 : ndr_print_set_switch_value(ndr, r->out.ctr, r->in.level);
7629 0 : ndr_print_wkssvc_NetrUseGetInfoCtr(ndr, "ctr", r->out.ctr);
7630 0 : ndr->depth--;
7631 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7632 0 : ndr->depth--;
7633 : }
7634 0 : ndr->depth--;
7635 : }
7636 :
7637 6 : static enum ndr_err_code ndr_push_wkssvc_NetrUseDel(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrUseDel *r)
7638 : {
7639 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7640 6 : if (flags & NDR_IN) {
7641 6 : if (r->in.use_name == NULL) {
7642 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7643 : }
7644 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
7645 6 : if (r->in.server_name) {
7646 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
7647 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7648 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
7649 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7650 : }
7651 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.use_name, CH_UTF16)));
7652 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7653 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.use_name, CH_UTF16)));
7654 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.use_name, ndr_charset_length(r->in.use_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7655 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.force_cond));
7656 : }
7657 6 : if (flags & NDR_OUT) {
7658 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7659 : }
7660 6 : return NDR_ERR_SUCCESS;
7661 : }
7662 :
7663 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrUseDel(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrUseDel *r)
7664 : {
7665 0 : uint32_t _ptr_server_name;
7666 6 : uint32_t size_server_name_1 = 0;
7667 6 : uint32_t length_server_name_1 = 0;
7668 6 : uint32_t size_use_name_1 = 0;
7669 6 : uint32_t length_use_name_1 = 0;
7670 6 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
7671 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7672 6 : if (flags & NDR_IN) {
7673 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
7674 6 : if (_ptr_server_name) {
7675 6 : NDR_PULL_ALLOC(ndr, r->in.server_name);
7676 : } else {
7677 0 : r->in.server_name = NULL;
7678 : }
7679 6 : if (r->in.server_name) {
7680 6 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7681 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
7682 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
7683 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
7684 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
7685 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
7686 6 : if (length_server_name_1 > size_server_name_1) {
7687 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
7688 : }
7689 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
7690 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
7691 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
7692 : }
7693 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.use_name));
7694 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.use_name));
7695 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.use_name, &size_use_name_1));
7696 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.use_name, &length_use_name_1));
7697 6 : if (length_use_name_1 > size_use_name_1) {
7698 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_use_name_1, length_use_name_1);
7699 : }
7700 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_use_name_1, sizeof(uint16_t)));
7701 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.use_name, length_use_name_1, sizeof(uint16_t), CH_UTF16));
7702 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.force_cond));
7703 : }
7704 6 : if (flags & NDR_OUT) {
7705 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7706 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7707 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7708 : }
7709 6 : return NDR_ERR_SUCCESS;
7710 : }
7711 :
7712 0 : _PUBLIC_ void ndr_print_wkssvc_NetrUseDel(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrUseDel *r)
7713 : {
7714 0 : ndr_print_struct(ndr, name, "wkssvc_NetrUseDel");
7715 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7716 0 : ndr->depth++;
7717 0 : if (flags & NDR_SET_VALUES) {
7718 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7719 : }
7720 0 : if (flags & NDR_IN) {
7721 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrUseDel");
7722 0 : ndr->depth++;
7723 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
7724 0 : ndr->depth++;
7725 0 : if (r->in.server_name) {
7726 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
7727 : }
7728 0 : ndr->depth--;
7729 0 : ndr_print_ptr(ndr, "use_name", r->in.use_name);
7730 0 : ndr->depth++;
7731 0 : ndr_print_string(ndr, "use_name", r->in.use_name);
7732 0 : ndr->depth--;
7733 0 : ndr_print_uint32(ndr, "force_cond", r->in.force_cond);
7734 0 : ndr->depth--;
7735 : }
7736 0 : if (flags & NDR_OUT) {
7737 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrUseDel");
7738 0 : ndr->depth++;
7739 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7740 0 : ndr->depth--;
7741 : }
7742 0 : ndr->depth--;
7743 : }
7744 :
7745 12 : static enum ndr_err_code ndr_push_wkssvc_NetrUseEnum(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrUseEnum *r)
7746 : {
7747 12 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7748 12 : if (flags & NDR_IN) {
7749 12 : if (r->in.info == NULL) {
7750 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7751 : }
7752 12 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
7753 12 : if (r->in.server_name) {
7754 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
7755 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7756 12 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
7757 12 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7758 : }
7759 12 : NDR_CHECK(ndr_push_wkssvc_NetrUseEnumInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
7760 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.prefmaxlen));
7761 12 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
7762 12 : if (r->in.resume_handle) {
7763 12 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
7764 : }
7765 : }
7766 12 : if (flags & NDR_OUT) {
7767 0 : if (r->out.info == NULL) {
7768 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7769 : }
7770 0 : if (r->out.entries_read == NULL) {
7771 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7772 : }
7773 0 : NDR_CHECK(ndr_push_wkssvc_NetrUseEnumInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
7774 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.entries_read));
7775 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
7776 0 : if (r->out.resume_handle) {
7777 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
7778 : }
7779 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7780 : }
7781 12 : return NDR_ERR_SUCCESS;
7782 : }
7783 :
7784 12 : static enum ndr_err_code ndr_pull_wkssvc_NetrUseEnum(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrUseEnum *r)
7785 : {
7786 0 : uint32_t _ptr_server_name;
7787 12 : uint32_t size_server_name_1 = 0;
7788 12 : uint32_t length_server_name_1 = 0;
7789 0 : uint32_t _ptr_resume_handle;
7790 12 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
7791 12 : TALLOC_CTX *_mem_save_info_0 = NULL;
7792 12 : TALLOC_CTX *_mem_save_entries_read_0 = NULL;
7793 12 : TALLOC_CTX *_mem_save_resume_handle_0 = NULL;
7794 12 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7795 12 : if (flags & NDR_IN) {
7796 12 : NDR_ZERO_STRUCT(r->out);
7797 :
7798 12 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
7799 12 : if (_ptr_server_name) {
7800 12 : NDR_PULL_ALLOC(ndr, r->in.server_name);
7801 : } else {
7802 0 : r->in.server_name = NULL;
7803 : }
7804 12 : if (r->in.server_name) {
7805 12 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7806 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
7807 12 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
7808 12 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
7809 12 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
7810 12 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
7811 12 : if (length_server_name_1 > size_server_name_1) {
7812 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
7813 : }
7814 12 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
7815 12 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
7816 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
7817 : }
7818 12 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7819 12 : NDR_PULL_ALLOC(ndr, r->in.info);
7820 : }
7821 12 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
7822 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
7823 12 : NDR_CHECK(ndr_pull_wkssvc_NetrUseEnumInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
7824 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
7825 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.prefmaxlen));
7826 12 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
7827 12 : if (_ptr_resume_handle) {
7828 12 : NDR_PULL_ALLOC(ndr, r->in.resume_handle);
7829 : } else {
7830 0 : r->in.resume_handle = NULL;
7831 : }
7832 12 : if (r->in.resume_handle) {
7833 12 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7834 12 : NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
7835 12 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
7836 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
7837 : }
7838 12 : NDR_PULL_ALLOC(ndr, r->out.info);
7839 12 : *r->out.info = *r->in.info;
7840 12 : NDR_PULL_ALLOC(ndr, r->out.entries_read);
7841 12 : NDR_ZERO_STRUCTP(r->out.entries_read);
7842 : }
7843 12 : if (flags & NDR_OUT) {
7844 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7845 : if (r->in.info == NULL) {
7846 : NDR_PULL_ALLOC(ndr, r->in.info);
7847 : NDR_ZERO_STRUCTP(r->in.info);
7848 : }
7849 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7850 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7851 0 : NDR_PULL_ALLOC(ndr, r->out.info);
7852 : }
7853 0 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
7854 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
7855 0 : NDR_CHECK(ndr_pull_wkssvc_NetrUseEnumInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
7856 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
7857 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7858 0 : NDR_PULL_ALLOC(ndr, r->out.entries_read);
7859 : }
7860 0 : _mem_save_entries_read_0 = NDR_PULL_GET_MEM_CTX(ndr);
7861 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.entries_read, LIBNDR_FLAG_REF_ALLOC);
7862 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.entries_read));
7863 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_read_0, LIBNDR_FLAG_REF_ALLOC);
7864 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
7865 0 : if (_ptr_resume_handle) {
7866 0 : NDR_PULL_ALLOC(ndr, r->out.resume_handle);
7867 : } else {
7868 0 : r->out.resume_handle = NULL;
7869 : }
7870 0 : if (r->out.resume_handle) {
7871 0 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7872 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
7873 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
7874 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
7875 : }
7876 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7877 : }
7878 12 : return NDR_ERR_SUCCESS;
7879 : }
7880 :
7881 0 : _PUBLIC_ void ndr_print_wkssvc_NetrUseEnum(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrUseEnum *r)
7882 : {
7883 0 : ndr_print_struct(ndr, name, "wkssvc_NetrUseEnum");
7884 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7885 0 : ndr->depth++;
7886 0 : if (flags & NDR_SET_VALUES) {
7887 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7888 : }
7889 0 : if (flags & NDR_IN) {
7890 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrUseEnum");
7891 0 : ndr->depth++;
7892 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
7893 0 : ndr->depth++;
7894 0 : if (r->in.server_name) {
7895 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
7896 : }
7897 0 : ndr->depth--;
7898 0 : ndr_print_ptr(ndr, "info", r->in.info);
7899 0 : ndr->depth++;
7900 0 : ndr_print_wkssvc_NetrUseEnumInfo(ndr, "info", r->in.info);
7901 0 : ndr->depth--;
7902 0 : ndr_print_uint32(ndr, "prefmaxlen", r->in.prefmaxlen);
7903 0 : ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
7904 0 : ndr->depth++;
7905 0 : if (r->in.resume_handle) {
7906 0 : ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
7907 : }
7908 0 : ndr->depth--;
7909 0 : ndr->depth--;
7910 : }
7911 0 : if (flags & NDR_OUT) {
7912 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrUseEnum");
7913 0 : ndr->depth++;
7914 0 : ndr_print_ptr(ndr, "info", r->out.info);
7915 0 : ndr->depth++;
7916 0 : ndr_print_wkssvc_NetrUseEnumInfo(ndr, "info", r->out.info);
7917 0 : ndr->depth--;
7918 0 : ndr_print_ptr(ndr, "entries_read", r->out.entries_read);
7919 0 : ndr->depth++;
7920 0 : ndr_print_uint32(ndr, "entries_read", *r->out.entries_read);
7921 0 : ndr->depth--;
7922 0 : ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
7923 0 : ndr->depth++;
7924 0 : if (r->out.resume_handle) {
7925 0 : ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
7926 : }
7927 0 : ndr->depth--;
7928 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7929 0 : ndr->depth--;
7930 : }
7931 0 : ndr->depth--;
7932 : }
7933 :
7934 6 : static enum ndr_err_code ndr_push_wkssvc_NetrMessageBufferSend(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrMessageBufferSend *r)
7935 : {
7936 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7937 6 : if (flags & NDR_IN) {
7938 6 : if (r->in.message_name == NULL) {
7939 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7940 : }
7941 6 : if (r->in.message_buffer == NULL) {
7942 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7943 : }
7944 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
7945 6 : if (r->in.server_name) {
7946 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
7947 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7948 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
7949 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7950 : }
7951 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.message_name, CH_UTF16)));
7952 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7953 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.message_name, CH_UTF16)));
7954 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.message_name, ndr_charset_length(r->in.message_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7955 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message_sender_name));
7956 6 : if (r->in.message_sender_name) {
7957 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.message_sender_name, CH_UTF16)));
7958 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7959 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.message_sender_name, CH_UTF16)));
7960 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.message_sender_name, ndr_charset_length(r->in.message_sender_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7961 : }
7962 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.message_size));
7963 6 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.message_buffer, r->in.message_size));
7964 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.message_size));
7965 : }
7966 6 : if (flags & NDR_OUT) {
7967 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7968 : }
7969 6 : return NDR_ERR_SUCCESS;
7970 : }
7971 :
7972 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrMessageBufferSend(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrMessageBufferSend *r)
7973 : {
7974 0 : uint32_t _ptr_server_name;
7975 6 : uint32_t size_server_name_1 = 0;
7976 6 : uint32_t length_server_name_1 = 0;
7977 6 : uint32_t size_message_name_1 = 0;
7978 6 : uint32_t length_message_name_1 = 0;
7979 0 : uint32_t _ptr_message_sender_name;
7980 6 : uint32_t size_message_sender_name_1 = 0;
7981 6 : uint32_t length_message_sender_name_1 = 0;
7982 6 : uint32_t size_message_buffer_1 = 0;
7983 6 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
7984 6 : TALLOC_CTX *_mem_save_message_sender_name_0 = NULL;
7985 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7986 6 : if (flags & NDR_IN) {
7987 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
7988 6 : if (_ptr_server_name) {
7989 6 : NDR_PULL_ALLOC(ndr, r->in.server_name);
7990 : } else {
7991 0 : r->in.server_name = NULL;
7992 : }
7993 6 : if (r->in.server_name) {
7994 6 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7995 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
7996 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
7997 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
7998 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
7999 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
8000 6 : if (length_server_name_1 > size_server_name_1) {
8001 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
8002 : }
8003 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
8004 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
8005 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
8006 : }
8007 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.message_name));
8008 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.message_name));
8009 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.message_name, &size_message_name_1));
8010 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.message_name, &length_message_name_1));
8011 6 : if (length_message_name_1 > size_message_name_1) {
8012 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_message_name_1, length_message_name_1);
8013 : }
8014 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_message_name_1, sizeof(uint16_t)));
8015 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.message_name, length_message_name_1, sizeof(uint16_t), CH_UTF16));
8016 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_message_sender_name));
8017 6 : if (_ptr_message_sender_name) {
8018 6 : NDR_PULL_ALLOC(ndr, r->in.message_sender_name);
8019 : } else {
8020 0 : r->in.message_sender_name = NULL;
8021 : }
8022 6 : if (r->in.message_sender_name) {
8023 6 : _mem_save_message_sender_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8024 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.message_sender_name, 0);
8025 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.message_sender_name));
8026 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.message_sender_name));
8027 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.message_sender_name, &size_message_sender_name_1));
8028 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.message_sender_name, &length_message_sender_name_1));
8029 6 : if (length_message_sender_name_1 > size_message_sender_name_1) {
8030 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_message_sender_name_1, length_message_sender_name_1);
8031 : }
8032 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_message_sender_name_1, sizeof(uint16_t)));
8033 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.message_sender_name, length_message_sender_name_1, sizeof(uint16_t), CH_UTF16));
8034 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_sender_name_0, 0);
8035 : }
8036 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.message_buffer));
8037 6 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.message_buffer, &size_message_buffer_1));
8038 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8039 6 : NDR_PULL_ALLOC_N(ndr, r->in.message_buffer, size_message_buffer_1);
8040 : }
8041 6 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.message_buffer, size_message_buffer_1));
8042 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.message_size));
8043 6 : if (r->in.message_buffer) {
8044 6 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.message_buffer, r->in.message_size));
8045 : }
8046 : }
8047 6 : if (flags & NDR_OUT) {
8048 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8049 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8050 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
8051 : }
8052 6 : return NDR_ERR_SUCCESS;
8053 : }
8054 :
8055 0 : _PUBLIC_ void ndr_print_wkssvc_NetrMessageBufferSend(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrMessageBufferSend *r)
8056 : {
8057 0 : ndr_print_struct(ndr, name, "wkssvc_NetrMessageBufferSend");
8058 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8059 0 : ndr->depth++;
8060 0 : if (flags & NDR_SET_VALUES) {
8061 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8062 : }
8063 0 : if (flags & NDR_IN) {
8064 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrMessageBufferSend");
8065 0 : ndr->depth++;
8066 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
8067 0 : ndr->depth++;
8068 0 : if (r->in.server_name) {
8069 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
8070 : }
8071 0 : ndr->depth--;
8072 0 : ndr_print_ptr(ndr, "message_name", r->in.message_name);
8073 0 : ndr->depth++;
8074 0 : ndr_print_string(ndr, "message_name", r->in.message_name);
8075 0 : ndr->depth--;
8076 0 : ndr_print_ptr(ndr, "message_sender_name", r->in.message_sender_name);
8077 0 : ndr->depth++;
8078 0 : if (r->in.message_sender_name) {
8079 0 : ndr_print_string(ndr, "message_sender_name", r->in.message_sender_name);
8080 : }
8081 0 : ndr->depth--;
8082 0 : ndr_print_ptr(ndr, "message_buffer", r->in.message_buffer);
8083 0 : ndr->depth++;
8084 0 : ndr_print_array_uint8(ndr, "message_buffer", r->in.message_buffer, r->in.message_size);
8085 0 : ndr->depth--;
8086 0 : ndr_print_uint32(ndr, "message_size", r->in.message_size);
8087 0 : ndr->depth--;
8088 : }
8089 0 : if (flags & NDR_OUT) {
8090 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrMessageBufferSend");
8091 0 : ndr->depth++;
8092 0 : ndr_print_WERROR(ndr, "result", r->out.result);
8093 0 : ndr->depth--;
8094 : }
8095 0 : ndr->depth--;
8096 : }
8097 :
8098 6 : static enum ndr_err_code ndr_push_wkssvc_NetrWorkstationStatisticsGet(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrWorkstationStatisticsGet *r)
8099 : {
8100 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8101 6 : if (flags & NDR_IN) {
8102 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
8103 6 : if (r->in.server_name) {
8104 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
8105 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8106 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
8107 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8108 : }
8109 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown2));
8110 6 : if (r->in.unknown2) {
8111 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.unknown2, CH_UTF16)));
8112 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8113 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.unknown2, CH_UTF16)));
8114 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.unknown2, ndr_charset_length(r->in.unknown2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8115 : }
8116 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown3));
8117 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown4));
8118 : }
8119 6 : if (flags & NDR_OUT) {
8120 0 : if (r->out.info == NULL) {
8121 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8122 : }
8123 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
8124 0 : if (*r->out.info) {
8125 0 : NDR_CHECK(ndr_push_wkssvc_NetrWorkstationStatistics(ndr, NDR_SCALARS, *r->out.info));
8126 : }
8127 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
8128 : }
8129 6 : return NDR_ERR_SUCCESS;
8130 : }
8131 :
8132 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrWorkstationStatisticsGet(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrWorkstationStatisticsGet *r)
8133 : {
8134 0 : uint32_t _ptr_server_name;
8135 6 : uint32_t size_server_name_1 = 0;
8136 6 : uint32_t length_server_name_1 = 0;
8137 0 : uint32_t _ptr_unknown2;
8138 6 : uint32_t size_unknown2_1 = 0;
8139 6 : uint32_t length_unknown2_1 = 0;
8140 0 : uint32_t _ptr_info;
8141 6 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
8142 6 : TALLOC_CTX *_mem_save_unknown2_0 = NULL;
8143 6 : TALLOC_CTX *_mem_save_info_0 = NULL;
8144 6 : TALLOC_CTX *_mem_save_info_1 = NULL;
8145 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8146 6 : if (flags & NDR_IN) {
8147 6 : NDR_ZERO_STRUCT(r->out);
8148 :
8149 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
8150 6 : if (_ptr_server_name) {
8151 6 : NDR_PULL_ALLOC(ndr, r->in.server_name);
8152 : } else {
8153 0 : r->in.server_name = NULL;
8154 : }
8155 6 : if (r->in.server_name) {
8156 6 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8157 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
8158 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
8159 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
8160 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
8161 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
8162 6 : if (length_server_name_1 > size_server_name_1) {
8163 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
8164 : }
8165 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
8166 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
8167 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
8168 : }
8169 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
8170 6 : if (_ptr_unknown2) {
8171 0 : NDR_PULL_ALLOC(ndr, r->in.unknown2);
8172 : } else {
8173 6 : r->in.unknown2 = NULL;
8174 : }
8175 6 : if (r->in.unknown2) {
8176 0 : _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
8177 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown2, 0);
8178 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.unknown2));
8179 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.unknown2));
8180 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.unknown2, &size_unknown2_1));
8181 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.unknown2, &length_unknown2_1));
8182 0 : if (length_unknown2_1 > size_unknown2_1) {
8183 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_unknown2_1, length_unknown2_1);
8184 : }
8185 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_unknown2_1, sizeof(uint16_t)));
8186 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.unknown2, length_unknown2_1, sizeof(uint16_t), CH_UTF16));
8187 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
8188 : }
8189 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown3));
8190 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown4));
8191 6 : NDR_PULL_ALLOC(ndr, r->out.info);
8192 6 : NDR_ZERO_STRUCTP(r->out.info);
8193 : }
8194 6 : if (flags & NDR_OUT) {
8195 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8196 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8197 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8198 0 : NDR_PULL_ALLOC(ndr, r->out.info);
8199 : }
8200 0 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
8201 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
8202 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
8203 0 : if (_ptr_info) {
8204 0 : NDR_PULL_ALLOC(ndr, *r->out.info);
8205 : } else {
8206 0 : *r->out.info = NULL;
8207 : }
8208 0 : if (*r->out.info) {
8209 0 : _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
8210 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
8211 0 : NDR_CHECK(ndr_pull_wkssvc_NetrWorkstationStatistics(ndr, NDR_SCALARS, *r->out.info));
8212 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
8213 : }
8214 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
8215 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
8216 : }
8217 6 : return NDR_ERR_SUCCESS;
8218 : }
8219 :
8220 0 : _PUBLIC_ void ndr_print_wkssvc_NetrWorkstationStatisticsGet(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrWorkstationStatisticsGet *r)
8221 : {
8222 0 : ndr_print_struct(ndr, name, "wkssvc_NetrWorkstationStatisticsGet");
8223 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8224 0 : ndr->depth++;
8225 0 : if (flags & NDR_SET_VALUES) {
8226 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8227 : }
8228 0 : if (flags & NDR_IN) {
8229 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrWorkstationStatisticsGet");
8230 0 : ndr->depth++;
8231 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
8232 0 : ndr->depth++;
8233 0 : if (r->in.server_name) {
8234 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
8235 : }
8236 0 : ndr->depth--;
8237 0 : ndr_print_ptr(ndr, "unknown2", r->in.unknown2);
8238 0 : ndr->depth++;
8239 0 : if (r->in.unknown2) {
8240 0 : ndr_print_string(ndr, "unknown2", r->in.unknown2);
8241 : }
8242 0 : ndr->depth--;
8243 0 : ndr_print_uint32(ndr, "unknown3", r->in.unknown3);
8244 0 : ndr_print_uint32(ndr, "unknown4", r->in.unknown4);
8245 0 : ndr->depth--;
8246 : }
8247 0 : if (flags & NDR_OUT) {
8248 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrWorkstationStatisticsGet");
8249 0 : ndr->depth++;
8250 0 : ndr_print_ptr(ndr, "info", r->out.info);
8251 0 : ndr->depth++;
8252 0 : ndr_print_ptr(ndr, "info", *r->out.info);
8253 0 : ndr->depth++;
8254 0 : if (*r->out.info) {
8255 0 : ndr_print_wkssvc_NetrWorkstationStatistics(ndr, "info", *r->out.info);
8256 : }
8257 0 : ndr->depth--;
8258 0 : ndr->depth--;
8259 0 : ndr_print_WERROR(ndr, "result", r->out.result);
8260 0 : ndr->depth--;
8261 : }
8262 0 : ndr->depth--;
8263 : }
8264 :
8265 6 : static enum ndr_err_code ndr_push_wkssvc_NetrLogonDomainNameAdd(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrLogonDomainNameAdd *r)
8266 : {
8267 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8268 6 : if (flags & NDR_IN) {
8269 6 : if (r->in.domain_name == NULL) {
8270 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8271 : }
8272 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
8273 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8274 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
8275 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8276 : }
8277 6 : if (flags & NDR_OUT) {
8278 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
8279 : }
8280 6 : return NDR_ERR_SUCCESS;
8281 : }
8282 :
8283 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrLogonDomainNameAdd(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrLogonDomainNameAdd *r)
8284 : {
8285 6 : uint32_t size_domain_name_1 = 0;
8286 6 : uint32_t length_domain_name_1 = 0;
8287 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8288 6 : if (flags & NDR_IN) {
8289 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
8290 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
8291 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain_name, &size_domain_name_1));
8292 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain_name, &length_domain_name_1));
8293 6 : if (length_domain_name_1 > size_domain_name_1) {
8294 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
8295 : }
8296 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
8297 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
8298 : }
8299 6 : if (flags & NDR_OUT) {
8300 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8301 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8302 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
8303 : }
8304 6 : return NDR_ERR_SUCCESS;
8305 : }
8306 :
8307 0 : _PUBLIC_ void ndr_print_wkssvc_NetrLogonDomainNameAdd(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrLogonDomainNameAdd *r)
8308 : {
8309 0 : ndr_print_struct(ndr, name, "wkssvc_NetrLogonDomainNameAdd");
8310 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8311 0 : ndr->depth++;
8312 0 : if (flags & NDR_SET_VALUES) {
8313 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8314 : }
8315 0 : if (flags & NDR_IN) {
8316 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrLogonDomainNameAdd");
8317 0 : ndr->depth++;
8318 0 : ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
8319 0 : ndr->depth++;
8320 0 : ndr_print_string(ndr, "domain_name", r->in.domain_name);
8321 0 : ndr->depth--;
8322 0 : ndr->depth--;
8323 : }
8324 0 : if (flags & NDR_OUT) {
8325 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrLogonDomainNameAdd");
8326 0 : ndr->depth++;
8327 0 : ndr_print_WERROR(ndr, "result", r->out.result);
8328 0 : ndr->depth--;
8329 : }
8330 0 : ndr->depth--;
8331 : }
8332 :
8333 6 : static enum ndr_err_code ndr_push_wkssvc_NetrLogonDomainNameDel(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrLogonDomainNameDel *r)
8334 : {
8335 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8336 6 : if (flags & NDR_IN) {
8337 6 : if (r->in.domain_name == NULL) {
8338 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8339 : }
8340 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
8341 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8342 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
8343 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8344 : }
8345 6 : if (flags & NDR_OUT) {
8346 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
8347 : }
8348 6 : return NDR_ERR_SUCCESS;
8349 : }
8350 :
8351 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrLogonDomainNameDel(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrLogonDomainNameDel *r)
8352 : {
8353 6 : uint32_t size_domain_name_1 = 0;
8354 6 : uint32_t length_domain_name_1 = 0;
8355 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8356 6 : if (flags & NDR_IN) {
8357 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
8358 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
8359 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain_name, &size_domain_name_1));
8360 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain_name, &length_domain_name_1));
8361 6 : if (length_domain_name_1 > size_domain_name_1) {
8362 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
8363 : }
8364 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
8365 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
8366 : }
8367 6 : if (flags & NDR_OUT) {
8368 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8369 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8370 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
8371 : }
8372 6 : return NDR_ERR_SUCCESS;
8373 : }
8374 :
8375 0 : _PUBLIC_ void ndr_print_wkssvc_NetrLogonDomainNameDel(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrLogonDomainNameDel *r)
8376 : {
8377 0 : ndr_print_struct(ndr, name, "wkssvc_NetrLogonDomainNameDel");
8378 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8379 0 : ndr->depth++;
8380 0 : if (flags & NDR_SET_VALUES) {
8381 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8382 : }
8383 0 : if (flags & NDR_IN) {
8384 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrLogonDomainNameDel");
8385 0 : ndr->depth++;
8386 0 : ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
8387 0 : ndr->depth++;
8388 0 : ndr_print_string(ndr, "domain_name", r->in.domain_name);
8389 0 : ndr->depth--;
8390 0 : ndr->depth--;
8391 : }
8392 0 : if (flags & NDR_OUT) {
8393 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrLogonDomainNameDel");
8394 0 : ndr->depth++;
8395 0 : ndr_print_WERROR(ndr, "result", r->out.result);
8396 0 : ndr->depth--;
8397 : }
8398 0 : ndr->depth--;
8399 : }
8400 :
8401 6 : static enum ndr_err_code ndr_push_wkssvc_NetrJoinDomain(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrJoinDomain *r)
8402 : {
8403 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8404 6 : if (flags & NDR_IN) {
8405 6 : if (r->in.domain_name == NULL) {
8406 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8407 : }
8408 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
8409 6 : if (r->in.server_name) {
8410 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
8411 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8412 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
8413 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8414 : }
8415 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
8416 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8417 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
8418 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8419 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.account_ou));
8420 6 : if (r->in.account_ou) {
8421 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_ou, CH_UTF16)));
8422 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8423 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_ou, CH_UTF16)));
8424 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_ou, ndr_charset_length(r->in.account_ou, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8425 : }
8426 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Account));
8427 6 : if (r->in.Account) {
8428 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
8429 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8430 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
8431 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Account, ndr_charset_length(r->in.Account, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8432 : }
8433 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
8434 6 : if (r->in.password) {
8435 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
8436 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8437 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
8438 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8439 : }
8440 6 : NDR_CHECK(ndr_push_wkssvc_joinflags(ndr, NDR_SCALARS, r->in.join_flags));
8441 : }
8442 6 : if (flags & NDR_OUT) {
8443 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
8444 : }
8445 6 : return NDR_ERR_SUCCESS;
8446 : }
8447 :
8448 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrJoinDomain(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrJoinDomain *r)
8449 : {
8450 0 : uint32_t _ptr_server_name;
8451 6 : uint32_t size_server_name_1 = 0;
8452 6 : uint32_t length_server_name_1 = 0;
8453 6 : uint32_t size_domain_name_1 = 0;
8454 6 : uint32_t length_domain_name_1 = 0;
8455 0 : uint32_t _ptr_account_ou;
8456 6 : uint32_t size_account_ou_1 = 0;
8457 6 : uint32_t length_account_ou_1 = 0;
8458 0 : uint32_t _ptr_Account;
8459 6 : uint32_t size_Account_1 = 0;
8460 6 : uint32_t length_Account_1 = 0;
8461 0 : uint32_t _ptr_password;
8462 6 : uint32_t size_password_1 = 0;
8463 6 : uint32_t length_password_1 = 0;
8464 6 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
8465 6 : TALLOC_CTX *_mem_save_account_ou_0 = NULL;
8466 6 : TALLOC_CTX *_mem_save_Account_0 = NULL;
8467 6 : TALLOC_CTX *_mem_save_password_0 = NULL;
8468 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8469 6 : if (flags & NDR_IN) {
8470 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
8471 6 : if (_ptr_server_name) {
8472 6 : NDR_PULL_ALLOC(ndr, r->in.server_name);
8473 : } else {
8474 0 : r->in.server_name = NULL;
8475 : }
8476 6 : if (r->in.server_name) {
8477 6 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8478 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
8479 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
8480 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
8481 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
8482 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
8483 6 : if (length_server_name_1 > size_server_name_1) {
8484 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
8485 : }
8486 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
8487 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
8488 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
8489 : }
8490 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
8491 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
8492 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain_name, &size_domain_name_1));
8493 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain_name, &length_domain_name_1));
8494 6 : if (length_domain_name_1 > size_domain_name_1) {
8495 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
8496 : }
8497 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
8498 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
8499 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_ou));
8500 6 : if (_ptr_account_ou) {
8501 0 : NDR_PULL_ALLOC(ndr, r->in.account_ou);
8502 : } else {
8503 6 : r->in.account_ou = NULL;
8504 : }
8505 6 : if (r->in.account_ou) {
8506 0 : _mem_save_account_ou_0 = NDR_PULL_GET_MEM_CTX(ndr);
8507 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.account_ou, 0);
8508 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_ou));
8509 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_ou));
8510 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_ou, &size_account_ou_1));
8511 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_ou, &length_account_ou_1));
8512 0 : if (length_account_ou_1 > size_account_ou_1) {
8513 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_ou_1, length_account_ou_1);
8514 : }
8515 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_ou_1, sizeof(uint16_t)));
8516 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_ou, length_account_ou_1, sizeof(uint16_t), CH_UTF16));
8517 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_ou_0, 0);
8518 : }
8519 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Account));
8520 6 : if (_ptr_Account) {
8521 6 : NDR_PULL_ALLOC(ndr, r->in.Account);
8522 : } else {
8523 0 : r->in.Account = NULL;
8524 : }
8525 6 : if (r->in.Account) {
8526 6 : _mem_save_Account_0 = NDR_PULL_GET_MEM_CTX(ndr);
8527 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Account, 0);
8528 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Account));
8529 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Account));
8530 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.Account, &size_Account_1));
8531 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.Account, &length_Account_1));
8532 6 : if (length_Account_1 > size_Account_1) {
8533 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_Account_1, length_Account_1);
8534 : }
8535 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_Account_1, sizeof(uint16_t)));
8536 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Account, length_Account_1, sizeof(uint16_t), CH_UTF16));
8537 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Account_0, 0);
8538 : }
8539 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
8540 6 : if (_ptr_password) {
8541 0 : NDR_PULL_ALLOC(ndr, r->in.password);
8542 : } else {
8543 6 : r->in.password = NULL;
8544 : }
8545 6 : if (r->in.password) {
8546 0 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
8547 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
8548 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
8549 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
8550 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.password, &size_password_1));
8551 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.password, &length_password_1));
8552 0 : if (length_password_1 > size_password_1) {
8553 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_password_1, length_password_1);
8554 : }
8555 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_password_1, sizeof(uint16_t)));
8556 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, length_password_1, sizeof(uint16_t), CH_UTF16));
8557 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
8558 : }
8559 6 : NDR_CHECK(ndr_pull_wkssvc_joinflags(ndr, NDR_SCALARS, &r->in.join_flags));
8560 : }
8561 6 : if (flags & NDR_OUT) {
8562 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8563 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8564 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
8565 : }
8566 6 : return NDR_ERR_SUCCESS;
8567 : }
8568 :
8569 0 : _PUBLIC_ void ndr_print_wkssvc_NetrJoinDomain(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrJoinDomain *r)
8570 : {
8571 0 : ndr_print_struct(ndr, name, "wkssvc_NetrJoinDomain");
8572 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8573 0 : ndr->depth++;
8574 0 : if (flags & NDR_SET_VALUES) {
8575 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8576 : }
8577 0 : if (flags & NDR_IN) {
8578 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrJoinDomain");
8579 0 : ndr->depth++;
8580 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
8581 0 : ndr->depth++;
8582 0 : if (r->in.server_name) {
8583 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
8584 : }
8585 0 : ndr->depth--;
8586 0 : ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
8587 0 : ndr->depth++;
8588 0 : ndr_print_string(ndr, "domain_name", r->in.domain_name);
8589 0 : ndr->depth--;
8590 0 : ndr_print_ptr(ndr, "account_ou", r->in.account_ou);
8591 0 : ndr->depth++;
8592 0 : if (r->in.account_ou) {
8593 0 : ndr_print_string(ndr, "account_ou", r->in.account_ou);
8594 : }
8595 0 : ndr->depth--;
8596 0 : ndr_print_ptr(ndr, "Account", r->in.Account);
8597 0 : ndr->depth++;
8598 0 : if (r->in.Account) {
8599 0 : ndr_print_string(ndr, "Account", r->in.Account);
8600 : }
8601 0 : ndr->depth--;
8602 0 : ndr_print_ptr(ndr, "password", r->in.password);
8603 0 : ndr->depth++;
8604 0 : if (r->in.password) {
8605 0 : ndr_print_string(ndr, "password", r->in.password);
8606 : }
8607 0 : ndr->depth--;
8608 0 : ndr_print_wkssvc_joinflags(ndr, "join_flags", r->in.join_flags);
8609 0 : ndr->depth--;
8610 : }
8611 0 : if (flags & NDR_OUT) {
8612 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrJoinDomain");
8613 0 : ndr->depth++;
8614 0 : ndr_print_WERROR(ndr, "result", r->out.result);
8615 0 : ndr->depth--;
8616 : }
8617 0 : ndr->depth--;
8618 : }
8619 :
8620 6 : static enum ndr_err_code ndr_push_wkssvc_NetrUnjoinDomain(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrUnjoinDomain *r)
8621 : {
8622 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8623 6 : if (flags & NDR_IN) {
8624 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
8625 6 : if (r->in.server_name) {
8626 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
8627 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8628 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
8629 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8630 : }
8631 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Account));
8632 6 : if (r->in.Account) {
8633 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
8634 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8635 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
8636 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Account, ndr_charset_length(r->in.Account, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8637 : }
8638 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
8639 6 : if (r->in.password) {
8640 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
8641 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8642 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
8643 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8644 : }
8645 6 : NDR_CHECK(ndr_push_wkssvc_joinflags(ndr, NDR_SCALARS, r->in.unjoin_flags));
8646 : }
8647 6 : if (flags & NDR_OUT) {
8648 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
8649 : }
8650 6 : return NDR_ERR_SUCCESS;
8651 : }
8652 :
8653 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrUnjoinDomain(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrUnjoinDomain *r)
8654 : {
8655 0 : uint32_t _ptr_server_name;
8656 6 : uint32_t size_server_name_1 = 0;
8657 6 : uint32_t length_server_name_1 = 0;
8658 0 : uint32_t _ptr_Account;
8659 6 : uint32_t size_Account_1 = 0;
8660 6 : uint32_t length_Account_1 = 0;
8661 0 : uint32_t _ptr_password;
8662 6 : uint32_t size_password_1 = 0;
8663 6 : uint32_t length_password_1 = 0;
8664 6 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
8665 6 : TALLOC_CTX *_mem_save_Account_0 = NULL;
8666 6 : TALLOC_CTX *_mem_save_password_0 = NULL;
8667 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8668 6 : if (flags & NDR_IN) {
8669 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
8670 6 : if (_ptr_server_name) {
8671 6 : NDR_PULL_ALLOC(ndr, r->in.server_name);
8672 : } else {
8673 0 : r->in.server_name = NULL;
8674 : }
8675 6 : if (r->in.server_name) {
8676 6 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8677 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
8678 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
8679 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
8680 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
8681 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
8682 6 : if (length_server_name_1 > size_server_name_1) {
8683 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
8684 : }
8685 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
8686 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
8687 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
8688 : }
8689 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Account));
8690 6 : if (_ptr_Account) {
8691 6 : NDR_PULL_ALLOC(ndr, r->in.Account);
8692 : } else {
8693 0 : r->in.Account = NULL;
8694 : }
8695 6 : if (r->in.Account) {
8696 6 : _mem_save_Account_0 = NDR_PULL_GET_MEM_CTX(ndr);
8697 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Account, 0);
8698 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Account));
8699 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Account));
8700 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.Account, &size_Account_1));
8701 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.Account, &length_Account_1));
8702 6 : if (length_Account_1 > size_Account_1) {
8703 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_Account_1, length_Account_1);
8704 : }
8705 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_Account_1, sizeof(uint16_t)));
8706 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Account, length_Account_1, sizeof(uint16_t), CH_UTF16));
8707 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Account_0, 0);
8708 : }
8709 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
8710 6 : if (_ptr_password) {
8711 0 : NDR_PULL_ALLOC(ndr, r->in.password);
8712 : } else {
8713 6 : r->in.password = NULL;
8714 : }
8715 6 : if (r->in.password) {
8716 0 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
8717 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
8718 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
8719 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
8720 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.password, &size_password_1));
8721 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.password, &length_password_1));
8722 0 : if (length_password_1 > size_password_1) {
8723 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_password_1, length_password_1);
8724 : }
8725 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_password_1, sizeof(uint16_t)));
8726 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, length_password_1, sizeof(uint16_t), CH_UTF16));
8727 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
8728 : }
8729 6 : NDR_CHECK(ndr_pull_wkssvc_joinflags(ndr, NDR_SCALARS, &r->in.unjoin_flags));
8730 : }
8731 6 : if (flags & NDR_OUT) {
8732 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8733 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8734 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
8735 : }
8736 6 : return NDR_ERR_SUCCESS;
8737 : }
8738 :
8739 0 : _PUBLIC_ void ndr_print_wkssvc_NetrUnjoinDomain(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrUnjoinDomain *r)
8740 : {
8741 0 : ndr_print_struct(ndr, name, "wkssvc_NetrUnjoinDomain");
8742 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8743 0 : ndr->depth++;
8744 0 : if (flags & NDR_SET_VALUES) {
8745 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8746 : }
8747 0 : if (flags & NDR_IN) {
8748 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrUnjoinDomain");
8749 0 : ndr->depth++;
8750 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
8751 0 : ndr->depth++;
8752 0 : if (r->in.server_name) {
8753 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
8754 : }
8755 0 : ndr->depth--;
8756 0 : ndr_print_ptr(ndr, "Account", r->in.Account);
8757 0 : ndr->depth++;
8758 0 : if (r->in.Account) {
8759 0 : ndr_print_string(ndr, "Account", r->in.Account);
8760 : }
8761 0 : ndr->depth--;
8762 0 : ndr_print_ptr(ndr, "password", r->in.password);
8763 0 : ndr->depth++;
8764 0 : if (r->in.password) {
8765 0 : ndr_print_string(ndr, "password", r->in.password);
8766 : }
8767 0 : ndr->depth--;
8768 0 : ndr_print_wkssvc_joinflags(ndr, "unjoin_flags", r->in.unjoin_flags);
8769 0 : ndr->depth--;
8770 : }
8771 0 : if (flags & NDR_OUT) {
8772 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrUnjoinDomain");
8773 0 : ndr->depth++;
8774 0 : ndr_print_WERROR(ndr, "result", r->out.result);
8775 0 : ndr->depth--;
8776 : }
8777 0 : ndr->depth--;
8778 : }
8779 :
8780 0 : static enum ndr_err_code ndr_push_wkssvc_NetrRenameMachineInDomain(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrRenameMachineInDomain *r)
8781 : {
8782 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8783 0 : if (flags & NDR_IN) {
8784 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
8785 0 : if (r->in.server_name) {
8786 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
8787 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8788 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
8789 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8790 : }
8791 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.NewMachineName));
8792 0 : if (r->in.NewMachineName) {
8793 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.NewMachineName, CH_UTF16)));
8794 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8795 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.NewMachineName, CH_UTF16)));
8796 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.NewMachineName, ndr_charset_length(r->in.NewMachineName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8797 : }
8798 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Account));
8799 0 : if (r->in.Account) {
8800 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
8801 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8802 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
8803 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Account, ndr_charset_length(r->in.Account, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8804 : }
8805 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
8806 0 : if (r->in.password) {
8807 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
8808 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8809 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
8810 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8811 : }
8812 0 : NDR_CHECK(ndr_push_wkssvc_renameflags(ndr, NDR_SCALARS, r->in.RenameOptions));
8813 : }
8814 0 : if (flags & NDR_OUT) {
8815 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
8816 : }
8817 0 : return NDR_ERR_SUCCESS;
8818 : }
8819 :
8820 0 : static enum ndr_err_code ndr_pull_wkssvc_NetrRenameMachineInDomain(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrRenameMachineInDomain *r)
8821 : {
8822 0 : uint32_t _ptr_server_name;
8823 0 : uint32_t size_server_name_1 = 0;
8824 0 : uint32_t length_server_name_1 = 0;
8825 0 : uint32_t _ptr_NewMachineName;
8826 0 : uint32_t size_NewMachineName_1 = 0;
8827 0 : uint32_t length_NewMachineName_1 = 0;
8828 0 : uint32_t _ptr_Account;
8829 0 : uint32_t size_Account_1 = 0;
8830 0 : uint32_t length_Account_1 = 0;
8831 0 : uint32_t _ptr_password;
8832 0 : uint32_t size_password_1 = 0;
8833 0 : uint32_t length_password_1 = 0;
8834 0 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
8835 0 : TALLOC_CTX *_mem_save_NewMachineName_0 = NULL;
8836 0 : TALLOC_CTX *_mem_save_Account_0 = NULL;
8837 0 : TALLOC_CTX *_mem_save_password_0 = NULL;
8838 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8839 0 : if (flags & NDR_IN) {
8840 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
8841 0 : if (_ptr_server_name) {
8842 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
8843 : } else {
8844 0 : r->in.server_name = NULL;
8845 : }
8846 0 : if (r->in.server_name) {
8847 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8848 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
8849 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
8850 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
8851 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
8852 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
8853 0 : if (length_server_name_1 > size_server_name_1) {
8854 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
8855 : }
8856 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
8857 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
8858 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
8859 : }
8860 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_NewMachineName));
8861 0 : if (_ptr_NewMachineName) {
8862 0 : NDR_PULL_ALLOC(ndr, r->in.NewMachineName);
8863 : } else {
8864 0 : r->in.NewMachineName = NULL;
8865 : }
8866 0 : if (r->in.NewMachineName) {
8867 0 : _mem_save_NewMachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
8868 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.NewMachineName, 0);
8869 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.NewMachineName));
8870 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.NewMachineName));
8871 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.NewMachineName, &size_NewMachineName_1));
8872 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.NewMachineName, &length_NewMachineName_1));
8873 0 : if (length_NewMachineName_1 > size_NewMachineName_1) {
8874 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_NewMachineName_1, length_NewMachineName_1);
8875 : }
8876 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_NewMachineName_1, sizeof(uint16_t)));
8877 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.NewMachineName, length_NewMachineName_1, sizeof(uint16_t), CH_UTF16));
8878 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_NewMachineName_0, 0);
8879 : }
8880 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Account));
8881 0 : if (_ptr_Account) {
8882 0 : NDR_PULL_ALLOC(ndr, r->in.Account);
8883 : } else {
8884 0 : r->in.Account = NULL;
8885 : }
8886 0 : if (r->in.Account) {
8887 0 : _mem_save_Account_0 = NDR_PULL_GET_MEM_CTX(ndr);
8888 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Account, 0);
8889 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Account));
8890 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Account));
8891 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.Account, &size_Account_1));
8892 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.Account, &length_Account_1));
8893 0 : if (length_Account_1 > size_Account_1) {
8894 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_Account_1, length_Account_1);
8895 : }
8896 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_Account_1, sizeof(uint16_t)));
8897 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Account, length_Account_1, sizeof(uint16_t), CH_UTF16));
8898 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Account_0, 0);
8899 : }
8900 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
8901 0 : if (_ptr_password) {
8902 0 : NDR_PULL_ALLOC(ndr, r->in.password);
8903 : } else {
8904 0 : r->in.password = NULL;
8905 : }
8906 0 : if (r->in.password) {
8907 0 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
8908 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
8909 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
8910 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
8911 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.password, &size_password_1));
8912 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.password, &length_password_1));
8913 0 : if (length_password_1 > size_password_1) {
8914 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_password_1, length_password_1);
8915 : }
8916 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_password_1, sizeof(uint16_t)));
8917 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, length_password_1, sizeof(uint16_t), CH_UTF16));
8918 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
8919 : }
8920 0 : NDR_CHECK(ndr_pull_wkssvc_renameflags(ndr, NDR_SCALARS, &r->in.RenameOptions));
8921 : }
8922 0 : if (flags & NDR_OUT) {
8923 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8924 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8925 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
8926 : }
8927 0 : return NDR_ERR_SUCCESS;
8928 : }
8929 :
8930 0 : _PUBLIC_ void ndr_print_wkssvc_NetrRenameMachineInDomain(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrRenameMachineInDomain *r)
8931 : {
8932 0 : ndr_print_struct(ndr, name, "wkssvc_NetrRenameMachineInDomain");
8933 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8934 0 : ndr->depth++;
8935 0 : if (flags & NDR_SET_VALUES) {
8936 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8937 : }
8938 0 : if (flags & NDR_IN) {
8939 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrRenameMachineInDomain");
8940 0 : ndr->depth++;
8941 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
8942 0 : ndr->depth++;
8943 0 : if (r->in.server_name) {
8944 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
8945 : }
8946 0 : ndr->depth--;
8947 0 : ndr_print_ptr(ndr, "NewMachineName", r->in.NewMachineName);
8948 0 : ndr->depth++;
8949 0 : if (r->in.NewMachineName) {
8950 0 : ndr_print_string(ndr, "NewMachineName", r->in.NewMachineName);
8951 : }
8952 0 : ndr->depth--;
8953 0 : ndr_print_ptr(ndr, "Account", r->in.Account);
8954 0 : ndr->depth++;
8955 0 : if (r->in.Account) {
8956 0 : ndr_print_string(ndr, "Account", r->in.Account);
8957 : }
8958 0 : ndr->depth--;
8959 0 : ndr_print_ptr(ndr, "password", r->in.password);
8960 0 : ndr->depth++;
8961 0 : if (r->in.password) {
8962 0 : ndr_print_string(ndr, "password", r->in.password);
8963 : }
8964 0 : ndr->depth--;
8965 0 : ndr_print_wkssvc_renameflags(ndr, "RenameOptions", r->in.RenameOptions);
8966 0 : ndr->depth--;
8967 : }
8968 0 : if (flags & NDR_OUT) {
8969 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrRenameMachineInDomain");
8970 0 : ndr->depth++;
8971 0 : ndr_print_WERROR(ndr, "result", r->out.result);
8972 0 : ndr->depth--;
8973 : }
8974 0 : ndr->depth--;
8975 : }
8976 :
8977 6 : static enum ndr_err_code ndr_push_wkssvc_NetrValidateName(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrValidateName *r)
8978 : {
8979 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8980 6 : if (flags & NDR_IN) {
8981 6 : if (r->in.name == NULL) {
8982 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8983 : }
8984 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
8985 6 : if (r->in.server_name) {
8986 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
8987 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8988 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
8989 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8990 : }
8991 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16)));
8992 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8993 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16)));
8994 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name, ndr_charset_length(r->in.name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8995 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Account));
8996 6 : if (r->in.Account) {
8997 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
8998 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8999 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
9000 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Account, ndr_charset_length(r->in.Account, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9001 : }
9002 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Password));
9003 6 : if (r->in.Password) {
9004 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Password, CH_UTF16)));
9005 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9006 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Password, CH_UTF16)));
9007 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Password, ndr_charset_length(r->in.Password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9008 : }
9009 6 : NDR_CHECK(ndr_push_wkssvc_NetValidateNameType(ndr, NDR_SCALARS, r->in.name_type));
9010 : }
9011 6 : if (flags & NDR_OUT) {
9012 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9013 : }
9014 6 : return NDR_ERR_SUCCESS;
9015 : }
9016 :
9017 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrValidateName(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrValidateName *r)
9018 : {
9019 0 : uint32_t _ptr_server_name;
9020 6 : uint32_t size_server_name_1 = 0;
9021 6 : uint32_t length_server_name_1 = 0;
9022 6 : uint32_t size_name_1 = 0;
9023 6 : uint32_t length_name_1 = 0;
9024 0 : uint32_t _ptr_Account;
9025 6 : uint32_t size_Account_1 = 0;
9026 6 : uint32_t length_Account_1 = 0;
9027 0 : uint32_t _ptr_Password;
9028 6 : uint32_t size_Password_1 = 0;
9029 6 : uint32_t length_Password_1 = 0;
9030 6 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
9031 6 : TALLOC_CTX *_mem_save_Account_0 = NULL;
9032 6 : TALLOC_CTX *_mem_save_Password_0 = NULL;
9033 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9034 6 : if (flags & NDR_IN) {
9035 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
9036 6 : if (_ptr_server_name) {
9037 6 : NDR_PULL_ALLOC(ndr, r->in.server_name);
9038 : } else {
9039 0 : r->in.server_name = NULL;
9040 : }
9041 6 : if (r->in.server_name) {
9042 6 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9043 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
9044 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
9045 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
9046 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
9047 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
9048 6 : if (length_server_name_1 > size_server_name_1) {
9049 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
9050 : }
9051 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
9052 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
9053 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
9054 : }
9055 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name));
9056 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name));
9057 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.name, &size_name_1));
9058 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.name, &length_name_1));
9059 6 : if (length_name_1 > size_name_1) {
9060 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_name_1, length_name_1);
9061 : }
9062 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
9063 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name, length_name_1, sizeof(uint16_t), CH_UTF16));
9064 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Account));
9065 6 : if (_ptr_Account) {
9066 0 : NDR_PULL_ALLOC(ndr, r->in.Account);
9067 : } else {
9068 6 : r->in.Account = NULL;
9069 : }
9070 6 : if (r->in.Account) {
9071 0 : _mem_save_Account_0 = NDR_PULL_GET_MEM_CTX(ndr);
9072 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Account, 0);
9073 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Account));
9074 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Account));
9075 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.Account, &size_Account_1));
9076 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.Account, &length_Account_1));
9077 0 : if (length_Account_1 > size_Account_1) {
9078 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_Account_1, length_Account_1);
9079 : }
9080 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_Account_1, sizeof(uint16_t)));
9081 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Account, length_Account_1, sizeof(uint16_t), CH_UTF16));
9082 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Account_0, 0);
9083 : }
9084 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Password));
9085 6 : if (_ptr_Password) {
9086 0 : NDR_PULL_ALLOC(ndr, r->in.Password);
9087 : } else {
9088 6 : r->in.Password = NULL;
9089 : }
9090 6 : if (r->in.Password) {
9091 0 : _mem_save_Password_0 = NDR_PULL_GET_MEM_CTX(ndr);
9092 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Password, 0);
9093 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Password));
9094 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Password));
9095 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.Password, &size_Password_1));
9096 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.Password, &length_Password_1));
9097 0 : if (length_Password_1 > size_Password_1) {
9098 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_Password_1, length_Password_1);
9099 : }
9100 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_Password_1, sizeof(uint16_t)));
9101 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Password, length_Password_1, sizeof(uint16_t), CH_UTF16));
9102 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Password_0, 0);
9103 : }
9104 6 : NDR_CHECK(ndr_pull_wkssvc_NetValidateNameType(ndr, NDR_SCALARS, &r->in.name_type));
9105 : }
9106 6 : if (flags & NDR_OUT) {
9107 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9108 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9109 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9110 : }
9111 6 : return NDR_ERR_SUCCESS;
9112 : }
9113 :
9114 0 : _PUBLIC_ void ndr_print_wkssvc_NetrValidateName(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrValidateName *r)
9115 : {
9116 0 : ndr_print_struct(ndr, name, "wkssvc_NetrValidateName");
9117 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9118 0 : ndr->depth++;
9119 0 : if (flags & NDR_SET_VALUES) {
9120 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9121 : }
9122 0 : if (flags & NDR_IN) {
9123 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrValidateName");
9124 0 : ndr->depth++;
9125 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
9126 0 : ndr->depth++;
9127 0 : if (r->in.server_name) {
9128 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
9129 : }
9130 0 : ndr->depth--;
9131 0 : ndr_print_ptr(ndr, "name", r->in.name);
9132 0 : ndr->depth++;
9133 0 : ndr_print_string(ndr, "name", r->in.name);
9134 0 : ndr->depth--;
9135 0 : ndr_print_ptr(ndr, "Account", r->in.Account);
9136 0 : ndr->depth++;
9137 0 : if (r->in.Account) {
9138 0 : ndr_print_string(ndr, "Account", r->in.Account);
9139 : }
9140 0 : ndr->depth--;
9141 0 : ndr_print_ptr(ndr, "Password", r->in.Password);
9142 0 : ndr->depth++;
9143 0 : if (r->in.Password) {
9144 0 : ndr_print_string(ndr, "Password", r->in.Password);
9145 : }
9146 0 : ndr->depth--;
9147 0 : ndr_print_wkssvc_NetValidateNameType(ndr, "name_type", r->in.name_type);
9148 0 : ndr->depth--;
9149 : }
9150 0 : if (flags & NDR_OUT) {
9151 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrValidateName");
9152 0 : ndr->depth++;
9153 0 : ndr_print_WERROR(ndr, "result", r->out.result);
9154 0 : ndr->depth--;
9155 : }
9156 0 : ndr->depth--;
9157 : }
9158 :
9159 6 : static enum ndr_err_code ndr_push_wkssvc_NetrGetJoinInformation(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrGetJoinInformation *r)
9160 : {
9161 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9162 6 : if (flags & NDR_IN) {
9163 6 : if (r->in.name_buffer == NULL) {
9164 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9165 : }
9166 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
9167 6 : if (r->in.server_name) {
9168 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
9169 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9170 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
9171 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9172 : }
9173 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.name_buffer));
9174 6 : if (*r->in.name_buffer) {
9175 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->in.name_buffer, CH_UTF16)));
9176 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9177 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->in.name_buffer, CH_UTF16)));
9178 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->in.name_buffer, ndr_charset_length(*r->in.name_buffer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9179 : }
9180 : }
9181 6 : if (flags & NDR_OUT) {
9182 0 : if (r->out.name_buffer == NULL) {
9183 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9184 : }
9185 0 : if (r->out.name_type == NULL) {
9186 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9187 : }
9188 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.name_buffer));
9189 0 : if (*r->out.name_buffer) {
9190 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.name_buffer, CH_UTF16)));
9191 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9192 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.name_buffer, CH_UTF16)));
9193 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.name_buffer, ndr_charset_length(*r->out.name_buffer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9194 : }
9195 0 : NDR_CHECK(ndr_push_wkssvc_NetJoinStatus(ndr, NDR_SCALARS, *r->out.name_type));
9196 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9197 : }
9198 6 : return NDR_ERR_SUCCESS;
9199 : }
9200 :
9201 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrGetJoinInformation(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrGetJoinInformation *r)
9202 : {
9203 0 : uint32_t _ptr_server_name;
9204 6 : uint32_t size_server_name_1 = 0;
9205 6 : uint32_t length_server_name_1 = 0;
9206 0 : uint32_t _ptr_name_buffer;
9207 6 : uint32_t size_name_buffer_2 = 0;
9208 6 : uint32_t length_name_buffer_2 = 0;
9209 6 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
9210 6 : TALLOC_CTX *_mem_save_name_buffer_0 = NULL;
9211 6 : TALLOC_CTX *_mem_save_name_buffer_1 = NULL;
9212 6 : TALLOC_CTX *_mem_save_name_type_0 = NULL;
9213 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9214 6 : if (flags & NDR_IN) {
9215 6 : NDR_ZERO_STRUCT(r->out);
9216 :
9217 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
9218 6 : if (_ptr_server_name) {
9219 6 : NDR_PULL_ALLOC(ndr, r->in.server_name);
9220 : } else {
9221 0 : r->in.server_name = NULL;
9222 : }
9223 6 : if (r->in.server_name) {
9224 6 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9225 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
9226 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
9227 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
9228 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
9229 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
9230 6 : if (length_server_name_1 > size_server_name_1) {
9231 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
9232 : }
9233 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
9234 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
9235 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
9236 : }
9237 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9238 6 : NDR_PULL_ALLOC(ndr, r->in.name_buffer);
9239 : }
9240 6 : _mem_save_name_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
9241 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.name_buffer, LIBNDR_FLAG_REF_ALLOC);
9242 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name_buffer));
9243 6 : if (_ptr_name_buffer) {
9244 6 : NDR_PULL_ALLOC(ndr, *r->in.name_buffer);
9245 : } else {
9246 0 : *r->in.name_buffer = NULL;
9247 : }
9248 6 : if (*r->in.name_buffer) {
9249 6 : _mem_save_name_buffer_1 = NDR_PULL_GET_MEM_CTX(ndr);
9250 6 : NDR_PULL_SET_MEM_CTX(ndr, *r->in.name_buffer, 0);
9251 6 : NDR_CHECK(ndr_pull_array_size(ndr, r->in.name_buffer));
9252 6 : NDR_CHECK(ndr_pull_array_length(ndr, r->in.name_buffer));
9253 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->in.name_buffer, &size_name_buffer_2));
9254 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->in.name_buffer, &length_name_buffer_2));
9255 6 : if (length_name_buffer_2 > size_name_buffer_2) {
9256 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_name_buffer_2, length_name_buffer_2);
9257 : }
9258 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_name_buffer_2, sizeof(uint16_t)));
9259 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->in.name_buffer, length_name_buffer_2, sizeof(uint16_t), CH_UTF16));
9260 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_buffer_1, 0);
9261 : }
9262 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_buffer_0, LIBNDR_FLAG_REF_ALLOC);
9263 6 : NDR_PULL_ALLOC(ndr, r->out.name_buffer);
9264 6 : *r->out.name_buffer = *r->in.name_buffer;
9265 6 : NDR_PULL_ALLOC(ndr, r->out.name_type);
9266 6 : NDR_ZERO_STRUCTP(r->out.name_type);
9267 : }
9268 6 : if (flags & NDR_OUT) {
9269 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9270 : if (r->in.name_buffer == NULL) {
9271 : NDR_PULL_ALLOC(ndr, r->in.name_buffer);
9272 : NDR_ZERO_STRUCTP(r->in.name_buffer);
9273 : }
9274 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9275 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9276 0 : NDR_PULL_ALLOC(ndr, r->out.name_buffer);
9277 : }
9278 0 : _mem_save_name_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
9279 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.name_buffer, LIBNDR_FLAG_REF_ALLOC);
9280 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name_buffer));
9281 0 : if (_ptr_name_buffer) {
9282 0 : NDR_PULL_ALLOC(ndr, *r->out.name_buffer);
9283 : } else {
9284 0 : *r->out.name_buffer = NULL;
9285 : }
9286 0 : if (*r->out.name_buffer) {
9287 0 : _mem_save_name_buffer_1 = NDR_PULL_GET_MEM_CTX(ndr);
9288 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.name_buffer, 0);
9289 0 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.name_buffer));
9290 0 : NDR_CHECK(ndr_pull_array_length(ndr, r->out.name_buffer));
9291 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.name_buffer, &size_name_buffer_2));
9292 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.name_buffer, &length_name_buffer_2));
9293 0 : if (length_name_buffer_2 > size_name_buffer_2) {
9294 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_name_buffer_2, length_name_buffer_2);
9295 : }
9296 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_name_buffer_2, sizeof(uint16_t)));
9297 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.name_buffer, length_name_buffer_2, sizeof(uint16_t), CH_UTF16));
9298 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_buffer_1, 0);
9299 : }
9300 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_buffer_0, LIBNDR_FLAG_REF_ALLOC);
9301 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9302 0 : NDR_PULL_ALLOC(ndr, r->out.name_type);
9303 : }
9304 0 : _mem_save_name_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
9305 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.name_type, LIBNDR_FLAG_REF_ALLOC);
9306 0 : NDR_CHECK(ndr_pull_wkssvc_NetJoinStatus(ndr, NDR_SCALARS, r->out.name_type));
9307 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_type_0, LIBNDR_FLAG_REF_ALLOC);
9308 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9309 : }
9310 6 : return NDR_ERR_SUCCESS;
9311 : }
9312 :
9313 0 : _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinInformation(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrGetJoinInformation *r)
9314 : {
9315 0 : ndr_print_struct(ndr, name, "wkssvc_NetrGetJoinInformation");
9316 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9317 0 : ndr->depth++;
9318 0 : if (flags & NDR_SET_VALUES) {
9319 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9320 : }
9321 0 : if (flags & NDR_IN) {
9322 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrGetJoinInformation");
9323 0 : ndr->depth++;
9324 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
9325 0 : ndr->depth++;
9326 0 : if (r->in.server_name) {
9327 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
9328 : }
9329 0 : ndr->depth--;
9330 0 : ndr_print_ptr(ndr, "name_buffer", r->in.name_buffer);
9331 0 : ndr->depth++;
9332 0 : ndr_print_ptr(ndr, "name_buffer", *r->in.name_buffer);
9333 0 : ndr->depth++;
9334 0 : if (*r->in.name_buffer) {
9335 0 : ndr_print_string(ndr, "name_buffer", *r->in.name_buffer);
9336 : }
9337 0 : ndr->depth--;
9338 0 : ndr->depth--;
9339 0 : ndr->depth--;
9340 : }
9341 0 : if (flags & NDR_OUT) {
9342 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrGetJoinInformation");
9343 0 : ndr->depth++;
9344 0 : ndr_print_ptr(ndr, "name_buffer", r->out.name_buffer);
9345 0 : ndr->depth++;
9346 0 : ndr_print_ptr(ndr, "name_buffer", *r->out.name_buffer);
9347 0 : ndr->depth++;
9348 0 : if (*r->out.name_buffer) {
9349 0 : ndr_print_string(ndr, "name_buffer", *r->out.name_buffer);
9350 : }
9351 0 : ndr->depth--;
9352 0 : ndr->depth--;
9353 0 : ndr_print_ptr(ndr, "name_type", r->out.name_type);
9354 0 : ndr->depth++;
9355 0 : ndr_print_wkssvc_NetJoinStatus(ndr, "name_type", *r->out.name_type);
9356 0 : ndr->depth--;
9357 0 : ndr_print_WERROR(ndr, "result", r->out.result);
9358 0 : ndr->depth--;
9359 : }
9360 0 : ndr->depth--;
9361 : }
9362 :
9363 6 : static enum ndr_err_code ndr_push_wkssvc_NetrGetJoinableOus(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrGetJoinableOus *r)
9364 : {
9365 0 : uint32_t cntr_ous_2;
9366 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9367 6 : if (flags & NDR_IN) {
9368 6 : if (r->in.domain_name == NULL) {
9369 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9370 : }
9371 6 : if (r->in.num_ous == NULL) {
9372 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9373 : }
9374 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
9375 6 : if (r->in.server_name) {
9376 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
9377 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9378 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
9379 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9380 : }
9381 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
9382 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9383 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
9384 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9385 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Account));
9386 6 : if (r->in.Account) {
9387 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
9388 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9389 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
9390 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Account, ndr_charset_length(r->in.Account, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9391 : }
9392 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown));
9393 6 : if (r->in.unknown) {
9394 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.unknown, CH_UTF16)));
9395 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9396 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.unknown, CH_UTF16)));
9397 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.unknown, ndr_charset_length(r->in.unknown, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9398 : }
9399 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.num_ous));
9400 : }
9401 6 : if (flags & NDR_OUT) {
9402 0 : if (r->out.num_ous == NULL) {
9403 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9404 : }
9405 0 : if (r->out.ous == NULL) {
9406 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9407 : }
9408 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_ous));
9409 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ous));
9410 0 : if (*r->out.ous) {
9411 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.num_ous));
9412 0 : for (cntr_ous_2 = 0; cntr_ous_2 < (*r->out.num_ous); cntr_ous_2++) {
9413 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, (*r->out.ous)[cntr_ous_2]));
9414 : }
9415 0 : for (cntr_ous_2 = 0; cntr_ous_2 < (*r->out.num_ous); cntr_ous_2++) {
9416 0 : if ((*r->out.ous)[cntr_ous_2]) {
9417 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length((*r->out.ous)[cntr_ous_2], CH_UTF16)));
9418 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9419 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length((*r->out.ous)[cntr_ous_2], CH_UTF16)));
9420 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, (*r->out.ous)[cntr_ous_2], ndr_charset_length((*r->out.ous)[cntr_ous_2], CH_UTF16), sizeof(uint16_t), CH_UTF16));
9421 : }
9422 : }
9423 : }
9424 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9425 : }
9426 6 : return NDR_ERR_SUCCESS;
9427 : }
9428 :
9429 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrGetJoinableOus(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrGetJoinableOus *r)
9430 : {
9431 0 : uint32_t _ptr_server_name;
9432 6 : uint32_t size_server_name_1 = 0;
9433 6 : uint32_t length_server_name_1 = 0;
9434 6 : uint32_t size_domain_name_1 = 0;
9435 6 : uint32_t length_domain_name_1 = 0;
9436 0 : uint32_t _ptr_Account;
9437 6 : uint32_t size_Account_1 = 0;
9438 6 : uint32_t length_Account_1 = 0;
9439 0 : uint32_t _ptr_unknown;
9440 6 : uint32_t size_unknown_1 = 0;
9441 6 : uint32_t length_unknown_1 = 0;
9442 0 : uint32_t _ptr_ous;
9443 6 : uint32_t size_ous_2 = 0;
9444 0 : uint32_t cntr_ous_2;
9445 6 : uint32_t size_ous_4 = 0;
9446 6 : uint32_t length_ous_4 = 0;
9447 6 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
9448 6 : TALLOC_CTX *_mem_save_Account_0 = NULL;
9449 6 : TALLOC_CTX *_mem_save_unknown_0 = NULL;
9450 6 : TALLOC_CTX *_mem_save_num_ous_0 = NULL;
9451 6 : TALLOC_CTX *_mem_save_ous_0 = NULL;
9452 6 : TALLOC_CTX *_mem_save_ous_1 = NULL;
9453 6 : TALLOC_CTX *_mem_save_ous_2 = NULL;
9454 6 : TALLOC_CTX *_mem_save_ous_3 = NULL;
9455 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9456 6 : if (flags & NDR_IN) {
9457 6 : NDR_ZERO_STRUCT(r->out);
9458 :
9459 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
9460 6 : if (_ptr_server_name) {
9461 6 : NDR_PULL_ALLOC(ndr, r->in.server_name);
9462 : } else {
9463 0 : r->in.server_name = NULL;
9464 : }
9465 6 : if (r->in.server_name) {
9466 6 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9467 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
9468 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
9469 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
9470 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
9471 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
9472 6 : if (length_server_name_1 > size_server_name_1) {
9473 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
9474 : }
9475 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
9476 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
9477 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
9478 : }
9479 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
9480 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
9481 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain_name, &size_domain_name_1));
9482 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain_name, &length_domain_name_1));
9483 6 : if (length_domain_name_1 > size_domain_name_1) {
9484 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
9485 : }
9486 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
9487 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
9488 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Account));
9489 6 : if (_ptr_Account) {
9490 0 : NDR_PULL_ALLOC(ndr, r->in.Account);
9491 : } else {
9492 6 : r->in.Account = NULL;
9493 : }
9494 6 : if (r->in.Account) {
9495 0 : _mem_save_Account_0 = NDR_PULL_GET_MEM_CTX(ndr);
9496 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Account, 0);
9497 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Account));
9498 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Account));
9499 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.Account, &size_Account_1));
9500 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.Account, &length_Account_1));
9501 0 : if (length_Account_1 > size_Account_1) {
9502 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_Account_1, length_Account_1);
9503 : }
9504 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_Account_1, sizeof(uint16_t)));
9505 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Account, length_Account_1, sizeof(uint16_t), CH_UTF16));
9506 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Account_0, 0);
9507 : }
9508 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
9509 6 : if (_ptr_unknown) {
9510 0 : NDR_PULL_ALLOC(ndr, r->in.unknown);
9511 : } else {
9512 6 : r->in.unknown = NULL;
9513 : }
9514 6 : if (r->in.unknown) {
9515 0 : _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
9516 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown, 0);
9517 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.unknown));
9518 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.unknown));
9519 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.unknown, &size_unknown_1));
9520 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.unknown, &length_unknown_1));
9521 0 : if (length_unknown_1 > size_unknown_1) {
9522 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_unknown_1, length_unknown_1);
9523 : }
9524 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_unknown_1, sizeof(uint16_t)));
9525 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.unknown, length_unknown_1, sizeof(uint16_t), CH_UTF16));
9526 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
9527 : }
9528 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9529 6 : NDR_PULL_ALLOC(ndr, r->in.num_ous);
9530 : }
9531 6 : _mem_save_num_ous_0 = NDR_PULL_GET_MEM_CTX(ndr);
9532 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.num_ous, LIBNDR_FLAG_REF_ALLOC);
9533 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.num_ous));
9534 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_ous_0, LIBNDR_FLAG_REF_ALLOC);
9535 6 : NDR_PULL_ALLOC(ndr, r->out.num_ous);
9536 6 : *r->out.num_ous = *r->in.num_ous;
9537 6 : NDR_PULL_ALLOC(ndr, r->out.ous);
9538 6 : NDR_ZERO_STRUCTP(r->out.ous);
9539 : }
9540 6 : if (flags & NDR_OUT) {
9541 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9542 : if (r->in.num_ous == NULL) {
9543 : NDR_PULL_ALLOC(ndr, r->in.num_ous);
9544 : NDR_ZERO_STRUCTP(r->in.num_ous);
9545 : }
9546 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9547 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9548 0 : NDR_PULL_ALLOC(ndr, r->out.num_ous);
9549 : }
9550 0 : _mem_save_num_ous_0 = NDR_PULL_GET_MEM_CTX(ndr);
9551 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.num_ous, LIBNDR_FLAG_REF_ALLOC);
9552 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_ous));
9553 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_ous_0, LIBNDR_FLAG_REF_ALLOC);
9554 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9555 0 : NDR_PULL_ALLOC(ndr, r->out.ous);
9556 : }
9557 0 : _mem_save_ous_0 = NDR_PULL_GET_MEM_CTX(ndr);
9558 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ous, LIBNDR_FLAG_REF_ALLOC);
9559 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ous));
9560 0 : if (_ptr_ous) {
9561 0 : NDR_PULL_ALLOC(ndr, *r->out.ous);
9562 : } else {
9563 0 : *r->out.ous = NULL;
9564 : }
9565 0 : if (*r->out.ous) {
9566 0 : _mem_save_ous_1 = NDR_PULL_GET_MEM_CTX(ndr);
9567 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.ous, 0);
9568 0 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.ous));
9569 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)r->out.ous, &size_ous_2));
9570 0 : NDR_PULL_ALLOC_N(ndr, *r->out.ous, size_ous_2);
9571 0 : _mem_save_ous_2 = NDR_PULL_GET_MEM_CTX(ndr);
9572 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.ous, 0);
9573 0 : for (cntr_ous_2 = 0; cntr_ous_2 < (size_ous_2); cntr_ous_2++) {
9574 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ous));
9575 0 : if (_ptr_ous) {
9576 0 : NDR_PULL_ALLOC(ndr, (*r->out.ous)[cntr_ous_2]);
9577 : } else {
9578 0 : (*r->out.ous)[cntr_ous_2] = NULL;
9579 : }
9580 : }
9581 0 : for (cntr_ous_2 = 0; cntr_ous_2 < (size_ous_2); cntr_ous_2++) {
9582 0 : if ((*r->out.ous)[cntr_ous_2]) {
9583 0 : _mem_save_ous_3 = NDR_PULL_GET_MEM_CTX(ndr);
9584 0 : NDR_PULL_SET_MEM_CTX(ndr, (*r->out.ous)[cntr_ous_2], 0);
9585 0 : NDR_CHECK(ndr_pull_array_size(ndr, &(*r->out.ous)[cntr_ous_2]));
9586 0 : NDR_CHECK(ndr_pull_array_length(ndr, &(*r->out.ous)[cntr_ous_2]));
9587 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&(*r->out.ous)[cntr_ous_2], &size_ous_4));
9588 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&(*r->out.ous)[cntr_ous_2], &length_ous_4));
9589 0 : if (length_ous_4 > size_ous_4) {
9590 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_ous_4, length_ous_4);
9591 : }
9592 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_ous_4, sizeof(uint16_t)));
9593 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &(*r->out.ous)[cntr_ous_2], length_ous_4, sizeof(uint16_t), CH_UTF16));
9594 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_3, 0);
9595 : }
9596 : }
9597 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_2, 0);
9598 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_1, 0);
9599 : }
9600 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_0, LIBNDR_FLAG_REF_ALLOC);
9601 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9602 0 : if (*r->out.ous) {
9603 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.ous, *r->out.num_ous));
9604 : }
9605 0 : for (cntr_ous_2 = 0; cntr_ous_2 < (size_ous_2); cntr_ous_2++) {
9606 0 : }
9607 : }
9608 6 : return NDR_ERR_SUCCESS;
9609 : }
9610 :
9611 0 : _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrGetJoinableOus *r)
9612 : {
9613 0 : uint32_t cntr_ous_2;
9614 0 : ndr_print_struct(ndr, name, "wkssvc_NetrGetJoinableOus");
9615 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9616 0 : ndr->depth++;
9617 0 : if (flags & NDR_SET_VALUES) {
9618 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9619 : }
9620 0 : if (flags & NDR_IN) {
9621 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrGetJoinableOus");
9622 0 : ndr->depth++;
9623 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
9624 0 : ndr->depth++;
9625 0 : if (r->in.server_name) {
9626 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
9627 : }
9628 0 : ndr->depth--;
9629 0 : ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
9630 0 : ndr->depth++;
9631 0 : ndr_print_string(ndr, "domain_name", r->in.domain_name);
9632 0 : ndr->depth--;
9633 0 : ndr_print_ptr(ndr, "Account", r->in.Account);
9634 0 : ndr->depth++;
9635 0 : if (r->in.Account) {
9636 0 : ndr_print_string(ndr, "Account", r->in.Account);
9637 : }
9638 0 : ndr->depth--;
9639 0 : ndr_print_ptr(ndr, "unknown", r->in.unknown);
9640 0 : ndr->depth++;
9641 0 : if (r->in.unknown) {
9642 0 : ndr_print_string(ndr, "unknown", r->in.unknown);
9643 : }
9644 0 : ndr->depth--;
9645 0 : ndr_print_ptr(ndr, "num_ous", r->in.num_ous);
9646 0 : ndr->depth++;
9647 0 : ndr_print_uint32(ndr, "num_ous", *r->in.num_ous);
9648 0 : ndr->depth--;
9649 0 : ndr->depth--;
9650 : }
9651 0 : if (flags & NDR_OUT) {
9652 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrGetJoinableOus");
9653 0 : ndr->depth++;
9654 0 : ndr_print_ptr(ndr, "num_ous", r->out.num_ous);
9655 0 : ndr->depth++;
9656 0 : ndr_print_uint32(ndr, "num_ous", *r->out.num_ous);
9657 0 : ndr->depth--;
9658 0 : ndr_print_ptr(ndr, "ous", r->out.ous);
9659 0 : ndr->depth++;
9660 0 : ndr_print_ptr(ndr, "ous", *r->out.ous);
9661 0 : ndr->depth++;
9662 0 : if (*r->out.ous) {
9663 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "ous", (uint32_t)(*r->out.num_ous));
9664 0 : ndr->depth++;
9665 0 : for (cntr_ous_2 = 0; cntr_ous_2 < (*r->out.num_ous); cntr_ous_2++) {
9666 0 : ndr_print_ptr(ndr, "ous", (*r->out.ous)[cntr_ous_2]);
9667 0 : ndr->depth++;
9668 0 : if ((*r->out.ous)[cntr_ous_2]) {
9669 0 : ndr_print_string(ndr, "ous", (*r->out.ous)[cntr_ous_2]);
9670 : }
9671 0 : ndr->depth--;
9672 : }
9673 0 : ndr->depth--;
9674 : }
9675 0 : ndr->depth--;
9676 0 : ndr->depth--;
9677 0 : ndr_print_WERROR(ndr, "result", r->out.result);
9678 0 : ndr->depth--;
9679 : }
9680 0 : ndr->depth--;
9681 : }
9682 :
9683 0 : static enum ndr_err_code ndr_push_wkssvc_NetrJoinDomain2(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrJoinDomain2 *r)
9684 : {
9685 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9686 0 : if (flags & NDR_IN) {
9687 0 : if (r->in.domain_name == NULL) {
9688 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9689 : }
9690 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
9691 0 : if (r->in.server_name) {
9692 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
9693 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9694 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
9695 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9696 : }
9697 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
9698 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9699 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
9700 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9701 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.account_ou));
9702 0 : if (r->in.account_ou) {
9703 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_ou, CH_UTF16)));
9704 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9705 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_ou, CH_UTF16)));
9706 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_ou, ndr_charset_length(r->in.account_ou, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9707 : }
9708 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.admin_account));
9709 0 : if (r->in.admin_account) {
9710 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.admin_account, CH_UTF16)));
9711 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9712 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.admin_account, CH_UTF16)));
9713 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.admin_account, ndr_charset_length(r->in.admin_account, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9714 : }
9715 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.encrypted_password));
9716 0 : if (r->in.encrypted_password) {
9717 0 : NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr, NDR_SCALARS, r->in.encrypted_password));
9718 : }
9719 0 : NDR_CHECK(ndr_push_wkssvc_joinflags(ndr, NDR_SCALARS, r->in.join_flags));
9720 : }
9721 0 : if (flags & NDR_OUT) {
9722 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9723 : }
9724 0 : return NDR_ERR_SUCCESS;
9725 : }
9726 :
9727 0 : static enum ndr_err_code ndr_pull_wkssvc_NetrJoinDomain2(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrJoinDomain2 *r)
9728 : {
9729 0 : uint32_t _ptr_server_name;
9730 0 : uint32_t size_server_name_1 = 0;
9731 0 : uint32_t length_server_name_1 = 0;
9732 0 : uint32_t size_domain_name_1 = 0;
9733 0 : uint32_t length_domain_name_1 = 0;
9734 0 : uint32_t _ptr_account_ou;
9735 0 : uint32_t size_account_ou_1 = 0;
9736 0 : uint32_t length_account_ou_1 = 0;
9737 0 : uint32_t _ptr_admin_account;
9738 0 : uint32_t size_admin_account_1 = 0;
9739 0 : uint32_t length_admin_account_1 = 0;
9740 0 : uint32_t _ptr_encrypted_password;
9741 0 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
9742 0 : TALLOC_CTX *_mem_save_account_ou_0 = NULL;
9743 0 : TALLOC_CTX *_mem_save_admin_account_0 = NULL;
9744 0 : TALLOC_CTX *_mem_save_encrypted_password_0 = NULL;
9745 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9746 0 : if (flags & NDR_IN) {
9747 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
9748 0 : if (_ptr_server_name) {
9749 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
9750 : } else {
9751 0 : r->in.server_name = NULL;
9752 : }
9753 0 : if (r->in.server_name) {
9754 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9755 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
9756 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
9757 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
9758 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
9759 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
9760 0 : if (length_server_name_1 > size_server_name_1) {
9761 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
9762 : }
9763 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
9764 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
9765 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
9766 : }
9767 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
9768 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
9769 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain_name, &size_domain_name_1));
9770 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain_name, &length_domain_name_1));
9771 0 : if (length_domain_name_1 > size_domain_name_1) {
9772 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
9773 : }
9774 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
9775 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
9776 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_ou));
9777 0 : if (_ptr_account_ou) {
9778 0 : NDR_PULL_ALLOC(ndr, r->in.account_ou);
9779 : } else {
9780 0 : r->in.account_ou = NULL;
9781 : }
9782 0 : if (r->in.account_ou) {
9783 0 : _mem_save_account_ou_0 = NDR_PULL_GET_MEM_CTX(ndr);
9784 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.account_ou, 0);
9785 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_ou));
9786 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_ou));
9787 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_ou, &size_account_ou_1));
9788 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_ou, &length_account_ou_1));
9789 0 : if (length_account_ou_1 > size_account_ou_1) {
9790 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_ou_1, length_account_ou_1);
9791 : }
9792 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_ou_1, sizeof(uint16_t)));
9793 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_ou, length_account_ou_1, sizeof(uint16_t), CH_UTF16));
9794 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_ou_0, 0);
9795 : }
9796 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_admin_account));
9797 0 : if (_ptr_admin_account) {
9798 0 : NDR_PULL_ALLOC(ndr, r->in.admin_account);
9799 : } else {
9800 0 : r->in.admin_account = NULL;
9801 : }
9802 0 : if (r->in.admin_account) {
9803 0 : _mem_save_admin_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
9804 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.admin_account, 0);
9805 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.admin_account));
9806 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.admin_account));
9807 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.admin_account, &size_admin_account_1));
9808 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.admin_account, &length_admin_account_1));
9809 0 : if (length_admin_account_1 > size_admin_account_1) {
9810 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_admin_account_1, length_admin_account_1);
9811 : }
9812 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_admin_account_1, sizeof(uint16_t)));
9813 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.admin_account, length_admin_account_1, sizeof(uint16_t), CH_UTF16));
9814 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_admin_account_0, 0);
9815 : }
9816 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_encrypted_password));
9817 0 : if (_ptr_encrypted_password) {
9818 0 : NDR_PULL_ALLOC(ndr, r->in.encrypted_password);
9819 : } else {
9820 0 : r->in.encrypted_password = NULL;
9821 : }
9822 0 : if (r->in.encrypted_password) {
9823 0 : _mem_save_encrypted_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
9824 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.encrypted_password, 0);
9825 0 : NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr, NDR_SCALARS, r->in.encrypted_password));
9826 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_encrypted_password_0, 0);
9827 : }
9828 0 : NDR_CHECK(ndr_pull_wkssvc_joinflags(ndr, NDR_SCALARS, &r->in.join_flags));
9829 : }
9830 0 : if (flags & NDR_OUT) {
9831 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9832 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9833 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9834 : }
9835 0 : return NDR_ERR_SUCCESS;
9836 : }
9837 :
9838 0 : _PUBLIC_ void ndr_print_wkssvc_NetrJoinDomain2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrJoinDomain2 *r)
9839 : {
9840 0 : ndr_print_struct(ndr, name, "wkssvc_NetrJoinDomain2");
9841 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9842 0 : ndr->depth++;
9843 0 : if (flags & NDR_SET_VALUES) {
9844 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9845 : }
9846 0 : if (flags & NDR_IN) {
9847 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrJoinDomain2");
9848 0 : ndr->depth++;
9849 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
9850 0 : ndr->depth++;
9851 0 : if (r->in.server_name) {
9852 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
9853 : }
9854 0 : ndr->depth--;
9855 0 : ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
9856 0 : ndr->depth++;
9857 0 : ndr_print_string(ndr, "domain_name", r->in.domain_name);
9858 0 : ndr->depth--;
9859 0 : ndr_print_ptr(ndr, "account_ou", r->in.account_ou);
9860 0 : ndr->depth++;
9861 0 : if (r->in.account_ou) {
9862 0 : ndr_print_string(ndr, "account_ou", r->in.account_ou);
9863 : }
9864 0 : ndr->depth--;
9865 0 : ndr_print_ptr(ndr, "admin_account", r->in.admin_account);
9866 0 : ndr->depth++;
9867 0 : if (r->in.admin_account) {
9868 0 : ndr_print_string(ndr, "admin_account", r->in.admin_account);
9869 : }
9870 0 : ndr->depth--;
9871 0 : ndr_print_ptr(ndr, "encrypted_password", r->in.encrypted_password);
9872 0 : ndr->depth++;
9873 0 : if (r->in.encrypted_password) {
9874 0 : ndr_print_wkssvc_PasswordBuffer(ndr, "encrypted_password", r->in.encrypted_password);
9875 : }
9876 0 : ndr->depth--;
9877 0 : ndr_print_wkssvc_joinflags(ndr, "join_flags", r->in.join_flags);
9878 0 : ndr->depth--;
9879 : }
9880 0 : if (flags & NDR_OUT) {
9881 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrJoinDomain2");
9882 0 : ndr->depth++;
9883 0 : ndr_print_WERROR(ndr, "result", r->out.result);
9884 0 : ndr->depth--;
9885 : }
9886 0 : ndr->depth--;
9887 : }
9888 :
9889 0 : static enum ndr_err_code ndr_push_wkssvc_NetrUnjoinDomain2(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrUnjoinDomain2 *r)
9890 : {
9891 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9892 0 : if (flags & NDR_IN) {
9893 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
9894 0 : if (r->in.server_name) {
9895 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
9896 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9897 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
9898 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9899 : }
9900 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.account));
9901 0 : if (r->in.account) {
9902 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account, CH_UTF16)));
9903 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9904 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account, CH_UTF16)));
9905 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account, ndr_charset_length(r->in.account, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9906 : }
9907 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.encrypted_password));
9908 0 : if (r->in.encrypted_password) {
9909 0 : NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr, NDR_SCALARS, r->in.encrypted_password));
9910 : }
9911 0 : NDR_CHECK(ndr_push_wkssvc_joinflags(ndr, NDR_SCALARS, r->in.unjoin_flags));
9912 : }
9913 0 : if (flags & NDR_OUT) {
9914 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9915 : }
9916 0 : return NDR_ERR_SUCCESS;
9917 : }
9918 :
9919 0 : static enum ndr_err_code ndr_pull_wkssvc_NetrUnjoinDomain2(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrUnjoinDomain2 *r)
9920 : {
9921 0 : uint32_t _ptr_server_name;
9922 0 : uint32_t size_server_name_1 = 0;
9923 0 : uint32_t length_server_name_1 = 0;
9924 0 : uint32_t _ptr_account;
9925 0 : uint32_t size_account_1 = 0;
9926 0 : uint32_t length_account_1 = 0;
9927 0 : uint32_t _ptr_encrypted_password;
9928 0 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
9929 0 : TALLOC_CTX *_mem_save_account_0 = NULL;
9930 0 : TALLOC_CTX *_mem_save_encrypted_password_0 = NULL;
9931 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9932 0 : if (flags & NDR_IN) {
9933 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
9934 0 : if (_ptr_server_name) {
9935 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
9936 : } else {
9937 0 : r->in.server_name = NULL;
9938 : }
9939 0 : if (r->in.server_name) {
9940 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9941 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
9942 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
9943 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
9944 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
9945 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
9946 0 : if (length_server_name_1 > size_server_name_1) {
9947 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
9948 : }
9949 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
9950 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
9951 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
9952 : }
9953 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account));
9954 0 : if (_ptr_account) {
9955 0 : NDR_PULL_ALLOC(ndr, r->in.account);
9956 : } else {
9957 0 : r->in.account = NULL;
9958 : }
9959 0 : if (r->in.account) {
9960 0 : _mem_save_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
9961 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.account, 0);
9962 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account));
9963 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account));
9964 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account, &size_account_1));
9965 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account, &length_account_1));
9966 0 : if (length_account_1 > size_account_1) {
9967 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_1, length_account_1);
9968 : }
9969 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_1, sizeof(uint16_t)));
9970 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account, length_account_1, sizeof(uint16_t), CH_UTF16));
9971 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_0, 0);
9972 : }
9973 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_encrypted_password));
9974 0 : if (_ptr_encrypted_password) {
9975 0 : NDR_PULL_ALLOC(ndr, r->in.encrypted_password);
9976 : } else {
9977 0 : r->in.encrypted_password = NULL;
9978 : }
9979 0 : if (r->in.encrypted_password) {
9980 0 : _mem_save_encrypted_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
9981 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.encrypted_password, 0);
9982 0 : NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr, NDR_SCALARS, r->in.encrypted_password));
9983 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_encrypted_password_0, 0);
9984 : }
9985 0 : NDR_CHECK(ndr_pull_wkssvc_joinflags(ndr, NDR_SCALARS, &r->in.unjoin_flags));
9986 : }
9987 0 : if (flags & NDR_OUT) {
9988 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9989 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9990 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9991 : }
9992 0 : return NDR_ERR_SUCCESS;
9993 : }
9994 :
9995 0 : _PUBLIC_ void ndr_print_wkssvc_NetrUnjoinDomain2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrUnjoinDomain2 *r)
9996 : {
9997 0 : ndr_print_struct(ndr, name, "wkssvc_NetrUnjoinDomain2");
9998 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9999 0 : ndr->depth++;
10000 0 : if (flags & NDR_SET_VALUES) {
10001 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10002 : }
10003 0 : if (flags & NDR_IN) {
10004 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrUnjoinDomain2");
10005 0 : ndr->depth++;
10006 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
10007 0 : ndr->depth++;
10008 0 : if (r->in.server_name) {
10009 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
10010 : }
10011 0 : ndr->depth--;
10012 0 : ndr_print_ptr(ndr, "account", r->in.account);
10013 0 : ndr->depth++;
10014 0 : if (r->in.account) {
10015 0 : ndr_print_string(ndr, "account", r->in.account);
10016 : }
10017 0 : ndr->depth--;
10018 0 : ndr_print_ptr(ndr, "encrypted_password", r->in.encrypted_password);
10019 0 : ndr->depth++;
10020 0 : if (r->in.encrypted_password) {
10021 0 : ndr_print_wkssvc_PasswordBuffer(ndr, "encrypted_password", r->in.encrypted_password);
10022 : }
10023 0 : ndr->depth--;
10024 0 : ndr_print_wkssvc_joinflags(ndr, "unjoin_flags", r->in.unjoin_flags);
10025 0 : ndr->depth--;
10026 : }
10027 0 : if (flags & NDR_OUT) {
10028 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrUnjoinDomain2");
10029 0 : ndr->depth++;
10030 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10031 0 : ndr->depth--;
10032 : }
10033 0 : ndr->depth--;
10034 : }
10035 :
10036 0 : static enum ndr_err_code ndr_push_wkssvc_NetrRenameMachineInDomain2(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrRenameMachineInDomain2 *r)
10037 : {
10038 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10039 0 : if (flags & NDR_IN) {
10040 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
10041 0 : if (r->in.server_name) {
10042 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10043 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10044 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10045 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10046 : }
10047 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.NewMachineName));
10048 0 : if (r->in.NewMachineName) {
10049 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.NewMachineName, CH_UTF16)));
10050 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10051 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.NewMachineName, CH_UTF16)));
10052 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.NewMachineName, ndr_charset_length(r->in.NewMachineName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10053 : }
10054 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Account));
10055 0 : if (r->in.Account) {
10056 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
10057 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10058 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
10059 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Account, ndr_charset_length(r->in.Account, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10060 : }
10061 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.EncryptedPassword));
10062 0 : if (r->in.EncryptedPassword) {
10063 0 : NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr, NDR_SCALARS, r->in.EncryptedPassword));
10064 : }
10065 0 : NDR_CHECK(ndr_push_wkssvc_renameflags(ndr, NDR_SCALARS, r->in.RenameOptions));
10066 : }
10067 0 : if (flags & NDR_OUT) {
10068 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10069 : }
10070 0 : return NDR_ERR_SUCCESS;
10071 : }
10072 :
10073 0 : static enum ndr_err_code ndr_pull_wkssvc_NetrRenameMachineInDomain2(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrRenameMachineInDomain2 *r)
10074 : {
10075 0 : uint32_t _ptr_server_name;
10076 0 : uint32_t size_server_name_1 = 0;
10077 0 : uint32_t length_server_name_1 = 0;
10078 0 : uint32_t _ptr_NewMachineName;
10079 0 : uint32_t size_NewMachineName_1 = 0;
10080 0 : uint32_t length_NewMachineName_1 = 0;
10081 0 : uint32_t _ptr_Account;
10082 0 : uint32_t size_Account_1 = 0;
10083 0 : uint32_t length_Account_1 = 0;
10084 0 : uint32_t _ptr_EncryptedPassword;
10085 0 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
10086 0 : TALLOC_CTX *_mem_save_NewMachineName_0 = NULL;
10087 0 : TALLOC_CTX *_mem_save_Account_0 = NULL;
10088 0 : TALLOC_CTX *_mem_save_EncryptedPassword_0 = NULL;
10089 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10090 0 : if (flags & NDR_IN) {
10091 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
10092 0 : if (_ptr_server_name) {
10093 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
10094 : } else {
10095 0 : r->in.server_name = NULL;
10096 : }
10097 0 : if (r->in.server_name) {
10098 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10099 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
10100 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
10101 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
10102 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
10103 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
10104 0 : if (length_server_name_1 > size_server_name_1) {
10105 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
10106 : }
10107 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
10108 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
10109 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
10110 : }
10111 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_NewMachineName));
10112 0 : if (_ptr_NewMachineName) {
10113 0 : NDR_PULL_ALLOC(ndr, r->in.NewMachineName);
10114 : } else {
10115 0 : r->in.NewMachineName = NULL;
10116 : }
10117 0 : if (r->in.NewMachineName) {
10118 0 : _mem_save_NewMachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
10119 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.NewMachineName, 0);
10120 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.NewMachineName));
10121 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.NewMachineName));
10122 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.NewMachineName, &size_NewMachineName_1));
10123 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.NewMachineName, &length_NewMachineName_1));
10124 0 : if (length_NewMachineName_1 > size_NewMachineName_1) {
10125 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_NewMachineName_1, length_NewMachineName_1);
10126 : }
10127 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_NewMachineName_1, sizeof(uint16_t)));
10128 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.NewMachineName, length_NewMachineName_1, sizeof(uint16_t), CH_UTF16));
10129 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_NewMachineName_0, 0);
10130 : }
10131 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Account));
10132 0 : if (_ptr_Account) {
10133 0 : NDR_PULL_ALLOC(ndr, r->in.Account);
10134 : } else {
10135 0 : r->in.Account = NULL;
10136 : }
10137 0 : if (r->in.Account) {
10138 0 : _mem_save_Account_0 = NDR_PULL_GET_MEM_CTX(ndr);
10139 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Account, 0);
10140 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Account));
10141 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Account));
10142 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.Account, &size_Account_1));
10143 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.Account, &length_Account_1));
10144 0 : if (length_Account_1 > size_Account_1) {
10145 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_Account_1, length_Account_1);
10146 : }
10147 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_Account_1, sizeof(uint16_t)));
10148 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Account, length_Account_1, sizeof(uint16_t), CH_UTF16));
10149 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Account_0, 0);
10150 : }
10151 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_EncryptedPassword));
10152 0 : if (_ptr_EncryptedPassword) {
10153 0 : NDR_PULL_ALLOC(ndr, r->in.EncryptedPassword);
10154 : } else {
10155 0 : r->in.EncryptedPassword = NULL;
10156 : }
10157 0 : if (r->in.EncryptedPassword) {
10158 0 : _mem_save_EncryptedPassword_0 = NDR_PULL_GET_MEM_CTX(ndr);
10159 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.EncryptedPassword, 0);
10160 0 : NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr, NDR_SCALARS, r->in.EncryptedPassword));
10161 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_EncryptedPassword_0, 0);
10162 : }
10163 0 : NDR_CHECK(ndr_pull_wkssvc_renameflags(ndr, NDR_SCALARS, &r->in.RenameOptions));
10164 : }
10165 0 : if (flags & NDR_OUT) {
10166 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10167 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10168 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10169 : }
10170 0 : return NDR_ERR_SUCCESS;
10171 : }
10172 :
10173 0 : _PUBLIC_ void ndr_print_wkssvc_NetrRenameMachineInDomain2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrRenameMachineInDomain2 *r)
10174 : {
10175 0 : ndr_print_struct(ndr, name, "wkssvc_NetrRenameMachineInDomain2");
10176 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10177 0 : ndr->depth++;
10178 0 : if (flags & NDR_SET_VALUES) {
10179 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10180 : }
10181 0 : if (flags & NDR_IN) {
10182 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrRenameMachineInDomain2");
10183 0 : ndr->depth++;
10184 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
10185 0 : ndr->depth++;
10186 0 : if (r->in.server_name) {
10187 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
10188 : }
10189 0 : ndr->depth--;
10190 0 : ndr_print_ptr(ndr, "NewMachineName", r->in.NewMachineName);
10191 0 : ndr->depth++;
10192 0 : if (r->in.NewMachineName) {
10193 0 : ndr_print_string(ndr, "NewMachineName", r->in.NewMachineName);
10194 : }
10195 0 : ndr->depth--;
10196 0 : ndr_print_ptr(ndr, "Account", r->in.Account);
10197 0 : ndr->depth++;
10198 0 : if (r->in.Account) {
10199 0 : ndr_print_string(ndr, "Account", r->in.Account);
10200 : }
10201 0 : ndr->depth--;
10202 0 : ndr_print_ptr(ndr, "EncryptedPassword", r->in.EncryptedPassword);
10203 0 : ndr->depth++;
10204 0 : if (r->in.EncryptedPassword) {
10205 0 : ndr_print_wkssvc_PasswordBuffer(ndr, "EncryptedPassword", r->in.EncryptedPassword);
10206 : }
10207 0 : ndr->depth--;
10208 0 : ndr_print_wkssvc_renameflags(ndr, "RenameOptions", r->in.RenameOptions);
10209 0 : ndr->depth--;
10210 : }
10211 0 : if (flags & NDR_OUT) {
10212 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrRenameMachineInDomain2");
10213 0 : ndr->depth++;
10214 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10215 0 : ndr->depth--;
10216 : }
10217 0 : ndr->depth--;
10218 : }
10219 :
10220 6 : static enum ndr_err_code ndr_push_wkssvc_NetrValidateName2(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrValidateName2 *r)
10221 : {
10222 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10223 6 : if (flags & NDR_IN) {
10224 6 : if (r->in.name == NULL) {
10225 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10226 : }
10227 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
10228 6 : if (r->in.server_name) {
10229 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10230 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10231 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10232 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10233 : }
10234 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16)));
10235 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10236 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16)));
10237 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name, ndr_charset_length(r->in.name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10238 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Account));
10239 6 : if (r->in.Account) {
10240 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
10241 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10242 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
10243 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Account, ndr_charset_length(r->in.Account, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10244 : }
10245 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.EncryptedPassword));
10246 6 : if (r->in.EncryptedPassword) {
10247 0 : NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr, NDR_SCALARS, r->in.EncryptedPassword));
10248 : }
10249 6 : NDR_CHECK(ndr_push_wkssvc_NetValidateNameType(ndr, NDR_SCALARS, r->in.name_type));
10250 : }
10251 6 : if (flags & NDR_OUT) {
10252 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10253 : }
10254 6 : return NDR_ERR_SUCCESS;
10255 : }
10256 :
10257 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrValidateName2(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrValidateName2 *r)
10258 : {
10259 0 : uint32_t _ptr_server_name;
10260 6 : uint32_t size_server_name_1 = 0;
10261 6 : uint32_t length_server_name_1 = 0;
10262 6 : uint32_t size_name_1 = 0;
10263 6 : uint32_t length_name_1 = 0;
10264 0 : uint32_t _ptr_Account;
10265 6 : uint32_t size_Account_1 = 0;
10266 6 : uint32_t length_Account_1 = 0;
10267 0 : uint32_t _ptr_EncryptedPassword;
10268 6 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
10269 6 : TALLOC_CTX *_mem_save_Account_0 = NULL;
10270 6 : TALLOC_CTX *_mem_save_EncryptedPassword_0 = NULL;
10271 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10272 6 : if (flags & NDR_IN) {
10273 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
10274 6 : if (_ptr_server_name) {
10275 6 : NDR_PULL_ALLOC(ndr, r->in.server_name);
10276 : } else {
10277 0 : r->in.server_name = NULL;
10278 : }
10279 6 : if (r->in.server_name) {
10280 6 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10281 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
10282 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
10283 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
10284 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
10285 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
10286 6 : if (length_server_name_1 > size_server_name_1) {
10287 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
10288 : }
10289 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
10290 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
10291 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
10292 : }
10293 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name));
10294 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name));
10295 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.name, &size_name_1));
10296 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.name, &length_name_1));
10297 6 : if (length_name_1 > size_name_1) {
10298 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_name_1, length_name_1);
10299 : }
10300 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
10301 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name, length_name_1, sizeof(uint16_t), CH_UTF16));
10302 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Account));
10303 6 : if (_ptr_Account) {
10304 0 : NDR_PULL_ALLOC(ndr, r->in.Account);
10305 : } else {
10306 6 : r->in.Account = NULL;
10307 : }
10308 6 : if (r->in.Account) {
10309 0 : _mem_save_Account_0 = NDR_PULL_GET_MEM_CTX(ndr);
10310 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Account, 0);
10311 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Account));
10312 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Account));
10313 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.Account, &size_Account_1));
10314 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.Account, &length_Account_1));
10315 0 : if (length_Account_1 > size_Account_1) {
10316 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_Account_1, length_Account_1);
10317 : }
10318 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_Account_1, sizeof(uint16_t)));
10319 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Account, length_Account_1, sizeof(uint16_t), CH_UTF16));
10320 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Account_0, 0);
10321 : }
10322 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_EncryptedPassword));
10323 6 : if (_ptr_EncryptedPassword) {
10324 0 : NDR_PULL_ALLOC(ndr, r->in.EncryptedPassword);
10325 : } else {
10326 6 : r->in.EncryptedPassword = NULL;
10327 : }
10328 6 : if (r->in.EncryptedPassword) {
10329 0 : _mem_save_EncryptedPassword_0 = NDR_PULL_GET_MEM_CTX(ndr);
10330 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.EncryptedPassword, 0);
10331 0 : NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr, NDR_SCALARS, r->in.EncryptedPassword));
10332 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_EncryptedPassword_0, 0);
10333 : }
10334 6 : NDR_CHECK(ndr_pull_wkssvc_NetValidateNameType(ndr, NDR_SCALARS, &r->in.name_type));
10335 : }
10336 6 : if (flags & NDR_OUT) {
10337 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10338 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10339 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10340 : }
10341 6 : return NDR_ERR_SUCCESS;
10342 : }
10343 :
10344 0 : _PUBLIC_ void ndr_print_wkssvc_NetrValidateName2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrValidateName2 *r)
10345 : {
10346 0 : ndr_print_struct(ndr, name, "wkssvc_NetrValidateName2");
10347 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10348 0 : ndr->depth++;
10349 0 : if (flags & NDR_SET_VALUES) {
10350 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10351 : }
10352 0 : if (flags & NDR_IN) {
10353 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrValidateName2");
10354 0 : ndr->depth++;
10355 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
10356 0 : ndr->depth++;
10357 0 : if (r->in.server_name) {
10358 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
10359 : }
10360 0 : ndr->depth--;
10361 0 : ndr_print_ptr(ndr, "name", r->in.name);
10362 0 : ndr->depth++;
10363 0 : ndr_print_string(ndr, "name", r->in.name);
10364 0 : ndr->depth--;
10365 0 : ndr_print_ptr(ndr, "Account", r->in.Account);
10366 0 : ndr->depth++;
10367 0 : if (r->in.Account) {
10368 0 : ndr_print_string(ndr, "Account", r->in.Account);
10369 : }
10370 0 : ndr->depth--;
10371 0 : ndr_print_ptr(ndr, "EncryptedPassword", r->in.EncryptedPassword);
10372 0 : ndr->depth++;
10373 0 : if (r->in.EncryptedPassword) {
10374 0 : ndr_print_wkssvc_PasswordBuffer(ndr, "EncryptedPassword", r->in.EncryptedPassword);
10375 : }
10376 0 : ndr->depth--;
10377 0 : ndr_print_wkssvc_NetValidateNameType(ndr, "name_type", r->in.name_type);
10378 0 : ndr->depth--;
10379 : }
10380 0 : if (flags & NDR_OUT) {
10381 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrValidateName2");
10382 0 : ndr->depth++;
10383 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10384 0 : ndr->depth--;
10385 : }
10386 0 : ndr->depth--;
10387 : }
10388 :
10389 6 : static enum ndr_err_code ndr_push_wkssvc_NetrGetJoinableOus2(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrGetJoinableOus2 *r)
10390 : {
10391 0 : uint32_t cntr_ous_2;
10392 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10393 6 : if (flags & NDR_IN) {
10394 6 : if (r->in.domain_name == NULL) {
10395 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10396 : }
10397 6 : if (r->in.num_ous == NULL) {
10398 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10399 : }
10400 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
10401 6 : if (r->in.server_name) {
10402 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10403 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10404 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10405 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10406 : }
10407 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
10408 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10409 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
10410 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10411 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Account));
10412 6 : if (r->in.Account) {
10413 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
10414 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10415 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
10416 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Account, ndr_charset_length(r->in.Account, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10417 : }
10418 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.EncryptedPassword));
10419 6 : if (r->in.EncryptedPassword) {
10420 0 : NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr, NDR_SCALARS, r->in.EncryptedPassword));
10421 : }
10422 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.num_ous));
10423 : }
10424 6 : if (flags & NDR_OUT) {
10425 0 : if (r->out.num_ous == NULL) {
10426 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10427 : }
10428 0 : if (r->out.ous == NULL) {
10429 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10430 : }
10431 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_ous));
10432 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ous));
10433 0 : if (*r->out.ous) {
10434 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.num_ous));
10435 0 : for (cntr_ous_2 = 0; cntr_ous_2 < (*r->out.num_ous); cntr_ous_2++) {
10436 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, (*r->out.ous)[cntr_ous_2]));
10437 : }
10438 0 : for (cntr_ous_2 = 0; cntr_ous_2 < (*r->out.num_ous); cntr_ous_2++) {
10439 0 : if ((*r->out.ous)[cntr_ous_2]) {
10440 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length((*r->out.ous)[cntr_ous_2], CH_UTF16)));
10441 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10442 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length((*r->out.ous)[cntr_ous_2], CH_UTF16)));
10443 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, (*r->out.ous)[cntr_ous_2], ndr_charset_length((*r->out.ous)[cntr_ous_2], CH_UTF16), sizeof(uint16_t), CH_UTF16));
10444 : }
10445 : }
10446 : }
10447 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10448 : }
10449 6 : return NDR_ERR_SUCCESS;
10450 : }
10451 :
10452 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrGetJoinableOus2(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrGetJoinableOus2 *r)
10453 : {
10454 0 : uint32_t _ptr_server_name;
10455 6 : uint32_t size_server_name_1 = 0;
10456 6 : uint32_t length_server_name_1 = 0;
10457 6 : uint32_t size_domain_name_1 = 0;
10458 6 : uint32_t length_domain_name_1 = 0;
10459 0 : uint32_t _ptr_Account;
10460 6 : uint32_t size_Account_1 = 0;
10461 6 : uint32_t length_Account_1 = 0;
10462 0 : uint32_t _ptr_EncryptedPassword;
10463 0 : uint32_t _ptr_ous;
10464 6 : uint32_t size_ous_2 = 0;
10465 0 : uint32_t cntr_ous_2;
10466 6 : uint32_t size_ous_4 = 0;
10467 6 : uint32_t length_ous_4 = 0;
10468 6 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
10469 6 : TALLOC_CTX *_mem_save_Account_0 = NULL;
10470 6 : TALLOC_CTX *_mem_save_EncryptedPassword_0 = NULL;
10471 6 : TALLOC_CTX *_mem_save_num_ous_0 = NULL;
10472 6 : TALLOC_CTX *_mem_save_ous_0 = NULL;
10473 6 : TALLOC_CTX *_mem_save_ous_1 = NULL;
10474 6 : TALLOC_CTX *_mem_save_ous_2 = NULL;
10475 6 : TALLOC_CTX *_mem_save_ous_3 = NULL;
10476 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10477 6 : if (flags & NDR_IN) {
10478 6 : NDR_ZERO_STRUCT(r->out);
10479 :
10480 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
10481 6 : if (_ptr_server_name) {
10482 6 : NDR_PULL_ALLOC(ndr, r->in.server_name);
10483 : } else {
10484 0 : r->in.server_name = NULL;
10485 : }
10486 6 : if (r->in.server_name) {
10487 6 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10488 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
10489 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
10490 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
10491 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
10492 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
10493 6 : if (length_server_name_1 > size_server_name_1) {
10494 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
10495 : }
10496 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
10497 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
10498 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
10499 : }
10500 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
10501 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
10502 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain_name, &size_domain_name_1));
10503 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain_name, &length_domain_name_1));
10504 6 : if (length_domain_name_1 > size_domain_name_1) {
10505 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
10506 : }
10507 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
10508 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
10509 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Account));
10510 6 : if (_ptr_Account) {
10511 0 : NDR_PULL_ALLOC(ndr, r->in.Account);
10512 : } else {
10513 6 : r->in.Account = NULL;
10514 : }
10515 6 : if (r->in.Account) {
10516 0 : _mem_save_Account_0 = NDR_PULL_GET_MEM_CTX(ndr);
10517 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Account, 0);
10518 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Account));
10519 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Account));
10520 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.Account, &size_Account_1));
10521 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.Account, &length_Account_1));
10522 0 : if (length_Account_1 > size_Account_1) {
10523 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_Account_1, length_Account_1);
10524 : }
10525 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_Account_1, sizeof(uint16_t)));
10526 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Account, length_Account_1, sizeof(uint16_t), CH_UTF16));
10527 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Account_0, 0);
10528 : }
10529 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_EncryptedPassword));
10530 6 : if (_ptr_EncryptedPassword) {
10531 0 : NDR_PULL_ALLOC(ndr, r->in.EncryptedPassword);
10532 : } else {
10533 6 : r->in.EncryptedPassword = NULL;
10534 : }
10535 6 : if (r->in.EncryptedPassword) {
10536 0 : _mem_save_EncryptedPassword_0 = NDR_PULL_GET_MEM_CTX(ndr);
10537 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.EncryptedPassword, 0);
10538 0 : NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr, NDR_SCALARS, r->in.EncryptedPassword));
10539 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_EncryptedPassword_0, 0);
10540 : }
10541 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10542 6 : NDR_PULL_ALLOC(ndr, r->in.num_ous);
10543 : }
10544 6 : _mem_save_num_ous_0 = NDR_PULL_GET_MEM_CTX(ndr);
10545 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.num_ous, LIBNDR_FLAG_REF_ALLOC);
10546 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.num_ous));
10547 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_ous_0, LIBNDR_FLAG_REF_ALLOC);
10548 6 : NDR_PULL_ALLOC(ndr, r->out.num_ous);
10549 6 : *r->out.num_ous = *r->in.num_ous;
10550 6 : NDR_PULL_ALLOC(ndr, r->out.ous);
10551 6 : NDR_ZERO_STRUCTP(r->out.ous);
10552 : }
10553 6 : if (flags & NDR_OUT) {
10554 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10555 : if (r->in.num_ous == NULL) {
10556 : NDR_PULL_ALLOC(ndr, r->in.num_ous);
10557 : NDR_ZERO_STRUCTP(r->in.num_ous);
10558 : }
10559 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10560 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10561 0 : NDR_PULL_ALLOC(ndr, r->out.num_ous);
10562 : }
10563 0 : _mem_save_num_ous_0 = NDR_PULL_GET_MEM_CTX(ndr);
10564 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.num_ous, LIBNDR_FLAG_REF_ALLOC);
10565 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_ous));
10566 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_ous_0, LIBNDR_FLAG_REF_ALLOC);
10567 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10568 0 : NDR_PULL_ALLOC(ndr, r->out.ous);
10569 : }
10570 0 : _mem_save_ous_0 = NDR_PULL_GET_MEM_CTX(ndr);
10571 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ous, LIBNDR_FLAG_REF_ALLOC);
10572 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ous));
10573 0 : if (_ptr_ous) {
10574 0 : NDR_PULL_ALLOC(ndr, *r->out.ous);
10575 : } else {
10576 0 : *r->out.ous = NULL;
10577 : }
10578 0 : if (*r->out.ous) {
10579 0 : _mem_save_ous_1 = NDR_PULL_GET_MEM_CTX(ndr);
10580 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.ous, 0);
10581 0 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.ous));
10582 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)r->out.ous, &size_ous_2));
10583 0 : NDR_PULL_ALLOC_N(ndr, *r->out.ous, size_ous_2);
10584 0 : _mem_save_ous_2 = NDR_PULL_GET_MEM_CTX(ndr);
10585 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.ous, 0);
10586 0 : for (cntr_ous_2 = 0; cntr_ous_2 < (size_ous_2); cntr_ous_2++) {
10587 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ous));
10588 0 : if (_ptr_ous) {
10589 0 : NDR_PULL_ALLOC(ndr, (*r->out.ous)[cntr_ous_2]);
10590 : } else {
10591 0 : (*r->out.ous)[cntr_ous_2] = NULL;
10592 : }
10593 : }
10594 0 : for (cntr_ous_2 = 0; cntr_ous_2 < (size_ous_2); cntr_ous_2++) {
10595 0 : if ((*r->out.ous)[cntr_ous_2]) {
10596 0 : _mem_save_ous_3 = NDR_PULL_GET_MEM_CTX(ndr);
10597 0 : NDR_PULL_SET_MEM_CTX(ndr, (*r->out.ous)[cntr_ous_2], 0);
10598 0 : NDR_CHECK(ndr_pull_array_size(ndr, &(*r->out.ous)[cntr_ous_2]));
10599 0 : NDR_CHECK(ndr_pull_array_length(ndr, &(*r->out.ous)[cntr_ous_2]));
10600 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&(*r->out.ous)[cntr_ous_2], &size_ous_4));
10601 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&(*r->out.ous)[cntr_ous_2], &length_ous_4));
10602 0 : if (length_ous_4 > size_ous_4) {
10603 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_ous_4, length_ous_4);
10604 : }
10605 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_ous_4, sizeof(uint16_t)));
10606 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &(*r->out.ous)[cntr_ous_2], length_ous_4, sizeof(uint16_t), CH_UTF16));
10607 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_3, 0);
10608 : }
10609 : }
10610 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_2, 0);
10611 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_1, 0);
10612 : }
10613 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_0, LIBNDR_FLAG_REF_ALLOC);
10614 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10615 0 : if (*r->out.ous) {
10616 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.ous, *r->out.num_ous));
10617 : }
10618 0 : for (cntr_ous_2 = 0; cntr_ous_2 < (size_ous_2); cntr_ous_2++) {
10619 0 : }
10620 : }
10621 6 : return NDR_ERR_SUCCESS;
10622 : }
10623 :
10624 0 : _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrGetJoinableOus2 *r)
10625 : {
10626 0 : uint32_t cntr_ous_2;
10627 0 : ndr_print_struct(ndr, name, "wkssvc_NetrGetJoinableOus2");
10628 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10629 0 : ndr->depth++;
10630 0 : if (flags & NDR_SET_VALUES) {
10631 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10632 : }
10633 0 : if (flags & NDR_IN) {
10634 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrGetJoinableOus2");
10635 0 : ndr->depth++;
10636 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
10637 0 : ndr->depth++;
10638 0 : if (r->in.server_name) {
10639 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
10640 : }
10641 0 : ndr->depth--;
10642 0 : ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
10643 0 : ndr->depth++;
10644 0 : ndr_print_string(ndr, "domain_name", r->in.domain_name);
10645 0 : ndr->depth--;
10646 0 : ndr_print_ptr(ndr, "Account", r->in.Account);
10647 0 : ndr->depth++;
10648 0 : if (r->in.Account) {
10649 0 : ndr_print_string(ndr, "Account", r->in.Account);
10650 : }
10651 0 : ndr->depth--;
10652 0 : ndr_print_ptr(ndr, "EncryptedPassword", r->in.EncryptedPassword);
10653 0 : ndr->depth++;
10654 0 : if (r->in.EncryptedPassword) {
10655 0 : ndr_print_wkssvc_PasswordBuffer(ndr, "EncryptedPassword", r->in.EncryptedPassword);
10656 : }
10657 0 : ndr->depth--;
10658 0 : ndr_print_ptr(ndr, "num_ous", r->in.num_ous);
10659 0 : ndr->depth++;
10660 0 : ndr_print_uint32(ndr, "num_ous", *r->in.num_ous);
10661 0 : ndr->depth--;
10662 0 : ndr->depth--;
10663 : }
10664 0 : if (flags & NDR_OUT) {
10665 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrGetJoinableOus2");
10666 0 : ndr->depth++;
10667 0 : ndr_print_ptr(ndr, "num_ous", r->out.num_ous);
10668 0 : ndr->depth++;
10669 0 : ndr_print_uint32(ndr, "num_ous", *r->out.num_ous);
10670 0 : ndr->depth--;
10671 0 : ndr_print_ptr(ndr, "ous", r->out.ous);
10672 0 : ndr->depth++;
10673 0 : ndr_print_ptr(ndr, "ous", *r->out.ous);
10674 0 : ndr->depth++;
10675 0 : if (*r->out.ous) {
10676 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "ous", (uint32_t)(*r->out.num_ous));
10677 0 : ndr->depth++;
10678 0 : for (cntr_ous_2 = 0; cntr_ous_2 < (*r->out.num_ous); cntr_ous_2++) {
10679 0 : ndr_print_ptr(ndr, "ous", (*r->out.ous)[cntr_ous_2]);
10680 0 : ndr->depth++;
10681 0 : if ((*r->out.ous)[cntr_ous_2]) {
10682 0 : ndr_print_string(ndr, "ous", (*r->out.ous)[cntr_ous_2]);
10683 : }
10684 0 : ndr->depth--;
10685 : }
10686 0 : ndr->depth--;
10687 : }
10688 0 : ndr->depth--;
10689 0 : ndr->depth--;
10690 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10691 0 : ndr->depth--;
10692 : }
10693 0 : ndr->depth--;
10694 : }
10695 :
10696 6 : static enum ndr_err_code ndr_push_wkssvc_NetrAddAlternateComputerName(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrAddAlternateComputerName *r)
10697 : {
10698 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10699 6 : if (flags & NDR_IN) {
10700 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
10701 6 : if (r->in.server_name) {
10702 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10703 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10704 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10705 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10706 : }
10707 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.NewAlternateMachineName));
10708 6 : if (r->in.NewAlternateMachineName) {
10709 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.NewAlternateMachineName, CH_UTF16)));
10710 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10711 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.NewAlternateMachineName, CH_UTF16)));
10712 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.NewAlternateMachineName, ndr_charset_length(r->in.NewAlternateMachineName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10713 : }
10714 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Account));
10715 6 : if (r->in.Account) {
10716 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
10717 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10718 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
10719 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Account, ndr_charset_length(r->in.Account, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10720 : }
10721 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.EncryptedPassword));
10722 6 : if (r->in.EncryptedPassword) {
10723 0 : NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr, NDR_SCALARS, r->in.EncryptedPassword));
10724 : }
10725 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Reserved));
10726 : }
10727 6 : if (flags & NDR_OUT) {
10728 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10729 : }
10730 6 : return NDR_ERR_SUCCESS;
10731 : }
10732 :
10733 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrAddAlternateComputerName(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrAddAlternateComputerName *r)
10734 : {
10735 0 : uint32_t _ptr_server_name;
10736 6 : uint32_t size_server_name_1 = 0;
10737 6 : uint32_t length_server_name_1 = 0;
10738 0 : uint32_t _ptr_NewAlternateMachineName;
10739 6 : uint32_t size_NewAlternateMachineName_1 = 0;
10740 6 : uint32_t length_NewAlternateMachineName_1 = 0;
10741 0 : uint32_t _ptr_Account;
10742 6 : uint32_t size_Account_1 = 0;
10743 6 : uint32_t length_Account_1 = 0;
10744 0 : uint32_t _ptr_EncryptedPassword;
10745 6 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
10746 6 : TALLOC_CTX *_mem_save_NewAlternateMachineName_0 = NULL;
10747 6 : TALLOC_CTX *_mem_save_Account_0 = NULL;
10748 6 : TALLOC_CTX *_mem_save_EncryptedPassword_0 = NULL;
10749 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10750 6 : if (flags & NDR_IN) {
10751 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
10752 6 : if (_ptr_server_name) {
10753 6 : NDR_PULL_ALLOC(ndr, r->in.server_name);
10754 : } else {
10755 0 : r->in.server_name = NULL;
10756 : }
10757 6 : if (r->in.server_name) {
10758 6 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10759 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
10760 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
10761 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
10762 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
10763 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
10764 6 : if (length_server_name_1 > size_server_name_1) {
10765 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
10766 : }
10767 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
10768 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
10769 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
10770 : }
10771 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_NewAlternateMachineName));
10772 6 : if (_ptr_NewAlternateMachineName) {
10773 6 : NDR_PULL_ALLOC(ndr, r->in.NewAlternateMachineName);
10774 : } else {
10775 0 : r->in.NewAlternateMachineName = NULL;
10776 : }
10777 6 : if (r->in.NewAlternateMachineName) {
10778 6 : _mem_save_NewAlternateMachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
10779 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.NewAlternateMachineName, 0);
10780 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.NewAlternateMachineName));
10781 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.NewAlternateMachineName));
10782 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.NewAlternateMachineName, &size_NewAlternateMachineName_1));
10783 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.NewAlternateMachineName, &length_NewAlternateMachineName_1));
10784 6 : if (length_NewAlternateMachineName_1 > size_NewAlternateMachineName_1) {
10785 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_NewAlternateMachineName_1, length_NewAlternateMachineName_1);
10786 : }
10787 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_NewAlternateMachineName_1, sizeof(uint16_t)));
10788 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.NewAlternateMachineName, length_NewAlternateMachineName_1, sizeof(uint16_t), CH_UTF16));
10789 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_NewAlternateMachineName_0, 0);
10790 : }
10791 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Account));
10792 6 : if (_ptr_Account) {
10793 0 : NDR_PULL_ALLOC(ndr, r->in.Account);
10794 : } else {
10795 6 : r->in.Account = NULL;
10796 : }
10797 6 : if (r->in.Account) {
10798 0 : _mem_save_Account_0 = NDR_PULL_GET_MEM_CTX(ndr);
10799 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Account, 0);
10800 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Account));
10801 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Account));
10802 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.Account, &size_Account_1));
10803 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.Account, &length_Account_1));
10804 0 : if (length_Account_1 > size_Account_1) {
10805 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_Account_1, length_Account_1);
10806 : }
10807 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_Account_1, sizeof(uint16_t)));
10808 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Account, length_Account_1, sizeof(uint16_t), CH_UTF16));
10809 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Account_0, 0);
10810 : }
10811 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_EncryptedPassword));
10812 6 : if (_ptr_EncryptedPassword) {
10813 0 : NDR_PULL_ALLOC(ndr, r->in.EncryptedPassword);
10814 : } else {
10815 6 : r->in.EncryptedPassword = NULL;
10816 : }
10817 6 : if (r->in.EncryptedPassword) {
10818 0 : _mem_save_EncryptedPassword_0 = NDR_PULL_GET_MEM_CTX(ndr);
10819 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.EncryptedPassword, 0);
10820 0 : NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr, NDR_SCALARS, r->in.EncryptedPassword));
10821 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_EncryptedPassword_0, 0);
10822 : }
10823 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Reserved));
10824 : }
10825 6 : if (flags & NDR_OUT) {
10826 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10827 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10828 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10829 : }
10830 6 : return NDR_ERR_SUCCESS;
10831 : }
10832 :
10833 0 : _PUBLIC_ void ndr_print_wkssvc_NetrAddAlternateComputerName(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrAddAlternateComputerName *r)
10834 : {
10835 0 : ndr_print_struct(ndr, name, "wkssvc_NetrAddAlternateComputerName");
10836 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10837 0 : ndr->depth++;
10838 0 : if (flags & NDR_SET_VALUES) {
10839 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10840 : }
10841 0 : if (flags & NDR_IN) {
10842 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrAddAlternateComputerName");
10843 0 : ndr->depth++;
10844 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
10845 0 : ndr->depth++;
10846 0 : if (r->in.server_name) {
10847 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
10848 : }
10849 0 : ndr->depth--;
10850 0 : ndr_print_ptr(ndr, "NewAlternateMachineName", r->in.NewAlternateMachineName);
10851 0 : ndr->depth++;
10852 0 : if (r->in.NewAlternateMachineName) {
10853 0 : ndr_print_string(ndr, "NewAlternateMachineName", r->in.NewAlternateMachineName);
10854 : }
10855 0 : ndr->depth--;
10856 0 : ndr_print_ptr(ndr, "Account", r->in.Account);
10857 0 : ndr->depth++;
10858 0 : if (r->in.Account) {
10859 0 : ndr_print_string(ndr, "Account", r->in.Account);
10860 : }
10861 0 : ndr->depth--;
10862 0 : ndr_print_ptr(ndr, "EncryptedPassword", r->in.EncryptedPassword);
10863 0 : ndr->depth++;
10864 0 : if (r->in.EncryptedPassword) {
10865 0 : ndr_print_wkssvc_PasswordBuffer(ndr, "EncryptedPassword", r->in.EncryptedPassword);
10866 : }
10867 0 : ndr->depth--;
10868 0 : ndr_print_uint32(ndr, "Reserved", r->in.Reserved);
10869 0 : ndr->depth--;
10870 : }
10871 0 : if (flags & NDR_OUT) {
10872 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrAddAlternateComputerName");
10873 0 : ndr->depth++;
10874 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10875 0 : ndr->depth--;
10876 : }
10877 0 : ndr->depth--;
10878 : }
10879 :
10880 6 : static enum ndr_err_code ndr_push_wkssvc_NetrRemoveAlternateComputerName(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrRemoveAlternateComputerName *r)
10881 : {
10882 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10883 6 : if (flags & NDR_IN) {
10884 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
10885 6 : if (r->in.server_name) {
10886 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10887 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10888 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
10889 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10890 : }
10891 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.AlternateMachineNameToRemove));
10892 6 : if (r->in.AlternateMachineNameToRemove) {
10893 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.AlternateMachineNameToRemove, CH_UTF16)));
10894 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10895 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.AlternateMachineNameToRemove, CH_UTF16)));
10896 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.AlternateMachineNameToRemove, ndr_charset_length(r->in.AlternateMachineNameToRemove, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10897 : }
10898 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Account));
10899 6 : if (r->in.Account) {
10900 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
10901 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10902 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
10903 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Account, ndr_charset_length(r->in.Account, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10904 : }
10905 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.EncryptedPassword));
10906 6 : if (r->in.EncryptedPassword) {
10907 0 : NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr, NDR_SCALARS, r->in.EncryptedPassword));
10908 : }
10909 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Reserved));
10910 : }
10911 6 : if (flags & NDR_OUT) {
10912 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10913 : }
10914 6 : return NDR_ERR_SUCCESS;
10915 : }
10916 :
10917 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrRemoveAlternateComputerName(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrRemoveAlternateComputerName *r)
10918 : {
10919 0 : uint32_t _ptr_server_name;
10920 6 : uint32_t size_server_name_1 = 0;
10921 6 : uint32_t length_server_name_1 = 0;
10922 0 : uint32_t _ptr_AlternateMachineNameToRemove;
10923 6 : uint32_t size_AlternateMachineNameToRemove_1 = 0;
10924 6 : uint32_t length_AlternateMachineNameToRemove_1 = 0;
10925 0 : uint32_t _ptr_Account;
10926 6 : uint32_t size_Account_1 = 0;
10927 6 : uint32_t length_Account_1 = 0;
10928 0 : uint32_t _ptr_EncryptedPassword;
10929 6 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
10930 6 : TALLOC_CTX *_mem_save_AlternateMachineNameToRemove_0 = NULL;
10931 6 : TALLOC_CTX *_mem_save_Account_0 = NULL;
10932 6 : TALLOC_CTX *_mem_save_EncryptedPassword_0 = NULL;
10933 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10934 6 : if (flags & NDR_IN) {
10935 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
10936 6 : if (_ptr_server_name) {
10937 6 : NDR_PULL_ALLOC(ndr, r->in.server_name);
10938 : } else {
10939 0 : r->in.server_name = NULL;
10940 : }
10941 6 : if (r->in.server_name) {
10942 6 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10943 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
10944 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
10945 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
10946 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
10947 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
10948 6 : if (length_server_name_1 > size_server_name_1) {
10949 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
10950 : }
10951 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
10952 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
10953 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
10954 : }
10955 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_AlternateMachineNameToRemove));
10956 6 : if (_ptr_AlternateMachineNameToRemove) {
10957 6 : NDR_PULL_ALLOC(ndr, r->in.AlternateMachineNameToRemove);
10958 : } else {
10959 0 : r->in.AlternateMachineNameToRemove = NULL;
10960 : }
10961 6 : if (r->in.AlternateMachineNameToRemove) {
10962 6 : _mem_save_AlternateMachineNameToRemove_0 = NDR_PULL_GET_MEM_CTX(ndr);
10963 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.AlternateMachineNameToRemove, 0);
10964 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.AlternateMachineNameToRemove));
10965 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.AlternateMachineNameToRemove));
10966 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.AlternateMachineNameToRemove, &size_AlternateMachineNameToRemove_1));
10967 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.AlternateMachineNameToRemove, &length_AlternateMachineNameToRemove_1));
10968 6 : if (length_AlternateMachineNameToRemove_1 > size_AlternateMachineNameToRemove_1) {
10969 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_AlternateMachineNameToRemove_1, length_AlternateMachineNameToRemove_1);
10970 : }
10971 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_AlternateMachineNameToRemove_1, sizeof(uint16_t)));
10972 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.AlternateMachineNameToRemove, length_AlternateMachineNameToRemove_1, sizeof(uint16_t), CH_UTF16));
10973 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_AlternateMachineNameToRemove_0, 0);
10974 : }
10975 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Account));
10976 6 : if (_ptr_Account) {
10977 0 : NDR_PULL_ALLOC(ndr, r->in.Account);
10978 : } else {
10979 6 : r->in.Account = NULL;
10980 : }
10981 6 : if (r->in.Account) {
10982 0 : _mem_save_Account_0 = NDR_PULL_GET_MEM_CTX(ndr);
10983 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Account, 0);
10984 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Account));
10985 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Account));
10986 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.Account, &size_Account_1));
10987 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.Account, &length_Account_1));
10988 0 : if (length_Account_1 > size_Account_1) {
10989 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_Account_1, length_Account_1);
10990 : }
10991 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_Account_1, sizeof(uint16_t)));
10992 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Account, length_Account_1, sizeof(uint16_t), CH_UTF16));
10993 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Account_0, 0);
10994 : }
10995 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_EncryptedPassword));
10996 6 : if (_ptr_EncryptedPassword) {
10997 0 : NDR_PULL_ALLOC(ndr, r->in.EncryptedPassword);
10998 : } else {
10999 6 : r->in.EncryptedPassword = NULL;
11000 : }
11001 6 : if (r->in.EncryptedPassword) {
11002 0 : _mem_save_EncryptedPassword_0 = NDR_PULL_GET_MEM_CTX(ndr);
11003 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.EncryptedPassword, 0);
11004 0 : NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr, NDR_SCALARS, r->in.EncryptedPassword));
11005 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_EncryptedPassword_0, 0);
11006 : }
11007 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Reserved));
11008 : }
11009 6 : if (flags & NDR_OUT) {
11010 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11011 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11012 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
11013 : }
11014 6 : return NDR_ERR_SUCCESS;
11015 : }
11016 :
11017 0 : _PUBLIC_ void ndr_print_wkssvc_NetrRemoveAlternateComputerName(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrRemoveAlternateComputerName *r)
11018 : {
11019 0 : ndr_print_struct(ndr, name, "wkssvc_NetrRemoveAlternateComputerName");
11020 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11021 0 : ndr->depth++;
11022 0 : if (flags & NDR_SET_VALUES) {
11023 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11024 : }
11025 0 : if (flags & NDR_IN) {
11026 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrRemoveAlternateComputerName");
11027 0 : ndr->depth++;
11028 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
11029 0 : ndr->depth++;
11030 0 : if (r->in.server_name) {
11031 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
11032 : }
11033 0 : ndr->depth--;
11034 0 : ndr_print_ptr(ndr, "AlternateMachineNameToRemove", r->in.AlternateMachineNameToRemove);
11035 0 : ndr->depth++;
11036 0 : if (r->in.AlternateMachineNameToRemove) {
11037 0 : ndr_print_string(ndr, "AlternateMachineNameToRemove", r->in.AlternateMachineNameToRemove);
11038 : }
11039 0 : ndr->depth--;
11040 0 : ndr_print_ptr(ndr, "Account", r->in.Account);
11041 0 : ndr->depth++;
11042 0 : if (r->in.Account) {
11043 0 : ndr_print_string(ndr, "Account", r->in.Account);
11044 : }
11045 0 : ndr->depth--;
11046 0 : ndr_print_ptr(ndr, "EncryptedPassword", r->in.EncryptedPassword);
11047 0 : ndr->depth++;
11048 0 : if (r->in.EncryptedPassword) {
11049 0 : ndr_print_wkssvc_PasswordBuffer(ndr, "EncryptedPassword", r->in.EncryptedPassword);
11050 : }
11051 0 : ndr->depth--;
11052 0 : ndr_print_uint32(ndr, "Reserved", r->in.Reserved);
11053 0 : ndr->depth--;
11054 : }
11055 0 : if (flags & NDR_OUT) {
11056 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrRemoveAlternateComputerName");
11057 0 : ndr->depth++;
11058 0 : ndr_print_WERROR(ndr, "result", r->out.result);
11059 0 : ndr->depth--;
11060 : }
11061 0 : ndr->depth--;
11062 : }
11063 :
11064 0 : static enum ndr_err_code ndr_push_wkssvc_NetrSetPrimaryComputername(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrSetPrimaryComputername *r)
11065 : {
11066 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11067 0 : if (flags & NDR_IN) {
11068 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
11069 0 : if (r->in.server_name) {
11070 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
11071 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11072 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
11073 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11074 : }
11075 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.primary_name));
11076 0 : if (r->in.primary_name) {
11077 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.primary_name, CH_UTF16)));
11078 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11079 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.primary_name, CH_UTF16)));
11080 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.primary_name, ndr_charset_length(r->in.primary_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11081 : }
11082 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Account));
11083 0 : if (r->in.Account) {
11084 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
11085 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11086 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Account, CH_UTF16)));
11087 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Account, ndr_charset_length(r->in.Account, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11088 : }
11089 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.EncryptedPassword));
11090 0 : if (r->in.EncryptedPassword) {
11091 0 : NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr, NDR_SCALARS, r->in.EncryptedPassword));
11092 : }
11093 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Reserved));
11094 : }
11095 0 : if (flags & NDR_OUT) {
11096 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
11097 : }
11098 0 : return NDR_ERR_SUCCESS;
11099 : }
11100 :
11101 0 : static enum ndr_err_code ndr_pull_wkssvc_NetrSetPrimaryComputername(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrSetPrimaryComputername *r)
11102 : {
11103 0 : uint32_t _ptr_server_name;
11104 0 : uint32_t size_server_name_1 = 0;
11105 0 : uint32_t length_server_name_1 = 0;
11106 0 : uint32_t _ptr_primary_name;
11107 0 : uint32_t size_primary_name_1 = 0;
11108 0 : uint32_t length_primary_name_1 = 0;
11109 0 : uint32_t _ptr_Account;
11110 0 : uint32_t size_Account_1 = 0;
11111 0 : uint32_t length_Account_1 = 0;
11112 0 : uint32_t _ptr_EncryptedPassword;
11113 0 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
11114 0 : TALLOC_CTX *_mem_save_primary_name_0 = NULL;
11115 0 : TALLOC_CTX *_mem_save_Account_0 = NULL;
11116 0 : TALLOC_CTX *_mem_save_EncryptedPassword_0 = NULL;
11117 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11118 0 : if (flags & NDR_IN) {
11119 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
11120 0 : if (_ptr_server_name) {
11121 0 : NDR_PULL_ALLOC(ndr, r->in.server_name);
11122 : } else {
11123 0 : r->in.server_name = NULL;
11124 : }
11125 0 : if (r->in.server_name) {
11126 0 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11127 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
11128 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
11129 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
11130 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
11131 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
11132 0 : if (length_server_name_1 > size_server_name_1) {
11133 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
11134 : }
11135 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
11136 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
11137 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
11138 : }
11139 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_primary_name));
11140 0 : if (_ptr_primary_name) {
11141 0 : NDR_PULL_ALLOC(ndr, r->in.primary_name);
11142 : } else {
11143 0 : r->in.primary_name = NULL;
11144 : }
11145 0 : if (r->in.primary_name) {
11146 0 : _mem_save_primary_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11147 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.primary_name, 0);
11148 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.primary_name));
11149 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.primary_name));
11150 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.primary_name, &size_primary_name_1));
11151 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.primary_name, &length_primary_name_1));
11152 0 : if (length_primary_name_1 > size_primary_name_1) {
11153 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_primary_name_1, length_primary_name_1);
11154 : }
11155 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_primary_name_1, sizeof(uint16_t)));
11156 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.primary_name, length_primary_name_1, sizeof(uint16_t), CH_UTF16));
11157 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_primary_name_0, 0);
11158 : }
11159 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Account));
11160 0 : if (_ptr_Account) {
11161 0 : NDR_PULL_ALLOC(ndr, r->in.Account);
11162 : } else {
11163 0 : r->in.Account = NULL;
11164 : }
11165 0 : if (r->in.Account) {
11166 0 : _mem_save_Account_0 = NDR_PULL_GET_MEM_CTX(ndr);
11167 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Account, 0);
11168 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Account));
11169 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Account));
11170 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.Account, &size_Account_1));
11171 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.Account, &length_Account_1));
11172 0 : if (length_Account_1 > size_Account_1) {
11173 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_Account_1, length_Account_1);
11174 : }
11175 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_Account_1, sizeof(uint16_t)));
11176 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Account, length_Account_1, sizeof(uint16_t), CH_UTF16));
11177 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Account_0, 0);
11178 : }
11179 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_EncryptedPassword));
11180 0 : if (_ptr_EncryptedPassword) {
11181 0 : NDR_PULL_ALLOC(ndr, r->in.EncryptedPassword);
11182 : } else {
11183 0 : r->in.EncryptedPassword = NULL;
11184 : }
11185 0 : if (r->in.EncryptedPassword) {
11186 0 : _mem_save_EncryptedPassword_0 = NDR_PULL_GET_MEM_CTX(ndr);
11187 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.EncryptedPassword, 0);
11188 0 : NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr, NDR_SCALARS, r->in.EncryptedPassword));
11189 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_EncryptedPassword_0, 0);
11190 : }
11191 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Reserved));
11192 : }
11193 0 : if (flags & NDR_OUT) {
11194 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11195 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11196 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
11197 : }
11198 0 : return NDR_ERR_SUCCESS;
11199 : }
11200 :
11201 0 : _PUBLIC_ void ndr_print_wkssvc_NetrSetPrimaryComputername(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrSetPrimaryComputername *r)
11202 : {
11203 0 : ndr_print_struct(ndr, name, "wkssvc_NetrSetPrimaryComputername");
11204 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11205 0 : ndr->depth++;
11206 0 : if (flags & NDR_SET_VALUES) {
11207 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11208 : }
11209 0 : if (flags & NDR_IN) {
11210 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrSetPrimaryComputername");
11211 0 : ndr->depth++;
11212 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
11213 0 : ndr->depth++;
11214 0 : if (r->in.server_name) {
11215 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
11216 : }
11217 0 : ndr->depth--;
11218 0 : ndr_print_ptr(ndr, "primary_name", r->in.primary_name);
11219 0 : ndr->depth++;
11220 0 : if (r->in.primary_name) {
11221 0 : ndr_print_string(ndr, "primary_name", r->in.primary_name);
11222 : }
11223 0 : ndr->depth--;
11224 0 : ndr_print_ptr(ndr, "Account", r->in.Account);
11225 0 : ndr->depth++;
11226 0 : if (r->in.Account) {
11227 0 : ndr_print_string(ndr, "Account", r->in.Account);
11228 : }
11229 0 : ndr->depth--;
11230 0 : ndr_print_ptr(ndr, "EncryptedPassword", r->in.EncryptedPassword);
11231 0 : ndr->depth++;
11232 0 : if (r->in.EncryptedPassword) {
11233 0 : ndr_print_wkssvc_PasswordBuffer(ndr, "EncryptedPassword", r->in.EncryptedPassword);
11234 : }
11235 0 : ndr->depth--;
11236 0 : ndr_print_uint32(ndr, "Reserved", r->in.Reserved);
11237 0 : ndr->depth--;
11238 : }
11239 0 : if (flags & NDR_OUT) {
11240 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrSetPrimaryComputername");
11241 0 : ndr->depth++;
11242 0 : ndr_print_WERROR(ndr, "result", r->out.result);
11243 0 : ndr->depth--;
11244 : }
11245 0 : ndr->depth--;
11246 : }
11247 :
11248 6 : static enum ndr_err_code ndr_push_wkssvc_NetrEnumerateComputerNames(struct ndr_push *ndr, ndr_flags_type flags, const struct wkssvc_NetrEnumerateComputerNames *r)
11249 : {
11250 6 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11251 6 : if (flags & NDR_IN) {
11252 6 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
11253 6 : if (r->in.server_name) {
11254 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
11255 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11256 6 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
11257 6 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11258 : }
11259 6 : NDR_CHECK(ndr_push_wkssvc_ComputerNameType(ndr, NDR_SCALARS, r->in.name_type));
11260 6 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Reserved));
11261 : }
11262 6 : if (flags & NDR_OUT) {
11263 0 : if (r->out.ctr == NULL) {
11264 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11265 : }
11266 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ctr));
11267 0 : if (*r->out.ctr) {
11268 0 : NDR_CHECK(ndr_push_wkssvc_ComputerNamesCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
11269 : }
11270 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
11271 : }
11272 6 : return NDR_ERR_SUCCESS;
11273 : }
11274 :
11275 6 : static enum ndr_err_code ndr_pull_wkssvc_NetrEnumerateComputerNames(struct ndr_pull *ndr, ndr_flags_type flags, struct wkssvc_NetrEnumerateComputerNames *r)
11276 : {
11277 0 : uint32_t _ptr_server_name;
11278 6 : uint32_t size_server_name_1 = 0;
11279 6 : uint32_t length_server_name_1 = 0;
11280 0 : uint32_t _ptr_ctr;
11281 6 : TALLOC_CTX *_mem_save_server_name_0 = NULL;
11282 6 : TALLOC_CTX *_mem_save_ctr_0 = NULL;
11283 6 : TALLOC_CTX *_mem_save_ctr_1 = NULL;
11284 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11285 6 : if (flags & NDR_IN) {
11286 6 : NDR_ZERO_STRUCT(r->out);
11287 :
11288 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
11289 6 : if (_ptr_server_name) {
11290 6 : NDR_PULL_ALLOC(ndr, r->in.server_name);
11291 : } else {
11292 0 : r->in.server_name = NULL;
11293 : }
11294 6 : if (r->in.server_name) {
11295 6 : _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11296 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
11297 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
11298 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
11299 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
11300 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
11301 6 : if (length_server_name_1 > size_server_name_1) {
11302 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
11303 : }
11304 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
11305 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
11306 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
11307 : }
11308 6 : NDR_CHECK(ndr_pull_wkssvc_ComputerNameType(ndr, NDR_SCALARS, &r->in.name_type));
11309 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Reserved));
11310 6 : NDR_PULL_ALLOC(ndr, r->out.ctr);
11311 6 : NDR_ZERO_STRUCTP(r->out.ctr);
11312 : }
11313 6 : if (flags & NDR_OUT) {
11314 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11315 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11316 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11317 0 : NDR_PULL_ALLOC(ndr, r->out.ctr);
11318 : }
11319 0 : _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
11320 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
11321 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr));
11322 0 : if (_ptr_ctr) {
11323 0 : NDR_PULL_ALLOC(ndr, *r->out.ctr);
11324 : } else {
11325 0 : *r->out.ctr = NULL;
11326 : }
11327 0 : if (*r->out.ctr) {
11328 0 : _mem_save_ctr_1 = NDR_PULL_GET_MEM_CTX(ndr);
11329 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.ctr, 0);
11330 0 : NDR_CHECK(ndr_pull_wkssvc_ComputerNamesCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
11331 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_1, 0);
11332 : }
11333 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
11334 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
11335 : }
11336 6 : return NDR_ERR_SUCCESS;
11337 : }
11338 :
11339 0 : _PUBLIC_ void ndr_print_wkssvc_NetrEnumerateComputerNames(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct wkssvc_NetrEnumerateComputerNames *r)
11340 : {
11341 0 : ndr_print_struct(ndr, name, "wkssvc_NetrEnumerateComputerNames");
11342 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11343 0 : ndr->depth++;
11344 0 : if (flags & NDR_SET_VALUES) {
11345 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11346 : }
11347 0 : if (flags & NDR_IN) {
11348 0 : ndr_print_struct(ndr, "in", "wkssvc_NetrEnumerateComputerNames");
11349 0 : ndr->depth++;
11350 0 : ndr_print_ptr(ndr, "server_name", r->in.server_name);
11351 0 : ndr->depth++;
11352 0 : if (r->in.server_name) {
11353 0 : ndr_print_string(ndr, "server_name", r->in.server_name);
11354 : }
11355 0 : ndr->depth--;
11356 0 : ndr_print_wkssvc_ComputerNameType(ndr, "name_type", r->in.name_type);
11357 0 : ndr_print_uint32(ndr, "Reserved", r->in.Reserved);
11358 0 : ndr->depth--;
11359 : }
11360 0 : if (flags & NDR_OUT) {
11361 0 : ndr_print_struct(ndr, "out", "wkssvc_NetrEnumerateComputerNames");
11362 0 : ndr->depth++;
11363 0 : ndr_print_ptr(ndr, "ctr", r->out.ctr);
11364 0 : ndr->depth++;
11365 0 : ndr_print_ptr(ndr, "ctr", *r->out.ctr);
11366 0 : ndr->depth++;
11367 0 : if (*r->out.ctr) {
11368 0 : ndr_print_wkssvc_ComputerNamesCtr(ndr, "ctr", *r->out.ctr);
11369 : }
11370 0 : ndr->depth--;
11371 0 : ndr->depth--;
11372 0 : ndr_print_WERROR(ndr, "result", r->out.result);
11373 0 : ndr->depth--;
11374 : }
11375 0 : ndr->depth--;
11376 : }
11377 :
11378 : #ifndef SKIP_NDR_TABLE_wkssvc
11379 : static const struct ndr_interface_public_struct wkssvc_public_structs[] = {
11380 : { .name = NULL }
11381 : };
11382 :
11383 : static const struct ndr_interface_call wkssvc_calls[] = {
11384 : {
11385 : "wkssvc_NetWkstaGetInfo",
11386 : sizeof(struct wkssvc_NetWkstaGetInfo),
11387 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetWkstaGetInfo,
11388 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetWkstaGetInfo,
11389 : (ndr_print_function_t) ndr_print_wkssvc_NetWkstaGetInfo,
11390 : { 0, NULL },
11391 : { 0, NULL },
11392 : },
11393 : {
11394 : "wkssvc_NetWkstaSetInfo",
11395 : sizeof(struct wkssvc_NetWkstaSetInfo),
11396 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetWkstaSetInfo,
11397 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetWkstaSetInfo,
11398 : (ndr_print_function_t) ndr_print_wkssvc_NetWkstaSetInfo,
11399 : { 0, NULL },
11400 : { 0, NULL },
11401 : },
11402 : {
11403 : "wkssvc_NetWkstaEnumUsers",
11404 : sizeof(struct wkssvc_NetWkstaEnumUsers),
11405 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetWkstaEnumUsers,
11406 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetWkstaEnumUsers,
11407 : (ndr_print_function_t) ndr_print_wkssvc_NetWkstaEnumUsers,
11408 : { 0, NULL },
11409 : { 0, NULL },
11410 : },
11411 : {
11412 : "wkssvc_NetrWkstaUserGetInfo",
11413 : sizeof(struct wkssvc_NetrWkstaUserGetInfo),
11414 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrWkstaUserGetInfo,
11415 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrWkstaUserGetInfo,
11416 : (ndr_print_function_t) ndr_print_wkssvc_NetrWkstaUserGetInfo,
11417 : { 0, NULL },
11418 : { 0, NULL },
11419 : },
11420 : {
11421 : "wkssvc_NetrWkstaUserSetInfo",
11422 : sizeof(struct wkssvc_NetrWkstaUserSetInfo),
11423 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrWkstaUserSetInfo,
11424 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrWkstaUserSetInfo,
11425 : (ndr_print_function_t) ndr_print_wkssvc_NetrWkstaUserSetInfo,
11426 : { 0, NULL },
11427 : { 0, NULL },
11428 : },
11429 : {
11430 : "wkssvc_NetWkstaTransportEnum",
11431 : sizeof(struct wkssvc_NetWkstaTransportEnum),
11432 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetWkstaTransportEnum,
11433 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetWkstaTransportEnum,
11434 : (ndr_print_function_t) ndr_print_wkssvc_NetWkstaTransportEnum,
11435 : { 0, NULL },
11436 : { 0, NULL },
11437 : },
11438 : {
11439 : "wkssvc_NetrWkstaTransportAdd",
11440 : sizeof(struct wkssvc_NetrWkstaTransportAdd),
11441 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrWkstaTransportAdd,
11442 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrWkstaTransportAdd,
11443 : (ndr_print_function_t) ndr_print_wkssvc_NetrWkstaTransportAdd,
11444 : { 0, NULL },
11445 : { 0, NULL },
11446 : },
11447 : {
11448 : "wkssvc_NetrWkstaTransportDel",
11449 : sizeof(struct wkssvc_NetrWkstaTransportDel),
11450 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrWkstaTransportDel,
11451 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrWkstaTransportDel,
11452 : (ndr_print_function_t) ndr_print_wkssvc_NetrWkstaTransportDel,
11453 : { 0, NULL },
11454 : { 0, NULL },
11455 : },
11456 : {
11457 : "wkssvc_NetrUseAdd",
11458 : sizeof(struct wkssvc_NetrUseAdd),
11459 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrUseAdd,
11460 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrUseAdd,
11461 : (ndr_print_function_t) ndr_print_wkssvc_NetrUseAdd,
11462 : { 0, NULL },
11463 : { 0, NULL },
11464 : },
11465 : {
11466 : "wkssvc_NetrUseGetInfo",
11467 : sizeof(struct wkssvc_NetrUseGetInfo),
11468 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrUseGetInfo,
11469 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrUseGetInfo,
11470 : (ndr_print_function_t) ndr_print_wkssvc_NetrUseGetInfo,
11471 : { 0, NULL },
11472 : { 0, NULL },
11473 : },
11474 : {
11475 : "wkssvc_NetrUseDel",
11476 : sizeof(struct wkssvc_NetrUseDel),
11477 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrUseDel,
11478 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrUseDel,
11479 : (ndr_print_function_t) ndr_print_wkssvc_NetrUseDel,
11480 : { 0, NULL },
11481 : { 0, NULL },
11482 : },
11483 : {
11484 : "wkssvc_NetrUseEnum",
11485 : sizeof(struct wkssvc_NetrUseEnum),
11486 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrUseEnum,
11487 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrUseEnum,
11488 : (ndr_print_function_t) ndr_print_wkssvc_NetrUseEnum,
11489 : { 0, NULL },
11490 : { 0, NULL },
11491 : },
11492 : {
11493 : "wkssvc_NetrMessageBufferSend",
11494 : sizeof(struct wkssvc_NetrMessageBufferSend),
11495 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrMessageBufferSend,
11496 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrMessageBufferSend,
11497 : (ndr_print_function_t) ndr_print_wkssvc_NetrMessageBufferSend,
11498 : { 0, NULL },
11499 : { 0, NULL },
11500 : },
11501 : {
11502 : "wkssvc_NetrWorkstationStatisticsGet",
11503 : sizeof(struct wkssvc_NetrWorkstationStatisticsGet),
11504 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrWorkstationStatisticsGet,
11505 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrWorkstationStatisticsGet,
11506 : (ndr_print_function_t) ndr_print_wkssvc_NetrWorkstationStatisticsGet,
11507 : { 0, NULL },
11508 : { 0, NULL },
11509 : },
11510 : {
11511 : "wkssvc_NetrLogonDomainNameAdd",
11512 : sizeof(struct wkssvc_NetrLogonDomainNameAdd),
11513 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrLogonDomainNameAdd,
11514 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrLogonDomainNameAdd,
11515 : (ndr_print_function_t) ndr_print_wkssvc_NetrLogonDomainNameAdd,
11516 : { 0, NULL },
11517 : { 0, NULL },
11518 : },
11519 : {
11520 : "wkssvc_NetrLogonDomainNameDel",
11521 : sizeof(struct wkssvc_NetrLogonDomainNameDel),
11522 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrLogonDomainNameDel,
11523 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrLogonDomainNameDel,
11524 : (ndr_print_function_t) ndr_print_wkssvc_NetrLogonDomainNameDel,
11525 : { 0, NULL },
11526 : { 0, NULL },
11527 : },
11528 : {
11529 : "wkssvc_NetrJoinDomain",
11530 : sizeof(struct wkssvc_NetrJoinDomain),
11531 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrJoinDomain,
11532 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrJoinDomain,
11533 : (ndr_print_function_t) ndr_print_wkssvc_NetrJoinDomain,
11534 : { 0, NULL },
11535 : { 0, NULL },
11536 : },
11537 : {
11538 : "wkssvc_NetrUnjoinDomain",
11539 : sizeof(struct wkssvc_NetrUnjoinDomain),
11540 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrUnjoinDomain,
11541 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrUnjoinDomain,
11542 : (ndr_print_function_t) ndr_print_wkssvc_NetrUnjoinDomain,
11543 : { 0, NULL },
11544 : { 0, NULL },
11545 : },
11546 : {
11547 : "wkssvc_NetrRenameMachineInDomain",
11548 : sizeof(struct wkssvc_NetrRenameMachineInDomain),
11549 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrRenameMachineInDomain,
11550 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrRenameMachineInDomain,
11551 : (ndr_print_function_t) ndr_print_wkssvc_NetrRenameMachineInDomain,
11552 : { 0, NULL },
11553 : { 0, NULL },
11554 : },
11555 : {
11556 : "wkssvc_NetrValidateName",
11557 : sizeof(struct wkssvc_NetrValidateName),
11558 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrValidateName,
11559 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrValidateName,
11560 : (ndr_print_function_t) ndr_print_wkssvc_NetrValidateName,
11561 : { 0, NULL },
11562 : { 0, NULL },
11563 : },
11564 : {
11565 : "wkssvc_NetrGetJoinInformation",
11566 : sizeof(struct wkssvc_NetrGetJoinInformation),
11567 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrGetJoinInformation,
11568 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrGetJoinInformation,
11569 : (ndr_print_function_t) ndr_print_wkssvc_NetrGetJoinInformation,
11570 : { 0, NULL },
11571 : { 0, NULL },
11572 : },
11573 : {
11574 : "wkssvc_NetrGetJoinableOus",
11575 : sizeof(struct wkssvc_NetrGetJoinableOus),
11576 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrGetJoinableOus,
11577 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrGetJoinableOus,
11578 : (ndr_print_function_t) ndr_print_wkssvc_NetrGetJoinableOus,
11579 : { 0, NULL },
11580 : { 0, NULL },
11581 : },
11582 : {
11583 : "wkssvc_NetrJoinDomain2",
11584 : sizeof(struct wkssvc_NetrJoinDomain2),
11585 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrJoinDomain2,
11586 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrJoinDomain2,
11587 : (ndr_print_function_t) ndr_print_wkssvc_NetrJoinDomain2,
11588 : { 0, NULL },
11589 : { 0, NULL },
11590 : },
11591 : {
11592 : "wkssvc_NetrUnjoinDomain2",
11593 : sizeof(struct wkssvc_NetrUnjoinDomain2),
11594 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrUnjoinDomain2,
11595 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrUnjoinDomain2,
11596 : (ndr_print_function_t) ndr_print_wkssvc_NetrUnjoinDomain2,
11597 : { 0, NULL },
11598 : { 0, NULL },
11599 : },
11600 : {
11601 : "wkssvc_NetrRenameMachineInDomain2",
11602 : sizeof(struct wkssvc_NetrRenameMachineInDomain2),
11603 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrRenameMachineInDomain2,
11604 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrRenameMachineInDomain2,
11605 : (ndr_print_function_t) ndr_print_wkssvc_NetrRenameMachineInDomain2,
11606 : { 0, NULL },
11607 : { 0, NULL },
11608 : },
11609 : {
11610 : "wkssvc_NetrValidateName2",
11611 : sizeof(struct wkssvc_NetrValidateName2),
11612 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrValidateName2,
11613 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrValidateName2,
11614 : (ndr_print_function_t) ndr_print_wkssvc_NetrValidateName2,
11615 : { 0, NULL },
11616 : { 0, NULL },
11617 : },
11618 : {
11619 : "wkssvc_NetrGetJoinableOus2",
11620 : sizeof(struct wkssvc_NetrGetJoinableOus2),
11621 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrGetJoinableOus2,
11622 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrGetJoinableOus2,
11623 : (ndr_print_function_t) ndr_print_wkssvc_NetrGetJoinableOus2,
11624 : { 0, NULL },
11625 : { 0, NULL },
11626 : },
11627 : {
11628 : "wkssvc_NetrAddAlternateComputerName",
11629 : sizeof(struct wkssvc_NetrAddAlternateComputerName),
11630 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrAddAlternateComputerName,
11631 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrAddAlternateComputerName,
11632 : (ndr_print_function_t) ndr_print_wkssvc_NetrAddAlternateComputerName,
11633 : { 0, NULL },
11634 : { 0, NULL },
11635 : },
11636 : {
11637 : "wkssvc_NetrRemoveAlternateComputerName",
11638 : sizeof(struct wkssvc_NetrRemoveAlternateComputerName),
11639 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrRemoveAlternateComputerName,
11640 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrRemoveAlternateComputerName,
11641 : (ndr_print_function_t) ndr_print_wkssvc_NetrRemoveAlternateComputerName,
11642 : { 0, NULL },
11643 : { 0, NULL },
11644 : },
11645 : {
11646 : "wkssvc_NetrSetPrimaryComputername",
11647 : sizeof(struct wkssvc_NetrSetPrimaryComputername),
11648 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrSetPrimaryComputername,
11649 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrSetPrimaryComputername,
11650 : (ndr_print_function_t) ndr_print_wkssvc_NetrSetPrimaryComputername,
11651 : { 0, NULL },
11652 : { 0, NULL },
11653 : },
11654 : {
11655 : "wkssvc_NetrEnumerateComputerNames",
11656 : sizeof(struct wkssvc_NetrEnumerateComputerNames),
11657 : (ndr_push_flags_fn_t) ndr_push_wkssvc_NetrEnumerateComputerNames,
11658 : (ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrEnumerateComputerNames,
11659 : (ndr_print_function_t) ndr_print_wkssvc_NetrEnumerateComputerNames,
11660 : { 0, NULL },
11661 : { 0, NULL },
11662 : },
11663 : { .name = NULL }
11664 : };
11665 :
11666 : static const char * const wkssvc_endpoint_strings[] = {
11667 : "ncacn_np:[\\pipe\\wkssvc]",
11668 : "ncacn_ip_tcp:",
11669 : "ncalrpc:",
11670 : };
11671 :
11672 : static const struct ndr_interface_string_array wkssvc_endpoints = {
11673 : .count = 3,
11674 : .names = wkssvc_endpoint_strings
11675 : };
11676 :
11677 : static const char * const wkssvc_authservice_strings[] = {
11678 : "host",
11679 : };
11680 :
11681 : static const struct ndr_interface_string_array wkssvc_authservices = {
11682 : .count = 1,
11683 : .names = wkssvc_authservice_strings
11684 : };
11685 :
11686 :
11687 : const struct ndr_interface_table ndr_table_wkssvc = {
11688 : .name = "wkssvc",
11689 : .syntax_id = {
11690 : {0x6bffd098,0xa112,0x3610,{0x98,0x33},{0x46,0xc3,0xf8,0x7e,0x34,0x5a}},
11691 : NDR_WKSSVC_VERSION
11692 : },
11693 : .helpstring = NDR_WKSSVC_HELPSTRING,
11694 : .num_calls = 31,
11695 : .calls = wkssvc_calls,
11696 : .num_public_structs = 0,
11697 : .public_structs = wkssvc_public_structs,
11698 : .endpoints = &wkssvc_endpoints,
11699 : .authservices = &wkssvc_authservices
11700 : };
11701 :
11702 : #endif /* SKIP_NDR_TABLE_wkssvc */
|