1 /* parser auto-generated by pidl */
4 #include "librpc/gen_ndr/ndr_wkssvc.h"
6 #include "librpc/gen_ndr/ndr_srvsvc.h"
7 #include "librpc/gen_ndr/ndr_lsa.h"
8 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo100(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo100
*r
)
10 if (ndr_flags
& NDR_SCALARS
) {
11 NDR_CHECK(ndr_push_align(ndr
, 4));
12 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr
, NDR_SCALARS
, r
->platform_id
));
13 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_name
));
14 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain_name
));
15 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version_major
));
16 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version_minor
));
18 if (ndr_flags
& NDR_BUFFERS
) {
20 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
21 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
22 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
23 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 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
27 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
28 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
29 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 return NDR_ERR_SUCCESS
;
35 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo100(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo100
*r
)
37 uint32_t _ptr_server_name
;
38 TALLOC_CTX
*_mem_save_server_name_0
;
39 uint32_t _ptr_domain_name
;
40 TALLOC_CTX
*_mem_save_domain_name_0
;
41 if (ndr_flags
& NDR_SCALARS
) {
42 NDR_CHECK(ndr_pull_align(ndr
, 4));
43 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr
, NDR_SCALARS
, &r
->platform_id
));
44 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
45 if (_ptr_server_name
) {
46 NDR_PULL_ALLOC(ndr
, r
->server_name
);
48 r
->server_name
= NULL
;
50 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_name
));
51 if (_ptr_domain_name
) {
52 NDR_PULL_ALLOC(ndr
, r
->domain_name
);
54 r
->domain_name
= NULL
;
56 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version_major
));
57 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version_minor
));
59 if (ndr_flags
& NDR_BUFFERS
) {
61 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
62 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_name
, 0);
63 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_name
));
64 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_name
));
65 if (ndr_get_array_length(ndr
, &r
->server_name
) > ndr_get_array_size(ndr
, &r
->server_name
)) {
66 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->server_name
), ndr_get_array_length(ndr
, &r
->server_name
));
68 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t)));
69 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_name
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t), CH_UTF16
));
70 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
73 _mem_save_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
74 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain_name
, 0);
75 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domain_name
));
76 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->domain_name
));
77 if (ndr_get_array_length(ndr
, &r
->domain_name
) > ndr_get_array_size(ndr
, &r
->domain_name
)) {
78 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->domain_name
), ndr_get_array_length(ndr
, &r
->domain_name
));
80 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t)));
81 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->domain_name
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t), CH_UTF16
));
82 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_name_0
, 0);
85 return NDR_ERR_SUCCESS
;
88 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo100(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo100
*r
)
90 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo100");
92 ndr_print_srvsvc_PlatformId(ndr
, "platform_id", r
->platform_id
);
93 ndr_print_ptr(ndr
, "server_name", r
->server_name
);
96 ndr_print_string(ndr
, "server_name", r
->server_name
);
99 ndr_print_ptr(ndr
, "domain_name", r
->domain_name
);
101 if (r
->domain_name
) {
102 ndr_print_string(ndr
, "domain_name", r
->domain_name
);
105 ndr_print_uint32(ndr
, "version_major", r
->version_major
);
106 ndr_print_uint32(ndr
, "version_minor", r
->version_minor
);
110 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo101(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo101
*r
)
112 if (ndr_flags
& NDR_SCALARS
) {
113 NDR_CHECK(ndr_push_align(ndr
, 4));
114 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr
, NDR_SCALARS
, r
->platform_id
));
115 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_name
));
116 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain_name
));
117 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version_major
));
118 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version_minor
));
119 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->lan_root
));
121 if (ndr_flags
& NDR_BUFFERS
) {
122 if (r
->server_name
) {
123 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
124 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
125 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
126 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server_name
, ndr_charset_length(r
->server_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
128 if (r
->domain_name
) {
129 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
130 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
131 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
132 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->domain_name
, ndr_charset_length(r
->domain_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
135 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->lan_root
, CH_UTF16
)));
136 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
137 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->lan_root
, CH_UTF16
)));
138 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->lan_root
, ndr_charset_length(r
->lan_root
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
141 return NDR_ERR_SUCCESS
;
144 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo101(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo101
*r
)
146 uint32_t _ptr_server_name
;
147 TALLOC_CTX
*_mem_save_server_name_0
;
148 uint32_t _ptr_domain_name
;
149 TALLOC_CTX
*_mem_save_domain_name_0
;
150 uint32_t _ptr_lan_root
;
151 TALLOC_CTX
*_mem_save_lan_root_0
;
152 if (ndr_flags
& NDR_SCALARS
) {
153 NDR_CHECK(ndr_pull_align(ndr
, 4));
154 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr
, NDR_SCALARS
, &r
->platform_id
));
155 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
156 if (_ptr_server_name
) {
157 NDR_PULL_ALLOC(ndr
, r
->server_name
);
159 r
->server_name
= NULL
;
161 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_name
));
162 if (_ptr_domain_name
) {
163 NDR_PULL_ALLOC(ndr
, r
->domain_name
);
165 r
->domain_name
= NULL
;
167 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version_major
));
168 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version_minor
));
169 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_lan_root
));
171 NDR_PULL_ALLOC(ndr
, r
->lan_root
);
176 if (ndr_flags
& NDR_BUFFERS
) {
177 if (r
->server_name
) {
178 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
179 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_name
, 0);
180 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_name
));
181 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_name
));
182 if (ndr_get_array_length(ndr
, &r
->server_name
) > ndr_get_array_size(ndr
, &r
->server_name
)) {
183 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->server_name
), ndr_get_array_length(ndr
, &r
->server_name
));
185 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t)));
186 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_name
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t), CH_UTF16
));
187 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
189 if (r
->domain_name
) {
190 _mem_save_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
191 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain_name
, 0);
192 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domain_name
));
193 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->domain_name
));
194 if (ndr_get_array_length(ndr
, &r
->domain_name
) > ndr_get_array_size(ndr
, &r
->domain_name
)) {
195 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->domain_name
), ndr_get_array_length(ndr
, &r
->domain_name
));
197 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t)));
198 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->domain_name
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t), CH_UTF16
));
199 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_name_0
, 0);
202 _mem_save_lan_root_0
= NDR_PULL_GET_MEM_CTX(ndr
);
203 NDR_PULL_SET_MEM_CTX(ndr
, r
->lan_root
, 0);
204 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->lan_root
));
205 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->lan_root
));
206 if (ndr_get_array_length(ndr
, &r
->lan_root
) > ndr_get_array_size(ndr
, &r
->lan_root
)) {
207 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->lan_root
), ndr_get_array_length(ndr
, &r
->lan_root
));
209 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->lan_root
), sizeof(uint16_t)));
210 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->lan_root
, ndr_get_array_length(ndr
, &r
->lan_root
), sizeof(uint16_t), CH_UTF16
));
211 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_lan_root_0
, 0);
214 return NDR_ERR_SUCCESS
;
217 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo101(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo101
*r
)
219 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo101");
221 ndr_print_srvsvc_PlatformId(ndr
, "platform_id", r
->platform_id
);
222 ndr_print_ptr(ndr
, "server_name", r
->server_name
);
224 if (r
->server_name
) {
225 ndr_print_string(ndr
, "server_name", r
->server_name
);
228 ndr_print_ptr(ndr
, "domain_name", r
->domain_name
);
230 if (r
->domain_name
) {
231 ndr_print_string(ndr
, "domain_name", r
->domain_name
);
234 ndr_print_uint32(ndr
, "version_major", r
->version_major
);
235 ndr_print_uint32(ndr
, "version_minor", r
->version_minor
);
236 ndr_print_ptr(ndr
, "lan_root", r
->lan_root
);
239 ndr_print_string(ndr
, "lan_root", r
->lan_root
);
245 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo102(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo102
*r
)
247 if (ndr_flags
& NDR_SCALARS
) {
248 NDR_CHECK(ndr_push_align(ndr
, 4));
249 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr
, NDR_SCALARS
, r
->platform_id
));
250 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_name
));
251 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain_name
));
252 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version_major
));
253 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version_minor
));
254 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->lan_root
));
255 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->logged_on_users
));
257 if (ndr_flags
& NDR_BUFFERS
) {
258 if (r
->server_name
) {
259 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
260 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
261 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
262 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server_name
, ndr_charset_length(r
->server_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
264 if (r
->domain_name
) {
265 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
266 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
267 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
268 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->domain_name
, ndr_charset_length(r
->domain_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
271 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->lan_root
, CH_UTF16
)));
272 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
273 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->lan_root
, CH_UTF16
)));
274 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->lan_root
, ndr_charset_length(r
->lan_root
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
277 return NDR_ERR_SUCCESS
;
280 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo102(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo102
*r
)
282 uint32_t _ptr_server_name
;
283 TALLOC_CTX
*_mem_save_server_name_0
;
284 uint32_t _ptr_domain_name
;
285 TALLOC_CTX
*_mem_save_domain_name_0
;
286 uint32_t _ptr_lan_root
;
287 TALLOC_CTX
*_mem_save_lan_root_0
;
288 if (ndr_flags
& NDR_SCALARS
) {
289 NDR_CHECK(ndr_pull_align(ndr
, 4));
290 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr
, NDR_SCALARS
, &r
->platform_id
));
291 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
292 if (_ptr_server_name
) {
293 NDR_PULL_ALLOC(ndr
, r
->server_name
);
295 r
->server_name
= NULL
;
297 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_name
));
298 if (_ptr_domain_name
) {
299 NDR_PULL_ALLOC(ndr
, r
->domain_name
);
301 r
->domain_name
= NULL
;
303 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version_major
));
304 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version_minor
));
305 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_lan_root
));
307 NDR_PULL_ALLOC(ndr
, r
->lan_root
);
311 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->logged_on_users
));
313 if (ndr_flags
& NDR_BUFFERS
) {
314 if (r
->server_name
) {
315 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
316 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_name
, 0);
317 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_name
));
318 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_name
));
319 if (ndr_get_array_length(ndr
, &r
->server_name
) > ndr_get_array_size(ndr
, &r
->server_name
)) {
320 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->server_name
), ndr_get_array_length(ndr
, &r
->server_name
));
322 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t)));
323 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_name
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t), CH_UTF16
));
324 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
326 if (r
->domain_name
) {
327 _mem_save_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
328 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain_name
, 0);
329 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domain_name
));
330 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->domain_name
));
331 if (ndr_get_array_length(ndr
, &r
->domain_name
) > ndr_get_array_size(ndr
, &r
->domain_name
)) {
332 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->domain_name
), ndr_get_array_length(ndr
, &r
->domain_name
));
334 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t)));
335 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->domain_name
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t), CH_UTF16
));
336 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_name_0
, 0);
339 _mem_save_lan_root_0
= NDR_PULL_GET_MEM_CTX(ndr
);
340 NDR_PULL_SET_MEM_CTX(ndr
, r
->lan_root
, 0);
341 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->lan_root
));
342 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->lan_root
));
343 if (ndr_get_array_length(ndr
, &r
->lan_root
) > ndr_get_array_size(ndr
, &r
->lan_root
)) {
344 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->lan_root
), ndr_get_array_length(ndr
, &r
->lan_root
));
346 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->lan_root
), sizeof(uint16_t)));
347 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->lan_root
, ndr_get_array_length(ndr
, &r
->lan_root
), sizeof(uint16_t), CH_UTF16
));
348 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_lan_root_0
, 0);
351 return NDR_ERR_SUCCESS
;
354 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo102(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo102
*r
)
356 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo102");
358 ndr_print_srvsvc_PlatformId(ndr
, "platform_id", r
->platform_id
);
359 ndr_print_ptr(ndr
, "server_name", r
->server_name
);
361 if (r
->server_name
) {
362 ndr_print_string(ndr
, "server_name", r
->server_name
);
365 ndr_print_ptr(ndr
, "domain_name", r
->domain_name
);
367 if (r
->domain_name
) {
368 ndr_print_string(ndr
, "domain_name", r
->domain_name
);
371 ndr_print_uint32(ndr
, "version_major", r
->version_major
);
372 ndr_print_uint32(ndr
, "version_minor", r
->version_minor
);
373 ndr_print_ptr(ndr
, "lan_root", r
->lan_root
);
376 ndr_print_string(ndr
, "lan_root", r
->lan_root
);
379 ndr_print_uint32(ndr
, "logged_on_users", r
->logged_on_users
);
383 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo502(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo502
*r
)
385 if (ndr_flags
& NDR_SCALARS
) {
386 NDR_CHECK(ndr_push_align(ndr
, 4));
387 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->char_wait
));
388 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->collection_time
));
389 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->maximum_collection_count
));
390 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->keep_connection
));
391 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_commands
));
392 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->session_timeout
));
393 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size_char_buf
));
394 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_threads
));
395 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->lock_quota
));
396 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->lock_increment
));
397 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->lock_maximum
));
398 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pipe_increment
));
399 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pipe_maximum
));
400 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->cache_file_timeout
));
401 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->dormant_file_limit
));
402 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->read_ahead_throughput
));
403 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_mailslot_buffers
));
404 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_srv_announce_buffers
));
405 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_illegal_dgram_events
));
406 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->dgram_event_reset_freq
));
407 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->log_election_packets
));
408 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_opportunistic_locking
));
409 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_unlock_behind
));
410 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_close_behind
));
411 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->buf_named_pipes
));
412 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_lock_read_unlock
));
413 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->utilize_nt_caching
));
414 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_raw_read
));
415 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_raw_write
));
416 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_write_raw_data
));
417 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_encryption
));
418 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->buf_files_deny_write
));
419 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->buf_read_only_files
));
420 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->force_core_create_mode
));
421 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_512_byte_max_transfer
));
423 if (ndr_flags
& NDR_BUFFERS
) {
425 return NDR_ERR_SUCCESS
;
428 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo502(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo502
*r
)
430 if (ndr_flags
& NDR_SCALARS
) {
431 NDR_CHECK(ndr_pull_align(ndr
, 4));
432 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->char_wait
));
433 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->collection_time
));
434 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->maximum_collection_count
));
435 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->keep_connection
));
436 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_commands
));
437 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->session_timeout
));
438 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size_char_buf
));
439 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_threads
));
440 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->lock_quota
));
441 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->lock_increment
));
442 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->lock_maximum
));
443 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pipe_increment
));
444 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pipe_maximum
));
445 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->cache_file_timeout
));
446 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->dormant_file_limit
));
447 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->read_ahead_throughput
));
448 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_mailslot_buffers
));
449 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_srv_announce_buffers
));
450 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_illegal_dgram_events
));
451 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->dgram_event_reset_freq
));
452 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->log_election_packets
));
453 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_opportunistic_locking
));
454 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_unlock_behind
));
455 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_close_behind
));
456 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->buf_named_pipes
));
457 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_lock_read_unlock
));
458 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->utilize_nt_caching
));
459 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_raw_read
));
460 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_raw_write
));
461 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_write_raw_data
));
462 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_encryption
));
463 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->buf_files_deny_write
));
464 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->buf_read_only_files
));
465 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->force_core_create_mode
));
466 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_512_byte_max_transfer
));
468 if (ndr_flags
& NDR_BUFFERS
) {
470 return NDR_ERR_SUCCESS
;
473 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo502(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo502
*r
)
475 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo502");
477 ndr_print_uint32(ndr
, "char_wait", r
->char_wait
);
478 ndr_print_uint32(ndr
, "collection_time", r
->collection_time
);
479 ndr_print_uint32(ndr
, "maximum_collection_count", r
->maximum_collection_count
);
480 ndr_print_uint32(ndr
, "keep_connection", r
->keep_connection
);
481 ndr_print_uint32(ndr
, "max_commands", r
->max_commands
);
482 ndr_print_uint32(ndr
, "session_timeout", r
->session_timeout
);
483 ndr_print_uint32(ndr
, "size_char_buf", r
->size_char_buf
);
484 ndr_print_uint32(ndr
, "max_threads", r
->max_threads
);
485 ndr_print_uint32(ndr
, "lock_quota", r
->lock_quota
);
486 ndr_print_uint32(ndr
, "lock_increment", r
->lock_increment
);
487 ndr_print_uint32(ndr
, "lock_maximum", r
->lock_maximum
);
488 ndr_print_uint32(ndr
, "pipe_increment", r
->pipe_increment
);
489 ndr_print_uint32(ndr
, "pipe_maximum", r
->pipe_maximum
);
490 ndr_print_uint32(ndr
, "cache_file_timeout", r
->cache_file_timeout
);
491 ndr_print_uint32(ndr
, "dormant_file_limit", r
->dormant_file_limit
);
492 ndr_print_uint32(ndr
, "read_ahead_throughput", r
->read_ahead_throughput
);
493 ndr_print_uint32(ndr
, "num_mailslot_buffers", r
->num_mailslot_buffers
);
494 ndr_print_uint32(ndr
, "num_srv_announce_buffers", r
->num_srv_announce_buffers
);
495 ndr_print_uint32(ndr
, "max_illegal_dgram_events", r
->max_illegal_dgram_events
);
496 ndr_print_uint32(ndr
, "dgram_event_reset_freq", r
->dgram_event_reset_freq
);
497 ndr_print_uint32(ndr
, "log_election_packets", r
->log_election_packets
);
498 ndr_print_uint32(ndr
, "use_opportunistic_locking", r
->use_opportunistic_locking
);
499 ndr_print_uint32(ndr
, "use_unlock_behind", r
->use_unlock_behind
);
500 ndr_print_uint32(ndr
, "use_close_behind", r
->use_close_behind
);
501 ndr_print_uint32(ndr
, "buf_named_pipes", r
->buf_named_pipes
);
502 ndr_print_uint32(ndr
, "use_lock_read_unlock", r
->use_lock_read_unlock
);
503 ndr_print_uint32(ndr
, "utilize_nt_caching", r
->utilize_nt_caching
);
504 ndr_print_uint32(ndr
, "use_raw_read", r
->use_raw_read
);
505 ndr_print_uint32(ndr
, "use_raw_write", r
->use_raw_write
);
506 ndr_print_uint32(ndr
, "use_write_raw_data", r
->use_write_raw_data
);
507 ndr_print_uint32(ndr
, "use_encryption", r
->use_encryption
);
508 ndr_print_uint32(ndr
, "buf_files_deny_write", r
->buf_files_deny_write
);
509 ndr_print_uint32(ndr
, "buf_read_only_files", r
->buf_read_only_files
);
510 ndr_print_uint32(ndr
, "force_core_create_mode", r
->force_core_create_mode
);
511 ndr_print_uint32(ndr
, "use_512_byte_max_transfer", r
->use_512_byte_max_transfer
);
515 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1010(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1010
*r
)
517 if (ndr_flags
& NDR_SCALARS
) {
518 NDR_CHECK(ndr_push_align(ndr
, 4));
519 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->char_wait
));
521 if (ndr_flags
& NDR_BUFFERS
) {
523 return NDR_ERR_SUCCESS
;
526 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1010(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1010
*r
)
528 if (ndr_flags
& NDR_SCALARS
) {
529 NDR_CHECK(ndr_pull_align(ndr
, 4));
530 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->char_wait
));
532 if (ndr_flags
& NDR_BUFFERS
) {
534 return NDR_ERR_SUCCESS
;
537 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1010(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1010
*r
)
539 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1010");
541 ndr_print_uint32(ndr
, "char_wait", r
->char_wait
);
545 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1011(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1011
*r
)
547 if (ndr_flags
& NDR_SCALARS
) {
548 NDR_CHECK(ndr_push_align(ndr
, 4));
549 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->collection_time
));
551 if (ndr_flags
& NDR_BUFFERS
) {
553 return NDR_ERR_SUCCESS
;
556 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1011(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1011
*r
)
558 if (ndr_flags
& NDR_SCALARS
) {
559 NDR_CHECK(ndr_pull_align(ndr
, 4));
560 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->collection_time
));
562 if (ndr_flags
& NDR_BUFFERS
) {
564 return NDR_ERR_SUCCESS
;
567 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1011(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1011
*r
)
569 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1011");
571 ndr_print_uint32(ndr
, "collection_time", r
->collection_time
);
575 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1012(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1012
*r
)
577 if (ndr_flags
& NDR_SCALARS
) {
578 NDR_CHECK(ndr_push_align(ndr
, 4));
579 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->maximum_collection_count
));
581 if (ndr_flags
& NDR_BUFFERS
) {
583 return NDR_ERR_SUCCESS
;
586 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1012(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1012
*r
)
588 if (ndr_flags
& NDR_SCALARS
) {
589 NDR_CHECK(ndr_pull_align(ndr
, 4));
590 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->maximum_collection_count
));
592 if (ndr_flags
& NDR_BUFFERS
) {
594 return NDR_ERR_SUCCESS
;
597 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1012(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1012
*r
)
599 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1012");
601 ndr_print_uint32(ndr
, "maximum_collection_count", r
->maximum_collection_count
);
605 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1013(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1013
*r
)
607 if (ndr_flags
& NDR_SCALARS
) {
608 NDR_CHECK(ndr_push_align(ndr
, 4));
609 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->keep_connection
));
611 if (ndr_flags
& NDR_BUFFERS
) {
613 return NDR_ERR_SUCCESS
;
616 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1013(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1013
*r
)
618 if (ndr_flags
& NDR_SCALARS
) {
619 NDR_CHECK(ndr_pull_align(ndr
, 4));
620 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->keep_connection
));
622 if (ndr_flags
& NDR_BUFFERS
) {
624 return NDR_ERR_SUCCESS
;
627 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1013(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1013
*r
)
629 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1013");
631 ndr_print_uint32(ndr
, "keep_connection", r
->keep_connection
);
635 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1018(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1018
*r
)
637 if (ndr_flags
& NDR_SCALARS
) {
638 NDR_CHECK(ndr_push_align(ndr
, 4));
639 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->session_timeout
));
641 if (ndr_flags
& NDR_BUFFERS
) {
643 return NDR_ERR_SUCCESS
;
646 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1018(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1018
*r
)
648 if (ndr_flags
& NDR_SCALARS
) {
649 NDR_CHECK(ndr_pull_align(ndr
, 4));
650 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->session_timeout
));
652 if (ndr_flags
& NDR_BUFFERS
) {
654 return NDR_ERR_SUCCESS
;
657 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1018(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1018
*r
)
659 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1018");
661 ndr_print_uint32(ndr
, "session_timeout", r
->session_timeout
);
665 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1023(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1023
*r
)
667 if (ndr_flags
& NDR_SCALARS
) {
668 NDR_CHECK(ndr_push_align(ndr
, 4));
669 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size_char_buf
));
671 if (ndr_flags
& NDR_BUFFERS
) {
673 return NDR_ERR_SUCCESS
;
676 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1023(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1023
*r
)
678 if (ndr_flags
& NDR_SCALARS
) {
679 NDR_CHECK(ndr_pull_align(ndr
, 4));
680 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size_char_buf
));
682 if (ndr_flags
& NDR_BUFFERS
) {
684 return NDR_ERR_SUCCESS
;
687 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1023(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1023
*r
)
689 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1023");
691 ndr_print_uint32(ndr
, "size_char_buf", r
->size_char_buf
);
695 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1027(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1027
*r
)
697 if (ndr_flags
& NDR_SCALARS
) {
698 NDR_CHECK(ndr_push_align(ndr
, 4));
699 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->errorlog_sz
));
701 if (ndr_flags
& NDR_BUFFERS
) {
703 return NDR_ERR_SUCCESS
;
706 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1027(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1027
*r
)
708 if (ndr_flags
& NDR_SCALARS
) {
709 NDR_CHECK(ndr_pull_align(ndr
, 4));
710 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->errorlog_sz
));
712 if (ndr_flags
& NDR_BUFFERS
) {
714 return NDR_ERR_SUCCESS
;
717 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1027(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1027
*r
)
719 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1027");
721 ndr_print_uint32(ndr
, "errorlog_sz", r
->errorlog_sz
);
725 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1028(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1028
*r
)
727 if (ndr_flags
& NDR_SCALARS
) {
728 NDR_CHECK(ndr_push_align(ndr
, 4));
729 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->print_buf_time
));
731 if (ndr_flags
& NDR_BUFFERS
) {
733 return NDR_ERR_SUCCESS
;
736 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1028(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1028
*r
)
738 if (ndr_flags
& NDR_SCALARS
) {
739 NDR_CHECK(ndr_pull_align(ndr
, 4));
740 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->print_buf_time
));
742 if (ndr_flags
& NDR_BUFFERS
) {
744 return NDR_ERR_SUCCESS
;
747 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1028(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1028
*r
)
749 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1028");
751 ndr_print_uint32(ndr
, "print_buf_time", r
->print_buf_time
);
755 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1032(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1032
*r
)
757 if (ndr_flags
& NDR_SCALARS
) {
758 NDR_CHECK(ndr_push_align(ndr
, 4));
759 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->wrk_heuristics
));
761 if (ndr_flags
& NDR_BUFFERS
) {
763 return NDR_ERR_SUCCESS
;
766 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1032(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1032
*r
)
768 if (ndr_flags
& NDR_SCALARS
) {
769 NDR_CHECK(ndr_pull_align(ndr
, 4));
770 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->wrk_heuristics
));
772 if (ndr_flags
& NDR_BUFFERS
) {
774 return NDR_ERR_SUCCESS
;
777 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1032(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1032
*r
)
779 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1032");
781 ndr_print_uint32(ndr
, "wrk_heuristics", r
->wrk_heuristics
);
785 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1033(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1033
*r
)
787 if (ndr_flags
& NDR_SCALARS
) {
788 NDR_CHECK(ndr_push_align(ndr
, 4));
789 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_threads
));
791 if (ndr_flags
& NDR_BUFFERS
) {
793 return NDR_ERR_SUCCESS
;
796 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1033(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1033
*r
)
798 if (ndr_flags
& NDR_SCALARS
) {
799 NDR_CHECK(ndr_pull_align(ndr
, 4));
800 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_threads
));
802 if (ndr_flags
& NDR_BUFFERS
) {
804 return NDR_ERR_SUCCESS
;
807 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1033(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1033
*r
)
809 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1033");
811 ndr_print_uint32(ndr
, "max_threads", r
->max_threads
);
815 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1041(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1041
*r
)
817 if (ndr_flags
& NDR_SCALARS
) {
818 NDR_CHECK(ndr_push_align(ndr
, 4));
819 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->lock_quota
));
821 if (ndr_flags
& NDR_BUFFERS
) {
823 return NDR_ERR_SUCCESS
;
826 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1041(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1041
*r
)
828 if (ndr_flags
& NDR_SCALARS
) {
829 NDR_CHECK(ndr_pull_align(ndr
, 4));
830 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->lock_quota
));
832 if (ndr_flags
& NDR_BUFFERS
) {
834 return NDR_ERR_SUCCESS
;
837 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1041(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1041
*r
)
839 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1041");
841 ndr_print_uint32(ndr
, "lock_quota", r
->lock_quota
);
845 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1042(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1042
*r
)
847 if (ndr_flags
& NDR_SCALARS
) {
848 NDR_CHECK(ndr_push_align(ndr
, 4));
849 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->lock_increment
));
851 if (ndr_flags
& NDR_BUFFERS
) {
853 return NDR_ERR_SUCCESS
;
856 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1042(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1042
*r
)
858 if (ndr_flags
& NDR_SCALARS
) {
859 NDR_CHECK(ndr_pull_align(ndr
, 4));
860 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->lock_increment
));
862 if (ndr_flags
& NDR_BUFFERS
) {
864 return NDR_ERR_SUCCESS
;
867 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1042(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1042
*r
)
869 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1042");
871 ndr_print_uint32(ndr
, "lock_increment", r
->lock_increment
);
875 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1043(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1043
*r
)
877 if (ndr_flags
& NDR_SCALARS
) {
878 NDR_CHECK(ndr_push_align(ndr
, 4));
879 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->lock_maximum
));
881 if (ndr_flags
& NDR_BUFFERS
) {
883 return NDR_ERR_SUCCESS
;
886 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1043(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1043
*r
)
888 if (ndr_flags
& NDR_SCALARS
) {
889 NDR_CHECK(ndr_pull_align(ndr
, 4));
890 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->lock_maximum
));
892 if (ndr_flags
& NDR_BUFFERS
) {
894 return NDR_ERR_SUCCESS
;
897 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1043(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1043
*r
)
899 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1043");
901 ndr_print_uint32(ndr
, "lock_maximum", r
->lock_maximum
);
905 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1044(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1044
*r
)
907 if (ndr_flags
& NDR_SCALARS
) {
908 NDR_CHECK(ndr_push_align(ndr
, 4));
909 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pipe_increment
));
911 if (ndr_flags
& NDR_BUFFERS
) {
913 return NDR_ERR_SUCCESS
;
916 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1044(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1044
*r
)
918 if (ndr_flags
& NDR_SCALARS
) {
919 NDR_CHECK(ndr_pull_align(ndr
, 4));
920 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pipe_increment
));
922 if (ndr_flags
& NDR_BUFFERS
) {
924 return NDR_ERR_SUCCESS
;
927 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1044(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1044
*r
)
929 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1044");
931 ndr_print_uint32(ndr
, "pipe_increment", r
->pipe_increment
);
935 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1045(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1045
*r
)
937 if (ndr_flags
& NDR_SCALARS
) {
938 NDR_CHECK(ndr_push_align(ndr
, 4));
939 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pipe_maximum
));
941 if (ndr_flags
& NDR_BUFFERS
) {
943 return NDR_ERR_SUCCESS
;
946 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1045(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1045
*r
)
948 if (ndr_flags
& NDR_SCALARS
) {
949 NDR_CHECK(ndr_pull_align(ndr
, 4));
950 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pipe_maximum
));
952 if (ndr_flags
& NDR_BUFFERS
) {
954 return NDR_ERR_SUCCESS
;
957 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1045(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1045
*r
)
959 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1045");
961 ndr_print_uint32(ndr
, "pipe_maximum", r
->pipe_maximum
);
965 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1046(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1046
*r
)
967 if (ndr_flags
& NDR_SCALARS
) {
968 NDR_CHECK(ndr_push_align(ndr
, 4));
969 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->dormant_file_limit
));
971 if (ndr_flags
& NDR_BUFFERS
) {
973 return NDR_ERR_SUCCESS
;
976 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1046(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1046
*r
)
978 if (ndr_flags
& NDR_SCALARS
) {
979 NDR_CHECK(ndr_pull_align(ndr
, 4));
980 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->dormant_file_limit
));
982 if (ndr_flags
& NDR_BUFFERS
) {
984 return NDR_ERR_SUCCESS
;
987 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1046(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1046
*r
)
989 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1046");
991 ndr_print_uint32(ndr
, "dormant_file_limit", r
->dormant_file_limit
);
995 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1047(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1047
*r
)
997 if (ndr_flags
& NDR_SCALARS
) {
998 NDR_CHECK(ndr_push_align(ndr
, 4));
999 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->cache_file_timeout
));
1001 if (ndr_flags
& NDR_BUFFERS
) {
1003 return NDR_ERR_SUCCESS
;
1006 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1047(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1047
*r
)
1008 if (ndr_flags
& NDR_SCALARS
) {
1009 NDR_CHECK(ndr_pull_align(ndr
, 4));
1010 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->cache_file_timeout
));
1012 if (ndr_flags
& NDR_BUFFERS
) {
1014 return NDR_ERR_SUCCESS
;
1017 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1047(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1047
*r
)
1019 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1047");
1021 ndr_print_uint32(ndr
, "cache_file_timeout", r
->cache_file_timeout
);
1025 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1048(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1048
*r
)
1027 if (ndr_flags
& NDR_SCALARS
) {
1028 NDR_CHECK(ndr_push_align(ndr
, 4));
1029 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_opportunistic_locking
));
1031 if (ndr_flags
& NDR_BUFFERS
) {
1033 return NDR_ERR_SUCCESS
;
1036 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1048(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1048
*r
)
1038 if (ndr_flags
& NDR_SCALARS
) {
1039 NDR_CHECK(ndr_pull_align(ndr
, 4));
1040 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_opportunistic_locking
));
1042 if (ndr_flags
& NDR_BUFFERS
) {
1044 return NDR_ERR_SUCCESS
;
1047 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1048(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1048
*r
)
1049 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1048");
1051 ndr_print_uint32(ndr
, "use_opportunistic_locking", r
->use_opportunistic_locking
);
1055 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1049(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1049
*r
)
1057 if (ndr_flags
& NDR_SCALARS
) {
1058 NDR_CHECK(ndr_push_align(ndr
, 4));
1059 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_unlock_behind
));
1061 if (ndr_flags
& NDR_BUFFERS
) {
1063 return NDR_ERR_SUCCESS
;
1066 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1049(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1049
*r
)
1068 if (ndr_flags
& NDR_SCALARS
) {
1069 NDR_CHECK(ndr_pull_align(ndr
, 4));
1070 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_unlock_behind
));
1072 if (ndr_flags
& NDR_BUFFERS
) {
1074 return NDR_ERR_SUCCESS
;
1077 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1049(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1049
*r
)
1079 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1049");
1081 ndr_print_uint32(ndr
, "use_unlock_behind", r
->use_unlock_behind
);
1085 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1050(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1050
*r
)
1087 if (ndr_flags
& NDR_SCALARS
) {
1088 NDR_CHECK(ndr_push_align(ndr
, 4));
1089 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_close_behind
));
1091 if (ndr_flags
& NDR_BUFFERS
) {
1093 return NDR_ERR_SUCCESS
;
1096 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1050(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1050
*r
)
1098 if (ndr_flags
& NDR_SCALARS
) {
1099 NDR_CHECK(ndr_pull_align(ndr
, 4));
1100 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_close_behind
));
1102 if (ndr_flags
& NDR_BUFFERS
) {
1104 return NDR_ERR_SUCCESS
;
1107 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1050(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1050
*r
)
1109 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1050");
1111 ndr_print_uint32(ndr
, "use_close_behind", r
->use_close_behind
);
1115 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1051(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1051
*r
)
1117 if (ndr_flags
& NDR_SCALARS
) {
1118 NDR_CHECK(ndr_push_align(ndr
, 4));
1119 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->buf_named_pipes
));
1121 if (ndr_flags
& NDR_BUFFERS
) {
1123 return NDR_ERR_SUCCESS
;
1126 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1051(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1051
*r
)
1128 if (ndr_flags
& NDR_SCALARS
) {
1129 NDR_CHECK(ndr_pull_align(ndr
, 4));
1130 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->buf_named_pipes
));
1132 if (ndr_flags
& NDR_BUFFERS
) {
1134 return NDR_ERR_SUCCESS
;
1137 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1051(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1051
*r
)
1139 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1051");
1141 ndr_print_uint32(ndr
, "buf_named_pipes", r
->buf_named_pipes
);
1145 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1052(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1052
*r
)
1147 if (ndr_flags
& NDR_SCALARS
) {
1148 NDR_CHECK(ndr_push_align(ndr
, 4));
1149 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_lock_read_unlock
));
1151 if (ndr_flags
& NDR_BUFFERS
) {
1153 return NDR_ERR_SUCCESS
;
1156 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1052(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1052
*r
)
1158 if (ndr_flags
& NDR_SCALARS
) {
1159 NDR_CHECK(ndr_pull_align(ndr
, 4));
1160 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_lock_read_unlock
));
1162 if (ndr_flags
& NDR_BUFFERS
) {
1164 return NDR_ERR_SUCCESS
;
1167 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1052(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1052
*r
)
1169 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1052");
1171 ndr_print_uint32(ndr
, "use_lock_read_unlock", r
->use_lock_read_unlock
);
1175 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1053(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1053
*r
)
1177 if (ndr_flags
& NDR_SCALARS
) {
1178 NDR_CHECK(ndr_push_align(ndr
, 4));
1179 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->utilize_nt_caching
));
1181 if (ndr_flags
& NDR_BUFFERS
) {
1183 return NDR_ERR_SUCCESS
;
1186 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1053(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1053
*r
)
1188 if (ndr_flags
& NDR_SCALARS
) {
1189 NDR_CHECK(ndr_pull_align(ndr
, 4));
1190 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->utilize_nt_caching
));
1192 if (ndr_flags
& NDR_BUFFERS
) {
1194 return NDR_ERR_SUCCESS
;
1197 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1053(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1053
*r
)
1199 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1053");
1201 ndr_print_uint32(ndr
, "utilize_nt_caching", r
->utilize_nt_caching
);
1205 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1054(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1054
*r
)
1207 if (ndr_flags
& NDR_SCALARS
) {
1208 NDR_CHECK(ndr_push_align(ndr
, 4));
1209 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_raw_read
));
1211 if (ndr_flags
& NDR_BUFFERS
) {
1213 return NDR_ERR_SUCCESS
;
1216 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1054(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1054
*r
)
1218 if (ndr_flags
& NDR_SCALARS
) {
1219 NDR_CHECK(ndr_pull_align(ndr
, 4));
1220 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_raw_read
));
1222 if (ndr_flags
& NDR_BUFFERS
) {
1224 return NDR_ERR_SUCCESS
;
1227 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1054(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1054
*r
)
1229 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1054");
1231 ndr_print_uint32(ndr
, "use_raw_read", r
->use_raw_read
);
1235 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1055(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1055
*r
)
1237 if (ndr_flags
& NDR_SCALARS
) {
1238 NDR_CHECK(ndr_push_align(ndr
, 4));
1239 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_raw_write
));
1241 if (ndr_flags
& NDR_BUFFERS
) {
1243 return NDR_ERR_SUCCESS
;
1246 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1055(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1055
*r
)
1248 if (ndr_flags
& NDR_SCALARS
) {
1249 NDR_CHECK(ndr_pull_align(ndr
, 4));
1250 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_raw_write
));
1252 if (ndr_flags
& NDR_BUFFERS
) {
1254 return NDR_ERR_SUCCESS
;
1257 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1055(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1055
*r
)
1259 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1055");
1261 ndr_print_uint32(ndr
, "use_raw_write", r
->use_raw_write
);
1265 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1056(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1056
*r
)
1267 if (ndr_flags
& NDR_SCALARS
) {
1268 NDR_CHECK(ndr_push_align(ndr
, 4));
1269 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_write_raw_data
));
1271 if (ndr_flags
& NDR_BUFFERS
) {
1273 return NDR_ERR_SUCCESS
;
1276 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1056(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1056
*r
)
1278 if (ndr_flags
& NDR_SCALARS
) {
1279 NDR_CHECK(ndr_pull_align(ndr
, 4));
1280 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_write_raw_data
));
1282 if (ndr_flags
& NDR_BUFFERS
) {
1284 return NDR_ERR_SUCCESS
;
1287 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1056(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1056
*r
)
1289 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1056");
1291 ndr_print_uint32(ndr
, "use_write_raw_data", r
->use_write_raw_data
);
1295 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1057(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1057
*r
)
1297 if (ndr_flags
& NDR_SCALARS
) {
1298 NDR_CHECK(ndr_push_align(ndr
, 4));
1299 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_encryption
));
1301 if (ndr_flags
& NDR_BUFFERS
) {
1303 return NDR_ERR_SUCCESS
;
1306 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1057(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1057
*r
)
1308 if (ndr_flags
& NDR_SCALARS
) {
1309 NDR_CHECK(ndr_pull_align(ndr
, 4));
1310 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_encryption
));
1312 if (ndr_flags
& NDR_BUFFERS
) {
1314 return NDR_ERR_SUCCESS
;
1317 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1057(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1057
*r
)
1319 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1057");
1321 ndr_print_uint32(ndr
, "use_encryption", r
->use_encryption
);
1325 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1058(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1058
*r
)
1327 if (ndr_flags
& NDR_SCALARS
) {
1328 NDR_CHECK(ndr_push_align(ndr
, 4));
1329 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->buf_files_deny_write
));
1331 if (ndr_flags
& NDR_BUFFERS
) {
1333 return NDR_ERR_SUCCESS
;
1336 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1058(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1058
*r
)
1338 if (ndr_flags
& NDR_SCALARS
) {
1339 NDR_CHECK(ndr_pull_align(ndr
, 4));
1340 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->buf_files_deny_write
));
1342 if (ndr_flags
& NDR_BUFFERS
) {
1344 return NDR_ERR_SUCCESS
;
1347 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1058(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1058
*r
)
1349 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1058");
1351 ndr_print_uint32(ndr
, "buf_files_deny_write", r
->buf_files_deny_write
);
1355 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1059(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1059
*r
)
1357 if (ndr_flags
& NDR_SCALARS
) {
1358 NDR_CHECK(ndr_push_align(ndr
, 4));
1359 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->buf_read_only_files
));
1361 if (ndr_flags
& NDR_BUFFERS
) {
1363 return NDR_ERR_SUCCESS
;
1366 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1059(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1059
*r
)
1368 if (ndr_flags
& NDR_SCALARS
) {
1369 NDR_CHECK(ndr_pull_align(ndr
, 4));
1370 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->buf_read_only_files
));
1372 if (ndr_flags
& NDR_BUFFERS
) {
1374 return NDR_ERR_SUCCESS
;
1377 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1059(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1059
*r
)
1379 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1059");
1381 ndr_print_uint32(ndr
, "buf_read_only_files", r
->buf_read_only_files
);
1385 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1060(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1060
*r
)
1387 if (ndr_flags
& NDR_SCALARS
) {
1388 NDR_CHECK(ndr_push_align(ndr
, 4));
1389 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->force_core_create_mode
));
1391 if (ndr_flags
& NDR_BUFFERS
) {
1393 return NDR_ERR_SUCCESS
;
1396 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1060(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1060
*r
)
1398 if (ndr_flags
& NDR_SCALARS
) {
1399 NDR_CHECK(ndr_pull_align(ndr
, 4));
1400 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->force_core_create_mode
));
1402 if (ndr_flags
& NDR_BUFFERS
) {
1404 return NDR_ERR_SUCCESS
;
1407 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1060(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1060
*r
)
1409 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1060");
1411 ndr_print_uint32(ndr
, "force_core_create_mode", r
->force_core_create_mode
);
1415 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1061(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1061
*r
)
1417 if (ndr_flags
& NDR_SCALARS
) {
1418 NDR_CHECK(ndr_push_align(ndr
, 4));
1419 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_512_byte_max_transfer
));
1421 if (ndr_flags
& NDR_BUFFERS
) {
1423 return NDR_ERR_SUCCESS
;
1426 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1061(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1061
*r
)
1428 if (ndr_flags
& NDR_SCALARS
) {
1429 NDR_CHECK(ndr_pull_align(ndr
, 4));
1430 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_512_byte_max_transfer
));
1432 if (ndr_flags
& NDR_BUFFERS
) {
1434 return NDR_ERR_SUCCESS
;
1437 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1061(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1061
*r
)
1439 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1061");
1441 ndr_print_uint32(ndr
, "use_512_byte_max_transfer", r
->use_512_byte_max_transfer
);
1445 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo1062(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1062
*r
)
1447 if (ndr_flags
& NDR_SCALARS
) {
1448 NDR_CHECK(ndr_push_align(ndr
, 4));
1449 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->read_ahead_throughput
));
1451 if (ndr_flags
& NDR_BUFFERS
) {
1453 return NDR_ERR_SUCCESS
;
1456 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo1062(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1062
*r
)
1458 if (ndr_flags
& NDR_SCALARS
) {
1459 NDR_CHECK(ndr_pull_align(ndr
, 4));
1460 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->read_ahead_throughput
));
1462 if (ndr_flags
& NDR_BUFFERS
) {
1464 return NDR_ERR_SUCCESS
;
1467 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1062(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1062
*r
)
1469 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1062");
1471 ndr_print_uint32(ndr
, "read_ahead_throughput", r
->read_ahead_throughput
);
1475 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaInfo(struct ndr_push
*ndr
, int ndr_flags
, const union wkssvc_NetWkstaInfo
*r
)
1477 if (ndr_flags
& NDR_SCALARS
) {
1478 int level
= ndr_push_get_switch_value(ndr
, r
);
1479 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
1482 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info100
));
1486 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info101
));
1490 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info102
));
1494 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info502
));
1498 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1010
));
1502 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1011
));
1506 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1012
));
1510 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1013
));
1514 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1018
));
1518 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1023
));
1522 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1027
));
1526 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1028
));
1530 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1032
));
1534 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1033
));
1538 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1041
));
1542 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1042
));
1546 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1043
));
1550 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1044
));
1554 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1045
));
1558 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1046
));
1562 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1047
));
1566 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1048
));
1570 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1049
));
1574 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1050
));
1578 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1051
));
1582 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1052
));
1586 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1053
));
1590 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1054
));
1594 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1055
));
1598 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1056
));
1602 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1057
));
1606 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1058
));
1610 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1059
));
1614 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1060
));
1618 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1061
));
1622 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1062
));
1630 if (ndr_flags
& NDR_BUFFERS
) {
1631 int level
= ndr_push_get_switch_value(ndr
, r
);
1635 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo100(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info100
));
1641 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo101(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info101
));
1647 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo102(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info102
));
1653 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo502(ndr
, NDR_SCALARS
, r
->info502
));
1659 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1010(ndr
, NDR_SCALARS
, r
->info1010
));
1665 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1011(ndr
, NDR_SCALARS
, r
->info1011
));
1671 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1012(ndr
, NDR_SCALARS
, r
->info1012
));
1677 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1013(ndr
, NDR_SCALARS
, r
->info1013
));
1683 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1018(ndr
, NDR_SCALARS
, r
->info1018
));
1689 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1023(ndr
, NDR_SCALARS
, r
->info1023
));
1695 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1027(ndr
, NDR_SCALARS
, r
->info1027
));
1701 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1028(ndr
, NDR_SCALARS
, r
->info1028
));
1707 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1032(ndr
, NDR_SCALARS
, r
->info1032
));
1713 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1033(ndr
, NDR_SCALARS
, r
->info1033
));
1719 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1041(ndr
, NDR_SCALARS
, r
->info1041
));
1725 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1042(ndr
, NDR_SCALARS
, r
->info1042
));
1731 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1043(ndr
, NDR_SCALARS
, r
->info1043
));
1737 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1044(ndr
, NDR_SCALARS
, r
->info1044
));
1743 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1045(ndr
, NDR_SCALARS
, r
->info1045
));
1749 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1046(ndr
, NDR_SCALARS
, r
->info1046
));
1755 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1047(ndr
, NDR_SCALARS
, r
->info1047
));
1761 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1048(ndr
, NDR_SCALARS
, r
->info1048
));
1767 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1049(ndr
, NDR_SCALARS
, r
->info1049
));
1773 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1050(ndr
, NDR_SCALARS
, r
->info1050
));
1779 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1051(ndr
, NDR_SCALARS
, r
->info1051
));
1785 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1052(ndr
, NDR_SCALARS
, r
->info1052
));
1791 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1053(ndr
, NDR_SCALARS
, r
->info1053
));
1797 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1054(ndr
, NDR_SCALARS
, r
->info1054
));
1803 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1055(ndr
, NDR_SCALARS
, r
->info1055
));
1809 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1056(ndr
, NDR_SCALARS
, r
->info1056
));
1815 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1057(ndr
, NDR_SCALARS
, r
->info1057
));
1821 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1058(ndr
, NDR_SCALARS
, r
->info1058
));
1827 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1059(ndr
, NDR_SCALARS
, r
->info1059
));
1833 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1060(ndr
, NDR_SCALARS
, r
->info1060
));
1839 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1061(ndr
, NDR_SCALARS
, r
->info1061
));
1845 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1062(ndr
, NDR_SCALARS
, r
->info1062
));
1854 return NDR_ERR_SUCCESS
;
1857 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaInfo(struct ndr_pull
*ndr
, int ndr_flags
, union wkssvc_NetWkstaInfo
*r
)
1861 TALLOC_CTX
*_mem_save_info100_0
;
1862 TALLOC_CTX
*_mem_save_info101_0
;
1863 TALLOC_CTX
*_mem_save_info102_0
;
1864 TALLOC_CTX
*_mem_save_info502_0
;
1865 TALLOC_CTX
*_mem_save_info1010_0
;
1866 TALLOC_CTX
*_mem_save_info1011_0
;
1867 TALLOC_CTX
*_mem_save_info1012_0
;
1868 TALLOC_CTX
*_mem_save_info1013_0
;
1869 TALLOC_CTX
*_mem_save_info1018_0
;
1870 TALLOC_CTX
*_mem_save_info1023_0
;
1871 TALLOC_CTX
*_mem_save_info1027_0
;
1872 TALLOC_CTX
*_mem_save_info1028_0
;
1873 TALLOC_CTX
*_mem_save_info1032_0
;
1874 TALLOC_CTX
*_mem_save_info1033_0
;
1875 TALLOC_CTX
*_mem_save_info1041_0
;
1876 TALLOC_CTX
*_mem_save_info1042_0
;
1877 TALLOC_CTX
*_mem_save_info1043_0
;
1878 TALLOC_CTX
*_mem_save_info1044_0
;
1879 TALLOC_CTX
*_mem_save_info1045_0
;
1880 TALLOC_CTX
*_mem_save_info1046_0
;
1881 TALLOC_CTX
*_mem_save_info1047_0
;
1882 TALLOC_CTX
*_mem_save_info1048_0
;
1883 TALLOC_CTX
*_mem_save_info1049_0
;
1884 TALLOC_CTX
*_mem_save_info1050_0
;
1885 TALLOC_CTX
*_mem_save_info1051_0
;
1886 TALLOC_CTX
*_mem_save_info1052_0
;
1887 TALLOC_CTX
*_mem_save_info1053_0
;
1888 TALLOC_CTX
*_mem_save_info1054_0
;
1889 TALLOC_CTX
*_mem_save_info1055_0
;
1890 TALLOC_CTX
*_mem_save_info1056_0
;
1891 TALLOC_CTX
*_mem_save_info1057_0
;
1892 TALLOC_CTX
*_mem_save_info1058_0
;
1893 TALLOC_CTX
*_mem_save_info1059_0
;
1894 TALLOC_CTX
*_mem_save_info1060_0
;
1895 TALLOC_CTX
*_mem_save_info1061_0
;
1896 TALLOC_CTX
*_mem_save_info1062_0
;
1897 level
= ndr_pull_get_switch_value(ndr
, r
);
1898 if (ndr_flags
& NDR_SCALARS
) {
1899 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
1900 if (_level
!= level
) {
1901 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
1905 uint32_t _ptr_info100
;
1906 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info100
));
1908 NDR_PULL_ALLOC(ndr
, r
->info100
);
1915 uint32_t _ptr_info101
;
1916 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info101
));
1918 NDR_PULL_ALLOC(ndr
, r
->info101
);
1925 uint32_t _ptr_info102
;
1926 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info102
));
1928 NDR_PULL_ALLOC(ndr
, r
->info102
);
1935 uint32_t _ptr_info502
;
1936 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info502
));
1938 NDR_PULL_ALLOC(ndr
, r
->info502
);
1945 uint32_t _ptr_info1010
;
1946 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1010
));
1947 if (_ptr_info1010
) {
1948 NDR_PULL_ALLOC(ndr
, r
->info1010
);
1955 uint32_t _ptr_info1011
;
1956 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1011
));
1957 if (_ptr_info1011
) {
1958 NDR_PULL_ALLOC(ndr
, r
->info1011
);
1965 uint32_t _ptr_info1012
;
1966 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1012
));
1967 if (_ptr_info1012
) {
1968 NDR_PULL_ALLOC(ndr
, r
->info1012
);
1975 uint32_t _ptr_info1013
;
1976 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1013
));
1977 if (_ptr_info1013
) {
1978 NDR_PULL_ALLOC(ndr
, r
->info1013
);
1985 uint32_t _ptr_info1018
;
1986 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1018
));
1987 if (_ptr_info1018
) {
1988 NDR_PULL_ALLOC(ndr
, r
->info1018
);
1995 uint32_t _ptr_info1023
;
1996 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1023
));
1997 if (_ptr_info1023
) {
1998 NDR_PULL_ALLOC(ndr
, r
->info1023
);
2005 uint32_t _ptr_info1027
;
2006 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1027
));
2007 if (_ptr_info1027
) {
2008 NDR_PULL_ALLOC(ndr
, r
->info1027
);
2015 uint32_t _ptr_info1028
;
2016 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1028
));
2017 if (_ptr_info1028
) {
2018 NDR_PULL_ALLOC(ndr
, r
->info1028
);
2025 uint32_t _ptr_info1032
;
2026 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1032
));
2027 if (_ptr_info1032
) {
2028 NDR_PULL_ALLOC(ndr
, r
->info1032
);
2035 uint32_t _ptr_info1033
;
2036 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1033
));
2037 if (_ptr_info1033
) {
2038 NDR_PULL_ALLOC(ndr
, r
->info1033
);
2045 uint32_t _ptr_info1041
;
2046 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1041
));
2047 if (_ptr_info1041
) {
2048 NDR_PULL_ALLOC(ndr
, r
->info1041
);
2055 uint32_t _ptr_info1042
;
2056 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1042
));
2057 if (_ptr_info1042
) {
2058 NDR_PULL_ALLOC(ndr
, r
->info1042
);
2065 uint32_t _ptr_info1043
;
2066 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1043
));
2067 if (_ptr_info1043
) {
2068 NDR_PULL_ALLOC(ndr
, r
->info1043
);
2075 uint32_t _ptr_info1044
;
2076 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1044
));
2077 if (_ptr_info1044
) {
2078 NDR_PULL_ALLOC(ndr
, r
->info1044
);
2085 uint32_t _ptr_info1045
;
2086 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1045
));
2087 if (_ptr_info1045
) {
2088 NDR_PULL_ALLOC(ndr
, r
->info1045
);
2095 uint32_t _ptr_info1046
;
2096 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1046
));
2097 if (_ptr_info1046
) {
2098 NDR_PULL_ALLOC(ndr
, r
->info1046
);
2105 uint32_t _ptr_info1047
;
2106 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1047
));
2107 if (_ptr_info1047
) {
2108 NDR_PULL_ALLOC(ndr
, r
->info1047
);
2115 uint32_t _ptr_info1048
;
2116 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1048
));
2117 if (_ptr_info1048
) {
2118 NDR_PULL_ALLOC(ndr
, r
->info1048
);
2125 uint32_t _ptr_info1049
;
2126 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1049
));
2127 if (_ptr_info1049
) {
2128 NDR_PULL_ALLOC(ndr
, r
->info1049
);
2135 uint32_t _ptr_info1050
;
2136 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1050
));
2137 if (_ptr_info1050
) {
2138 NDR_PULL_ALLOC(ndr
, r
->info1050
);
2145 uint32_t _ptr_info1051
;
2146 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1051
));
2147 if (_ptr_info1051
) {
2148 NDR_PULL_ALLOC(ndr
, r
->info1051
);
2155 uint32_t _ptr_info1052
;
2156 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1052
));
2157 if (_ptr_info1052
) {
2158 NDR_PULL_ALLOC(ndr
, r
->info1052
);
2165 uint32_t _ptr_info1053
;
2166 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1053
));
2167 if (_ptr_info1053
) {
2168 NDR_PULL_ALLOC(ndr
, r
->info1053
);
2175 uint32_t _ptr_info1054
;
2176 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1054
));
2177 if (_ptr_info1054
) {
2178 NDR_PULL_ALLOC(ndr
, r
->info1054
);
2185 uint32_t _ptr_info1055
;
2186 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1055
));
2187 if (_ptr_info1055
) {
2188 NDR_PULL_ALLOC(ndr
, r
->info1055
);
2195 uint32_t _ptr_info1056
;
2196 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1056
));
2197 if (_ptr_info1056
) {
2198 NDR_PULL_ALLOC(ndr
, r
->info1056
);
2205 uint32_t _ptr_info1057
;
2206 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1057
));
2207 if (_ptr_info1057
) {
2208 NDR_PULL_ALLOC(ndr
, r
->info1057
);
2215 uint32_t _ptr_info1058
;
2216 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1058
));
2217 if (_ptr_info1058
) {
2218 NDR_PULL_ALLOC(ndr
, r
->info1058
);
2225 uint32_t _ptr_info1059
;
2226 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1059
));
2227 if (_ptr_info1059
) {
2228 NDR_PULL_ALLOC(ndr
, r
->info1059
);
2235 uint32_t _ptr_info1060
;
2236 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1060
));
2237 if (_ptr_info1060
) {
2238 NDR_PULL_ALLOC(ndr
, r
->info1060
);
2245 uint32_t _ptr_info1061
;
2246 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1061
));
2247 if (_ptr_info1061
) {
2248 NDR_PULL_ALLOC(ndr
, r
->info1061
);
2255 uint32_t _ptr_info1062
;
2256 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1062
));
2257 if (_ptr_info1062
) {
2258 NDR_PULL_ALLOC(ndr
, r
->info1062
);
2269 if (ndr_flags
& NDR_BUFFERS
) {
2273 _mem_save_info100_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2274 NDR_PULL_SET_MEM_CTX(ndr
, r
->info100
, 0);
2275 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo100(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info100
));
2276 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info100_0
, 0);
2282 _mem_save_info101_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2283 NDR_PULL_SET_MEM_CTX(ndr
, r
->info101
, 0);
2284 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo101(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info101
));
2285 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info101_0
, 0);
2291 _mem_save_info102_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2292 NDR_PULL_SET_MEM_CTX(ndr
, r
->info102
, 0);
2293 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo102(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info102
));
2294 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info102_0
, 0);
2300 _mem_save_info502_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2301 NDR_PULL_SET_MEM_CTX(ndr
, r
->info502
, 0);
2302 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo502(ndr
, NDR_SCALARS
, r
->info502
));
2303 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info502_0
, 0);
2309 _mem_save_info1010_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2310 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1010
, 0);
2311 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1010(ndr
, NDR_SCALARS
, r
->info1010
));
2312 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1010_0
, 0);
2318 _mem_save_info1011_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2319 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1011
, 0);
2320 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1011(ndr
, NDR_SCALARS
, r
->info1011
));
2321 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1011_0
, 0);
2327 _mem_save_info1012_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2328 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1012
, 0);
2329 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1012(ndr
, NDR_SCALARS
, r
->info1012
));
2330 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1012_0
, 0);
2336 _mem_save_info1013_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2337 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1013
, 0);
2338 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1013(ndr
, NDR_SCALARS
, r
->info1013
));
2339 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1013_0
, 0);
2345 _mem_save_info1018_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2346 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1018
, 0);
2347 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1018(ndr
, NDR_SCALARS
, r
->info1018
));
2348 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1018_0
, 0);
2354 _mem_save_info1023_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2355 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1023
, 0);
2356 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1023(ndr
, NDR_SCALARS
, r
->info1023
));
2357 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1023_0
, 0);
2363 _mem_save_info1027_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2364 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1027
, 0);
2365 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1027(ndr
, NDR_SCALARS
, r
->info1027
));
2366 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1027_0
, 0);
2372 _mem_save_info1028_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2373 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1028
, 0);
2374 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1028(ndr
, NDR_SCALARS
, r
->info1028
));
2375 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1028_0
, 0);
2381 _mem_save_info1032_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2382 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1032
, 0);
2383 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1032(ndr
, NDR_SCALARS
, r
->info1032
));
2384 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1032_0
, 0);
2390 _mem_save_info1033_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2391 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1033
, 0);
2392 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1033(ndr
, NDR_SCALARS
, r
->info1033
));
2393 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1033_0
, 0);
2399 _mem_save_info1041_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2400 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1041
, 0);
2401 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1041(ndr
, NDR_SCALARS
, r
->info1041
));
2402 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1041_0
, 0);
2408 _mem_save_info1042_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2409 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1042
, 0);
2410 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1042(ndr
, NDR_SCALARS
, r
->info1042
));
2411 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1042_0
, 0);
2417 _mem_save_info1043_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2418 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1043
, 0);
2419 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1043(ndr
, NDR_SCALARS
, r
->info1043
));
2420 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1043_0
, 0);
2426 _mem_save_info1044_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2427 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1044
, 0);
2428 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1044(ndr
, NDR_SCALARS
, r
->info1044
));
2429 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1044_0
, 0);
2435 _mem_save_info1045_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2436 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1045
, 0);
2437 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1045(ndr
, NDR_SCALARS
, r
->info1045
));
2438 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1045_0
, 0);
2444 _mem_save_info1046_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2445 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1046
, 0);
2446 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1046(ndr
, NDR_SCALARS
, r
->info1046
));
2447 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1046_0
, 0);
2453 _mem_save_info1047_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2454 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1047
, 0);
2455 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1047(ndr
, NDR_SCALARS
, r
->info1047
));
2456 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1047_0
, 0);
2462 _mem_save_info1048_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2463 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1048
, 0);
2464 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1048(ndr
, NDR_SCALARS
, r
->info1048
));
2465 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1048_0
, 0);
2471 _mem_save_info1049_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2472 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1049
, 0);
2473 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1049(ndr
, NDR_SCALARS
, r
->info1049
));
2474 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1049_0
, 0);
2480 _mem_save_info1050_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2481 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1050
, 0);
2482 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1050(ndr
, NDR_SCALARS
, r
->info1050
));
2483 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1050_0
, 0);
2489 _mem_save_info1051_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2490 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1051
, 0);
2491 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1051(ndr
, NDR_SCALARS
, r
->info1051
));
2492 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1051_0
, 0);
2498 _mem_save_info1052_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2499 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1052
, 0);
2500 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1052(ndr
, NDR_SCALARS
, r
->info1052
));
2501 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1052_0
, 0);
2507 _mem_save_info1053_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2508 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1053
, 0);
2509 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1053(ndr
, NDR_SCALARS
, r
->info1053
));
2510 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1053_0
, 0);
2516 _mem_save_info1054_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2517 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1054
, 0);
2518 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1054(ndr
, NDR_SCALARS
, r
->info1054
));
2519 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1054_0
, 0);
2525 _mem_save_info1055_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2526 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1055
, 0);
2527 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1055(ndr
, NDR_SCALARS
, r
->info1055
));
2528 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1055_0
, 0);
2534 _mem_save_info1056_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2535 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1056
, 0);
2536 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1056(ndr
, NDR_SCALARS
, r
->info1056
));
2537 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1056_0
, 0);
2543 _mem_save_info1057_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2544 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1057
, 0);
2545 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1057(ndr
, NDR_SCALARS
, r
->info1057
));
2546 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1057_0
, 0);
2552 _mem_save_info1058_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2553 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1058
, 0);
2554 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1058(ndr
, NDR_SCALARS
, r
->info1058
));
2555 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1058_0
, 0);
2561 _mem_save_info1059_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2562 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1059
, 0);
2563 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1059(ndr
, NDR_SCALARS
, r
->info1059
));
2564 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1059_0
, 0);
2570 _mem_save_info1060_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2571 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1060
, 0);
2572 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1060(ndr
, NDR_SCALARS
, r
->info1060
));
2573 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1060_0
, 0);
2579 _mem_save_info1061_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2580 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1061
, 0);
2581 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1061(ndr
, NDR_SCALARS
, r
->info1061
));
2582 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1061_0
, 0);
2588 _mem_save_info1062_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2589 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1062
, 0);
2590 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1062(ndr
, NDR_SCALARS
, r
->info1062
));
2591 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1062_0
, 0);
2600 return NDR_ERR_SUCCESS
;
2603 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo(struct ndr_print
*ndr
, const char *name
, const union wkssvc_NetWkstaInfo
*r
)
2606 level
= ndr_print_get_switch_value(ndr
, r
);
2607 ndr_print_union(ndr
, name
, level
, "wkssvc_NetWkstaInfo");
2610 ndr_print_ptr(ndr
, "info100", r
->info100
);
2613 ndr_print_wkssvc_NetWkstaInfo100(ndr
, "info100", r
->info100
);
2619 ndr_print_ptr(ndr
, "info101", r
->info101
);
2622 ndr_print_wkssvc_NetWkstaInfo101(ndr
, "info101", r
->info101
);
2628 ndr_print_ptr(ndr
, "info102", r
->info102
);
2631 ndr_print_wkssvc_NetWkstaInfo102(ndr
, "info102", r
->info102
);
2637 ndr_print_ptr(ndr
, "info502", r
->info502
);
2640 ndr_print_wkssvc_NetWkstaInfo502(ndr
, "info502", r
->info502
);
2646 ndr_print_ptr(ndr
, "info1010", r
->info1010
);
2649 ndr_print_wkssvc_NetWkstaInfo1010(ndr
, "info1010", r
->info1010
);
2655 ndr_print_ptr(ndr
, "info1011", r
->info1011
);
2658 ndr_print_wkssvc_NetWkstaInfo1011(ndr
, "info1011", r
->info1011
);
2664 ndr_print_ptr(ndr
, "info1012", r
->info1012
);
2667 ndr_print_wkssvc_NetWkstaInfo1012(ndr
, "info1012", r
->info1012
);
2673 ndr_print_ptr(ndr
, "info1013", r
->info1013
);
2676 ndr_print_wkssvc_NetWkstaInfo1013(ndr
, "info1013", r
->info1013
);
2682 ndr_print_ptr(ndr
, "info1018", r
->info1018
);
2685 ndr_print_wkssvc_NetWkstaInfo1018(ndr
, "info1018", r
->info1018
);
2691 ndr_print_ptr(ndr
, "info1023", r
->info1023
);
2694 ndr_print_wkssvc_NetWkstaInfo1023(ndr
, "info1023", r
->info1023
);
2700 ndr_print_ptr(ndr
, "info1027", r
->info1027
);
2703 ndr_print_wkssvc_NetWkstaInfo1027(ndr
, "info1027", r
->info1027
);
2709 ndr_print_ptr(ndr
, "info1028", r
->info1028
);
2712 ndr_print_wkssvc_NetWkstaInfo1028(ndr
, "info1028", r
->info1028
);
2718 ndr_print_ptr(ndr
, "info1032", r
->info1032
);
2721 ndr_print_wkssvc_NetWkstaInfo1032(ndr
, "info1032", r
->info1032
);
2727 ndr_print_ptr(ndr
, "info1033", r
->info1033
);
2730 ndr_print_wkssvc_NetWkstaInfo1033(ndr
, "info1033", r
->info1033
);
2736 ndr_print_ptr(ndr
, "info1041", r
->info1041
);
2739 ndr_print_wkssvc_NetWkstaInfo1041(ndr
, "info1041", r
->info1041
);
2745 ndr_print_ptr(ndr
, "info1042", r
->info1042
);
2748 ndr_print_wkssvc_NetWkstaInfo1042(ndr
, "info1042", r
->info1042
);
2754 ndr_print_ptr(ndr
, "info1043", r
->info1043
);
2757 ndr_print_wkssvc_NetWkstaInfo1043(ndr
, "info1043", r
->info1043
);
2763 ndr_print_ptr(ndr
, "info1044", r
->info1044
);
2766 ndr_print_wkssvc_NetWkstaInfo1044(ndr
, "info1044", r
->info1044
);
2772 ndr_print_ptr(ndr
, "info1045", r
->info1045
);
2775 ndr_print_wkssvc_NetWkstaInfo1045(ndr
, "info1045", r
->info1045
);
2781 ndr_print_ptr(ndr
, "info1046", r
->info1046
);
2784 ndr_print_wkssvc_NetWkstaInfo1046(ndr
, "info1046", r
->info1046
);
2790 ndr_print_ptr(ndr
, "info1047", r
->info1047
);
2793 ndr_print_wkssvc_NetWkstaInfo1047(ndr
, "info1047", r
->info1047
);
2799 ndr_print_ptr(ndr
, "info1048", r
->info1048
);
2802 ndr_print_wkssvc_NetWkstaInfo1048(ndr
, "info1048", r
->info1048
);
2808 ndr_print_ptr(ndr
, "info1049", r
->info1049
);
2811 ndr_print_wkssvc_NetWkstaInfo1049(ndr
, "info1049", r
->info1049
);
2817 ndr_print_ptr(ndr
, "info1050", r
->info1050
);
2820 ndr_print_wkssvc_NetWkstaInfo1050(ndr
, "info1050", r
->info1050
);
2826 ndr_print_ptr(ndr
, "info1051", r
->info1051
);
2829 ndr_print_wkssvc_NetWkstaInfo1051(ndr
, "info1051", r
->info1051
);
2835 ndr_print_ptr(ndr
, "info1052", r
->info1052
);
2838 ndr_print_wkssvc_NetWkstaInfo1052(ndr
, "info1052", r
->info1052
);
2844 ndr_print_ptr(ndr
, "info1053", r
->info1053
);
2847 ndr_print_wkssvc_NetWkstaInfo1053(ndr
, "info1053", r
->info1053
);
2853 ndr_print_ptr(ndr
, "info1054", r
->info1054
);
2856 ndr_print_wkssvc_NetWkstaInfo1054(ndr
, "info1054", r
->info1054
);
2862 ndr_print_ptr(ndr
, "info1055", r
->info1055
);
2865 ndr_print_wkssvc_NetWkstaInfo1055(ndr
, "info1055", r
->info1055
);
2871 ndr_print_ptr(ndr
, "info1056", r
->info1056
);
2874 ndr_print_wkssvc_NetWkstaInfo1056(ndr
, "info1056", r
->info1056
);
2880 ndr_print_ptr(ndr
, "info1057", r
->info1057
);
2883 ndr_print_wkssvc_NetWkstaInfo1057(ndr
, "info1057", r
->info1057
);
2889 ndr_print_ptr(ndr
, "info1058", r
->info1058
);
2892 ndr_print_wkssvc_NetWkstaInfo1058(ndr
, "info1058", r
->info1058
);
2898 ndr_print_ptr(ndr
, "info1059", r
->info1059
);
2901 ndr_print_wkssvc_NetWkstaInfo1059(ndr
, "info1059", r
->info1059
);
2907 ndr_print_ptr(ndr
, "info1060", r
->info1060
);
2910 ndr_print_wkssvc_NetWkstaInfo1060(ndr
, "info1060", r
->info1060
);
2916 ndr_print_ptr(ndr
, "info1061", r
->info1061
);
2919 ndr_print_wkssvc_NetWkstaInfo1061(ndr
, "info1061", r
->info1061
);
2925 ndr_print_ptr(ndr
, "info1062", r
->info1062
);
2928 ndr_print_wkssvc_NetWkstaInfo1062(ndr
, "info1062", r
->info1062
);
2939 static enum ndr_err_code
ndr_push_wkssvc_NetrWkstaUserInfo0(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetrWkstaUserInfo0
*r
)
2941 if (ndr_flags
& NDR_SCALARS
) {
2942 NDR_CHECK(ndr_push_align(ndr
, 4));
2943 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user_name
));
2945 if (ndr_flags
& NDR_BUFFERS
) {
2947 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
2948 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
2949 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
2950 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->user_name
, ndr_charset_length(r
->user_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
2953 return NDR_ERR_SUCCESS
;
2956 static enum ndr_err_code
ndr_pull_wkssvc_NetrWkstaUserInfo0(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetrWkstaUserInfo0
*r
)
2958 uint32_t _ptr_user_name
;
2959 TALLOC_CTX
*_mem_save_user_name_0
;
2960 if (ndr_flags
& NDR_SCALARS
) {
2961 NDR_CHECK(ndr_pull_align(ndr
, 4));
2962 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_name
));
2963 if (_ptr_user_name
) {
2964 NDR_PULL_ALLOC(ndr
, r
->user_name
);
2966 r
->user_name
= NULL
;
2969 if (ndr_flags
& NDR_BUFFERS
) {
2971 _mem_save_user_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2972 NDR_PULL_SET_MEM_CTX(ndr
, r
->user_name
, 0);
2973 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->user_name
));
2974 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->user_name
));
2975 if (ndr_get_array_length(ndr
, &r
->user_name
) > ndr_get_array_size(ndr
, &r
->user_name
)) {
2976 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->user_name
), ndr_get_array_length(ndr
, &r
->user_name
));
2978 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t)));
2979 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->user_name
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t), CH_UTF16
));
2980 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_name_0
, 0);
2983 return NDR_ERR_SUCCESS
;
2986 _PUBLIC_
void ndr_print_wkssvc_NetrWkstaUserInfo0(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetrWkstaUserInfo0
*r
)
2988 ndr_print_struct(ndr
, name
, "wkssvc_NetrWkstaUserInfo0");
2990 ndr_print_ptr(ndr
, "user_name", r
->user_name
);
2993 ndr_print_string(ndr
, "user_name", r
->user_name
);
2999 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaEnumUsersCtr0(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaEnumUsersCtr0
*r
)
3001 uint32_t cntr_user0_1
;
3002 if (ndr_flags
& NDR_SCALARS
) {
3003 NDR_CHECK(ndr_push_align(ndr
, 4));
3004 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->entries_read
));
3005 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user0
));
3007 if (ndr_flags
& NDR_BUFFERS
) {
3009 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->entries_read
));
3010 for (cntr_user0_1
= 0; cntr_user0_1
< r
->entries_read
; cntr_user0_1
++) {
3011 NDR_CHECK(ndr_push_wkssvc_NetrWkstaUserInfo0(ndr
, NDR_SCALARS
, &r
->user0
[cntr_user0_1
]));
3013 for (cntr_user0_1
= 0; cntr_user0_1
< r
->entries_read
; cntr_user0_1
++) {
3014 NDR_CHECK(ndr_push_wkssvc_NetrWkstaUserInfo0(ndr
, NDR_BUFFERS
, &r
->user0
[cntr_user0_1
]));
3018 return NDR_ERR_SUCCESS
;
3021 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaEnumUsersCtr0(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaEnumUsersCtr0
*r
)
3023 uint32_t _ptr_user0
;
3024 uint32_t cntr_user0_1
;
3025 TALLOC_CTX
*_mem_save_user0_0
;
3026 TALLOC_CTX
*_mem_save_user0_1
;
3027 if (ndr_flags
& NDR_SCALARS
) {
3028 NDR_CHECK(ndr_pull_align(ndr
, 4));
3029 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->entries_read
));
3030 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user0
));
3032 NDR_PULL_ALLOC(ndr
, r
->user0
);
3037 if (ndr_flags
& NDR_BUFFERS
) {
3039 _mem_save_user0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3040 NDR_PULL_SET_MEM_CTX(ndr
, r
->user0
, 0);
3041 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->user0
));
3042 NDR_PULL_ALLOC_N(ndr
, r
->user0
, ndr_get_array_size(ndr
, &r
->user0
));
3043 _mem_save_user0_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3044 NDR_PULL_SET_MEM_CTX(ndr
, r
->user0
, 0);
3045 for (cntr_user0_1
= 0; cntr_user0_1
< r
->entries_read
; cntr_user0_1
++) {
3046 NDR_CHECK(ndr_pull_wkssvc_NetrWkstaUserInfo0(ndr
, NDR_SCALARS
, &r
->user0
[cntr_user0_1
]));
3048 for (cntr_user0_1
= 0; cntr_user0_1
< r
->entries_read
; cntr_user0_1
++) {
3049 NDR_CHECK(ndr_pull_wkssvc_NetrWkstaUserInfo0(ndr
, NDR_BUFFERS
, &r
->user0
[cntr_user0_1
]));
3051 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user0_1
, 0);
3052 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user0_0
, 0);
3055 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->user0
, r
->entries_read
));
3058 return NDR_ERR_SUCCESS
;
3061 _PUBLIC_
void ndr_print_wkssvc_NetWkstaEnumUsersCtr0(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaEnumUsersCtr0
*r
)
3063 uint32_t cntr_user0_1
;
3064 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaEnumUsersCtr0");
3066 ndr_print_uint32(ndr
, "entries_read", r
->entries_read
);
3067 ndr_print_ptr(ndr
, "user0", r
->user0
);
3070 ndr
->print(ndr
, "%s: ARRAY(%d)", "user0", (int)r
->entries_read
);
3072 for (cntr_user0_1
=0;cntr_user0_1
<r
->entries_read
;cntr_user0_1
++) {
3074 if (asprintf(&idx_1
, "[%d]", cntr_user0_1
) != -1) {
3075 ndr_print_wkssvc_NetrWkstaUserInfo0(ndr
, "user0", &r
->user0
[cntr_user0_1
]);
3085 static enum ndr_err_code
ndr_push_wkssvc_NetrWkstaUserInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetrWkstaUserInfo1
*r
)
3087 if (ndr_flags
& NDR_SCALARS
) {
3088 NDR_CHECK(ndr_push_align(ndr
, 4));
3089 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user_name
));
3090 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->logon_domain
));
3091 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->other_domains
));
3092 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->logon_server
));
3094 if (ndr_flags
& NDR_BUFFERS
) {
3096 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
3097 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3098 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
3099 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->user_name
, ndr_charset_length(r
->user_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3101 if (r
->logon_domain
) {
3102 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->logon_domain
, CH_UTF16
)));
3103 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3104 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->logon_domain
, CH_UTF16
)));
3105 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->logon_domain
, ndr_charset_length(r
->logon_domain
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3107 if (r
->other_domains
) {
3108 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->other_domains
, CH_UTF16
)));
3109 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3110 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->other_domains
, CH_UTF16
)));
3111 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->other_domains
, ndr_charset_length(r
->other_domains
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3113 if (r
->logon_server
) {
3114 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->logon_server
, CH_UTF16
)));
3115 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3116 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->logon_server
, CH_UTF16
)));
3117 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->logon_server
, ndr_charset_length(r
->logon_server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3120 return NDR_ERR_SUCCESS
;
3123 static enum ndr_err_code
ndr_pull_wkssvc_NetrWkstaUserInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetrWkstaUserInfo1
*r
)
3125 uint32_t _ptr_user_name
;
3126 TALLOC_CTX
*_mem_save_user_name_0
;
3127 uint32_t _ptr_logon_domain
;
3128 TALLOC_CTX
*_mem_save_logon_domain_0
;
3129 uint32_t _ptr_other_domains
;
3130 TALLOC_CTX
*_mem_save_other_domains_0
;
3131 uint32_t _ptr_logon_server
;
3132 TALLOC_CTX
*_mem_save_logon_server_0
;
3133 if (ndr_flags
& NDR_SCALARS
) {
3134 NDR_CHECK(ndr_pull_align(ndr
, 4));
3135 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_name
));
3136 if (_ptr_user_name
) {
3137 NDR_PULL_ALLOC(ndr
, r
->user_name
);
3139 r
->user_name
= NULL
;
3141 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_logon_domain
));
3142 if (_ptr_logon_domain
) {
3143 NDR_PULL_ALLOC(ndr
, r
->logon_domain
);
3145 r
->logon_domain
= NULL
;
3147 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_other_domains
));
3148 if (_ptr_other_domains
) {
3149 NDR_PULL_ALLOC(ndr
, r
->other_domains
);
3151 r
->other_domains
= NULL
;
3153 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_logon_server
));
3154 if (_ptr_logon_server
) {
3155 NDR_PULL_ALLOC(ndr
, r
->logon_server
);
3157 r
->logon_server
= NULL
;
3160 if (ndr_flags
& NDR_BUFFERS
) {
3162 _mem_save_user_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3163 NDR_PULL_SET_MEM_CTX(ndr
, r
->user_name
, 0);
3164 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->user_name
));
3165 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->user_name
));
3166 if (ndr_get_array_length(ndr
, &r
->user_name
) > ndr_get_array_size(ndr
, &r
->user_name
)) {
3167 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->user_name
), ndr_get_array_length(ndr
, &r
->user_name
));
3169 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t)));
3170 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->user_name
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t), CH_UTF16
));
3171 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_name_0
, 0);
3173 if (r
->logon_domain
) {
3174 _mem_save_logon_domain_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3175 NDR_PULL_SET_MEM_CTX(ndr
, r
->logon_domain
, 0);
3176 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->logon_domain
));
3177 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->logon_domain
));
3178 if (ndr_get_array_length(ndr
, &r
->logon_domain
) > ndr_get_array_size(ndr
, &r
->logon_domain
)) {
3179 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->logon_domain
), ndr_get_array_length(ndr
, &r
->logon_domain
));
3181 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->logon_domain
), sizeof(uint16_t)));
3182 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->logon_domain
, ndr_get_array_length(ndr
, &r
->logon_domain
), sizeof(uint16_t), CH_UTF16
));
3183 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_logon_domain_0
, 0);
3185 if (r
->other_domains
) {
3186 _mem_save_other_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3187 NDR_PULL_SET_MEM_CTX(ndr
, r
->other_domains
, 0);
3188 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->other_domains
));
3189 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->other_domains
));
3190 if (ndr_get_array_length(ndr
, &r
->other_domains
) > ndr_get_array_size(ndr
, &r
->other_domains
)) {
3191 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->other_domains
), ndr_get_array_length(ndr
, &r
->other_domains
));
3193 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->other_domains
), sizeof(uint16_t)));
3194 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->other_domains
, ndr_get_array_length(ndr
, &r
->other_domains
), sizeof(uint16_t), CH_UTF16
));
3195 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_other_domains_0
, 0);
3197 if (r
->logon_server
) {
3198 _mem_save_logon_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3199 NDR_PULL_SET_MEM_CTX(ndr
, r
->logon_server
, 0);
3200 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->logon_server
));
3201 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->logon_server
));
3202 if (ndr_get_array_length(ndr
, &r
->logon_server
) > ndr_get_array_size(ndr
, &r
->logon_server
)) {
3203 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->logon_server
), ndr_get_array_length(ndr
, &r
->logon_server
));
3205 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->logon_server
), sizeof(uint16_t)));
3206 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->logon_server
, ndr_get_array_length(ndr
, &r
->logon_server
), sizeof(uint16_t), CH_UTF16
));
3207 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_logon_server_0
, 0);
3210 return NDR_ERR_SUCCESS
;
3213 _PUBLIC_
void ndr_print_wkssvc_NetrWkstaUserInfo1(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetrWkstaUserInfo1
*r
)
3215 ndr_print_struct(ndr
, name
, "wkssvc_NetrWkstaUserInfo1");
3217 ndr_print_ptr(ndr
, "user_name", r
->user_name
);
3220 ndr_print_string(ndr
, "user_name", r
->user_name
);
3223 ndr_print_ptr(ndr
, "logon_domain", r
->logon_domain
);
3225 if (r
->logon_domain
) {
3226 ndr_print_string(ndr
, "logon_domain", r
->logon_domain
);
3229 ndr_print_ptr(ndr
, "other_domains", r
->other_domains
);
3231 if (r
->other_domains
) {
3232 ndr_print_string(ndr
, "other_domains", r
->other_domains
);
3235 ndr_print_ptr(ndr
, "logon_server", r
->logon_server
);
3237 if (r
->logon_server
) {
3238 ndr_print_string(ndr
, "logon_server", r
->logon_server
);
3244 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaEnumUsersCtr1(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaEnumUsersCtr1
*r
)
3246 uint32_t cntr_user1_1
;
3247 if (ndr_flags
& NDR_SCALARS
) {
3248 NDR_CHECK(ndr_push_align(ndr
, 4));
3249 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->entries_read
));
3250 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user1
));
3252 if (ndr_flags
& NDR_BUFFERS
) {
3254 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->entries_read
));
3255 for (cntr_user1_1
= 0; cntr_user1_1
< r
->entries_read
; cntr_user1_1
++) {
3256 NDR_CHECK(ndr_push_wkssvc_NetrWkstaUserInfo1(ndr
, NDR_SCALARS
, &r
->user1
[cntr_user1_1
]));
3258 for (cntr_user1_1
= 0; cntr_user1_1
< r
->entries_read
; cntr_user1_1
++) {
3259 NDR_CHECK(ndr_push_wkssvc_NetrWkstaUserInfo1(ndr
, NDR_BUFFERS
, &r
->user1
[cntr_user1_1
]));
3263 return NDR_ERR_SUCCESS
;
3266 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaEnumUsersCtr1(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaEnumUsersCtr1
*r
)
3268 uint32_t _ptr_user1
;
3269 uint32_t cntr_user1_1
;
3270 TALLOC_CTX
*_mem_save_user1_0
;
3271 TALLOC_CTX
*_mem_save_user1_1
;
3272 if (ndr_flags
& NDR_SCALARS
) {
3273 NDR_CHECK(ndr_pull_align(ndr
, 4));
3274 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->entries_read
));
3275 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user1
));
3277 NDR_PULL_ALLOC(ndr
, r
->user1
);
3282 if (ndr_flags
& NDR_BUFFERS
) {
3284 _mem_save_user1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3285 NDR_PULL_SET_MEM_CTX(ndr
, r
->user1
, 0);
3286 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->user1
));
3287 NDR_PULL_ALLOC_N(ndr
, r
->user1
, ndr_get_array_size(ndr
, &r
->user1
));
3288 _mem_save_user1_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3289 NDR_PULL_SET_MEM_CTX(ndr
, r
->user1
, 0);
3290 for (cntr_user1_1
= 0; cntr_user1_1
< r
->entries_read
; cntr_user1_1
++) {
3291 NDR_CHECK(ndr_pull_wkssvc_NetrWkstaUserInfo1(ndr
, NDR_SCALARS
, &r
->user1
[cntr_user1_1
]));
3293 for (cntr_user1_1
= 0; cntr_user1_1
< r
->entries_read
; cntr_user1_1
++) {
3294 NDR_CHECK(ndr_pull_wkssvc_NetrWkstaUserInfo1(ndr
, NDR_BUFFERS
, &r
->user1
[cntr_user1_1
]));
3296 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user1_1
, 0);
3297 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user1_0
, 0);
3300 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->user1
, r
->entries_read
));
3303 return NDR_ERR_SUCCESS
;
3306 _PUBLIC_
void ndr_print_wkssvc_NetWkstaEnumUsersCtr1(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaEnumUsersCtr1
*r
)
3308 uint32_t cntr_user1_1
;
3309 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaEnumUsersCtr1");
3311 ndr_print_uint32(ndr
, "entries_read", r
->entries_read
);
3312 ndr_print_ptr(ndr
, "user1", r
->user1
);
3315 ndr
->print(ndr
, "%s: ARRAY(%d)", "user1", (int)r
->entries_read
);
3317 for (cntr_user1_1
=0;cntr_user1_1
<r
->entries_read
;cntr_user1_1
++) {
3319 if (asprintf(&idx_1
, "[%d]", cntr_user1_1
) != -1) {
3320 ndr_print_wkssvc_NetrWkstaUserInfo1(ndr
, "user1", &r
->user1
[cntr_user1_1
]);
3330 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaEnumUsersCtr(struct ndr_push
*ndr
, int ndr_flags
, const union wkssvc_NetWkstaEnumUsersCtr
*r
)
3332 if (ndr_flags
& NDR_SCALARS
) {
3333 int level
= ndr_push_get_switch_value(ndr
, r
);
3334 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
3337 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user0
));
3341 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user1
));
3345 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3348 if (ndr_flags
& NDR_BUFFERS
) {
3349 int level
= ndr_push_get_switch_value(ndr
, r
);
3353 NDR_CHECK(ndr_push_wkssvc_NetWkstaEnumUsersCtr0(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->user0
));
3359 NDR_CHECK(ndr_push_wkssvc_NetWkstaEnumUsersCtr1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->user1
));
3364 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3367 return NDR_ERR_SUCCESS
;
3370 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaEnumUsersCtr(struct ndr_pull
*ndr
, int ndr_flags
, union wkssvc_NetWkstaEnumUsersCtr
*r
)
3374 TALLOC_CTX
*_mem_save_user0_0
;
3375 TALLOC_CTX
*_mem_save_user1_0
;
3376 level
= ndr_pull_get_switch_value(ndr
, r
);
3377 if (ndr_flags
& NDR_SCALARS
) {
3378 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
3379 if (_level
!= level
) {
3380 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
3384 uint32_t _ptr_user0
;
3385 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user0
));
3387 NDR_PULL_ALLOC(ndr
, r
->user0
);
3394 uint32_t _ptr_user1
;
3395 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user1
));
3397 NDR_PULL_ALLOC(ndr
, r
->user1
);
3404 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3407 if (ndr_flags
& NDR_BUFFERS
) {
3411 _mem_save_user0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3412 NDR_PULL_SET_MEM_CTX(ndr
, r
->user0
, 0);
3413 NDR_CHECK(ndr_pull_wkssvc_NetWkstaEnumUsersCtr0(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->user0
));
3414 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user0_0
, 0);
3420 _mem_save_user1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3421 NDR_PULL_SET_MEM_CTX(ndr
, r
->user1
, 0);
3422 NDR_CHECK(ndr_pull_wkssvc_NetWkstaEnumUsersCtr1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->user1
));
3423 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user1_0
, 0);
3428 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3431 return NDR_ERR_SUCCESS
;
3434 _PUBLIC_
void ndr_print_wkssvc_NetWkstaEnumUsersCtr(struct ndr_print
*ndr
, const char *name
, const union wkssvc_NetWkstaEnumUsersCtr
*r
)
3437 level
= ndr_print_get_switch_value(ndr
, r
);
3438 ndr_print_union(ndr
, name
, level
, "wkssvc_NetWkstaEnumUsersCtr");
3441 ndr_print_ptr(ndr
, "user0", r
->user0
);
3444 ndr_print_wkssvc_NetWkstaEnumUsersCtr0(ndr
, "user0", r
->user0
);
3450 ndr_print_ptr(ndr
, "user1", r
->user1
);
3453 ndr_print_wkssvc_NetWkstaEnumUsersCtr1(ndr
, "user1", r
->user1
);
3459 ndr_print_bad_level(ndr
, name
, level
);
3463 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaEnumUsersInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaEnumUsersInfo
*r
)
3465 if (ndr_flags
& NDR_SCALARS
) {
3466 NDR_CHECK(ndr_push_align(ndr
, 4));
3467 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->level
));
3468 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->ctr
, r
->level
));
3469 NDR_CHECK(ndr_push_wkssvc_NetWkstaEnumUsersCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
3471 if (ndr_flags
& NDR_BUFFERS
) {
3472 NDR_CHECK(ndr_push_wkssvc_NetWkstaEnumUsersCtr(ndr
, NDR_BUFFERS
, &r
->ctr
));
3474 return NDR_ERR_SUCCESS
;
3477 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaEnumUsersInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaEnumUsersInfo
*r
)
3479 if (ndr_flags
& NDR_SCALARS
) {
3480 NDR_CHECK(ndr_pull_align(ndr
, 4));
3481 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->level
));
3482 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->ctr
, r
->level
));
3483 NDR_CHECK(ndr_pull_wkssvc_NetWkstaEnumUsersCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
3485 if (ndr_flags
& NDR_BUFFERS
) {
3486 NDR_CHECK(ndr_pull_wkssvc_NetWkstaEnumUsersCtr(ndr
, NDR_BUFFERS
, &r
->ctr
));
3488 return NDR_ERR_SUCCESS
;
3491 _PUBLIC_
void ndr_print_wkssvc_NetWkstaEnumUsersInfo(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaEnumUsersInfo
*r
)
3493 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaEnumUsersInfo");
3495 ndr_print_uint32(ndr
, "level", r
->level
);
3496 ndr_print_set_switch_value(ndr
, &r
->ctr
, r
->level
);
3497 ndr_print_wkssvc_NetWkstaEnumUsersCtr(ndr
, "ctr", &r
->ctr
);
3501 static enum ndr_err_code
ndr_push_wkssvc_NetrWkstaUserInfo1101(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetrWkstaUserInfo1101
*r
)
3503 if (ndr_flags
& NDR_SCALARS
) {
3504 NDR_CHECK(ndr_push_align(ndr
, 4));
3505 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->other_domains
));
3507 if (ndr_flags
& NDR_BUFFERS
) {
3508 if (r
->other_domains
) {
3509 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->other_domains
, CH_UTF16
)));
3510 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3511 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->other_domains
, CH_UTF16
)));
3512 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->other_domains
, ndr_charset_length(r
->other_domains
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3515 return NDR_ERR_SUCCESS
;
3518 static enum ndr_err_code
ndr_pull_wkssvc_NetrWkstaUserInfo1101(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetrWkstaUserInfo1101
*r
)
3520 uint32_t _ptr_other_domains
;
3521 TALLOC_CTX
*_mem_save_other_domains_0
;
3522 if (ndr_flags
& NDR_SCALARS
) {
3523 NDR_CHECK(ndr_pull_align(ndr
, 4));
3524 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_other_domains
));
3525 if (_ptr_other_domains
) {
3526 NDR_PULL_ALLOC(ndr
, r
->other_domains
);
3528 r
->other_domains
= NULL
;
3531 if (ndr_flags
& NDR_BUFFERS
) {
3532 if (r
->other_domains
) {
3533 _mem_save_other_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3534 NDR_PULL_SET_MEM_CTX(ndr
, r
->other_domains
, 0);
3535 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->other_domains
));
3536 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->other_domains
));
3537 if (ndr_get_array_length(ndr
, &r
->other_domains
) > ndr_get_array_size(ndr
, &r
->other_domains
)) {
3538 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->other_domains
), ndr_get_array_length(ndr
, &r
->other_domains
));
3540 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->other_domains
), sizeof(uint16_t)));
3541 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->other_domains
, ndr_get_array_length(ndr
, &r
->other_domains
), sizeof(uint16_t), CH_UTF16
));
3542 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_other_domains_0
, 0);
3545 return NDR_ERR_SUCCESS
;
3548 _PUBLIC_
void ndr_print_wkssvc_NetrWkstaUserInfo1101(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetrWkstaUserInfo1101
*r
)
3550 ndr_print_struct(ndr
, name
, "wkssvc_NetrWkstaUserInfo1101");
3552 ndr_print_ptr(ndr
, "other_domains", r
->other_domains
);
3554 if (r
->other_domains
) {
3555 ndr_print_string(ndr
, "other_domains", r
->other_domains
);
3561 static enum ndr_err_code
ndr_push_wkssvc_NetrWkstaUserInfo(struct ndr_push
*ndr
, int ndr_flags
, const union wkssvc_NetrWkstaUserInfo
*r
)
3563 if (ndr_flags
& NDR_SCALARS
) {
3564 int level
= ndr_push_get_switch_value(ndr
, r
);
3565 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
3568 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info0
));
3572 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
3576 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1101
));
3580 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3583 if (ndr_flags
& NDR_BUFFERS
) {
3584 int level
= ndr_push_get_switch_value(ndr
, r
);
3588 NDR_CHECK(ndr_push_wkssvc_NetrWkstaUserInfo0(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info0
));
3594 NDR_CHECK(ndr_push_wkssvc_NetrWkstaUserInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
3600 NDR_CHECK(ndr_push_wkssvc_NetrWkstaUserInfo1101(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1101
));
3605 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3608 return NDR_ERR_SUCCESS
;
3611 static enum ndr_err_code
ndr_pull_wkssvc_NetrWkstaUserInfo(struct ndr_pull
*ndr
, int ndr_flags
, union wkssvc_NetrWkstaUserInfo
*r
)
3615 TALLOC_CTX
*_mem_save_info0_0
;
3616 TALLOC_CTX
*_mem_save_info1_0
;
3617 TALLOC_CTX
*_mem_save_info1101_0
;
3618 level
= ndr_pull_get_switch_value(ndr
, r
);
3619 if (ndr_flags
& NDR_SCALARS
) {
3620 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
3621 if (_level
!= level
) {
3622 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
3626 uint32_t _ptr_info0
;
3627 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info0
));
3629 NDR_PULL_ALLOC(ndr
, r
->info0
);
3636 uint32_t _ptr_info1
;
3637 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
3639 NDR_PULL_ALLOC(ndr
, r
->info1
);
3646 uint32_t _ptr_info1101
;
3647 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1101
));
3648 if (_ptr_info1101
) {
3649 NDR_PULL_ALLOC(ndr
, r
->info1101
);
3656 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3659 if (ndr_flags
& NDR_BUFFERS
) {
3663 _mem_save_info0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3664 NDR_PULL_SET_MEM_CTX(ndr
, r
->info0
, 0);
3665 NDR_CHECK(ndr_pull_wkssvc_NetrWkstaUserInfo0(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info0
));
3666 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info0_0
, 0);
3672 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3673 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
3674 NDR_CHECK(ndr_pull_wkssvc_NetrWkstaUserInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
3675 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
3681 _mem_save_info1101_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3682 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1101
, 0);
3683 NDR_CHECK(ndr_pull_wkssvc_NetrWkstaUserInfo1101(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1101
));
3684 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1101_0
, 0);
3689 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3692 return NDR_ERR_SUCCESS
;
3695 _PUBLIC_
void ndr_print_wkssvc_NetrWkstaUserInfo(struct ndr_print
*ndr
, const char *name
, const union wkssvc_NetrWkstaUserInfo
*r
)
3698 level
= ndr_print_get_switch_value(ndr
, r
);
3699 ndr_print_union(ndr
, name
, level
, "wkssvc_NetrWkstaUserInfo");
3702 ndr_print_ptr(ndr
, "info0", r
->info0
);
3705 ndr_print_wkssvc_NetrWkstaUserInfo0(ndr
, "info0", r
->info0
);
3711 ndr_print_ptr(ndr
, "info1", r
->info1
);
3714 ndr_print_wkssvc_NetrWkstaUserInfo1(ndr
, "info1", r
->info1
);
3720 ndr_print_ptr(ndr
, "info1101", r
->info1101
);
3723 ndr_print_wkssvc_NetrWkstaUserInfo1101(ndr
, "info1101", r
->info1101
);
3729 ndr_print_bad_level(ndr
, name
, level
);
3733 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaTransportInfo0(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaTransportInfo0
*r
)
3735 if (ndr_flags
& NDR_SCALARS
) {
3736 NDR_CHECK(ndr_push_align(ndr
, 4));
3737 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->quality_of_service
));
3738 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->vc_count
));
3739 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->name
));
3740 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->address
));
3741 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->wan_link
));
3743 if (ndr_flags
& NDR_BUFFERS
) {
3745 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->name
, CH_UTF16
)));
3746 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3747 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->name
, CH_UTF16
)));
3748 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->name
, ndr_charset_length(r
->name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3751 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->address
, CH_UTF16
)));
3752 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3753 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->address
, CH_UTF16
)));
3754 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->address
, ndr_charset_length(r
->address
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3757 return NDR_ERR_SUCCESS
;
3760 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaTransportInfo0(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaTransportInfo0
*r
)
3763 TALLOC_CTX
*_mem_save_name_0
;
3764 uint32_t _ptr_address
;
3765 TALLOC_CTX
*_mem_save_address_0
;
3766 if (ndr_flags
& NDR_SCALARS
) {
3767 NDR_CHECK(ndr_pull_align(ndr
, 4));
3768 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->quality_of_service
));
3769 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->vc_count
));
3770 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
3772 NDR_PULL_ALLOC(ndr
, r
->name
);
3776 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_address
));
3778 NDR_PULL_ALLOC(ndr
, r
->address
);
3782 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->wan_link
));
3784 if (ndr_flags
& NDR_BUFFERS
) {
3786 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3787 NDR_PULL_SET_MEM_CTX(ndr
, r
->name
, 0);
3788 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->name
));
3789 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->name
));
3790 if (ndr_get_array_length(ndr
, &r
->name
) > ndr_get_array_size(ndr
, &r
->name
)) {
3791 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->name
), ndr_get_array_length(ndr
, &r
->name
));
3793 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->name
), sizeof(uint16_t)));
3794 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->name
, ndr_get_array_length(ndr
, &r
->name
), sizeof(uint16_t), CH_UTF16
));
3795 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, 0);
3798 _mem_save_address_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3799 NDR_PULL_SET_MEM_CTX(ndr
, r
->address
, 0);
3800 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->address
));
3801 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->address
));
3802 if (ndr_get_array_length(ndr
, &r
->address
) > ndr_get_array_size(ndr
, &r
->address
)) {
3803 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->address
), ndr_get_array_length(ndr
, &r
->address
));
3805 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->address
), sizeof(uint16_t)));
3806 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->address
, ndr_get_array_length(ndr
, &r
->address
), sizeof(uint16_t), CH_UTF16
));
3807 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_address_0
, 0);
3810 return NDR_ERR_SUCCESS
;
3813 _PUBLIC_
void ndr_print_wkssvc_NetWkstaTransportInfo0(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaTransportInfo0
*r
)
3815 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaTransportInfo0");
3817 ndr_print_uint32(ndr
, "quality_of_service", r
->quality_of_service
);
3818 ndr_print_uint32(ndr
, "vc_count", r
->vc_count
);
3819 ndr_print_ptr(ndr
, "name", r
->name
);
3822 ndr_print_string(ndr
, "name", r
->name
);
3825 ndr_print_ptr(ndr
, "address", r
->address
);
3828 ndr_print_string(ndr
, "address", r
->address
);
3831 ndr_print_uint32(ndr
, "wan_link", r
->wan_link
);
3835 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaTransportCtr0(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaTransportCtr0
*r
)
3837 uint32_t cntr_array_1
;
3838 if (ndr_flags
& NDR_SCALARS
) {
3839 NDR_CHECK(ndr_push_align(ndr
, 4));
3840 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
3841 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->array
));
3843 if (ndr_flags
& NDR_BUFFERS
) {
3845 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
3846 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
3847 NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportInfo0(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
3849 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
3850 NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportInfo0(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
3854 return NDR_ERR_SUCCESS
;
3857 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaTransportCtr0(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaTransportCtr0
*r
)
3859 uint32_t _ptr_array
;
3860 uint32_t cntr_array_1
;
3861 TALLOC_CTX
*_mem_save_array_0
;
3862 TALLOC_CTX
*_mem_save_array_1
;
3863 if (ndr_flags
& NDR_SCALARS
) {
3864 NDR_CHECK(ndr_pull_align(ndr
, 4));
3865 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
3866 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_array
));
3868 NDR_PULL_ALLOC(ndr
, r
->array
);
3873 if (ndr_flags
& NDR_BUFFERS
) {
3875 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3876 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
3877 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
3878 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
3879 _mem_save_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3880 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
3881 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
3882 NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportInfo0(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
3884 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
3885 NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportInfo0(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
3887 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
3888 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
3891 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
3894 return NDR_ERR_SUCCESS
;
3897 _PUBLIC_
void ndr_print_wkssvc_NetWkstaTransportCtr0(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaTransportCtr0
*r
)
3899 uint32_t cntr_array_1
;
3900 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaTransportCtr0");
3902 ndr_print_uint32(ndr
, "count", r
->count
);
3903 ndr_print_ptr(ndr
, "array", r
->array
);
3906 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
3908 for (cntr_array_1
=0;cntr_array_1
<r
->count
;cntr_array_1
++) {
3910 if (asprintf(&idx_1
, "[%d]", cntr_array_1
) != -1) {
3911 ndr_print_wkssvc_NetWkstaTransportInfo0(ndr
, "array", &r
->array
[cntr_array_1
]);
3921 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaTransportCtr(struct ndr_push
*ndr
, int ndr_flags
, const union wkssvc_NetWkstaTransportCtr
*r
)
3923 if (ndr_flags
& NDR_SCALARS
) {
3924 int level
= ndr_push_get_switch_value(ndr
, r
);
3925 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
3928 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->ctr0
));
3932 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3935 if (ndr_flags
& NDR_BUFFERS
) {
3936 int level
= ndr_push_get_switch_value(ndr
, r
);
3940 NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportCtr0(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->ctr0
));
3945 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3948 return NDR_ERR_SUCCESS
;
3951 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaTransportCtr(struct ndr_pull
*ndr
, int ndr_flags
, union wkssvc_NetWkstaTransportCtr
*r
)
3955 TALLOC_CTX
*_mem_save_ctr0_0
;
3956 level
= ndr_pull_get_switch_value(ndr
, r
);
3957 if (ndr_flags
& NDR_SCALARS
) {
3958 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
3959 if (_level
!= level
) {
3960 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
3965 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ctr0
));
3967 NDR_PULL_ALLOC(ndr
, r
->ctr0
);
3974 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3977 if (ndr_flags
& NDR_BUFFERS
) {
3981 _mem_save_ctr0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3982 NDR_PULL_SET_MEM_CTX(ndr
, r
->ctr0
, 0);
3983 NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportCtr0(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->ctr0
));
3984 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr0_0
, 0);
3989 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3992 return NDR_ERR_SUCCESS
;
3995 _PUBLIC_
void ndr_print_wkssvc_NetWkstaTransportCtr(struct ndr_print
*ndr
, const char *name
, const union wkssvc_NetWkstaTransportCtr
*r
)
3998 level
= ndr_print_get_switch_value(ndr
, r
);
3999 ndr_print_union(ndr
, name
, level
, "wkssvc_NetWkstaTransportCtr");
4002 ndr_print_ptr(ndr
, "ctr0", r
->ctr0
);
4005 ndr_print_wkssvc_NetWkstaTransportCtr0(ndr
, "ctr0", r
->ctr0
);
4011 ndr_print_bad_level(ndr
, name
, level
);
4015 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaTransportInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaTransportInfo
*r
)
4017 if (ndr_flags
& NDR_SCALARS
) {
4018 NDR_CHECK(ndr_push_align(ndr
, 4));
4019 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->level
));
4020 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->ctr
, r
->level
));
4021 NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
4023 if (ndr_flags
& NDR_BUFFERS
) {
4024 NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportCtr(ndr
, NDR_BUFFERS
, &r
->ctr
));
4026 return NDR_ERR_SUCCESS
;
4029 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaTransportInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaTransportInfo
*r
)
4031 if (ndr_flags
& NDR_SCALARS
) {
4032 NDR_CHECK(ndr_pull_align(ndr
, 4));
4033 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->level
));
4034 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->ctr
, r
->level
));
4035 NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
4037 if (ndr_flags
& NDR_BUFFERS
) {
4038 NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportCtr(ndr
, NDR_BUFFERS
, &r
->ctr
));
4040 return NDR_ERR_SUCCESS
;
4043 _PUBLIC_
void ndr_print_wkssvc_NetWkstaTransportInfo(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaTransportInfo
*r
)
4045 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaTransportInfo");
4047 ndr_print_uint32(ndr
, "level", r
->level
);
4048 ndr_print_set_switch_value(ndr
, &r
->ctr
, r
->level
);
4049 ndr_print_wkssvc_NetWkstaTransportCtr(ndr
, "ctr", &r
->ctr
);
4053 static enum ndr_err_code
ndr_push_wkssvc_NetrUseInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetrUseInfo3
*r
)
4055 if (ndr_flags
& NDR_SCALARS
) {
4056 NDR_CHECK(ndr_push_align(ndr
, 4));
4057 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->unknown1
));
4058 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->unknown2
));
4060 if (ndr_flags
& NDR_BUFFERS
) {
4062 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->unknown1
, CH_UTF16
)));
4063 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4064 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->unknown1
, CH_UTF16
)));
4065 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->unknown1
, ndr_charset_length(r
->unknown1
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4068 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->unknown2
, CH_UTF16
)));
4069 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4070 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->unknown2
, CH_UTF16
)));
4071 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->unknown2
, ndr_charset_length(r
->unknown2
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4074 return NDR_ERR_SUCCESS
;
4077 static enum ndr_err_code
ndr_pull_wkssvc_NetrUseInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetrUseInfo3
*r
)
4079 uint32_t _ptr_unknown1
;
4080 TALLOC_CTX
*_mem_save_unknown1_0
;
4081 uint32_t _ptr_unknown2
;
4082 TALLOC_CTX
*_mem_save_unknown2_0
;
4083 if (ndr_flags
& NDR_SCALARS
) {
4084 NDR_CHECK(ndr_pull_align(ndr
, 4));
4085 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown1
));
4086 if (_ptr_unknown1
) {
4087 NDR_PULL_ALLOC(ndr
, r
->unknown1
);
4091 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown2
));
4092 if (_ptr_unknown2
) {
4093 NDR_PULL_ALLOC(ndr
, r
->unknown2
);
4098 if (ndr_flags
& NDR_BUFFERS
) {
4100 _mem_save_unknown1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4101 NDR_PULL_SET_MEM_CTX(ndr
, r
->unknown1
, 0);
4102 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->unknown1
));
4103 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->unknown1
));
4104 if (ndr_get_array_length(ndr
, &r
->unknown1
) > ndr_get_array_size(ndr
, &r
->unknown1
)) {
4105 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->unknown1
), ndr_get_array_length(ndr
, &r
->unknown1
));
4107 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->unknown1
), sizeof(uint16_t)));
4108 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->unknown1
, ndr_get_array_length(ndr
, &r
->unknown1
), sizeof(uint16_t), CH_UTF16
));
4109 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown1_0
, 0);
4112 _mem_save_unknown2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4113 NDR_PULL_SET_MEM_CTX(ndr
, r
->unknown2
, 0);
4114 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->unknown2
));
4115 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->unknown2
));
4116 if (ndr_get_array_length(ndr
, &r
->unknown2
) > ndr_get_array_size(ndr
, &r
->unknown2
)) {
4117 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->unknown2
), ndr_get_array_length(ndr
, &r
->unknown2
));
4119 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->unknown2
), sizeof(uint16_t)));
4120 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->unknown2
, ndr_get_array_length(ndr
, &r
->unknown2
), sizeof(uint16_t), CH_UTF16
));
4121 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown2_0
, 0);
4124 return NDR_ERR_SUCCESS
;
4127 _PUBLIC_
void ndr_print_wkssvc_NetrUseInfo3(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetrUseInfo3
*r
)
4129 ndr_print_struct(ndr
, name
, "wkssvc_NetrUseInfo3");
4131 ndr_print_ptr(ndr
, "unknown1", r
->unknown1
);
4134 ndr_print_string(ndr
, "unknown1", r
->unknown1
);
4137 ndr_print_ptr(ndr
, "unknown2", r
->unknown2
);
4140 ndr_print_string(ndr
, "unknown2", r
->unknown2
);
4146 static enum ndr_err_code
ndr_push_wkssvc_NetrUseInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetrUseInfo2
*r
)
4148 if (ndr_flags
& NDR_SCALARS
) {
4149 NDR_CHECK(ndr_push_align(ndr
, 4));
4150 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->local
));
4151 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->remote
));
4152 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->password
));
4153 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->status
));
4154 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->asg_type
));
4155 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->ref_count
));
4156 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_count
));
4157 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user_name
));
4158 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain_name
));
4160 if (ndr_flags
& NDR_BUFFERS
) {
4162 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->local
, CH_UTF16
)));
4163 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4164 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->local
, CH_UTF16
)));
4165 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->local
, ndr_charset_length(r
->local
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4168 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->remote
, CH_UTF16
)));
4169 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4170 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->remote
, CH_UTF16
)));
4171 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->remote
, ndr_charset_length(r
->remote
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4174 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->password
, CH_UTF16
)));
4175 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4176 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->password
, CH_UTF16
)));
4177 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->password
, ndr_charset_length(r
->password
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4180 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
4181 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4182 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
4183 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->user_name
, ndr_charset_length(r
->user_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4185 if (r
->domain_name
) {
4186 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
4187 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4188 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
4189 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->domain_name
, ndr_charset_length(r
->domain_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4192 return NDR_ERR_SUCCESS
;
4195 static enum ndr_err_code
ndr_pull_wkssvc_NetrUseInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetrUseInfo2
*r
)
4197 uint32_t _ptr_local
;
4198 TALLOC_CTX
*_mem_save_local_0
;
4199 uint32_t _ptr_remote
;
4200 TALLOC_CTX
*_mem_save_remote_0
;
4201 uint32_t _ptr_password
;
4202 TALLOC_CTX
*_mem_save_password_0
;
4203 uint32_t _ptr_user_name
;
4204 TALLOC_CTX
*_mem_save_user_name_0
;
4205 uint32_t _ptr_domain_name
;
4206 TALLOC_CTX
*_mem_save_domain_name_0
;
4207 if (ndr_flags
& NDR_SCALARS
) {
4208 NDR_CHECK(ndr_pull_align(ndr
, 4));
4209 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_local
));
4211 NDR_PULL_ALLOC(ndr
, r
->local
);
4215 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_remote
));
4217 NDR_PULL_ALLOC(ndr
, r
->remote
);
4221 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password
));
4222 if (_ptr_password
) {
4223 NDR_PULL_ALLOC(ndr
, r
->password
);
4227 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->status
));
4228 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->asg_type
));
4229 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->ref_count
));
4230 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_count
));
4231 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_name
));
4232 if (_ptr_user_name
) {
4233 NDR_PULL_ALLOC(ndr
, r
->user_name
);
4235 r
->user_name
= NULL
;
4237 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_name
));
4238 if (_ptr_domain_name
) {
4239 NDR_PULL_ALLOC(ndr
, r
->domain_name
);
4241 r
->domain_name
= NULL
;
4244 if (ndr_flags
& NDR_BUFFERS
) {
4246 _mem_save_local_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4247 NDR_PULL_SET_MEM_CTX(ndr
, r
->local
, 0);
4248 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->local
));
4249 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->local
));
4250 if (ndr_get_array_length(ndr
, &r
->local
) > ndr_get_array_size(ndr
, &r
->local
)) {
4251 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->local
), ndr_get_array_length(ndr
, &r
->local
));
4253 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->local
), sizeof(uint16_t)));
4254 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->local
, ndr_get_array_length(ndr
, &r
->local
), sizeof(uint16_t), CH_UTF16
));
4255 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_local_0
, 0);
4258 _mem_save_remote_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4259 NDR_PULL_SET_MEM_CTX(ndr
, r
->remote
, 0);
4260 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->remote
));
4261 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->remote
));
4262 if (ndr_get_array_length(ndr
, &r
->remote
) > ndr_get_array_size(ndr
, &r
->remote
)) {
4263 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->remote
), ndr_get_array_length(ndr
, &r
->remote
));
4265 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->remote
), sizeof(uint16_t)));
4266 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->remote
, ndr_get_array_length(ndr
, &r
->remote
), sizeof(uint16_t), CH_UTF16
));
4267 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_remote_0
, 0);
4270 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4271 NDR_PULL_SET_MEM_CTX(ndr
, r
->password
, 0);
4272 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->password
));
4273 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->password
));
4274 if (ndr_get_array_length(ndr
, &r
->password
) > ndr_get_array_size(ndr
, &r
->password
)) {
4275 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->password
), ndr_get_array_length(ndr
, &r
->password
));
4277 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->password
), sizeof(uint16_t)));
4278 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->password
, ndr_get_array_length(ndr
, &r
->password
), sizeof(uint16_t), CH_UTF16
));
4279 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, 0);
4282 _mem_save_user_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4283 NDR_PULL_SET_MEM_CTX(ndr
, r
->user_name
, 0);
4284 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->user_name
));
4285 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->user_name
));
4286 if (ndr_get_array_length(ndr
, &r
->user_name
) > ndr_get_array_size(ndr
, &r
->user_name
)) {
4287 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->user_name
), ndr_get_array_length(ndr
, &r
->user_name
));
4289 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t)));
4290 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->user_name
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t), CH_UTF16
));
4291 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_name_0
, 0);
4293 if (r
->domain_name
) {
4294 _mem_save_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4295 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain_name
, 0);
4296 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domain_name
));
4297 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->domain_name
));
4298 if (ndr_get_array_length(ndr
, &r
->domain_name
) > ndr_get_array_size(ndr
, &r
->domain_name
)) {
4299 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->domain_name
), ndr_get_array_length(ndr
, &r
->domain_name
));
4301 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t)));
4302 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->domain_name
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t), CH_UTF16
));
4303 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_name_0
, 0);
4306 return NDR_ERR_SUCCESS
;
4309 _PUBLIC_
void ndr_print_wkssvc_NetrUseInfo2(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetrUseInfo2
*r
)
4311 ndr_print_struct(ndr
, name
, "wkssvc_NetrUseInfo2");
4313 ndr_print_ptr(ndr
, "local", r
->local
);
4316 ndr_print_string(ndr
, "local", r
->local
);
4319 ndr_print_ptr(ndr
, "remote", r
->remote
);
4322 ndr_print_string(ndr
, "remote", r
->remote
);
4325 ndr_print_ptr(ndr
, "password", r
->password
);
4328 ndr_print_string(ndr
, "password", r
->password
);
4331 ndr_print_uint32(ndr
, "status", r
->status
);
4332 ndr_print_uint32(ndr
, "asg_type", r
->asg_type
);
4333 ndr_print_uint32(ndr
, "ref_count", r
->ref_count
);
4334 ndr_print_uint32(ndr
, "use_count", r
->use_count
);
4335 ndr_print_ptr(ndr
, "user_name", r
->user_name
);
4338 ndr_print_string(ndr
, "user_name", r
->user_name
);
4341 ndr_print_ptr(ndr
, "domain_name", r
->domain_name
);
4343 if (r
->domain_name
) {
4344 ndr_print_string(ndr
, "domain_name", r
->domain_name
);
4350 static enum ndr_err_code
ndr_push_wkssvc_NetrUseInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetrUseInfo1
*r
)
4352 if (ndr_flags
& NDR_SCALARS
) {
4353 NDR_CHECK(ndr_push_align(ndr
, 4));
4354 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->local
));
4355 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->remote
));
4356 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->password
));
4357 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->status
));
4358 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->asg_type
));
4359 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->ref_count
));
4360 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_count
));
4362 if (ndr_flags
& NDR_BUFFERS
) {
4364 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->local
, CH_UTF16
)));
4365 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4366 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->local
, CH_UTF16
)));
4367 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->local
, ndr_charset_length(r
->local
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4370 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->remote
, CH_UTF16
)));
4371 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4372 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->remote
, CH_UTF16
)));
4373 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->remote
, ndr_charset_length(r
->remote
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4376 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->password
, CH_UTF16
)));
4377 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4378 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->password
, CH_UTF16
)));
4379 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->password
, ndr_charset_length(r
->password
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4382 return NDR_ERR_SUCCESS
;
4385 static enum ndr_err_code
ndr_pull_wkssvc_NetrUseInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetrUseInfo1
*r
)
4387 uint32_t _ptr_local
;
4388 TALLOC_CTX
*_mem_save_local_0
;
4389 uint32_t _ptr_remote
;
4390 TALLOC_CTX
*_mem_save_remote_0
;
4391 uint32_t _ptr_password
;
4392 TALLOC_CTX
*_mem_save_password_0
;
4393 if (ndr_flags
& NDR_SCALARS
) {
4394 NDR_CHECK(ndr_pull_align(ndr
, 4));
4395 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_local
));
4397 NDR_PULL_ALLOC(ndr
, r
->local
);
4401 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_remote
));
4403 NDR_PULL_ALLOC(ndr
, r
->remote
);
4407 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password
));
4408 if (_ptr_password
) {
4409 NDR_PULL_ALLOC(ndr
, r
->password
);
4413 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->status
));
4414 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->asg_type
));
4415 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->ref_count
));
4416 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_count
));
4418 if (ndr_flags
& NDR_BUFFERS
) {
4420 _mem_save_local_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4421 NDR_PULL_SET_MEM_CTX(ndr
, r
->local
, 0);
4422 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->local
));
4423 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->local
));
4424 if (ndr_get_array_length(ndr
, &r
->local
) > ndr_get_array_size(ndr
, &r
->local
)) {
4425 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->local
), ndr_get_array_length(ndr
, &r
->local
));
4427 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->local
), sizeof(uint16_t)));
4428 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->local
, ndr_get_array_length(ndr
, &r
->local
), sizeof(uint16_t), CH_UTF16
));
4429 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_local_0
, 0);
4432 _mem_save_remote_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4433 NDR_PULL_SET_MEM_CTX(ndr
, r
->remote
, 0);
4434 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->remote
));
4435 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->remote
));
4436 if (ndr_get_array_length(ndr
, &r
->remote
) > ndr_get_array_size(ndr
, &r
->remote
)) {
4437 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->remote
), ndr_get_array_length(ndr
, &r
->remote
));
4439 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->remote
), sizeof(uint16_t)));
4440 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->remote
, ndr_get_array_length(ndr
, &r
->remote
), sizeof(uint16_t), CH_UTF16
));
4441 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_remote_0
, 0);
4444 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4445 NDR_PULL_SET_MEM_CTX(ndr
, r
->password
, 0);
4446 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->password
));
4447 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->password
));
4448 if (ndr_get_array_length(ndr
, &r
->password
) > ndr_get_array_size(ndr
, &r
->password
)) {
4449 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->password
), ndr_get_array_length(ndr
, &r
->password
));
4451 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->password
), sizeof(uint16_t)));
4452 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->password
, ndr_get_array_length(ndr
, &r
->password
), sizeof(uint16_t), CH_UTF16
));
4453 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, 0);
4456 return NDR_ERR_SUCCESS
;
4459 _PUBLIC_
void ndr_print_wkssvc_NetrUseInfo1(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetrUseInfo1
*r
)
4461 ndr_print_struct(ndr
, name
, "wkssvc_NetrUseInfo1");
4463 ndr_print_ptr(ndr
, "local", r
->local
);
4466 ndr_print_string(ndr
, "local", r
->local
);
4469 ndr_print_ptr(ndr
, "remote", r
->remote
);
4472 ndr_print_string(ndr
, "remote", r
->remote
);
4475 ndr_print_ptr(ndr
, "password", r
->password
);
4478 ndr_print_string(ndr
, "password", r
->password
);
4481 ndr_print_uint32(ndr
, "status", r
->status
);
4482 ndr_print_uint32(ndr
, "asg_type", r
->asg_type
);
4483 ndr_print_uint32(ndr
, "ref_count", r
->ref_count
);
4484 ndr_print_uint32(ndr
, "use_count", r
->use_count
);
4488 static enum ndr_err_code
ndr_push_wkssvc_NetrUseInfo0(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetrUseInfo0
*r
)
4490 if (ndr_flags
& NDR_SCALARS
) {
4491 NDR_CHECK(ndr_push_align(ndr
, 4));
4492 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->local
));
4493 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->remote
));
4495 if (ndr_flags
& NDR_BUFFERS
) {
4497 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->local
, CH_UTF16
)));
4498 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4499 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->local
, CH_UTF16
)));
4500 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->local
, ndr_charset_length(r
->local
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4503 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->remote
, CH_UTF16
)));
4504 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4505 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->remote
, CH_UTF16
)));
4506 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->remote
, ndr_charset_length(r
->remote
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4509 return NDR_ERR_SUCCESS
;
4512 static enum ndr_err_code
ndr_pull_wkssvc_NetrUseInfo0(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetrUseInfo0
*r
)
4514 uint32_t _ptr_local
;
4515 TALLOC_CTX
*_mem_save_local_0
;
4516 uint32_t _ptr_remote
;
4517 TALLOC_CTX
*_mem_save_remote_0
;
4518 if (ndr_flags
& NDR_SCALARS
) {
4519 NDR_CHECK(ndr_pull_align(ndr
, 4));
4520 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_local
));
4522 NDR_PULL_ALLOC(ndr
, r
->local
);
4526 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_remote
));
4528 NDR_PULL_ALLOC(ndr
, r
->remote
);
4533 if (ndr_flags
& NDR_BUFFERS
) {
4535 _mem_save_local_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4536 NDR_PULL_SET_MEM_CTX(ndr
, r
->local
, 0);
4537 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->local
));
4538 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->local
));
4539 if (ndr_get_array_length(ndr
, &r
->local
) > ndr_get_array_size(ndr
, &r
->local
)) {
4540 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->local
), ndr_get_array_length(ndr
, &r
->local
));
4542 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->local
), sizeof(uint16_t)));
4543 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->local
, ndr_get_array_length(ndr
, &r
->local
), sizeof(uint16_t), CH_UTF16
));
4544 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_local_0
, 0);
4547 _mem_save_remote_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4548 NDR_PULL_SET_MEM_CTX(ndr
, r
->remote
, 0);
4549 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->remote
));
4550 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->remote
));
4551 if (ndr_get_array_length(ndr
, &r
->remote
) > ndr_get_array_size(ndr
, &r
->remote
)) {
4552 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->remote
), ndr_get_array_length(ndr
, &r
->remote
));
4554 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->remote
), sizeof(uint16_t)));
4555 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->remote
, ndr_get_array_length(ndr
, &r
->remote
), sizeof(uint16_t), CH_UTF16
));
4556 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_remote_0
, 0);
4559 return NDR_ERR_SUCCESS
;
4562 _PUBLIC_
void ndr_print_wkssvc_NetrUseInfo0(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetrUseInfo0
*r
)
4564 ndr_print_struct(ndr
, name
, "wkssvc_NetrUseInfo0");
4566 ndr_print_ptr(ndr
, "local", r
->local
);
4569 ndr_print_string(ndr
, "local", r
->local
);
4572 ndr_print_ptr(ndr
, "remote", r
->remote
);
4575 ndr_print_string(ndr
, "remote", r
->remote
);
4581 static enum ndr_err_code
ndr_push_wkssvc_NetrUseGetInfoCtr(struct ndr_push
*ndr
, int ndr_flags
, const union wkssvc_NetrUseGetInfoCtr
*r
)
4583 if (ndr_flags
& NDR_SCALARS
) {
4584 int level
= ndr_push_get_switch_value(ndr
, r
);
4585 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
4588 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info0
));
4592 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
4596 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info2
));
4600 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info3
));
4604 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4607 if (ndr_flags
& NDR_BUFFERS
) {
4608 int level
= ndr_push_get_switch_value(ndr
, r
);
4612 NDR_CHECK(ndr_push_wkssvc_NetrUseInfo0(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info0
));
4618 NDR_CHECK(ndr_push_wkssvc_NetrUseInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
4624 NDR_CHECK(ndr_push_wkssvc_NetrUseInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
4630 NDR_CHECK(ndr_push_wkssvc_NetrUseInfo3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info3
));
4635 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4638 return NDR_ERR_SUCCESS
;
4641 static enum ndr_err_code
ndr_pull_wkssvc_NetrUseGetInfoCtr(struct ndr_pull
*ndr
, int ndr_flags
, union wkssvc_NetrUseGetInfoCtr
*r
)
4645 TALLOC_CTX
*_mem_save_info0_0
;
4646 TALLOC_CTX
*_mem_save_info1_0
;
4647 TALLOC_CTX
*_mem_save_info2_0
;
4648 TALLOC_CTX
*_mem_save_info3_0
;
4649 level
= ndr_pull_get_switch_value(ndr
, r
);
4650 if (ndr_flags
& NDR_SCALARS
) {
4651 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
4652 if (_level
!= level
) {
4653 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
4657 uint32_t _ptr_info0
;
4658 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info0
));
4660 NDR_PULL_ALLOC(ndr
, r
->info0
);
4667 uint32_t _ptr_info1
;
4668 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
4670 NDR_PULL_ALLOC(ndr
, r
->info1
);
4677 uint32_t _ptr_info2
;
4678 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info2
));
4680 NDR_PULL_ALLOC(ndr
, r
->info2
);
4687 uint32_t _ptr_info3
;
4688 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info3
));
4690 NDR_PULL_ALLOC(ndr
, r
->info3
);
4697 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4700 if (ndr_flags
& NDR_BUFFERS
) {
4704 _mem_save_info0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4705 NDR_PULL_SET_MEM_CTX(ndr
, r
->info0
, 0);
4706 NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo0(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info0
));
4707 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info0_0
, 0);
4713 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4714 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
4715 NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
4716 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
4722 _mem_save_info2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4723 NDR_PULL_SET_MEM_CTX(ndr
, r
->info2
, 0);
4724 NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
4725 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info2_0
, 0);
4731 _mem_save_info3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4732 NDR_PULL_SET_MEM_CTX(ndr
, r
->info3
, 0);
4733 NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info3
));
4734 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info3_0
, 0);
4739 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4742 return NDR_ERR_SUCCESS
;
4745 _PUBLIC_
void ndr_print_wkssvc_NetrUseGetInfoCtr(struct ndr_print
*ndr
, const char *name
, const union wkssvc_NetrUseGetInfoCtr
*r
)
4748 level
= ndr_print_get_switch_value(ndr
, r
);
4749 ndr_print_union(ndr
, name
, level
, "wkssvc_NetrUseGetInfoCtr");
4752 ndr_print_ptr(ndr
, "info0", r
->info0
);
4755 ndr_print_wkssvc_NetrUseInfo0(ndr
, "info0", r
->info0
);
4761 ndr_print_ptr(ndr
, "info1", r
->info1
);
4764 ndr_print_wkssvc_NetrUseInfo1(ndr
, "info1", r
->info1
);
4770 ndr_print_ptr(ndr
, "info2", r
->info2
);
4773 ndr_print_wkssvc_NetrUseInfo2(ndr
, "info2", r
->info2
);
4779 ndr_print_ptr(ndr
, "info3", r
->info3
);
4782 ndr_print_wkssvc_NetrUseInfo3(ndr
, "info3", r
->info3
);
4788 ndr_print_bad_level(ndr
, name
, level
);
4792 static enum ndr_err_code
ndr_push_wkssvc_NetrUseEnumCtr2(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetrUseEnumCtr2
*r
)
4794 uint32_t cntr_array_1
;
4795 if (ndr_flags
& NDR_SCALARS
) {
4796 NDR_CHECK(ndr_push_align(ndr
, 4));
4797 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4798 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->array
));
4800 if (ndr_flags
& NDR_BUFFERS
) {
4802 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4803 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
4804 NDR_CHECK(ndr_push_wkssvc_NetrUseInfo2(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
4806 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
4807 NDR_CHECK(ndr_push_wkssvc_NetrUseInfo2(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
4811 return NDR_ERR_SUCCESS
;
4814 static enum ndr_err_code
ndr_pull_wkssvc_NetrUseEnumCtr2(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetrUseEnumCtr2
*r
)
4816 uint32_t _ptr_array
;
4817 uint32_t cntr_array_1
;
4818 TALLOC_CTX
*_mem_save_array_0
;
4819 TALLOC_CTX
*_mem_save_array_1
;
4820 if (ndr_flags
& NDR_SCALARS
) {
4821 NDR_CHECK(ndr_pull_align(ndr
, 4));
4822 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4823 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_array
));
4825 NDR_PULL_ALLOC(ndr
, r
->array
);
4830 if (ndr_flags
& NDR_BUFFERS
) {
4832 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4833 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
4834 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
4835 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
4836 _mem_save_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4837 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
4838 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
4839 NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo2(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
4841 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
4842 NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo2(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
4844 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
4845 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
4848 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
4851 return NDR_ERR_SUCCESS
;
4854 _PUBLIC_
void ndr_print_wkssvc_NetrUseEnumCtr2(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetrUseEnumCtr2
*r
)
4856 uint32_t cntr_array_1
;
4857 ndr_print_struct(ndr
, name
, "wkssvc_NetrUseEnumCtr2");
4859 ndr_print_uint32(ndr
, "count", r
->count
);
4860 ndr_print_ptr(ndr
, "array", r
->array
);
4863 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
4865 for (cntr_array_1
=0;cntr_array_1
<r
->count
;cntr_array_1
++) {
4867 if (asprintf(&idx_1
, "[%d]", cntr_array_1
) != -1) {
4868 ndr_print_wkssvc_NetrUseInfo2(ndr
, "array", &r
->array
[cntr_array_1
]);
4878 static enum ndr_err_code
ndr_push_wkssvc_NetrUseEnumCtr1(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetrUseEnumCtr1
*r
)
4880 uint32_t cntr_array_1
;
4881 if (ndr_flags
& NDR_SCALARS
) {
4882 NDR_CHECK(ndr_push_align(ndr
, 4));
4883 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4884 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->array
));
4886 if (ndr_flags
& NDR_BUFFERS
) {
4888 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4889 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
4890 NDR_CHECK(ndr_push_wkssvc_NetrUseInfo1(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
4892 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
4893 NDR_CHECK(ndr_push_wkssvc_NetrUseInfo1(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
4897 return NDR_ERR_SUCCESS
;
4900 static enum ndr_err_code
ndr_pull_wkssvc_NetrUseEnumCtr1(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetrUseEnumCtr1
*r
)
4902 uint32_t _ptr_array
;
4903 uint32_t cntr_array_1
;
4904 TALLOC_CTX
*_mem_save_array_0
;
4905 TALLOC_CTX
*_mem_save_array_1
;
4906 if (ndr_flags
& NDR_SCALARS
) {
4907 NDR_CHECK(ndr_pull_align(ndr
, 4));
4908 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4909 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_array
));
4911 NDR_PULL_ALLOC(ndr
, r
->array
);
4916 if (ndr_flags
& NDR_BUFFERS
) {
4918 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4919 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
4920 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
4921 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
4922 _mem_save_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4923 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
4924 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
4925 NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo1(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
4927 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
4928 NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo1(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
4930 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
4931 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
4934 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
4937 return NDR_ERR_SUCCESS
;
4940 _PUBLIC_
void ndr_print_wkssvc_NetrUseEnumCtr1(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetrUseEnumCtr1
*r
)
4942 uint32_t cntr_array_1
;
4943 ndr_print_struct(ndr
, name
, "wkssvc_NetrUseEnumCtr1");
4945 ndr_print_uint32(ndr
, "count", r
->count
);
4946 ndr_print_ptr(ndr
, "array", r
->array
);
4949 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
4951 for (cntr_array_1
=0;cntr_array_1
<r
->count
;cntr_array_1
++) {
4953 if (asprintf(&idx_1
, "[%d]", cntr_array_1
) != -1) {
4954 ndr_print_wkssvc_NetrUseInfo1(ndr
, "array", &r
->array
[cntr_array_1
]);
4964 static enum ndr_err_code
ndr_push_wkssvc_NetrUseEnumCtr0(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetrUseEnumCtr0
*r
)
4966 uint32_t cntr_array_1
;
4967 if (ndr_flags
& NDR_SCALARS
) {
4968 NDR_CHECK(ndr_push_align(ndr
, 4));
4969 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4970 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->array
));
4972 if (ndr_flags
& NDR_BUFFERS
) {
4974 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4975 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
4976 NDR_CHECK(ndr_push_wkssvc_NetrUseInfo0(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
4978 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
4979 NDR_CHECK(ndr_push_wkssvc_NetrUseInfo0(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
4983 return NDR_ERR_SUCCESS
;
4986 static enum ndr_err_code
ndr_pull_wkssvc_NetrUseEnumCtr0(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetrUseEnumCtr0
*r
)
4988 uint32_t _ptr_array
;
4989 uint32_t cntr_array_1
;
4990 TALLOC_CTX
*_mem_save_array_0
;
4991 TALLOC_CTX
*_mem_save_array_1
;
4992 if (ndr_flags
& NDR_SCALARS
) {
4993 NDR_CHECK(ndr_pull_align(ndr
, 4));
4994 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4995 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_array
));
4997 NDR_PULL_ALLOC(ndr
, r
->array
);
5002 if (ndr_flags
& NDR_BUFFERS
) {
5004 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5005 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
5006 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
5007 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
5008 _mem_save_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5009 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
5010 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
5011 NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo0(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
5013 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
5014 NDR_CHECK(ndr_pull_wkssvc_NetrUseInfo0(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
5016 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
5017 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
5020 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
5023 return NDR_ERR_SUCCESS
;
5026 _PUBLIC_
void ndr_print_wkssvc_NetrUseEnumCtr0(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetrUseEnumCtr0
*r
)
5028 uint32_t cntr_array_1
;
5029 ndr_print_struct(ndr
, name
, "wkssvc_NetrUseEnumCtr0");
5031 ndr_print_uint32(ndr
, "count", r
->count
);
5032 ndr_print_ptr(ndr
, "array", r
->array
);
5035 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->count
);
5037 for (cntr_array_1
=0;cntr_array_1
<r
->count
;cntr_array_1
++) {
5039 if (asprintf(&idx_1
, "[%d]", cntr_array_1
) != -1) {
5040 ndr_print_wkssvc_NetrUseInfo0(ndr
, "array", &r
->array
[cntr_array_1
]);
5050 static enum ndr_err_code
ndr_push_wkssvc_NetrUseEnumCtr(struct ndr_push
*ndr
, int ndr_flags
, const union wkssvc_NetrUseEnumCtr
*r
)
5052 if (ndr_flags
& NDR_SCALARS
) {
5053 int level
= ndr_push_get_switch_value(ndr
, r
);
5054 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
5057 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->ctr0
));
5061 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->ctr1
));
5065 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->ctr2
));
5069 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5072 if (ndr_flags
& NDR_BUFFERS
) {
5073 int level
= ndr_push_get_switch_value(ndr
, r
);
5077 NDR_CHECK(ndr_push_wkssvc_NetrUseEnumCtr0(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->ctr0
));
5083 NDR_CHECK(ndr_push_wkssvc_NetrUseEnumCtr1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->ctr1
));
5089 NDR_CHECK(ndr_push_wkssvc_NetrUseEnumCtr2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->ctr2
));
5094 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5097 return NDR_ERR_SUCCESS
;
5100 static enum ndr_err_code
ndr_pull_wkssvc_NetrUseEnumCtr(struct ndr_pull
*ndr
, int ndr_flags
, union wkssvc_NetrUseEnumCtr
*r
)
5104 TALLOC_CTX
*_mem_save_ctr0_0
;
5105 TALLOC_CTX
*_mem_save_ctr1_0
;
5106 TALLOC_CTX
*_mem_save_ctr2_0
;
5107 level
= ndr_pull_get_switch_value(ndr
, r
);
5108 if (ndr_flags
& NDR_SCALARS
) {
5109 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
5110 if (_level
!= level
) {
5111 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
5116 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ctr0
));
5118 NDR_PULL_ALLOC(ndr
, r
->ctr0
);
5126 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ctr1
));
5128 NDR_PULL_ALLOC(ndr
, r
->ctr1
);
5136 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ctr2
));
5138 NDR_PULL_ALLOC(ndr
, r
->ctr2
);
5145 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5148 if (ndr_flags
& NDR_BUFFERS
) {
5152 _mem_save_ctr0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5153 NDR_PULL_SET_MEM_CTX(ndr
, r
->ctr0
, 0);
5154 NDR_CHECK(ndr_pull_wkssvc_NetrUseEnumCtr0(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->ctr0
));
5155 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr0_0
, 0);
5161 _mem_save_ctr1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5162 NDR_PULL_SET_MEM_CTX(ndr
, r
->ctr1
, 0);
5163 NDR_CHECK(ndr_pull_wkssvc_NetrUseEnumCtr1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->ctr1
));
5164 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr1_0
, 0);
5170 _mem_save_ctr2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5171 NDR_PULL_SET_MEM_CTX(ndr
, r
->ctr2
, 0);
5172 NDR_CHECK(ndr_pull_wkssvc_NetrUseEnumCtr2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->ctr2
));
5173 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr2_0
, 0);
5178 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
5181 return NDR_ERR_SUCCESS
;
5184 _PUBLIC_
void ndr_print_wkssvc_NetrUseEnumCtr(struct ndr_print
*ndr
, const char *name
, const union wkssvc_NetrUseEnumCtr
*r
)
5187 level
= ndr_print_get_switch_value(ndr
, r
);
5188 ndr_print_union(ndr
, name
, level
, "wkssvc_NetrUseEnumCtr");
5191 ndr_print_ptr(ndr
, "ctr0", r
->ctr0
);
5194 ndr_print_wkssvc_NetrUseEnumCtr0(ndr
, "ctr0", r
->ctr0
);
5200 ndr_print_ptr(ndr
, "ctr1", r
->ctr1
);
5203 ndr_print_wkssvc_NetrUseEnumCtr1(ndr
, "ctr1", r
->ctr1
);
5209 ndr_print_ptr(ndr
, "ctr2", r
->ctr2
);
5212 ndr_print_wkssvc_NetrUseEnumCtr2(ndr
, "ctr2", r
->ctr2
);
5218 ndr_print_bad_level(ndr
, name
, level
);
5222 static enum ndr_err_code
ndr_push_wkssvc_NetrUseEnumInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetrUseEnumInfo
*r
)
5224 if (ndr_flags
& NDR_SCALARS
) {
5225 NDR_CHECK(ndr_push_align(ndr
, 4));
5226 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->level
));
5227 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->ctr
, r
->level
));
5228 NDR_CHECK(ndr_push_wkssvc_NetrUseEnumCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
5230 if (ndr_flags
& NDR_BUFFERS
) {
5231 NDR_CHECK(ndr_push_wkssvc_NetrUseEnumCtr(ndr
, NDR_BUFFERS
, &r
->ctr
));
5233 return NDR_ERR_SUCCESS
;
5236 static enum ndr_err_code
ndr_pull_wkssvc_NetrUseEnumInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetrUseEnumInfo
*r
)
5238 if (ndr_flags
& NDR_SCALARS
) {
5239 NDR_CHECK(ndr_pull_align(ndr
, 4));
5240 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->level
));
5241 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->ctr
, r
->level
));
5242 NDR_CHECK(ndr_pull_wkssvc_NetrUseEnumCtr(ndr
, NDR_SCALARS
, &r
->ctr
));
5244 if (ndr_flags
& NDR_BUFFERS
) {
5245 NDR_CHECK(ndr_pull_wkssvc_NetrUseEnumCtr(ndr
, NDR_BUFFERS
, &r
->ctr
));
5247 return NDR_ERR_SUCCESS
;
5250 _PUBLIC_
void ndr_print_wkssvc_NetrUseEnumInfo(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetrUseEnumInfo
*r
)
5252 ndr_print_struct(ndr
, name
, "wkssvc_NetrUseEnumInfo");
5254 ndr_print_uint32(ndr
, "level", r
->level
);
5255 ndr_print_set_switch_value(ndr
, &r
->ctr
, r
->level
);
5256 ndr_print_wkssvc_NetrUseEnumCtr(ndr
, "ctr", &r
->ctr
);
5260 static enum ndr_err_code
ndr_push_wkssvc_NetrWorkstationStatistics(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetrWorkstationStatistics
*r
)
5262 if (ndr_flags
& NDR_SCALARS
) {
5263 NDR_CHECK(ndr_push_align(ndr
, 8));
5264 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown1
));
5265 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown2
));
5266 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown3
));
5267 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown4
));
5268 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown5
));
5269 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown6
));
5270 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown7
));
5271 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown8
));
5272 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown9
));
5273 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown10
));
5274 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown11
));
5275 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown12
));
5276 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown13
));
5277 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown14
));
5278 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown15
));
5279 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown16
));
5280 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown17
));
5281 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown18
));
5282 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown19
));
5283 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown20
));
5284 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown21
));
5285 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown22
));
5286 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown23
));
5287 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown24
));
5288 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown25
));
5289 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown26
));
5290 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown27
));
5291 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown28
));
5292 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown29
));
5293 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown30
));
5294 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown31
));
5295 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown32
));
5296 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown33
));
5297 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown34
));
5298 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown35
));
5299 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown36
));
5300 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown37
));
5301 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown38
));
5302 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown39
));
5303 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown40
));
5305 if (ndr_flags
& NDR_BUFFERS
) {
5307 return NDR_ERR_SUCCESS
;
5310 static enum ndr_err_code
ndr_pull_wkssvc_NetrWorkstationStatistics(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetrWorkstationStatistics
*r
)
5312 if (ndr_flags
& NDR_SCALARS
) {
5313 NDR_CHECK(ndr_pull_align(ndr
, 8));
5314 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown1
));
5315 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown2
));
5316 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown3
));
5317 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown4
));
5318 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown5
));
5319 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown6
));
5320 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown7
));
5321 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown8
));
5322 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown9
));
5323 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown10
));
5324 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown11
));
5325 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown12
));
5326 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown13
));
5327 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown14
));
5328 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown15
));
5329 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown16
));
5330 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown17
));
5331 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown18
));
5332 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown19
));
5333 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown20
));
5334 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown21
));
5335 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown22
));
5336 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown23
));
5337 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown24
));
5338 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown25
));
5339 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown26
));
5340 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown27
));
5341 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown28
));
5342 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown29
));
5343 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown30
));
5344 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown31
));
5345 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown32
));
5346 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown33
));
5347 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown34
));
5348 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown35
));
5349 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown36
));
5350 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown37
));
5351 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown38
));
5352 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown39
));
5353 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown40
));
5355 if (ndr_flags
& NDR_BUFFERS
) {
5357 return NDR_ERR_SUCCESS
;
5360 _PUBLIC_
void ndr_print_wkssvc_NetrWorkstationStatistics(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetrWorkstationStatistics
*r
)
5362 ndr_print_struct(ndr
, name
, "wkssvc_NetrWorkstationStatistics");
5364 ndr_print_hyper(ndr
, "unknown1", r
->unknown1
);
5365 ndr_print_hyper(ndr
, "unknown2", r
->unknown2
);
5366 ndr_print_hyper(ndr
, "unknown3", r
->unknown3
);
5367 ndr_print_hyper(ndr
, "unknown4", r
->unknown4
);
5368 ndr_print_hyper(ndr
, "unknown5", r
->unknown5
);
5369 ndr_print_hyper(ndr
, "unknown6", r
->unknown6
);
5370 ndr_print_hyper(ndr
, "unknown7", r
->unknown7
);
5371 ndr_print_hyper(ndr
, "unknown8", r
->unknown8
);
5372 ndr_print_hyper(ndr
, "unknown9", r
->unknown9
);
5373 ndr_print_hyper(ndr
, "unknown10", r
->unknown10
);
5374 ndr_print_hyper(ndr
, "unknown11", r
->unknown11
);
5375 ndr_print_hyper(ndr
, "unknown12", r
->unknown12
);
5376 ndr_print_hyper(ndr
, "unknown13", r
->unknown13
);
5377 ndr_print_uint32(ndr
, "unknown14", r
->unknown14
);
5378 ndr_print_uint32(ndr
, "unknown15", r
->unknown15
);
5379 ndr_print_uint32(ndr
, "unknown16", r
->unknown16
);
5380 ndr_print_uint32(ndr
, "unknown17", r
->unknown17
);
5381 ndr_print_uint32(ndr
, "unknown18", r
->unknown18
);
5382 ndr_print_uint32(ndr
, "unknown19", r
->unknown19
);
5383 ndr_print_uint32(ndr
, "unknown20", r
->unknown20
);
5384 ndr_print_uint32(ndr
, "unknown21", r
->unknown21
);
5385 ndr_print_uint32(ndr
, "unknown22", r
->unknown22
);
5386 ndr_print_uint32(ndr
, "unknown23", r
->unknown23
);
5387 ndr_print_uint32(ndr
, "unknown24", r
->unknown24
);
5388 ndr_print_uint32(ndr
, "unknown25", r
->unknown25
);
5389 ndr_print_uint32(ndr
, "unknown26", r
->unknown26
);
5390 ndr_print_uint32(ndr
, "unknown27", r
->unknown27
);
5391 ndr_print_uint32(ndr
, "unknown28", r
->unknown28
);
5392 ndr_print_uint32(ndr
, "unknown29", r
->unknown29
);
5393 ndr_print_uint32(ndr
, "unknown30", r
->unknown30
);
5394 ndr_print_uint32(ndr
, "unknown31", r
->unknown31
);
5395 ndr_print_uint32(ndr
, "unknown32", r
->unknown32
);
5396 ndr_print_uint32(ndr
, "unknown33", r
->unknown33
);
5397 ndr_print_uint32(ndr
, "unknown34", r
->unknown34
);
5398 ndr_print_uint32(ndr
, "unknown35", r
->unknown35
);
5399 ndr_print_uint32(ndr
, "unknown36", r
->unknown36
);
5400 ndr_print_uint32(ndr
, "unknown37", r
->unknown37
);
5401 ndr_print_uint32(ndr
, "unknown38", r
->unknown38
);
5402 ndr_print_uint32(ndr
, "unknown39", r
->unknown39
);
5403 ndr_print_uint32(ndr
, "unknown40", r
->unknown40
);
5407 static enum ndr_err_code
ndr_push_wkssvc_renameflags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
5409 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
5410 return NDR_ERR_SUCCESS
;
5413 static enum ndr_err_code
ndr_pull_wkssvc_renameflags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
5416 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
5418 return NDR_ERR_SUCCESS
;
5421 _PUBLIC_
void ndr_print_wkssvc_renameflags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
5423 ndr_print_uint32(ndr
, name
, r
);
5425 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE", WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE
, r
);
5429 static enum ndr_err_code
ndr_push_wkssvc_NetValidateNameType(struct ndr_push
*ndr
, int ndr_flags
, enum wkssvc_NetValidateNameType r
)
5431 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
5432 return NDR_ERR_SUCCESS
;
5435 static enum ndr_err_code
ndr_pull_wkssvc_NetValidateNameType(struct ndr_pull
*ndr
, int ndr_flags
, enum wkssvc_NetValidateNameType
*r
)
5438 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
5440 return NDR_ERR_SUCCESS
;
5443 _PUBLIC_
void ndr_print_wkssvc_NetValidateNameType(struct ndr_print
*ndr
, const char *name
, enum wkssvc_NetValidateNameType r
)
5445 const char *val
= NULL
;
5448 case NetSetupUnknown
: val
= "NetSetupUnknown"; break;
5449 case NetSetupMachine
: val
= "NetSetupMachine"; break;
5450 case NetSetupWorkgroup
: val
= "NetSetupWorkgroup"; break;
5451 case NetSetupDomain
: val
= "NetSetupDomain"; break;
5452 case NetSetupNonExistentDomain
: val
= "NetSetupNonExistentDomain"; break;
5453 case NetSetupDnsMachine
: val
= "NetSetupDnsMachine"; break;
5455 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
5458 static enum ndr_err_code
ndr_push_wkssvc_NetJoinStatus(struct ndr_push
*ndr
, int ndr_flags
, enum wkssvc_NetJoinStatus r
)
5460 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
5461 return NDR_ERR_SUCCESS
;
5464 static enum ndr_err_code
ndr_pull_wkssvc_NetJoinStatus(struct ndr_pull
*ndr
, int ndr_flags
, enum wkssvc_NetJoinStatus
*r
)
5467 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
5469 return NDR_ERR_SUCCESS
;
5472 _PUBLIC_
void ndr_print_wkssvc_NetJoinStatus(struct ndr_print
*ndr
, const char *name
, enum wkssvc_NetJoinStatus r
)
5474 const char *val
= NULL
;
5477 case NetSetupUnknownStatus
: val
= "NetSetupUnknownStatus"; break;
5478 case NetSetupUnjoined
: val
= "NetSetupUnjoined"; break;
5479 case NetSetupWorkgroupName
: val
= "NetSetupWorkgroupName"; break;
5480 case NetSetupDomainName
: val
= "NetSetupDomainName"; break;
5482 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
5485 static enum ndr_err_code
ndr_push_wkssvc_PasswordBuffer(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_PasswordBuffer
*r
)
5488 uint32_t _flags_save_STRUCT
= ndr
->flags
;
5489 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
5490 if (ndr_flags
& NDR_SCALARS
) {
5491 NDR_CHECK(ndr_push_align(ndr
, 1));
5492 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, 524));
5494 if (ndr_flags
& NDR_BUFFERS
) {
5496 ndr
->flags
= _flags_save_STRUCT
;
5498 return NDR_ERR_SUCCESS
;
5501 static enum ndr_err_code
ndr_pull_wkssvc_PasswordBuffer(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_PasswordBuffer
*r
)
5504 uint32_t _flags_save_STRUCT
= ndr
->flags
;
5505 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
5506 if (ndr_flags
& NDR_SCALARS
) {
5507 NDR_CHECK(ndr_pull_align(ndr
, 1));
5508 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, 524));
5510 if (ndr_flags
& NDR_BUFFERS
) {
5512 ndr
->flags
= _flags_save_STRUCT
;
5514 return NDR_ERR_SUCCESS
;
5517 _PUBLIC_
void ndr_print_wkssvc_PasswordBuffer(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_PasswordBuffer
*r
)
5519 ndr_print_struct(ndr
, name
, "wkssvc_PasswordBuffer");
5521 uint32_t _flags_save_STRUCT
= ndr
->flags
;
5522 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
5524 ndr_print_array_uint8(ndr
, "data", r
->data
, 524);
5526 ndr
->flags
= _flags_save_STRUCT
;
5530 static enum ndr_err_code
ndr_push_wkssvc_joinflags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
5532 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
5533 return NDR_ERR_SUCCESS
;
5536 static enum ndr_err_code
ndr_pull_wkssvc_joinflags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
5539 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
5541 return NDR_ERR_SUCCESS
;
5544 _PUBLIC_
void ndr_print_wkssvc_joinflags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
5546 ndr_print_uint32(ndr
, name
, r
);
5548 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_JOIN_WITH_NEW_NAME", WKSSVC_JOIN_FLAGS_JOIN_WITH_NEW_NAME
, r
);
5549 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_JOIN_DC_ACCOUNT", WKSSVC_JOIN_FLAGS_JOIN_DC_ACCOUNT
, r
);
5550 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_DEFER_SPN", WKSSVC_JOIN_FLAGS_DEFER_SPN
, r
);
5551 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_MACHINE_PWD_PASSED", WKSSVC_JOIN_FLAGS_MACHINE_PWD_PASSED
, r
);
5552 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_JOIN_UNSECURE", WKSSVC_JOIN_FLAGS_JOIN_UNSECURE
, r
);
5553 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_DOMAIN_JOIN_IF_JOINED", WKSSVC_JOIN_FLAGS_DOMAIN_JOIN_IF_JOINED
, r
);
5554 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_WIN9X_UPGRADE", WKSSVC_JOIN_FLAGS_WIN9X_UPGRADE
, r
);
5555 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE", WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE
, r
);
5556 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE", WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE
, r
);
5557 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_JOIN_TYPE", WKSSVC_JOIN_FLAGS_JOIN_TYPE
, r
);
5561 static enum ndr_err_code
ndr_push_wkssvc_ComputerNameType(struct ndr_push
*ndr
, int ndr_flags
, enum wkssvc_ComputerNameType r
)
5563 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
5564 return NDR_ERR_SUCCESS
;
5567 static enum ndr_err_code
ndr_pull_wkssvc_ComputerNameType(struct ndr_pull
*ndr
, int ndr_flags
, enum wkssvc_ComputerNameType
*r
)
5570 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
5572 return NDR_ERR_SUCCESS
;
5575 _PUBLIC_
void ndr_print_wkssvc_ComputerNameType(struct ndr_print
*ndr
, const char *name
, enum wkssvc_ComputerNameType r
)
5577 const char *val
= NULL
;
5580 case NetPrimaryComputerName
: val
= "NetPrimaryComputerName"; break;
5581 case NetAlternateComputerNames
: val
= "NetAlternateComputerNames"; break;
5582 case NetAllComputerNames
: val
= "NetAllComputerNames"; break;
5583 case NetComputerNameTypeMax
: val
= "NetComputerNameTypeMax"; break;
5585 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
5588 static enum ndr_err_code
ndr_push_wkssvc_ComputerNamesCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_ComputerNamesCtr
*r
)
5590 uint32_t cntr_computer_name_1
;
5591 if (ndr_flags
& NDR_SCALARS
) {
5592 NDR_CHECK(ndr_push_align(ndr
, 4));
5593 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
5594 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->computer_name
));
5596 if (ndr_flags
& NDR_BUFFERS
) {
5597 if (r
->computer_name
) {
5598 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
5599 for (cntr_computer_name_1
= 0; cntr_computer_name_1
< r
->count
; cntr_computer_name_1
++) {
5600 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->computer_name
[cntr_computer_name_1
]));
5602 for (cntr_computer_name_1
= 0; cntr_computer_name_1
< r
->count
; cntr_computer_name_1
++) {
5603 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->computer_name
[cntr_computer_name_1
]));
5607 return NDR_ERR_SUCCESS
;
5610 static enum ndr_err_code
ndr_pull_wkssvc_ComputerNamesCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_ComputerNamesCtr
*r
)
5612 uint32_t _ptr_computer_name
;
5613 uint32_t cntr_computer_name_1
;
5614 TALLOC_CTX
*_mem_save_computer_name_0
;
5615 TALLOC_CTX
*_mem_save_computer_name_1
;
5616 if (ndr_flags
& NDR_SCALARS
) {
5617 NDR_CHECK(ndr_pull_align(ndr
, 4));
5618 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
5619 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_computer_name
));
5620 if (_ptr_computer_name
) {
5621 NDR_PULL_ALLOC(ndr
, r
->computer_name
);
5623 r
->computer_name
= NULL
;
5626 if (ndr_flags
& NDR_BUFFERS
) {
5627 if (r
->computer_name
) {
5628 _mem_save_computer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5629 NDR_PULL_SET_MEM_CTX(ndr
, r
->computer_name
, 0);
5630 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->computer_name
));
5631 NDR_PULL_ALLOC_N(ndr
, r
->computer_name
, ndr_get_array_size(ndr
, &r
->computer_name
));
5632 _mem_save_computer_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5633 NDR_PULL_SET_MEM_CTX(ndr
, r
->computer_name
, 0);
5634 for (cntr_computer_name_1
= 0; cntr_computer_name_1
< r
->count
; cntr_computer_name_1
++) {
5635 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->computer_name
[cntr_computer_name_1
]));
5637 for (cntr_computer_name_1
= 0; cntr_computer_name_1
< r
->count
; cntr_computer_name_1
++) {
5638 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->computer_name
[cntr_computer_name_1
]));
5640 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_computer_name_1
, 0);
5641 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_computer_name_0
, 0);
5643 if (r
->computer_name
) {
5644 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->computer_name
, r
->count
));
5647 return NDR_ERR_SUCCESS
;
5650 _PUBLIC_
void ndr_print_wkssvc_ComputerNamesCtr(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_ComputerNamesCtr
*r
)
5652 uint32_t cntr_computer_name_1
;
5653 ndr_print_struct(ndr
, name
, "wkssvc_ComputerNamesCtr");
5655 ndr_print_uint32(ndr
, "count", r
->count
);
5656 ndr_print_ptr(ndr
, "computer_name", r
->computer_name
);
5658 if (r
->computer_name
) {
5659 ndr
->print(ndr
, "%s: ARRAY(%d)", "computer_name", (int)r
->count
);
5661 for (cntr_computer_name_1
=0;cntr_computer_name_1
<r
->count
;cntr_computer_name_1
++) {
5663 if (asprintf(&idx_1
, "[%d]", cntr_computer_name_1
) != -1) {
5664 ndr_print_lsa_String(ndr
, "computer_name", &r
->computer_name
[cntr_computer_name_1
]);
5674 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaGetInfo(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetWkstaGetInfo
*r
)
5676 if (flags
& NDR_IN
) {
5677 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
5678 if (r
->in
.server_name
) {
5679 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
5680 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5681 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
5682 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
));
5684 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
5686 if (flags
& NDR_OUT
) {
5687 if (r
->out
.info
== NULL
) {
5688 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5690 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
5691 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
5692 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5694 return NDR_ERR_SUCCESS
;
5697 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaGetInfo(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetWkstaGetInfo
*r
)
5699 uint32_t _ptr_server_name
;
5700 TALLOC_CTX
*_mem_save_server_name_0
;
5701 TALLOC_CTX
*_mem_save_info_0
;
5702 if (flags
& NDR_IN
) {
5703 ZERO_STRUCT(r
->out
);
5705 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
5706 if (_ptr_server_name
) {
5707 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
5709 r
->in
.server_name
= NULL
;
5711 if (r
->in
.server_name
) {
5712 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5713 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
5714 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
5715 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
5716 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
5717 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
5719 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
5720 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
5721 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
5723 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
5724 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
5725 ZERO_STRUCTP(r
->out
.info
);
5727 if (flags
& NDR_OUT
) {
5728 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5729 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
5731 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5732 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
5733 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
5734 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
5735 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
5736 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5738 return NDR_ERR_SUCCESS
;
5741 _PUBLIC_
void ndr_print_wkssvc_NetWkstaGetInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetWkstaGetInfo
*r
)
5743 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaGetInfo");
5745 if (flags
& NDR_SET_VALUES
) {
5746 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5748 if (flags
& NDR_IN
) {
5749 ndr_print_struct(ndr
, "in", "wkssvc_NetWkstaGetInfo");
5751 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
5753 if (r
->in
.server_name
) {
5754 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
5757 ndr_print_uint32(ndr
, "level", r
->in
.level
);
5760 if (flags
& NDR_OUT
) {
5761 ndr_print_struct(ndr
, "out", "wkssvc_NetWkstaGetInfo");
5763 ndr_print_ptr(ndr
, "info", r
->out
.info
);
5765 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
5766 ndr_print_wkssvc_NetWkstaInfo(ndr
, "info", r
->out
.info
);
5768 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5774 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaSetInfo(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetWkstaSetInfo
*r
)
5776 if (flags
& NDR_IN
) {
5777 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
5778 if (r
->in
.server_name
) {
5779 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
5780 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5781 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
5782 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
));
5784 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
5785 if (r
->in
.info
== NULL
) {
5786 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5788 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
5789 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
5790 if (r
->in
.parm_error
== NULL
) {
5791 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5793 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.parm_error
));
5795 if (flags
& NDR_OUT
) {
5796 if (r
->out
.parm_error
== NULL
) {
5797 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5799 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.parm_error
));
5800 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5802 return NDR_ERR_SUCCESS
;
5805 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaSetInfo(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetWkstaSetInfo
*r
)
5807 uint32_t _ptr_server_name
;
5808 TALLOC_CTX
*_mem_save_server_name_0
;
5809 TALLOC_CTX
*_mem_save_info_0
;
5810 TALLOC_CTX
*_mem_save_parm_error_0
;
5811 if (flags
& NDR_IN
) {
5812 ZERO_STRUCT(r
->out
);
5814 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
5815 if (_ptr_server_name
) {
5816 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
5818 r
->in
.server_name
= NULL
;
5820 if (r
->in
.server_name
) {
5821 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5822 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
5823 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
5824 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
5825 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
5826 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
5828 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
5829 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
5830 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
5832 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
5833 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5834 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
5836 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5837 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
5838 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
5839 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
5840 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
5841 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5842 NDR_PULL_ALLOC(ndr
, r
->in
.parm_error
);
5844 _mem_save_parm_error_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5845 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.parm_error
, LIBNDR_FLAG_REF_ALLOC
);
5846 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.parm_error
));
5847 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parm_error_0
, LIBNDR_FLAG_REF_ALLOC
);
5848 NDR_PULL_ALLOC(ndr
, r
->out
.parm_error
);
5849 *r
->out
.parm_error
= *r
->in
.parm_error
;
5851 if (flags
& NDR_OUT
) {
5852 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5853 NDR_PULL_ALLOC(ndr
, r
->out
.parm_error
);
5855 _mem_save_parm_error_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5856 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.parm_error
, LIBNDR_FLAG_REF_ALLOC
);
5857 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.parm_error
));
5858 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parm_error_0
, LIBNDR_FLAG_REF_ALLOC
);
5859 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5861 return NDR_ERR_SUCCESS
;
5864 _PUBLIC_
void ndr_print_wkssvc_NetWkstaSetInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetWkstaSetInfo
*r
)
5866 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaSetInfo");
5868 if (flags
& NDR_SET_VALUES
) {
5869 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5871 if (flags
& NDR_IN
) {
5872 ndr_print_struct(ndr
, "in", "wkssvc_NetWkstaSetInfo");
5874 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
5876 if (r
->in
.server_name
) {
5877 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
5880 ndr_print_uint32(ndr
, "level", r
->in
.level
);
5881 ndr_print_ptr(ndr
, "info", r
->in
.info
);
5883 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
5884 ndr_print_wkssvc_NetWkstaInfo(ndr
, "info", r
->in
.info
);
5886 ndr_print_ptr(ndr
, "parm_error", r
->in
.parm_error
);
5888 ndr_print_uint32(ndr
, "parm_error", *r
->in
.parm_error
);
5892 if (flags
& NDR_OUT
) {
5893 ndr_print_struct(ndr
, "out", "wkssvc_NetWkstaSetInfo");
5895 ndr_print_ptr(ndr
, "parm_error", r
->out
.parm_error
);
5897 ndr_print_uint32(ndr
, "parm_error", *r
->out
.parm_error
);
5899 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5905 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaEnumUsers(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetWkstaEnumUsers
*r
)
5907 if (flags
& NDR_IN
) {
5908 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
5909 if (r
->in
.server_name
) {
5910 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
5911 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5912 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
5913 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
));
5915 if (r
->in
.info
== NULL
) {
5916 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5918 NDR_CHECK(ndr_push_wkssvc_NetWkstaEnumUsersInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
5919 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.prefmaxlen
));
5920 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.resume_handle
));
5921 if (r
->in
.resume_handle
) {
5922 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
5925 if (flags
& NDR_OUT
) {
5926 if (r
->out
.info
== NULL
) {
5927 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5929 NDR_CHECK(ndr_push_wkssvc_NetWkstaEnumUsersInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
5930 if (r
->out
.entries_read
== NULL
) {
5931 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5933 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.entries_read
));
5934 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.resume_handle
));
5935 if (r
->out
.resume_handle
) {
5936 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
5938 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5940 return NDR_ERR_SUCCESS
;
5943 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaEnumUsers(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetWkstaEnumUsers
*r
)
5945 uint32_t _ptr_server_name
;
5946 uint32_t _ptr_resume_handle
;
5947 TALLOC_CTX
*_mem_save_server_name_0
;
5948 TALLOC_CTX
*_mem_save_info_0
;
5949 TALLOC_CTX
*_mem_save_entries_read_0
;
5950 TALLOC_CTX
*_mem_save_resume_handle_0
;
5951 if (flags
& NDR_IN
) {
5952 ZERO_STRUCT(r
->out
);
5954 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
5955 if (_ptr_server_name
) {
5956 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
5958 r
->in
.server_name
= NULL
;
5960 if (r
->in
.server_name
) {
5961 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5962 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
5963 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
5964 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
5965 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
5966 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
5968 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
5969 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
5970 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
5972 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5973 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
5975 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5976 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
5977 NDR_CHECK(ndr_pull_wkssvc_NetWkstaEnumUsersInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
5978 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
5979 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.prefmaxlen
));
5980 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_resume_handle
));
5981 if (_ptr_resume_handle
) {
5982 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
5984 r
->in
.resume_handle
= NULL
;
5986 if (r
->in
.resume_handle
) {
5987 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5988 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, 0);
5989 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
5990 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, 0);
5992 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
5993 *r
->out
.info
= *r
->in
.info
;
5994 NDR_PULL_ALLOC(ndr
, r
->out
.entries_read
);
5995 ZERO_STRUCTP(r
->out
.entries_read
);
5997 if (flags
& NDR_OUT
) {
5998 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5999 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
6001 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6002 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
6003 NDR_CHECK(ndr_pull_wkssvc_NetWkstaEnumUsersInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
6004 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
6005 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6006 NDR_PULL_ALLOC(ndr
, r
->out
.entries_read
);
6008 _mem_save_entries_read_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6009 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.entries_read
, LIBNDR_FLAG_REF_ALLOC
);
6010 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.entries_read
));
6011 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_read_0
, LIBNDR_FLAG_REF_ALLOC
);
6012 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_resume_handle
));
6013 if (_ptr_resume_handle
) {
6014 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6016 r
->out
.resume_handle
= NULL
;
6018 if (r
->out
.resume_handle
) {
6019 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6020 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, 0);
6021 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
6022 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, 0);
6024 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
6026 return NDR_ERR_SUCCESS
;
6029 _PUBLIC_
void ndr_print_wkssvc_NetWkstaEnumUsers(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetWkstaEnumUsers
*r
)
6031 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaEnumUsers");
6033 if (flags
& NDR_SET_VALUES
) {
6034 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6036 if (flags
& NDR_IN
) {
6037 ndr_print_struct(ndr
, "in", "wkssvc_NetWkstaEnumUsers");
6039 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
6041 if (r
->in
.server_name
) {
6042 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
6045 ndr_print_ptr(ndr
, "info", r
->in
.info
);
6047 ndr_print_wkssvc_NetWkstaEnumUsersInfo(ndr
, "info", r
->in
.info
);
6049 ndr_print_uint32(ndr
, "prefmaxlen", r
->in
.prefmaxlen
);
6050 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
6052 if (r
->in
.resume_handle
) {
6053 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
6058 if (flags
& NDR_OUT
) {
6059 ndr_print_struct(ndr
, "out", "wkssvc_NetWkstaEnumUsers");
6061 ndr_print_ptr(ndr
, "info", r
->out
.info
);
6063 ndr_print_wkssvc_NetWkstaEnumUsersInfo(ndr
, "info", r
->out
.info
);
6065 ndr_print_ptr(ndr
, "entries_read", r
->out
.entries_read
);
6067 ndr_print_uint32(ndr
, "entries_read", *r
->out
.entries_read
);
6069 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
6071 if (r
->out
.resume_handle
) {
6072 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
6075 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
6081 static enum ndr_err_code
ndr_push_wkssvc_NetrWkstaUserGetInfo(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrWkstaUserGetInfo
*r
)
6083 if (flags
& NDR_IN
) {
6084 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.unknown
));
6085 if (r
->in
.unknown
) {
6086 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.unknown
, CH_UTF16
)));
6087 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6088 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.unknown
, CH_UTF16
)));
6089 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.unknown
, ndr_charset_length(r
->in
.unknown
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6091 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
6093 if (flags
& NDR_OUT
) {
6094 if (r
->out
.info
== NULL
) {
6095 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6097 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
6098 NDR_CHECK(ndr_push_wkssvc_NetrWkstaUserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
6099 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
6101 return NDR_ERR_SUCCESS
;
6104 static enum ndr_err_code
ndr_pull_wkssvc_NetrWkstaUserGetInfo(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrWkstaUserGetInfo
*r
)
6106 uint32_t _ptr_unknown
;
6107 TALLOC_CTX
*_mem_save_unknown_0
;
6108 TALLOC_CTX
*_mem_save_info_0
;
6109 if (flags
& NDR_IN
) {
6110 ZERO_STRUCT(r
->out
);
6112 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown
));
6114 NDR_PULL_ALLOC(ndr
, r
->in
.unknown
);
6116 r
->in
.unknown
= NULL
;
6118 if (r
->in
.unknown
) {
6119 _mem_save_unknown_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6120 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.unknown
, 0);
6121 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.unknown
));
6122 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.unknown
));
6123 if (ndr_get_array_length(ndr
, &r
->in
.unknown
) > ndr_get_array_size(ndr
, &r
->in
.unknown
)) {
6124 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.unknown
), ndr_get_array_length(ndr
, &r
->in
.unknown
));
6126 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.unknown
), sizeof(uint16_t)));
6127 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.unknown
, ndr_get_array_length(ndr
, &r
->in
.unknown
), sizeof(uint16_t), CH_UTF16
));
6128 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown_0
, 0);
6130 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
6131 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
6132 ZERO_STRUCTP(r
->out
.info
);
6134 if (flags
& NDR_OUT
) {
6135 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6136 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
6138 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6139 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
6140 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
6141 NDR_CHECK(ndr_pull_wkssvc_NetrWkstaUserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
6142 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
6143 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
6145 return NDR_ERR_SUCCESS
;
6148 _PUBLIC_
void ndr_print_wkssvc_NetrWkstaUserGetInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrWkstaUserGetInfo
*r
)
6150 ndr_print_struct(ndr
, name
, "wkssvc_NetrWkstaUserGetInfo");
6152 if (flags
& NDR_SET_VALUES
) {
6153 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6155 if (flags
& NDR_IN
) {
6156 ndr_print_struct(ndr
, "in", "wkssvc_NetrWkstaUserGetInfo");
6158 ndr_print_ptr(ndr
, "unknown", r
->in
.unknown
);
6160 if (r
->in
.unknown
) {
6161 ndr_print_string(ndr
, "unknown", r
->in
.unknown
);
6164 ndr_print_uint32(ndr
, "level", r
->in
.level
);
6167 if (flags
& NDR_OUT
) {
6168 ndr_print_struct(ndr
, "out", "wkssvc_NetrWkstaUserGetInfo");
6170 ndr_print_ptr(ndr
, "info", r
->out
.info
);
6172 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
6173 ndr_print_wkssvc_NetrWkstaUserInfo(ndr
, "info", r
->out
.info
);
6175 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
6181 static enum ndr_err_code
ndr_push_wkssvc_NetrWkstaUserSetInfo(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrWkstaUserSetInfo
*r
)
6183 if (flags
& NDR_IN
) {
6184 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.unknown
));
6185 if (r
->in
.unknown
) {
6186 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.unknown
, CH_UTF16
)));
6187 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6188 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.unknown
, CH_UTF16
)));
6189 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.unknown
, ndr_charset_length(r
->in
.unknown
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6191 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
6192 if (r
->in
.info
== NULL
) {
6193 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6195 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
6196 NDR_CHECK(ndr_push_wkssvc_NetrWkstaUserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
6197 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.parm_err
));
6198 if (r
->in
.parm_err
) {
6199 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.parm_err
));
6202 if (flags
& NDR_OUT
) {
6203 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.parm_err
));
6204 if (r
->out
.parm_err
) {
6205 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.parm_err
));
6207 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
6209 return NDR_ERR_SUCCESS
;
6212 static enum ndr_err_code
ndr_pull_wkssvc_NetrWkstaUserSetInfo(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrWkstaUserSetInfo
*r
)
6214 uint32_t _ptr_unknown
;
6215 uint32_t _ptr_parm_err
;
6216 TALLOC_CTX
*_mem_save_unknown_0
;
6217 TALLOC_CTX
*_mem_save_info_0
;
6218 TALLOC_CTX
*_mem_save_parm_err_0
;
6219 if (flags
& NDR_IN
) {
6220 ZERO_STRUCT(r
->out
);
6222 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown
));
6224 NDR_PULL_ALLOC(ndr
, r
->in
.unknown
);
6226 r
->in
.unknown
= NULL
;
6228 if (r
->in
.unknown
) {
6229 _mem_save_unknown_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6230 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.unknown
, 0);
6231 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.unknown
));
6232 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.unknown
));
6233 if (ndr_get_array_length(ndr
, &r
->in
.unknown
) > ndr_get_array_size(ndr
, &r
->in
.unknown
)) {
6234 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.unknown
), ndr_get_array_length(ndr
, &r
->in
.unknown
));
6236 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.unknown
), sizeof(uint16_t)));
6237 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.unknown
, ndr_get_array_length(ndr
, &r
->in
.unknown
), sizeof(uint16_t), CH_UTF16
));
6238 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown_0
, 0);
6240 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
6241 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6242 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
6244 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6245 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
6246 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
6247 NDR_CHECK(ndr_pull_wkssvc_NetrWkstaUserInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
6248 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
6249 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parm_err
));
6250 if (_ptr_parm_err
) {
6251 NDR_PULL_ALLOC(ndr
, r
->in
.parm_err
);
6253 r
->in
.parm_err
= NULL
;
6255 if (r
->in
.parm_err
) {
6256 _mem_save_parm_err_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6257 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.parm_err
, 0);
6258 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.parm_err
));
6259 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parm_err_0
, 0);
6262 if (flags
& NDR_OUT
) {
6263 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parm_err
));
6264 if (_ptr_parm_err
) {
6265 NDR_PULL_ALLOC(ndr
, r
->out
.parm_err
);
6267 r
->out
.parm_err
= NULL
;
6269 if (r
->out
.parm_err
) {
6270 _mem_save_parm_err_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6271 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.parm_err
, 0);
6272 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.parm_err
));
6273 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parm_err_0
, 0);
6275 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
6277 return NDR_ERR_SUCCESS
;
6280 _PUBLIC_
void ndr_print_wkssvc_NetrWkstaUserSetInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrWkstaUserSetInfo
*r
)
6282 ndr_print_struct(ndr
, name
, "wkssvc_NetrWkstaUserSetInfo");
6284 if (flags
& NDR_SET_VALUES
) {
6285 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6287 if (flags
& NDR_IN
) {
6288 ndr_print_struct(ndr
, "in", "wkssvc_NetrWkstaUserSetInfo");
6290 ndr_print_ptr(ndr
, "unknown", r
->in
.unknown
);
6292 if (r
->in
.unknown
) {
6293 ndr_print_string(ndr
, "unknown", r
->in
.unknown
);
6296 ndr_print_uint32(ndr
, "level", r
->in
.level
);
6297 ndr_print_ptr(ndr
, "info", r
->in
.info
);
6299 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
6300 ndr_print_wkssvc_NetrWkstaUserInfo(ndr
, "info", r
->in
.info
);
6302 ndr_print_ptr(ndr
, "parm_err", r
->in
.parm_err
);
6304 if (r
->in
.parm_err
) {
6305 ndr_print_uint32(ndr
, "parm_err", *r
->in
.parm_err
);
6310 if (flags
& NDR_OUT
) {
6311 ndr_print_struct(ndr
, "out", "wkssvc_NetrWkstaUserSetInfo");
6313 ndr_print_ptr(ndr
, "parm_err", r
->out
.parm_err
);
6315 if (r
->out
.parm_err
) {
6316 ndr_print_uint32(ndr
, "parm_err", *r
->out
.parm_err
);
6319 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
6325 static enum ndr_err_code
ndr_push_wkssvc_NetWkstaTransportEnum(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetWkstaTransportEnum
*r
)
6327 if (flags
& NDR_IN
) {
6328 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
6329 if (r
->in
.server_name
) {
6330 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
6331 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6332 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
6333 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
));
6335 if (r
->in
.info
== NULL
) {
6336 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6338 NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
6339 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_buffer
));
6340 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.resume_handle
));
6341 if (r
->in
.resume_handle
) {
6342 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
6345 if (flags
& NDR_OUT
) {
6346 if (r
->out
.info
== NULL
) {
6347 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6349 NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
6350 if (r
->out
.total_entries
== NULL
) {
6351 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6353 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.total_entries
));
6354 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.resume_handle
));
6355 if (r
->out
.resume_handle
) {
6356 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
6358 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
6360 return NDR_ERR_SUCCESS
;
6363 static enum ndr_err_code
ndr_pull_wkssvc_NetWkstaTransportEnum(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetWkstaTransportEnum
*r
)
6365 uint32_t _ptr_server_name
;
6366 uint32_t _ptr_resume_handle
;
6367 TALLOC_CTX
*_mem_save_server_name_0
;
6368 TALLOC_CTX
*_mem_save_info_0
;
6369 TALLOC_CTX
*_mem_save_total_entries_0
;
6370 TALLOC_CTX
*_mem_save_resume_handle_0
;
6371 if (flags
& NDR_IN
) {
6372 ZERO_STRUCT(r
->out
);
6374 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
6375 if (_ptr_server_name
) {
6376 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
6378 r
->in
.server_name
= NULL
;
6380 if (r
->in
.server_name
) {
6381 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6382 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
6383 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
6384 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
6385 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
6386 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
6388 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
6389 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
6390 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
6392 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6393 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
6395 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6396 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
6397 NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
6398 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
6399 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_buffer
));
6400 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_resume_handle
));
6401 if (_ptr_resume_handle
) {
6402 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
6404 r
->in
.resume_handle
= NULL
;
6406 if (r
->in
.resume_handle
) {
6407 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6408 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, 0);
6409 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
6410 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, 0);
6412 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
6413 *r
->out
.info
= *r
->in
.info
;
6414 NDR_PULL_ALLOC(ndr
, r
->out
.total_entries
);
6415 ZERO_STRUCTP(r
->out
.total_entries
);
6417 if (flags
& NDR_OUT
) {
6418 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6419 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
6421 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6422 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
6423 NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
6424 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
6425 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6426 NDR_PULL_ALLOC(ndr
, r
->out
.total_entries
);
6428 _mem_save_total_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6429 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.total_entries
, LIBNDR_FLAG_REF_ALLOC
);
6430 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.total_entries
));
6431 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_entries_0
, LIBNDR_FLAG_REF_ALLOC
);
6432 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_resume_handle
));
6433 if (_ptr_resume_handle
) {
6434 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6436 r
->out
.resume_handle
= NULL
;
6438 if (r
->out
.resume_handle
) {
6439 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6440 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, 0);
6441 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
6442 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, 0);
6444 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
6446 return NDR_ERR_SUCCESS
;
6449 _PUBLIC_
void ndr_print_wkssvc_NetWkstaTransportEnum(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetWkstaTransportEnum
*r
)
6451 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaTransportEnum");
6453 if (flags
& NDR_SET_VALUES
) {
6454 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6456 if (flags
& NDR_IN
) {
6457 ndr_print_struct(ndr
, "in", "wkssvc_NetWkstaTransportEnum");
6459 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
6461 if (r
->in
.server_name
) {
6462 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
6465 ndr_print_ptr(ndr
, "info", r
->in
.info
);
6467 ndr_print_wkssvc_NetWkstaTransportInfo(ndr
, "info", r
->in
.info
);
6469 ndr_print_uint32(ndr
, "max_buffer", r
->in
.max_buffer
);
6470 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
6472 if (r
->in
.resume_handle
) {
6473 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
6478 if (flags
& NDR_OUT
) {
6479 ndr_print_struct(ndr
, "out", "wkssvc_NetWkstaTransportEnum");
6481 ndr_print_ptr(ndr
, "info", r
->out
.info
);
6483 ndr_print_wkssvc_NetWkstaTransportInfo(ndr
, "info", r
->out
.info
);
6485 ndr_print_ptr(ndr
, "total_entries", r
->out
.total_entries
);
6487 ndr_print_uint32(ndr
, "total_entries", *r
->out
.total_entries
);
6489 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
6491 if (r
->out
.resume_handle
) {
6492 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
6495 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
6501 static enum ndr_err_code
ndr_push_wkssvc_NetrWkstaTransportAdd(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrWkstaTransportAdd
*r
)
6503 if (flags
& NDR_IN
) {
6504 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
6505 if (r
->in
.server_name
) {
6506 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
6507 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6508 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
6509 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
));
6511 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
6512 if (r
->in
.info0
== NULL
) {
6513 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6515 NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportInfo0(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info0
));
6516 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.parm_err
));
6517 if (r
->in
.parm_err
) {
6518 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.parm_err
));
6521 if (flags
& NDR_OUT
) {
6522 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.parm_err
));
6523 if (r
->out
.parm_err
) {
6524 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.parm_err
));
6526 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
6528 return NDR_ERR_SUCCESS
;
6531 static enum ndr_err_code
ndr_pull_wkssvc_NetrWkstaTransportAdd(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrWkstaTransportAdd
*r
)
6533 uint32_t _ptr_server_name
;
6534 uint32_t _ptr_parm_err
;
6535 TALLOC_CTX
*_mem_save_server_name_0
;
6536 TALLOC_CTX
*_mem_save_info0_0
;
6537 TALLOC_CTX
*_mem_save_parm_err_0
;
6538 if (flags
& NDR_IN
) {
6539 ZERO_STRUCT(r
->out
);
6541 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
6542 if (_ptr_server_name
) {
6543 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
6545 r
->in
.server_name
= NULL
;
6547 if (r
->in
.server_name
) {
6548 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6549 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
6550 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
6551 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
6552 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
6553 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
6555 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
6556 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
6557 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
6559 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
6560 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6561 NDR_PULL_ALLOC(ndr
, r
->in
.info0
);
6563 _mem_save_info0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6564 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info0
, LIBNDR_FLAG_REF_ALLOC
);
6565 NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportInfo0(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info0
));
6566 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info0_0
, LIBNDR_FLAG_REF_ALLOC
);
6567 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parm_err
));
6568 if (_ptr_parm_err
) {
6569 NDR_PULL_ALLOC(ndr
, r
->in
.parm_err
);
6571 r
->in
.parm_err
= NULL
;
6573 if (r
->in
.parm_err
) {
6574 _mem_save_parm_err_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6575 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.parm_err
, 0);
6576 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.parm_err
));
6577 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parm_err_0
, 0);
6580 if (flags
& NDR_OUT
) {
6581 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parm_err
));
6582 if (_ptr_parm_err
) {
6583 NDR_PULL_ALLOC(ndr
, r
->out
.parm_err
);
6585 r
->out
.parm_err
= NULL
;
6587 if (r
->out
.parm_err
) {
6588 _mem_save_parm_err_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6589 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.parm_err
, 0);
6590 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.parm_err
));
6591 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parm_err_0
, 0);
6593 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
6595 return NDR_ERR_SUCCESS
;
6598 _PUBLIC_
void ndr_print_wkssvc_NetrWkstaTransportAdd(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrWkstaTransportAdd
*r
)
6600 ndr_print_struct(ndr
, name
, "wkssvc_NetrWkstaTransportAdd");
6602 if (flags
& NDR_SET_VALUES
) {
6603 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6605 if (flags
& NDR_IN
) {
6606 ndr_print_struct(ndr
, "in", "wkssvc_NetrWkstaTransportAdd");
6608 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
6610 if (r
->in
.server_name
) {
6611 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
6614 ndr_print_uint32(ndr
, "level", r
->in
.level
);
6615 ndr_print_ptr(ndr
, "info0", r
->in
.info0
);
6617 ndr_print_wkssvc_NetWkstaTransportInfo0(ndr
, "info0", r
->in
.info0
);
6619 ndr_print_ptr(ndr
, "parm_err", r
->in
.parm_err
);
6621 if (r
->in
.parm_err
) {
6622 ndr_print_uint32(ndr
, "parm_err", *r
->in
.parm_err
);
6627 if (flags
& NDR_OUT
) {
6628 ndr_print_struct(ndr
, "out", "wkssvc_NetrWkstaTransportAdd");
6630 ndr_print_ptr(ndr
, "parm_err", r
->out
.parm_err
);
6632 if (r
->out
.parm_err
) {
6633 ndr_print_uint32(ndr
, "parm_err", *r
->out
.parm_err
);
6636 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
6642 static enum ndr_err_code
ndr_push_wkssvc_NetrWkstaTransportDel(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrWkstaTransportDel
*r
)
6644 if (flags
& NDR_IN
) {
6645 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
6646 if (r
->in
.server_name
) {
6647 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
6648 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6649 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
6650 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
));
6652 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.transport_name
));
6653 if (r
->in
.transport_name
) {
6654 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.transport_name
, CH_UTF16
)));
6655 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6656 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.transport_name
, CH_UTF16
)));
6657 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
));
6659 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown3
));
6661 if (flags
& NDR_OUT
) {
6662 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
6664 return NDR_ERR_SUCCESS
;
6667 static enum ndr_err_code
ndr_pull_wkssvc_NetrWkstaTransportDel(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrWkstaTransportDel
*r
)
6669 uint32_t _ptr_server_name
;
6670 uint32_t _ptr_transport_name
;
6671 TALLOC_CTX
*_mem_save_server_name_0
;
6672 TALLOC_CTX
*_mem_save_transport_name_0
;
6673 if (flags
& NDR_IN
) {
6674 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
6675 if (_ptr_server_name
) {
6676 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
6678 r
->in
.server_name
= NULL
;
6680 if (r
->in
.server_name
) {
6681 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6682 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
6683 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
6684 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
6685 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
6686 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
6688 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
6689 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
6690 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
6692 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_transport_name
));
6693 if (_ptr_transport_name
) {
6694 NDR_PULL_ALLOC(ndr
, r
->in
.transport_name
);
6696 r
->in
.transport_name
= NULL
;
6698 if (r
->in
.transport_name
) {
6699 _mem_save_transport_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6700 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.transport_name
, 0);
6701 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.transport_name
));
6702 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.transport_name
));
6703 if (ndr_get_array_length(ndr
, &r
->in
.transport_name
) > ndr_get_array_size(ndr
, &r
->in
.transport_name
)) {
6704 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.transport_name
), ndr_get_array_length(ndr
, &r
->in
.transport_name
));
6706 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.transport_name
), sizeof(uint16_t)));
6707 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.transport_name
, ndr_get_array_length(ndr
, &r
->in
.transport_name
), sizeof(uint16_t), CH_UTF16
));
6708 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_transport_name_0
, 0);
6710 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown3
));
6712 if (flags
& NDR_OUT
) {
6713 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
6715 return NDR_ERR_SUCCESS
;
6718 _PUBLIC_
void ndr_print_wkssvc_NetrWkstaTransportDel(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrWkstaTransportDel
*r
)
6720 ndr_print_struct(ndr
, name
, "wkssvc_NetrWkstaTransportDel");
6722 if (flags
& NDR_SET_VALUES
) {
6723 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6725 if (flags
& NDR_IN
) {
6726 ndr_print_struct(ndr
, "in", "wkssvc_NetrWkstaTransportDel");
6728 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
6730 if (r
->in
.server_name
) {
6731 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
6734 ndr_print_ptr(ndr
, "transport_name", r
->in
.transport_name
);
6736 if (r
->in
.transport_name
) {
6737 ndr_print_string(ndr
, "transport_name", r
->in
.transport_name
);
6740 ndr_print_uint32(ndr
, "unknown3", r
->in
.unknown3
);
6743 if (flags
& NDR_OUT
) {
6744 ndr_print_struct(ndr
, "out", "wkssvc_NetrWkstaTransportDel");
6746 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
6752 static enum ndr_err_code
ndr_push_wkssvc_NetrUseAdd(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrUseAdd
*r
)
6754 if (flags
& NDR_IN
) {
6755 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
6756 if (r
->in
.server_name
) {
6757 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
6758 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6759 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
6760 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
));
6762 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
6763 if (r
->in
.ctr
== NULL
) {
6764 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6766 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.ctr
, r
->in
.level
));
6767 NDR_CHECK(ndr_push_wkssvc_NetrUseGetInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.ctr
));
6768 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.parm_err
));
6769 if (r
->in
.parm_err
) {
6770 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.parm_err
));
6773 if (flags
& NDR_OUT
) {
6774 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.parm_err
));
6775 if (r
->out
.parm_err
) {
6776 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.parm_err
));
6778 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
6780 return NDR_ERR_SUCCESS
;
6783 static enum ndr_err_code
ndr_pull_wkssvc_NetrUseAdd(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrUseAdd
*r
)
6785 uint32_t _ptr_server_name
;
6786 uint32_t _ptr_parm_err
;
6787 TALLOC_CTX
*_mem_save_server_name_0
;
6788 TALLOC_CTX
*_mem_save_ctr_0
;
6789 TALLOC_CTX
*_mem_save_parm_err_0
;
6790 if (flags
& NDR_IN
) {
6791 ZERO_STRUCT(r
->out
);
6793 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
6794 if (_ptr_server_name
) {
6795 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
6797 r
->in
.server_name
= NULL
;
6799 if (r
->in
.server_name
) {
6800 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6801 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
6802 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
6803 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
6804 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
6805 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
6807 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
6808 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
6809 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
6811 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
6812 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6813 NDR_PULL_ALLOC(ndr
, r
->in
.ctr
);
6815 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6816 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
6817 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.ctr
, r
->in
.level
));
6818 NDR_CHECK(ndr_pull_wkssvc_NetrUseGetInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.ctr
));
6819 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
6820 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parm_err
));
6821 if (_ptr_parm_err
) {
6822 NDR_PULL_ALLOC(ndr
, r
->in
.parm_err
);
6824 r
->in
.parm_err
= NULL
;
6826 if (r
->in
.parm_err
) {
6827 _mem_save_parm_err_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6828 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.parm_err
, 0);
6829 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.parm_err
));
6830 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parm_err_0
, 0);
6833 if (flags
& NDR_OUT
) {
6834 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parm_err
));
6835 if (_ptr_parm_err
) {
6836 NDR_PULL_ALLOC(ndr
, r
->out
.parm_err
);
6838 r
->out
.parm_err
= NULL
;
6840 if (r
->out
.parm_err
) {
6841 _mem_save_parm_err_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6842 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.parm_err
, 0);
6843 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.parm_err
));
6844 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parm_err_0
, 0);
6846 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
6848 return NDR_ERR_SUCCESS
;
6851 _PUBLIC_
void ndr_print_wkssvc_NetrUseAdd(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrUseAdd
*r
)
6853 ndr_print_struct(ndr
, name
, "wkssvc_NetrUseAdd");
6855 if (flags
& NDR_SET_VALUES
) {
6856 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6858 if (flags
& NDR_IN
) {
6859 ndr_print_struct(ndr
, "in", "wkssvc_NetrUseAdd");
6861 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
6863 if (r
->in
.server_name
) {
6864 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
6867 ndr_print_uint32(ndr
, "level", r
->in
.level
);
6868 ndr_print_ptr(ndr
, "ctr", r
->in
.ctr
);
6870 ndr_print_set_switch_value(ndr
, r
->in
.ctr
, r
->in
.level
);
6871 ndr_print_wkssvc_NetrUseGetInfoCtr(ndr
, "ctr", r
->in
.ctr
);
6873 ndr_print_ptr(ndr
, "parm_err", r
->in
.parm_err
);
6875 if (r
->in
.parm_err
) {
6876 ndr_print_uint32(ndr
, "parm_err", *r
->in
.parm_err
);
6881 if (flags
& NDR_OUT
) {
6882 ndr_print_struct(ndr
, "out", "wkssvc_NetrUseAdd");
6884 ndr_print_ptr(ndr
, "parm_err", r
->out
.parm_err
);
6886 if (r
->out
.parm_err
) {
6887 ndr_print_uint32(ndr
, "parm_err", *r
->out
.parm_err
);
6890 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
6896 static enum ndr_err_code
ndr_push_wkssvc_NetrUseGetInfo(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrUseGetInfo
*r
)
6898 if (flags
& NDR_IN
) {
6899 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
6900 if (r
->in
.server_name
) {
6901 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
6902 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6903 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
6904 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
));
6906 if (r
->in
.use_name
== NULL
) {
6907 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6909 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.use_name
, CH_UTF16
)));
6910 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6911 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.use_name
, CH_UTF16
)));
6912 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
));
6913 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
6915 if (flags
& NDR_OUT
) {
6916 if (r
->out
.ctr
== NULL
) {
6917 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6919 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.ctr
, r
->in
.level
));
6920 NDR_CHECK(ndr_push_wkssvc_NetrUseGetInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
6921 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
6923 return NDR_ERR_SUCCESS
;
6926 static enum ndr_err_code
ndr_pull_wkssvc_NetrUseGetInfo(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrUseGetInfo
*r
)
6928 uint32_t _ptr_server_name
;
6929 TALLOC_CTX
*_mem_save_server_name_0
;
6930 TALLOC_CTX
*_mem_save_ctr_0
;
6931 if (flags
& NDR_IN
) {
6932 ZERO_STRUCT(r
->out
);
6934 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
6935 if (_ptr_server_name
) {
6936 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
6938 r
->in
.server_name
= NULL
;
6940 if (r
->in
.server_name
) {
6941 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6942 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
6943 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
6944 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
6945 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
6946 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
6948 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
6949 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
6950 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
6952 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.use_name
));
6953 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.use_name
));
6954 if (ndr_get_array_length(ndr
, &r
->in
.use_name
) > ndr_get_array_size(ndr
, &r
->in
.use_name
)) {
6955 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.use_name
), ndr_get_array_length(ndr
, &r
->in
.use_name
));
6957 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.use_name
), sizeof(uint16_t)));
6958 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.use_name
, ndr_get_array_length(ndr
, &r
->in
.use_name
), sizeof(uint16_t), CH_UTF16
));
6959 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
6960 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
6961 ZERO_STRUCTP(r
->out
.ctr
);
6963 if (flags
& NDR_OUT
) {
6964 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6965 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
6967 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6968 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
6969 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.ctr
, r
->in
.level
));
6970 NDR_CHECK(ndr_pull_wkssvc_NetrUseGetInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
6971 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
6972 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
6974 return NDR_ERR_SUCCESS
;
6977 _PUBLIC_
void ndr_print_wkssvc_NetrUseGetInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrUseGetInfo
*r
)
6979 ndr_print_struct(ndr
, name
, "wkssvc_NetrUseGetInfo");
6981 if (flags
& NDR_SET_VALUES
) {
6982 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6984 if (flags
& NDR_IN
) {
6985 ndr_print_struct(ndr
, "in", "wkssvc_NetrUseGetInfo");
6987 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
6989 if (r
->in
.server_name
) {
6990 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
6993 ndr_print_ptr(ndr
, "use_name", r
->in
.use_name
);
6995 ndr_print_string(ndr
, "use_name", r
->in
.use_name
);
6997 ndr_print_uint32(ndr
, "level", r
->in
.level
);
7000 if (flags
& NDR_OUT
) {
7001 ndr_print_struct(ndr
, "out", "wkssvc_NetrUseGetInfo");
7003 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
7005 ndr_print_set_switch_value(ndr
, r
->out
.ctr
, r
->in
.level
);
7006 ndr_print_wkssvc_NetrUseGetInfoCtr(ndr
, "ctr", r
->out
.ctr
);
7008 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
7014 static enum ndr_err_code
ndr_push_wkssvc_NetrUseDel(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrUseDel
*r
)
7016 if (flags
& NDR_IN
) {
7017 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
7018 if (r
->in
.server_name
) {
7019 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
7020 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7021 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
7022 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
));
7024 if (r
->in
.use_name
== NULL
) {
7025 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7027 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.use_name
, CH_UTF16
)));
7028 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7029 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.use_name
, CH_UTF16
)));
7030 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
));
7031 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.force_cond
));
7033 if (flags
& NDR_OUT
) {
7034 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
7036 return NDR_ERR_SUCCESS
;
7039 static enum ndr_err_code
ndr_pull_wkssvc_NetrUseDel(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrUseDel
*r
)
7041 uint32_t _ptr_server_name
;
7042 TALLOC_CTX
*_mem_save_server_name_0
;
7043 if (flags
& NDR_IN
) {
7044 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
7045 if (_ptr_server_name
) {
7046 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
7048 r
->in
.server_name
= NULL
;
7050 if (r
->in
.server_name
) {
7051 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7052 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
7053 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
7054 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
7055 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
7056 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
7058 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
7059 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
7060 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
7062 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.use_name
));
7063 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.use_name
));
7064 if (ndr_get_array_length(ndr
, &r
->in
.use_name
) > ndr_get_array_size(ndr
, &r
->in
.use_name
)) {
7065 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.use_name
), ndr_get_array_length(ndr
, &r
->in
.use_name
));
7067 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.use_name
), sizeof(uint16_t)));
7068 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.use_name
, ndr_get_array_length(ndr
, &r
->in
.use_name
), sizeof(uint16_t), CH_UTF16
));
7069 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.force_cond
));
7071 if (flags
& NDR_OUT
) {
7072 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
7074 return NDR_ERR_SUCCESS
;
7077 _PUBLIC_
void ndr_print_wkssvc_NetrUseDel(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrUseDel
*r
)
7079 ndr_print_struct(ndr
, name
, "wkssvc_NetrUseDel");
7081 if (flags
& NDR_SET_VALUES
) {
7082 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7084 if (flags
& NDR_IN
) {
7085 ndr_print_struct(ndr
, "in", "wkssvc_NetrUseDel");
7087 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
7089 if (r
->in
.server_name
) {
7090 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
7093 ndr_print_ptr(ndr
, "use_name", r
->in
.use_name
);
7095 ndr_print_string(ndr
, "use_name", r
->in
.use_name
);
7097 ndr_print_uint32(ndr
, "force_cond", r
->in
.force_cond
);
7100 if (flags
& NDR_OUT
) {
7101 ndr_print_struct(ndr
, "out", "wkssvc_NetrUseDel");
7103 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
7109 static enum ndr_err_code
ndr_push_wkssvc_NetrUseEnum(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrUseEnum
*r
)
7111 if (flags
& NDR_IN
) {
7112 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
7113 if (r
->in
.server_name
) {
7114 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
7115 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7116 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
7117 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
));
7119 if (r
->in
.info
== NULL
) {
7120 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7122 NDR_CHECK(ndr_push_wkssvc_NetrUseEnumInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
7123 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.prefmaxlen
));
7124 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.resume_handle
));
7125 if (r
->in
.resume_handle
) {
7126 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
7129 if (flags
& NDR_OUT
) {
7130 if (r
->out
.info
== NULL
) {
7131 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7133 NDR_CHECK(ndr_push_wkssvc_NetrUseEnumInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
7134 if (r
->out
.entries_read
== NULL
) {
7135 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7137 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.entries_read
));
7138 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.resume_handle
));
7139 if (r
->out
.resume_handle
) {
7140 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
7142 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
7144 return NDR_ERR_SUCCESS
;
7147 static enum ndr_err_code
ndr_pull_wkssvc_NetrUseEnum(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrUseEnum
*r
)
7149 uint32_t _ptr_server_name
;
7150 uint32_t _ptr_resume_handle
;
7151 TALLOC_CTX
*_mem_save_server_name_0
;
7152 TALLOC_CTX
*_mem_save_info_0
;
7153 TALLOC_CTX
*_mem_save_entries_read_0
;
7154 TALLOC_CTX
*_mem_save_resume_handle_0
;
7155 if (flags
& NDR_IN
) {
7156 ZERO_STRUCT(r
->out
);
7158 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
7159 if (_ptr_server_name
) {
7160 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
7162 r
->in
.server_name
= NULL
;
7164 if (r
->in
.server_name
) {
7165 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7166 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
7167 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
7168 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
7169 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
7170 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
7172 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
7173 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
7174 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
7176 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7177 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
7179 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7180 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
7181 NDR_CHECK(ndr_pull_wkssvc_NetrUseEnumInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
7182 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
7183 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.prefmaxlen
));
7184 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_resume_handle
));
7185 if (_ptr_resume_handle
) {
7186 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
7188 r
->in
.resume_handle
= NULL
;
7190 if (r
->in
.resume_handle
) {
7191 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7192 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, 0);
7193 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
7194 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, 0);
7196 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
7197 *r
->out
.info
= *r
->in
.info
;
7198 NDR_PULL_ALLOC(ndr
, r
->out
.entries_read
);
7199 ZERO_STRUCTP(r
->out
.entries_read
);
7201 if (flags
& NDR_OUT
) {
7202 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7203 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
7205 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7206 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
7207 NDR_CHECK(ndr_pull_wkssvc_NetrUseEnumInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
7208 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
7209 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7210 NDR_PULL_ALLOC(ndr
, r
->out
.entries_read
);
7212 _mem_save_entries_read_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7213 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.entries_read
, LIBNDR_FLAG_REF_ALLOC
);
7214 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.entries_read
));
7215 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_read_0
, LIBNDR_FLAG_REF_ALLOC
);
7216 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_resume_handle
));
7217 if (_ptr_resume_handle
) {
7218 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
7220 r
->out
.resume_handle
= NULL
;
7222 if (r
->out
.resume_handle
) {
7223 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7224 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, 0);
7225 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
7226 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, 0);
7228 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
7230 return NDR_ERR_SUCCESS
;
7233 _PUBLIC_
void ndr_print_wkssvc_NetrUseEnum(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrUseEnum
*r
)
7235 ndr_print_struct(ndr
, name
, "wkssvc_NetrUseEnum");
7237 if (flags
& NDR_SET_VALUES
) {
7238 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7240 if (flags
& NDR_IN
) {
7241 ndr_print_struct(ndr
, "in", "wkssvc_NetrUseEnum");
7243 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
7245 if (r
->in
.server_name
) {
7246 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
7249 ndr_print_ptr(ndr
, "info", r
->in
.info
);
7251 ndr_print_wkssvc_NetrUseEnumInfo(ndr
, "info", r
->in
.info
);
7253 ndr_print_uint32(ndr
, "prefmaxlen", r
->in
.prefmaxlen
);
7254 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
7256 if (r
->in
.resume_handle
) {
7257 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
7262 if (flags
& NDR_OUT
) {
7263 ndr_print_struct(ndr
, "out", "wkssvc_NetrUseEnum");
7265 ndr_print_ptr(ndr
, "info", r
->out
.info
);
7267 ndr_print_wkssvc_NetrUseEnumInfo(ndr
, "info", r
->out
.info
);
7269 ndr_print_ptr(ndr
, "entries_read", r
->out
.entries_read
);
7271 ndr_print_uint32(ndr
, "entries_read", *r
->out
.entries_read
);
7273 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
7275 if (r
->out
.resume_handle
) {
7276 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
7279 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
7285 static enum ndr_err_code
ndr_push_wkssvc_NetrMessageBufferSend(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrMessageBufferSend
*r
)
7287 if (flags
& NDR_IN
) {
7288 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
7289 if (r
->in
.server_name
) {
7290 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
7291 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7292 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
7293 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
));
7295 if (r
->in
.message_name
== NULL
) {
7296 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7298 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.message_name
, CH_UTF16
)));
7299 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7300 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.message_name
, CH_UTF16
)));
7301 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
));
7302 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.message_sender_name
));
7303 if (r
->in
.message_sender_name
) {
7304 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.message_sender_name
, CH_UTF16
)));
7305 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7306 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.message_sender_name
, CH_UTF16
)));
7307 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
));
7309 if (r
->in
.message_buffer
== NULL
) {
7310 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7312 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.message_size
));
7313 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.message_buffer
, r
->in
.message_size
));
7314 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.message_size
));
7316 if (flags
& NDR_OUT
) {
7317 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
7319 return NDR_ERR_SUCCESS
;
7322 static enum ndr_err_code
ndr_pull_wkssvc_NetrMessageBufferSend(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrMessageBufferSend
*r
)
7324 uint32_t _ptr_server_name
;
7325 uint32_t _ptr_message_sender_name
;
7326 TALLOC_CTX
*_mem_save_server_name_0
;
7327 TALLOC_CTX
*_mem_save_message_sender_name_0
;
7328 if (flags
& NDR_IN
) {
7329 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
7330 if (_ptr_server_name
) {
7331 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
7333 r
->in
.server_name
= NULL
;
7335 if (r
->in
.server_name
) {
7336 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7337 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
7338 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
7339 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
7340 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
7341 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
7343 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
7344 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
7345 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
7347 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.message_name
));
7348 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.message_name
));
7349 if (ndr_get_array_length(ndr
, &r
->in
.message_name
) > ndr_get_array_size(ndr
, &r
->in
.message_name
)) {
7350 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.message_name
), ndr_get_array_length(ndr
, &r
->in
.message_name
));
7352 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.message_name
), sizeof(uint16_t)));
7353 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.message_name
, ndr_get_array_length(ndr
, &r
->in
.message_name
), sizeof(uint16_t), CH_UTF16
));
7354 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_message_sender_name
));
7355 if (_ptr_message_sender_name
) {
7356 NDR_PULL_ALLOC(ndr
, r
->in
.message_sender_name
);
7358 r
->in
.message_sender_name
= NULL
;
7360 if (r
->in
.message_sender_name
) {
7361 _mem_save_message_sender_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7362 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.message_sender_name
, 0);
7363 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.message_sender_name
));
7364 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.message_sender_name
));
7365 if (ndr_get_array_length(ndr
, &r
->in
.message_sender_name
) > ndr_get_array_size(ndr
, &r
->in
.message_sender_name
)) {
7366 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.message_sender_name
), ndr_get_array_length(ndr
, &r
->in
.message_sender_name
));
7368 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.message_sender_name
), sizeof(uint16_t)));
7369 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.message_sender_name
, ndr_get_array_length(ndr
, &r
->in
.message_sender_name
), sizeof(uint16_t), CH_UTF16
));
7370 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_message_sender_name_0
, 0);
7372 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.message_buffer
));
7373 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7374 NDR_PULL_ALLOC_N(ndr
, r
->in
.message_buffer
, ndr_get_array_size(ndr
, &r
->in
.message_buffer
));
7376 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.message_buffer
, ndr_get_array_size(ndr
, &r
->in
.message_buffer
)));
7377 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.message_size
));
7378 if (r
->in
.message_buffer
) {
7379 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.message_buffer
, r
->in
.message_size
));
7382 if (flags
& NDR_OUT
) {
7383 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
7385 return NDR_ERR_SUCCESS
;
7388 _PUBLIC_
void ndr_print_wkssvc_NetrMessageBufferSend(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrMessageBufferSend
*r
)
7390 ndr_print_struct(ndr
, name
, "wkssvc_NetrMessageBufferSend");
7392 if (flags
& NDR_SET_VALUES
) {
7393 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7395 if (flags
& NDR_IN
) {
7396 ndr_print_struct(ndr
, "in", "wkssvc_NetrMessageBufferSend");
7398 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
7400 if (r
->in
.server_name
) {
7401 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
7404 ndr_print_ptr(ndr
, "message_name", r
->in
.message_name
);
7406 ndr_print_string(ndr
, "message_name", r
->in
.message_name
);
7408 ndr_print_ptr(ndr
, "message_sender_name", r
->in
.message_sender_name
);
7410 if (r
->in
.message_sender_name
) {
7411 ndr_print_string(ndr
, "message_sender_name", r
->in
.message_sender_name
);
7414 ndr_print_ptr(ndr
, "message_buffer", r
->in
.message_buffer
);
7416 ndr_print_array_uint8(ndr
, "message_buffer", r
->in
.message_buffer
, r
->in
.message_size
);
7418 ndr_print_uint32(ndr
, "message_size", r
->in
.message_size
);
7421 if (flags
& NDR_OUT
) {
7422 ndr_print_struct(ndr
, "out", "wkssvc_NetrMessageBufferSend");
7424 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
7430 static enum ndr_err_code
ndr_push_wkssvc_NetrWorkstationStatisticsGet(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrWorkstationStatisticsGet
*r
)
7432 if (flags
& NDR_IN
) {
7433 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
7434 if (r
->in
.server_name
) {
7435 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
7436 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7437 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
7438 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
));
7440 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.unknown2
));
7441 if (r
->in
.unknown2
) {
7442 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.unknown2
, CH_UTF16
)));
7443 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7444 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.unknown2
, CH_UTF16
)));
7445 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.unknown2
, ndr_charset_length(r
->in
.unknown2
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7447 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown3
));
7448 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown4
));
7450 if (flags
& NDR_OUT
) {
7451 if (r
->out
.info
== NULL
) {
7452 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7454 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
7456 NDR_CHECK(ndr_push_wkssvc_NetrWorkstationStatistics(ndr
, NDR_SCALARS
, *r
->out
.info
));
7458 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
7460 return NDR_ERR_SUCCESS
;
7463 static enum ndr_err_code
ndr_pull_wkssvc_NetrWorkstationStatisticsGet(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrWorkstationStatisticsGet
*r
)
7465 uint32_t _ptr_server_name
;
7466 uint32_t _ptr_unknown2
;
7468 TALLOC_CTX
*_mem_save_server_name_0
;
7469 TALLOC_CTX
*_mem_save_unknown2_0
;
7470 TALLOC_CTX
*_mem_save_info_0
;
7471 TALLOC_CTX
*_mem_save_info_1
;
7472 if (flags
& NDR_IN
) {
7473 ZERO_STRUCT(r
->out
);
7475 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
7476 if (_ptr_server_name
) {
7477 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
7479 r
->in
.server_name
= NULL
;
7481 if (r
->in
.server_name
) {
7482 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7483 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
7484 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
7485 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
7486 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
7487 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
7489 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
7490 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
7491 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
7493 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown2
));
7494 if (_ptr_unknown2
) {
7495 NDR_PULL_ALLOC(ndr
, r
->in
.unknown2
);
7497 r
->in
.unknown2
= NULL
;
7499 if (r
->in
.unknown2
) {
7500 _mem_save_unknown2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7501 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.unknown2
, 0);
7502 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.unknown2
));
7503 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.unknown2
));
7504 if (ndr_get_array_length(ndr
, &r
->in
.unknown2
) > ndr_get_array_size(ndr
, &r
->in
.unknown2
)) {
7505 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.unknown2
), ndr_get_array_length(ndr
, &r
->in
.unknown2
));
7507 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.unknown2
), sizeof(uint16_t)));
7508 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.unknown2
, ndr_get_array_length(ndr
, &r
->in
.unknown2
), sizeof(uint16_t), CH_UTF16
));
7509 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown2_0
, 0);
7511 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown3
));
7512 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown4
));
7513 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
7514 ZERO_STRUCTP(r
->out
.info
);
7516 if (flags
& NDR_OUT
) {
7517 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7518 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
7520 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7521 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
7522 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
7524 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
7526 *r
->out
.info
= NULL
;
7529 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7530 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
7531 NDR_CHECK(ndr_pull_wkssvc_NetrWorkstationStatistics(ndr
, NDR_SCALARS
, *r
->out
.info
));
7532 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
7534 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
7535 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
7537 return NDR_ERR_SUCCESS
;
7540 _PUBLIC_
void ndr_print_wkssvc_NetrWorkstationStatisticsGet(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrWorkstationStatisticsGet
*r
)
7542 ndr_print_struct(ndr
, name
, "wkssvc_NetrWorkstationStatisticsGet");
7544 if (flags
& NDR_SET_VALUES
) {
7545 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7547 if (flags
& NDR_IN
) {
7548 ndr_print_struct(ndr
, "in", "wkssvc_NetrWorkstationStatisticsGet");
7550 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
7552 if (r
->in
.server_name
) {
7553 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
7556 ndr_print_ptr(ndr
, "unknown2", r
->in
.unknown2
);
7558 if (r
->in
.unknown2
) {
7559 ndr_print_string(ndr
, "unknown2", r
->in
.unknown2
);
7562 ndr_print_uint32(ndr
, "unknown3", r
->in
.unknown3
);
7563 ndr_print_uint32(ndr
, "unknown4", r
->in
.unknown4
);
7566 if (flags
& NDR_OUT
) {
7567 ndr_print_struct(ndr
, "out", "wkssvc_NetrWorkstationStatisticsGet");
7569 ndr_print_ptr(ndr
, "info", r
->out
.info
);
7571 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
7574 ndr_print_wkssvc_NetrWorkstationStatistics(ndr
, "info", *r
->out
.info
);
7578 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
7584 static enum ndr_err_code
ndr_push_wkssvc_NetrLogonDomainNameAdd(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrLogonDomainNameAdd
*r
)
7586 if (flags
& NDR_IN
) {
7587 if (r
->in
.domain_name
== NULL
) {
7588 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7590 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
7591 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7592 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
7593 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
));
7595 if (flags
& NDR_OUT
) {
7596 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
7598 return NDR_ERR_SUCCESS
;
7601 static enum ndr_err_code
ndr_pull_wkssvc_NetrLogonDomainNameAdd(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrLogonDomainNameAdd
*r
)
7603 if (flags
& NDR_IN
) {
7604 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.domain_name
));
7605 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.domain_name
));
7606 if (ndr_get_array_length(ndr
, &r
->in
.domain_name
) > ndr_get_array_size(ndr
, &r
->in
.domain_name
)) {
7607 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.domain_name
), ndr_get_array_length(ndr
, &r
->in
.domain_name
));
7609 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t)));
7610 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.domain_name
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t), CH_UTF16
));
7612 if (flags
& NDR_OUT
) {
7613 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
7615 return NDR_ERR_SUCCESS
;
7618 _PUBLIC_
void ndr_print_wkssvc_NetrLogonDomainNameAdd(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrLogonDomainNameAdd
*r
)
7620 ndr_print_struct(ndr
, name
, "wkssvc_NetrLogonDomainNameAdd");
7622 if (flags
& NDR_SET_VALUES
) {
7623 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7625 if (flags
& NDR_IN
) {
7626 ndr_print_struct(ndr
, "in", "wkssvc_NetrLogonDomainNameAdd");
7628 ndr_print_ptr(ndr
, "domain_name", r
->in
.domain_name
);
7630 ndr_print_string(ndr
, "domain_name", r
->in
.domain_name
);
7634 if (flags
& NDR_OUT
) {
7635 ndr_print_struct(ndr
, "out", "wkssvc_NetrLogonDomainNameAdd");
7637 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
7643 static enum ndr_err_code
ndr_push_wkssvc_NetrLogonDomainNameDel(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrLogonDomainNameDel
*r
)
7645 if (flags
& NDR_IN
) {
7646 if (r
->in
.domain_name
== NULL
) {
7647 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7649 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
7650 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7651 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
7652 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
));
7654 if (flags
& NDR_OUT
) {
7655 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
7657 return NDR_ERR_SUCCESS
;
7660 static enum ndr_err_code
ndr_pull_wkssvc_NetrLogonDomainNameDel(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrLogonDomainNameDel
*r
)
7662 if (flags
& NDR_IN
) {
7663 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.domain_name
));
7664 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.domain_name
));
7665 if (ndr_get_array_length(ndr
, &r
->in
.domain_name
) > ndr_get_array_size(ndr
, &r
->in
.domain_name
)) {
7666 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.domain_name
), ndr_get_array_length(ndr
, &r
->in
.domain_name
));
7668 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t)));
7669 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.domain_name
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t), CH_UTF16
));
7671 if (flags
& NDR_OUT
) {
7672 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
7674 return NDR_ERR_SUCCESS
;
7677 _PUBLIC_
void ndr_print_wkssvc_NetrLogonDomainNameDel(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrLogonDomainNameDel
*r
)
7679 ndr_print_struct(ndr
, name
, "wkssvc_NetrLogonDomainNameDel");
7681 if (flags
& NDR_SET_VALUES
) {
7682 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7684 if (flags
& NDR_IN
) {
7685 ndr_print_struct(ndr
, "in", "wkssvc_NetrLogonDomainNameDel");
7687 ndr_print_ptr(ndr
, "domain_name", r
->in
.domain_name
);
7689 ndr_print_string(ndr
, "domain_name", r
->in
.domain_name
);
7693 if (flags
& NDR_OUT
) {
7694 ndr_print_struct(ndr
, "out", "wkssvc_NetrLogonDomainNameDel");
7696 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
7702 static enum ndr_err_code
ndr_push_wkssvc_NetrJoinDomain(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrJoinDomain
*r
)
7704 if (flags
& NDR_IN
) {
7705 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
7706 if (r
->in
.server_name
) {
7707 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
7708 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7709 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
7710 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
));
7712 if (r
->in
.domain_name
== NULL
) {
7713 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7715 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
7716 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7717 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
7718 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
));
7719 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.account_ou
));
7720 if (r
->in
.account_ou
) {
7721 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_ou
, CH_UTF16
)));
7722 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7723 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_ou
, CH_UTF16
)));
7724 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
));
7726 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.Account
));
7727 if (r
->in
.Account
) {
7728 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
7729 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7730 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
7731 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.Account
, ndr_charset_length(r
->in
.Account
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7733 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.password
));
7734 if (r
->in
.password
) {
7735 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.password
, CH_UTF16
)));
7736 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7737 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.password
, CH_UTF16
)));
7738 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.password
, ndr_charset_length(r
->in
.password
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7740 NDR_CHECK(ndr_push_wkssvc_joinflags(ndr
, NDR_SCALARS
, r
->in
.join_flags
));
7742 if (flags
& NDR_OUT
) {
7743 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
7745 return NDR_ERR_SUCCESS
;
7748 static enum ndr_err_code
ndr_pull_wkssvc_NetrJoinDomain(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrJoinDomain
*r
)
7750 uint32_t _ptr_server_name
;
7751 uint32_t _ptr_account_ou
;
7752 uint32_t _ptr_Account
;
7753 uint32_t _ptr_password
;
7754 TALLOC_CTX
*_mem_save_server_name_0
;
7755 TALLOC_CTX
*_mem_save_account_ou_0
;
7756 TALLOC_CTX
*_mem_save_Account_0
;
7757 TALLOC_CTX
*_mem_save_password_0
;
7758 if (flags
& NDR_IN
) {
7759 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
7760 if (_ptr_server_name
) {
7761 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
7763 r
->in
.server_name
= NULL
;
7765 if (r
->in
.server_name
) {
7766 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7767 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
7768 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
7769 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
7770 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
7771 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
7773 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
7774 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
7775 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
7777 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.domain_name
));
7778 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.domain_name
));
7779 if (ndr_get_array_length(ndr
, &r
->in
.domain_name
) > ndr_get_array_size(ndr
, &r
->in
.domain_name
)) {
7780 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.domain_name
), ndr_get_array_length(ndr
, &r
->in
.domain_name
));
7782 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t)));
7783 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.domain_name
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t), CH_UTF16
));
7784 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_account_ou
));
7785 if (_ptr_account_ou
) {
7786 NDR_PULL_ALLOC(ndr
, r
->in
.account_ou
);
7788 r
->in
.account_ou
= NULL
;
7790 if (r
->in
.account_ou
) {
7791 _mem_save_account_ou_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7792 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.account_ou
, 0);
7793 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.account_ou
));
7794 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.account_ou
));
7795 if (ndr_get_array_length(ndr
, &r
->in
.account_ou
) > ndr_get_array_size(ndr
, &r
->in
.account_ou
)) {
7796 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.account_ou
), ndr_get_array_length(ndr
, &r
->in
.account_ou
));
7798 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.account_ou
), sizeof(uint16_t)));
7799 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.account_ou
, ndr_get_array_length(ndr
, &r
->in
.account_ou
), sizeof(uint16_t), CH_UTF16
));
7800 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_ou_0
, 0);
7802 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_Account
));
7804 NDR_PULL_ALLOC(ndr
, r
->in
.Account
);
7806 r
->in
.Account
= NULL
;
7808 if (r
->in
.Account
) {
7809 _mem_save_Account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7810 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.Account
, 0);
7811 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.Account
));
7812 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.Account
));
7813 if (ndr_get_array_length(ndr
, &r
->in
.Account
) > ndr_get_array_size(ndr
, &r
->in
.Account
)) {
7814 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.Account
), ndr_get_array_length(ndr
, &r
->in
.Account
));
7816 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t)));
7817 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.Account
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t), CH_UTF16
));
7818 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Account_0
, 0);
7820 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password
));
7821 if (_ptr_password
) {
7822 NDR_PULL_ALLOC(ndr
, r
->in
.password
);
7824 r
->in
.password
= NULL
;
7826 if (r
->in
.password
) {
7827 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7828 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.password
, 0);
7829 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.password
));
7830 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.password
));
7831 if (ndr_get_array_length(ndr
, &r
->in
.password
) > ndr_get_array_size(ndr
, &r
->in
.password
)) {
7832 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.password
), ndr_get_array_length(ndr
, &r
->in
.password
));
7834 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.password
), sizeof(uint16_t)));
7835 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.password
, ndr_get_array_length(ndr
, &r
->in
.password
), sizeof(uint16_t), CH_UTF16
));
7836 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, 0);
7838 NDR_CHECK(ndr_pull_wkssvc_joinflags(ndr
, NDR_SCALARS
, &r
->in
.join_flags
));
7840 if (flags
& NDR_OUT
) {
7841 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
7843 return NDR_ERR_SUCCESS
;
7846 _PUBLIC_
void ndr_print_wkssvc_NetrJoinDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrJoinDomain
*r
)
7848 ndr_print_struct(ndr
, name
, "wkssvc_NetrJoinDomain");
7850 if (flags
& NDR_SET_VALUES
) {
7851 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7853 if (flags
& NDR_IN
) {
7854 ndr_print_struct(ndr
, "in", "wkssvc_NetrJoinDomain");
7856 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
7858 if (r
->in
.server_name
) {
7859 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
7862 ndr_print_ptr(ndr
, "domain_name", r
->in
.domain_name
);
7864 ndr_print_string(ndr
, "domain_name", r
->in
.domain_name
);
7866 ndr_print_ptr(ndr
, "account_ou", r
->in
.account_ou
);
7868 if (r
->in
.account_ou
) {
7869 ndr_print_string(ndr
, "account_ou", r
->in
.account_ou
);
7872 ndr_print_ptr(ndr
, "Account", r
->in
.Account
);
7874 if (r
->in
.Account
) {
7875 ndr_print_string(ndr
, "Account", r
->in
.Account
);
7878 ndr_print_ptr(ndr
, "password", r
->in
.password
);
7880 if (r
->in
.password
) {
7881 ndr_print_string(ndr
, "password", r
->in
.password
);
7884 ndr_print_wkssvc_joinflags(ndr
, "join_flags", r
->in
.join_flags
);
7887 if (flags
& NDR_OUT
) {
7888 ndr_print_struct(ndr
, "out", "wkssvc_NetrJoinDomain");
7890 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
7896 static enum ndr_err_code
ndr_push_wkssvc_NetrUnjoinDomain(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrUnjoinDomain
*r
)
7898 if (flags
& NDR_IN
) {
7899 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
7900 if (r
->in
.server_name
) {
7901 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
7902 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7903 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
7904 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
));
7906 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.Account
));
7907 if (r
->in
.Account
) {
7908 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
7909 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7910 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
7911 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.Account
, ndr_charset_length(r
->in
.Account
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7913 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.password
));
7914 if (r
->in
.password
) {
7915 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.password
, CH_UTF16
)));
7916 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7917 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.password
, CH_UTF16
)));
7918 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.password
, ndr_charset_length(r
->in
.password
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7920 NDR_CHECK(ndr_push_wkssvc_joinflags(ndr
, NDR_SCALARS
, r
->in
.unjoin_flags
));
7922 if (flags
& NDR_OUT
) {
7923 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
7925 return NDR_ERR_SUCCESS
;
7928 static enum ndr_err_code
ndr_pull_wkssvc_NetrUnjoinDomain(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrUnjoinDomain
*r
)
7930 uint32_t _ptr_server_name
;
7931 uint32_t _ptr_Account
;
7932 uint32_t _ptr_password
;
7933 TALLOC_CTX
*_mem_save_server_name_0
;
7934 TALLOC_CTX
*_mem_save_Account_0
;
7935 TALLOC_CTX
*_mem_save_password_0
;
7936 if (flags
& NDR_IN
) {
7937 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
7938 if (_ptr_server_name
) {
7939 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
7941 r
->in
.server_name
= NULL
;
7943 if (r
->in
.server_name
) {
7944 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7945 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
7946 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
7947 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
7948 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
7949 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
7951 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
7952 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
7953 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
7955 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_Account
));
7957 NDR_PULL_ALLOC(ndr
, r
->in
.Account
);
7959 r
->in
.Account
= NULL
;
7961 if (r
->in
.Account
) {
7962 _mem_save_Account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7963 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.Account
, 0);
7964 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.Account
));
7965 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.Account
));
7966 if (ndr_get_array_length(ndr
, &r
->in
.Account
) > ndr_get_array_size(ndr
, &r
->in
.Account
)) {
7967 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.Account
), ndr_get_array_length(ndr
, &r
->in
.Account
));
7969 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t)));
7970 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.Account
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t), CH_UTF16
));
7971 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Account_0
, 0);
7973 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password
));
7974 if (_ptr_password
) {
7975 NDR_PULL_ALLOC(ndr
, r
->in
.password
);
7977 r
->in
.password
= NULL
;
7979 if (r
->in
.password
) {
7980 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7981 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.password
, 0);
7982 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.password
));
7983 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.password
));
7984 if (ndr_get_array_length(ndr
, &r
->in
.password
) > ndr_get_array_size(ndr
, &r
->in
.password
)) {
7985 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.password
), ndr_get_array_length(ndr
, &r
->in
.password
));
7987 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.password
), sizeof(uint16_t)));
7988 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.password
, ndr_get_array_length(ndr
, &r
->in
.password
), sizeof(uint16_t), CH_UTF16
));
7989 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, 0);
7991 NDR_CHECK(ndr_pull_wkssvc_joinflags(ndr
, NDR_SCALARS
, &r
->in
.unjoin_flags
));
7993 if (flags
& NDR_OUT
) {
7994 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
7996 return NDR_ERR_SUCCESS
;
7999 _PUBLIC_
void ndr_print_wkssvc_NetrUnjoinDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrUnjoinDomain
*r
)
8001 ndr_print_struct(ndr
, name
, "wkssvc_NetrUnjoinDomain");
8003 if (flags
& NDR_SET_VALUES
) {
8004 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8006 if (flags
& NDR_IN
) {
8007 ndr_print_struct(ndr
, "in", "wkssvc_NetrUnjoinDomain");
8009 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
8011 if (r
->in
.server_name
) {
8012 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
8015 ndr_print_ptr(ndr
, "Account", r
->in
.Account
);
8017 if (r
->in
.Account
) {
8018 ndr_print_string(ndr
, "Account", r
->in
.Account
);
8021 ndr_print_ptr(ndr
, "password", r
->in
.password
);
8023 if (r
->in
.password
) {
8024 ndr_print_string(ndr
, "password", r
->in
.password
);
8027 ndr_print_wkssvc_joinflags(ndr
, "unjoin_flags", r
->in
.unjoin_flags
);
8030 if (flags
& NDR_OUT
) {
8031 ndr_print_struct(ndr
, "out", "wkssvc_NetrUnjoinDomain");
8033 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
8039 static enum ndr_err_code
ndr_push_wkssvc_NetrRenameMachineInDomain(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrRenameMachineInDomain
*r
)
8041 if (flags
& NDR_IN
) {
8042 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
8043 if (r
->in
.server_name
) {
8044 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8045 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8046 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8047 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
));
8049 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.NewMachineName
));
8050 if (r
->in
.NewMachineName
) {
8051 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.NewMachineName
, CH_UTF16
)));
8052 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8053 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.NewMachineName
, CH_UTF16
)));
8054 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.NewMachineName
, ndr_charset_length(r
->in
.NewMachineName
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8056 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.Account
));
8057 if (r
->in
.Account
) {
8058 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
8059 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8060 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
8061 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.Account
, ndr_charset_length(r
->in
.Account
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8063 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.password
));
8064 if (r
->in
.password
) {
8065 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.password
, CH_UTF16
)));
8066 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8067 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.password
, CH_UTF16
)));
8068 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.password
, ndr_charset_length(r
->in
.password
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8070 NDR_CHECK(ndr_push_wkssvc_renameflags(ndr
, NDR_SCALARS
, r
->in
.RenameOptions
));
8072 if (flags
& NDR_OUT
) {
8073 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
8075 return NDR_ERR_SUCCESS
;
8078 static enum ndr_err_code
ndr_pull_wkssvc_NetrRenameMachineInDomain(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrRenameMachineInDomain
*r
)
8080 uint32_t _ptr_server_name
;
8081 uint32_t _ptr_NewMachineName
;
8082 uint32_t _ptr_Account
;
8083 uint32_t _ptr_password
;
8084 TALLOC_CTX
*_mem_save_server_name_0
;
8085 TALLOC_CTX
*_mem_save_NewMachineName_0
;
8086 TALLOC_CTX
*_mem_save_Account_0
;
8087 TALLOC_CTX
*_mem_save_password_0
;
8088 if (flags
& NDR_IN
) {
8089 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
8090 if (_ptr_server_name
) {
8091 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
8093 r
->in
.server_name
= NULL
;
8095 if (r
->in
.server_name
) {
8096 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8097 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
8098 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
8099 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
8100 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
8101 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
8103 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
8104 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
8105 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
8107 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_NewMachineName
));
8108 if (_ptr_NewMachineName
) {
8109 NDR_PULL_ALLOC(ndr
, r
->in
.NewMachineName
);
8111 r
->in
.NewMachineName
= NULL
;
8113 if (r
->in
.NewMachineName
) {
8114 _mem_save_NewMachineName_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8115 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.NewMachineName
, 0);
8116 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.NewMachineName
));
8117 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.NewMachineName
));
8118 if (ndr_get_array_length(ndr
, &r
->in
.NewMachineName
) > ndr_get_array_size(ndr
, &r
->in
.NewMachineName
)) {
8119 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.NewMachineName
), ndr_get_array_length(ndr
, &r
->in
.NewMachineName
));
8121 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.NewMachineName
), sizeof(uint16_t)));
8122 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.NewMachineName
, ndr_get_array_length(ndr
, &r
->in
.NewMachineName
), sizeof(uint16_t), CH_UTF16
));
8123 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_NewMachineName_0
, 0);
8125 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_Account
));
8127 NDR_PULL_ALLOC(ndr
, r
->in
.Account
);
8129 r
->in
.Account
= NULL
;
8131 if (r
->in
.Account
) {
8132 _mem_save_Account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8133 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.Account
, 0);
8134 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.Account
));
8135 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.Account
));
8136 if (ndr_get_array_length(ndr
, &r
->in
.Account
) > ndr_get_array_size(ndr
, &r
->in
.Account
)) {
8137 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.Account
), ndr_get_array_length(ndr
, &r
->in
.Account
));
8139 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t)));
8140 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.Account
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t), CH_UTF16
));
8141 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Account_0
, 0);
8143 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password
));
8144 if (_ptr_password
) {
8145 NDR_PULL_ALLOC(ndr
, r
->in
.password
);
8147 r
->in
.password
= NULL
;
8149 if (r
->in
.password
) {
8150 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8151 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.password
, 0);
8152 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.password
));
8153 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.password
));
8154 if (ndr_get_array_length(ndr
, &r
->in
.password
) > ndr_get_array_size(ndr
, &r
->in
.password
)) {
8155 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.password
), ndr_get_array_length(ndr
, &r
->in
.password
));
8157 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.password
), sizeof(uint16_t)));
8158 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.password
, ndr_get_array_length(ndr
, &r
->in
.password
), sizeof(uint16_t), CH_UTF16
));
8159 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, 0);
8161 NDR_CHECK(ndr_pull_wkssvc_renameflags(ndr
, NDR_SCALARS
, &r
->in
.RenameOptions
));
8163 if (flags
& NDR_OUT
) {
8164 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
8166 return NDR_ERR_SUCCESS
;
8169 _PUBLIC_
void ndr_print_wkssvc_NetrRenameMachineInDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrRenameMachineInDomain
*r
)
8171 ndr_print_struct(ndr
, name
, "wkssvc_NetrRenameMachineInDomain");
8173 if (flags
& NDR_SET_VALUES
) {
8174 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8176 if (flags
& NDR_IN
) {
8177 ndr_print_struct(ndr
, "in", "wkssvc_NetrRenameMachineInDomain");
8179 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
8181 if (r
->in
.server_name
) {
8182 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
8185 ndr_print_ptr(ndr
, "NewMachineName", r
->in
.NewMachineName
);
8187 if (r
->in
.NewMachineName
) {
8188 ndr_print_string(ndr
, "NewMachineName", r
->in
.NewMachineName
);
8191 ndr_print_ptr(ndr
, "Account", r
->in
.Account
);
8193 if (r
->in
.Account
) {
8194 ndr_print_string(ndr
, "Account", r
->in
.Account
);
8197 ndr_print_ptr(ndr
, "password", r
->in
.password
);
8199 if (r
->in
.password
) {
8200 ndr_print_string(ndr
, "password", r
->in
.password
);
8203 ndr_print_wkssvc_renameflags(ndr
, "RenameOptions", r
->in
.RenameOptions
);
8206 if (flags
& NDR_OUT
) {
8207 ndr_print_struct(ndr
, "out", "wkssvc_NetrRenameMachineInDomain");
8209 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
8215 static enum ndr_err_code
ndr_push_wkssvc_NetrValidateName(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrValidateName
*r
)
8217 if (flags
& NDR_IN
) {
8218 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
8219 if (r
->in
.server_name
) {
8220 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8221 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8222 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8223 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
));
8225 if (r
->in
.name
== NULL
) {
8226 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8228 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.name
, CH_UTF16
)));
8229 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8230 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.name
, CH_UTF16
)));
8231 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.name
, ndr_charset_length(r
->in
.name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8232 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.Account
));
8233 if (r
->in
.Account
) {
8234 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
8235 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8236 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
8237 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.Account
, ndr_charset_length(r
->in
.Account
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8239 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.Password
));
8240 if (r
->in
.Password
) {
8241 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Password
, CH_UTF16
)));
8242 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8243 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Password
, CH_UTF16
)));
8244 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.Password
, ndr_charset_length(r
->in
.Password
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8246 NDR_CHECK(ndr_push_wkssvc_NetValidateNameType(ndr
, NDR_SCALARS
, r
->in
.name_type
));
8248 if (flags
& NDR_OUT
) {
8249 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
8251 return NDR_ERR_SUCCESS
;
8254 static enum ndr_err_code
ndr_pull_wkssvc_NetrValidateName(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrValidateName
*r
)
8256 uint32_t _ptr_server_name
;
8257 uint32_t _ptr_Account
;
8258 uint32_t _ptr_Password
;
8259 TALLOC_CTX
*_mem_save_server_name_0
;
8260 TALLOC_CTX
*_mem_save_Account_0
;
8261 TALLOC_CTX
*_mem_save_Password_0
;
8262 if (flags
& NDR_IN
) {
8263 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
8264 if (_ptr_server_name
) {
8265 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
8267 r
->in
.server_name
= NULL
;
8269 if (r
->in
.server_name
) {
8270 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8271 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
8272 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
8273 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
8274 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
8275 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
8277 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
8278 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
8279 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
8281 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.name
));
8282 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.name
));
8283 if (ndr_get_array_length(ndr
, &r
->in
.name
) > ndr_get_array_size(ndr
, &r
->in
.name
)) {
8284 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.name
), ndr_get_array_length(ndr
, &r
->in
.name
));
8286 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.name
), sizeof(uint16_t)));
8287 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.name
, ndr_get_array_length(ndr
, &r
->in
.name
), sizeof(uint16_t), CH_UTF16
));
8288 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_Account
));
8290 NDR_PULL_ALLOC(ndr
, r
->in
.Account
);
8292 r
->in
.Account
= NULL
;
8294 if (r
->in
.Account
) {
8295 _mem_save_Account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8296 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.Account
, 0);
8297 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.Account
));
8298 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.Account
));
8299 if (ndr_get_array_length(ndr
, &r
->in
.Account
) > ndr_get_array_size(ndr
, &r
->in
.Account
)) {
8300 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.Account
), ndr_get_array_length(ndr
, &r
->in
.Account
));
8302 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t)));
8303 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.Account
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t), CH_UTF16
));
8304 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Account_0
, 0);
8306 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_Password
));
8307 if (_ptr_Password
) {
8308 NDR_PULL_ALLOC(ndr
, r
->in
.Password
);
8310 r
->in
.Password
= NULL
;
8312 if (r
->in
.Password
) {
8313 _mem_save_Password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8314 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.Password
, 0);
8315 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.Password
));
8316 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.Password
));
8317 if (ndr_get_array_length(ndr
, &r
->in
.Password
) > ndr_get_array_size(ndr
, &r
->in
.Password
)) {
8318 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.Password
), ndr_get_array_length(ndr
, &r
->in
.Password
));
8320 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.Password
), sizeof(uint16_t)));
8321 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.Password
, ndr_get_array_length(ndr
, &r
->in
.Password
), sizeof(uint16_t), CH_UTF16
));
8322 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Password_0
, 0);
8324 NDR_CHECK(ndr_pull_wkssvc_NetValidateNameType(ndr
, NDR_SCALARS
, &r
->in
.name_type
));
8326 if (flags
& NDR_OUT
) {
8327 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
8329 return NDR_ERR_SUCCESS
;
8332 _PUBLIC_
void ndr_print_wkssvc_NetrValidateName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrValidateName
*r
)
8334 ndr_print_struct(ndr
, name
, "wkssvc_NetrValidateName");
8336 if (flags
& NDR_SET_VALUES
) {
8337 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8339 if (flags
& NDR_IN
) {
8340 ndr_print_struct(ndr
, "in", "wkssvc_NetrValidateName");
8342 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
8344 if (r
->in
.server_name
) {
8345 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
8348 ndr_print_ptr(ndr
, "name", r
->in
.name
);
8350 ndr_print_string(ndr
, "name", r
->in
.name
);
8352 ndr_print_ptr(ndr
, "Account", r
->in
.Account
);
8354 if (r
->in
.Account
) {
8355 ndr_print_string(ndr
, "Account", r
->in
.Account
);
8358 ndr_print_ptr(ndr
, "Password", r
->in
.Password
);
8360 if (r
->in
.Password
) {
8361 ndr_print_string(ndr
, "Password", r
->in
.Password
);
8364 ndr_print_wkssvc_NetValidateNameType(ndr
, "name_type", r
->in
.name_type
);
8367 if (flags
& NDR_OUT
) {
8368 ndr_print_struct(ndr
, "out", "wkssvc_NetrValidateName");
8370 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
8376 static enum ndr_err_code
ndr_push_wkssvc_NetrGetJoinInformation(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrGetJoinInformation
*r
)
8378 if (flags
& NDR_IN
) {
8379 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
8380 if (r
->in
.server_name
) {
8381 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8382 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8383 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8384 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
));
8386 if (r
->in
.name_buffer
== NULL
) {
8387 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8389 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.name_buffer
));
8390 if (*r
->in
.name_buffer
) {
8391 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->in
.name_buffer
, CH_UTF16
)));
8392 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8393 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->in
.name_buffer
, CH_UTF16
)));
8394 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
));
8397 if (flags
& NDR_OUT
) {
8398 if (r
->out
.name_buffer
== NULL
) {
8399 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8401 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.name_buffer
));
8402 if (*r
->out
.name_buffer
) {
8403 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.name_buffer
, CH_UTF16
)));
8404 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8405 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.name_buffer
, CH_UTF16
)));
8406 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
));
8408 if (r
->out
.name_type
== NULL
) {
8409 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8411 NDR_CHECK(ndr_push_wkssvc_NetJoinStatus(ndr
, NDR_SCALARS
, *r
->out
.name_type
));
8412 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
8414 return NDR_ERR_SUCCESS
;
8417 static enum ndr_err_code
ndr_pull_wkssvc_NetrGetJoinInformation(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrGetJoinInformation
*r
)
8419 uint32_t _ptr_server_name
;
8420 uint32_t _ptr_name_buffer
;
8421 TALLOC_CTX
*_mem_save_server_name_0
;
8422 TALLOC_CTX
*_mem_save_name_buffer_0
;
8423 TALLOC_CTX
*_mem_save_name_buffer_1
;
8424 TALLOC_CTX
*_mem_save_name_type_0
;
8425 if (flags
& NDR_IN
) {
8426 ZERO_STRUCT(r
->out
);
8428 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
8429 if (_ptr_server_name
) {
8430 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
8432 r
->in
.server_name
= NULL
;
8434 if (r
->in
.server_name
) {
8435 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8436 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
8437 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
8438 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
8439 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
8440 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
8442 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
8443 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
8444 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
8446 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8447 NDR_PULL_ALLOC(ndr
, r
->in
.name_buffer
);
8449 _mem_save_name_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8450 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name_buffer
, LIBNDR_FLAG_REF_ALLOC
);
8451 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name_buffer
));
8452 if (_ptr_name_buffer
) {
8453 NDR_PULL_ALLOC(ndr
, *r
->in
.name_buffer
);
8455 *r
->in
.name_buffer
= NULL
;
8457 if (*r
->in
.name_buffer
) {
8458 _mem_save_name_buffer_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8459 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.name_buffer
, 0);
8460 NDR_CHECK(ndr_pull_array_size(ndr
, r
->in
.name_buffer
));
8461 NDR_CHECK(ndr_pull_array_length(ndr
, r
->in
.name_buffer
));
8462 if (ndr_get_array_length(ndr
, r
->in
.name_buffer
) > ndr_get_array_size(ndr
, r
->in
.name_buffer
)) {
8463 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, r
->in
.name_buffer
), ndr_get_array_length(ndr
, r
->in
.name_buffer
));
8465 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, r
->in
.name_buffer
), sizeof(uint16_t)));
8466 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, r
->in
.name_buffer
, ndr_get_array_length(ndr
, r
->in
.name_buffer
), sizeof(uint16_t), CH_UTF16
));
8467 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_buffer_1
, 0);
8469 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_buffer_0
, LIBNDR_FLAG_REF_ALLOC
);
8470 NDR_PULL_ALLOC(ndr
, r
->out
.name_buffer
);
8471 *r
->out
.name_buffer
= *r
->in
.name_buffer
;
8472 NDR_PULL_ALLOC(ndr
, r
->out
.name_type
);
8473 ZERO_STRUCTP(r
->out
.name_type
);
8475 if (flags
& NDR_OUT
) {
8476 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8477 NDR_PULL_ALLOC(ndr
, r
->out
.name_buffer
);
8479 _mem_save_name_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8480 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.name_buffer
, LIBNDR_FLAG_REF_ALLOC
);
8481 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name_buffer
));
8482 if (_ptr_name_buffer
) {
8483 NDR_PULL_ALLOC(ndr
, *r
->out
.name_buffer
);
8485 *r
->out
.name_buffer
= NULL
;
8487 if (*r
->out
.name_buffer
) {
8488 _mem_save_name_buffer_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8489 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.name_buffer
, 0);
8490 NDR_CHECK(ndr_pull_array_size(ndr
, r
->out
.name_buffer
));
8491 NDR_CHECK(ndr_pull_array_length(ndr
, r
->out
.name_buffer
));
8492 if (ndr_get_array_length(ndr
, r
->out
.name_buffer
) > ndr_get_array_size(ndr
, r
->out
.name_buffer
)) {
8493 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, r
->out
.name_buffer
), ndr_get_array_length(ndr
, r
->out
.name_buffer
));
8495 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, r
->out
.name_buffer
), sizeof(uint16_t)));
8496 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, r
->out
.name_buffer
, ndr_get_array_length(ndr
, r
->out
.name_buffer
), sizeof(uint16_t), CH_UTF16
));
8497 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_buffer_1
, 0);
8499 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_buffer_0
, LIBNDR_FLAG_REF_ALLOC
);
8500 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8501 NDR_PULL_ALLOC(ndr
, r
->out
.name_type
);
8503 _mem_save_name_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8504 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.name_type
, LIBNDR_FLAG_REF_ALLOC
);
8505 NDR_CHECK(ndr_pull_wkssvc_NetJoinStatus(ndr
, NDR_SCALARS
, r
->out
.name_type
));
8506 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_type_0
, LIBNDR_FLAG_REF_ALLOC
);
8507 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
8509 return NDR_ERR_SUCCESS
;
8512 _PUBLIC_
void ndr_print_wkssvc_NetrGetJoinInformation(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrGetJoinInformation
*r
)
8514 ndr_print_struct(ndr
, name
, "wkssvc_NetrGetJoinInformation");
8516 if (flags
& NDR_SET_VALUES
) {
8517 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8519 if (flags
& NDR_IN
) {
8520 ndr_print_struct(ndr
, "in", "wkssvc_NetrGetJoinInformation");
8522 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
8524 if (r
->in
.server_name
) {
8525 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
8528 ndr_print_ptr(ndr
, "name_buffer", r
->in
.name_buffer
);
8530 ndr_print_ptr(ndr
, "name_buffer", *r
->in
.name_buffer
);
8532 if (*r
->in
.name_buffer
) {
8533 ndr_print_string(ndr
, "name_buffer", *r
->in
.name_buffer
);
8539 if (flags
& NDR_OUT
) {
8540 ndr_print_struct(ndr
, "out", "wkssvc_NetrGetJoinInformation");
8542 ndr_print_ptr(ndr
, "name_buffer", r
->out
.name_buffer
);
8544 ndr_print_ptr(ndr
, "name_buffer", *r
->out
.name_buffer
);
8546 if (*r
->out
.name_buffer
) {
8547 ndr_print_string(ndr
, "name_buffer", *r
->out
.name_buffer
);
8551 ndr_print_ptr(ndr
, "name_type", r
->out
.name_type
);
8553 ndr_print_wkssvc_NetJoinStatus(ndr
, "name_type", *r
->out
.name_type
);
8555 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
8561 static enum ndr_err_code
ndr_push_wkssvc_NetrGetJoinableOus(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrGetJoinableOus
*r
)
8563 uint32_t cntr_ous_2
;
8564 if (flags
& NDR_IN
) {
8565 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
8566 if (r
->in
.server_name
) {
8567 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8568 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8569 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8570 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
));
8572 if (r
->in
.domain_name
== NULL
) {
8573 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8575 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
8576 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8577 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
8578 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
));
8579 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.Account
));
8580 if (r
->in
.Account
) {
8581 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
8582 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8583 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
8584 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.Account
, ndr_charset_length(r
->in
.Account
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8586 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.unknown
));
8587 if (r
->in
.unknown
) {
8588 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.unknown
, CH_UTF16
)));
8589 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8590 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.unknown
, CH_UTF16
)));
8591 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.unknown
, ndr_charset_length(r
->in
.unknown
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8593 if (r
->in
.num_ous
== NULL
) {
8594 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8596 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.num_ous
));
8598 if (flags
& NDR_OUT
) {
8599 if (r
->out
.num_ous
== NULL
) {
8600 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8602 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.num_ous
));
8603 if (r
->out
.ous
== NULL
) {
8604 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8606 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.ous
));
8608 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.num_ous
));
8609 for (cntr_ous_2
= 0; cntr_ous_2
< *r
->out
.num_ous
; cntr_ous_2
++) {
8610 NDR_CHECK(ndr_push_unique_ptr(ndr
, (*r
->out
.ous
)[cntr_ous_2
]));
8612 for (cntr_ous_2
= 0; cntr_ous_2
< *r
->out
.num_ous
; cntr_ous_2
++) {
8613 if ((*r
->out
.ous
)[cntr_ous_2
]) {
8614 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length((*r
->out
.ous
)[cntr_ous_2
], CH_UTF16
)));
8615 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8616 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length((*r
->out
.ous
)[cntr_ous_2
], CH_UTF16
)));
8617 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
));
8621 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
8623 return NDR_ERR_SUCCESS
;
8626 static enum ndr_err_code
ndr_pull_wkssvc_NetrGetJoinableOus(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrGetJoinableOus
*r
)
8628 uint32_t _ptr_server_name
;
8629 uint32_t _ptr_Account
;
8630 uint32_t _ptr_unknown
;
8632 uint32_t cntr_ous_2
;
8633 TALLOC_CTX
*_mem_save_server_name_0
;
8634 TALLOC_CTX
*_mem_save_Account_0
;
8635 TALLOC_CTX
*_mem_save_unknown_0
;
8636 TALLOC_CTX
*_mem_save_num_ous_0
;
8637 TALLOC_CTX
*_mem_save_ous_0
;
8638 TALLOC_CTX
*_mem_save_ous_1
;
8639 TALLOC_CTX
*_mem_save_ous_2
;
8640 TALLOC_CTX
*_mem_save_ous_3
;
8641 if (flags
& NDR_IN
) {
8642 ZERO_STRUCT(r
->out
);
8644 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
8645 if (_ptr_server_name
) {
8646 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
8648 r
->in
.server_name
= NULL
;
8650 if (r
->in
.server_name
) {
8651 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8652 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
8653 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
8654 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
8655 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
8656 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
8658 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
8659 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
8660 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
8662 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.domain_name
));
8663 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.domain_name
));
8664 if (ndr_get_array_length(ndr
, &r
->in
.domain_name
) > ndr_get_array_size(ndr
, &r
->in
.domain_name
)) {
8665 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.domain_name
), ndr_get_array_length(ndr
, &r
->in
.domain_name
));
8667 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t)));
8668 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.domain_name
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t), CH_UTF16
));
8669 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_Account
));
8671 NDR_PULL_ALLOC(ndr
, r
->in
.Account
);
8673 r
->in
.Account
= NULL
;
8675 if (r
->in
.Account
) {
8676 _mem_save_Account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8677 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.Account
, 0);
8678 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.Account
));
8679 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.Account
));
8680 if (ndr_get_array_length(ndr
, &r
->in
.Account
) > ndr_get_array_size(ndr
, &r
->in
.Account
)) {
8681 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.Account
), ndr_get_array_length(ndr
, &r
->in
.Account
));
8683 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t)));
8684 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.Account
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t), CH_UTF16
));
8685 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Account_0
, 0);
8687 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown
));
8689 NDR_PULL_ALLOC(ndr
, r
->in
.unknown
);
8691 r
->in
.unknown
= NULL
;
8693 if (r
->in
.unknown
) {
8694 _mem_save_unknown_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8695 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.unknown
, 0);
8696 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.unknown
));
8697 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.unknown
));
8698 if (ndr_get_array_length(ndr
, &r
->in
.unknown
) > ndr_get_array_size(ndr
, &r
->in
.unknown
)) {
8699 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.unknown
), ndr_get_array_length(ndr
, &r
->in
.unknown
));
8701 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.unknown
), sizeof(uint16_t)));
8702 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.unknown
, ndr_get_array_length(ndr
, &r
->in
.unknown
), sizeof(uint16_t), CH_UTF16
));
8703 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown_0
, 0);
8705 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8706 NDR_PULL_ALLOC(ndr
, r
->in
.num_ous
);
8708 _mem_save_num_ous_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8709 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.num_ous
, LIBNDR_FLAG_REF_ALLOC
);
8710 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.num_ous
));
8711 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_num_ous_0
, LIBNDR_FLAG_REF_ALLOC
);
8712 NDR_PULL_ALLOC(ndr
, r
->out
.num_ous
);
8713 *r
->out
.num_ous
= *r
->in
.num_ous
;
8714 NDR_PULL_ALLOC(ndr
, r
->out
.ous
);
8715 ZERO_STRUCTP(r
->out
.ous
);
8717 if (flags
& NDR_OUT
) {
8718 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8719 NDR_PULL_ALLOC(ndr
, r
->out
.num_ous
);
8721 _mem_save_num_ous_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8722 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.num_ous
, LIBNDR_FLAG_REF_ALLOC
);
8723 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.num_ous
));
8724 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_num_ous_0
, LIBNDR_FLAG_REF_ALLOC
);
8725 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8726 NDR_PULL_ALLOC(ndr
, r
->out
.ous
);
8728 _mem_save_ous_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8729 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ous
, LIBNDR_FLAG_REF_ALLOC
);
8730 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ous
));
8732 NDR_PULL_ALLOC(ndr
, *r
->out
.ous
);
8737 _mem_save_ous_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8738 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.ous
, 0);
8739 NDR_CHECK(ndr_pull_array_size(ndr
, r
->out
.ous
));
8740 NDR_PULL_ALLOC_N(ndr
, *r
->out
.ous
, ndr_get_array_size(ndr
, r
->out
.ous
));
8741 _mem_save_ous_2
= NDR_PULL_GET_MEM_CTX(ndr
);
8742 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.ous
, 0);
8743 for (cntr_ous_2
= 0; cntr_ous_2
< *r
->out
.num_ous
; cntr_ous_2
++) {
8744 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ous
));
8746 NDR_PULL_ALLOC(ndr
, (*r
->out
.ous
)[cntr_ous_2
]);
8748 (*r
->out
.ous
)[cntr_ous_2
] = NULL
;
8751 for (cntr_ous_2
= 0; cntr_ous_2
< *r
->out
.num_ous
; cntr_ous_2
++) {
8752 if ((*r
->out
.ous
)[cntr_ous_2
]) {
8753 _mem_save_ous_3
= NDR_PULL_GET_MEM_CTX(ndr
);
8754 NDR_PULL_SET_MEM_CTX(ndr
, (*r
->out
.ous
)[cntr_ous_2
], 0);
8755 NDR_CHECK(ndr_pull_array_size(ndr
, &(*r
->out
.ous
)[cntr_ous_2
]));
8756 NDR_CHECK(ndr_pull_array_length(ndr
, &(*r
->out
.ous
)[cntr_ous_2
]));
8757 if (ndr_get_array_length(ndr
, &(*r
->out
.ous
)[cntr_ous_2
]) > ndr_get_array_size(ndr
, &(*r
->out
.ous
)[cntr_ous_2
])) {
8758 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &(*r
->out
.ous
)[cntr_ous_2
]), ndr_get_array_length(ndr
, &(*r
->out
.ous
)[cntr_ous_2
]));
8760 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &(*r
->out
.ous
)[cntr_ous_2
]), sizeof(uint16_t)));
8761 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &(*r
->out
.ous
)[cntr_ous_2
], ndr_get_array_length(ndr
, &(*r
->out
.ous
)[cntr_ous_2
]), sizeof(uint16_t), CH_UTF16
));
8762 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ous_3
, 0);
8765 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ous_2
, 0);
8766 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ous_1
, 0);
8768 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ous_0
, LIBNDR_FLAG_REF_ALLOC
);
8769 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
8771 NDR_CHECK(ndr_check_array_size(ndr
, (void*)r
->out
.ous
, *r
->out
.num_ous
));
8774 return NDR_ERR_SUCCESS
;
8777 _PUBLIC_
void ndr_print_wkssvc_NetrGetJoinableOus(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrGetJoinableOus
*r
)
8779 uint32_t cntr_ous_2
;
8780 ndr_print_struct(ndr
, name
, "wkssvc_NetrGetJoinableOus");
8782 if (flags
& NDR_SET_VALUES
) {
8783 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8785 if (flags
& NDR_IN
) {
8786 ndr_print_struct(ndr
, "in", "wkssvc_NetrGetJoinableOus");
8788 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
8790 if (r
->in
.server_name
) {
8791 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
8794 ndr_print_ptr(ndr
, "domain_name", r
->in
.domain_name
);
8796 ndr_print_string(ndr
, "domain_name", r
->in
.domain_name
);
8798 ndr_print_ptr(ndr
, "Account", r
->in
.Account
);
8800 if (r
->in
.Account
) {
8801 ndr_print_string(ndr
, "Account", r
->in
.Account
);
8804 ndr_print_ptr(ndr
, "unknown", r
->in
.unknown
);
8806 if (r
->in
.unknown
) {
8807 ndr_print_string(ndr
, "unknown", r
->in
.unknown
);
8810 ndr_print_ptr(ndr
, "num_ous", r
->in
.num_ous
);
8812 ndr_print_uint32(ndr
, "num_ous", *r
->in
.num_ous
);
8816 if (flags
& NDR_OUT
) {
8817 ndr_print_struct(ndr
, "out", "wkssvc_NetrGetJoinableOus");
8819 ndr_print_ptr(ndr
, "num_ous", r
->out
.num_ous
);
8821 ndr_print_uint32(ndr
, "num_ous", *r
->out
.num_ous
);
8823 ndr_print_ptr(ndr
, "ous", r
->out
.ous
);
8825 ndr_print_ptr(ndr
, "ous", *r
->out
.ous
);
8828 ndr
->print(ndr
, "%s: ARRAY(%d)", "ous", (int)*r
->out
.num_ous
);
8830 for (cntr_ous_2
=0;cntr_ous_2
<*r
->out
.num_ous
;cntr_ous_2
++) {
8832 if (asprintf(&idx_2
, "[%d]", cntr_ous_2
) != -1) {
8833 ndr_print_ptr(ndr
, "ous", (*r
->out
.ous
)[cntr_ous_2
]);
8835 if ((*r
->out
.ous
)[cntr_ous_2
]) {
8836 ndr_print_string(ndr
, "ous", (*r
->out
.ous
)[cntr_ous_2
]);
8846 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
8852 static enum ndr_err_code
ndr_push_wkssvc_NetrJoinDomain2(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrJoinDomain2
*r
)
8854 if (flags
& NDR_IN
) {
8855 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
8856 if (r
->in
.server_name
) {
8857 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8858 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8859 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
8860 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
));
8862 if (r
->in
.domain_name
== NULL
) {
8863 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8865 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
8866 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8867 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
8868 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
));
8869 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.account_ou
));
8870 if (r
->in
.account_ou
) {
8871 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_ou
, CH_UTF16
)));
8872 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8873 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_ou
, CH_UTF16
)));
8874 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
));
8876 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.admin_account
));
8877 if (r
->in
.admin_account
) {
8878 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.admin_account
, CH_UTF16
)));
8879 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8880 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.admin_account
, CH_UTF16
)));
8881 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
));
8883 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.encrypted_password
));
8884 if (r
->in
.encrypted_password
) {
8885 NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.encrypted_password
));
8887 NDR_CHECK(ndr_push_wkssvc_joinflags(ndr
, NDR_SCALARS
, r
->in
.join_flags
));
8889 if (flags
& NDR_OUT
) {
8890 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
8892 return NDR_ERR_SUCCESS
;
8895 static enum ndr_err_code
ndr_pull_wkssvc_NetrJoinDomain2(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrJoinDomain2
*r
)
8897 uint32_t _ptr_server_name
;
8898 uint32_t _ptr_account_ou
;
8899 uint32_t _ptr_admin_account
;
8900 uint32_t _ptr_encrypted_password
;
8901 TALLOC_CTX
*_mem_save_server_name_0
;
8902 TALLOC_CTX
*_mem_save_account_ou_0
;
8903 TALLOC_CTX
*_mem_save_admin_account_0
;
8904 TALLOC_CTX
*_mem_save_encrypted_password_0
;
8905 if (flags
& NDR_IN
) {
8906 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
8907 if (_ptr_server_name
) {
8908 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
8910 r
->in
.server_name
= NULL
;
8912 if (r
->in
.server_name
) {
8913 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8914 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
8915 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
8916 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
8917 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
8918 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
8920 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
8921 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
8922 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
8924 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.domain_name
));
8925 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.domain_name
));
8926 if (ndr_get_array_length(ndr
, &r
->in
.domain_name
) > ndr_get_array_size(ndr
, &r
->in
.domain_name
)) {
8927 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.domain_name
), ndr_get_array_length(ndr
, &r
->in
.domain_name
));
8929 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t)));
8930 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.domain_name
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t), CH_UTF16
));
8931 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_account_ou
));
8932 if (_ptr_account_ou
) {
8933 NDR_PULL_ALLOC(ndr
, r
->in
.account_ou
);
8935 r
->in
.account_ou
= NULL
;
8937 if (r
->in
.account_ou
) {
8938 _mem_save_account_ou_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8939 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.account_ou
, 0);
8940 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.account_ou
));
8941 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.account_ou
));
8942 if (ndr_get_array_length(ndr
, &r
->in
.account_ou
) > ndr_get_array_size(ndr
, &r
->in
.account_ou
)) {
8943 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.account_ou
), ndr_get_array_length(ndr
, &r
->in
.account_ou
));
8945 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.account_ou
), sizeof(uint16_t)));
8946 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.account_ou
, ndr_get_array_length(ndr
, &r
->in
.account_ou
), sizeof(uint16_t), CH_UTF16
));
8947 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_ou_0
, 0);
8949 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_admin_account
));
8950 if (_ptr_admin_account
) {
8951 NDR_PULL_ALLOC(ndr
, r
->in
.admin_account
);
8953 r
->in
.admin_account
= NULL
;
8955 if (r
->in
.admin_account
) {
8956 _mem_save_admin_account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8957 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.admin_account
, 0);
8958 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.admin_account
));
8959 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.admin_account
));
8960 if (ndr_get_array_length(ndr
, &r
->in
.admin_account
) > ndr_get_array_size(ndr
, &r
->in
.admin_account
)) {
8961 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.admin_account
), ndr_get_array_length(ndr
, &r
->in
.admin_account
));
8963 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.admin_account
), sizeof(uint16_t)));
8964 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.admin_account
, ndr_get_array_length(ndr
, &r
->in
.admin_account
), sizeof(uint16_t), CH_UTF16
));
8965 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_admin_account_0
, 0);
8967 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_encrypted_password
));
8968 if (_ptr_encrypted_password
) {
8969 NDR_PULL_ALLOC(ndr
, r
->in
.encrypted_password
);
8971 r
->in
.encrypted_password
= NULL
;
8973 if (r
->in
.encrypted_password
) {
8974 _mem_save_encrypted_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8975 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.encrypted_password
, 0);
8976 NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.encrypted_password
));
8977 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_encrypted_password_0
, 0);
8979 NDR_CHECK(ndr_pull_wkssvc_joinflags(ndr
, NDR_SCALARS
, &r
->in
.join_flags
));
8981 if (flags
& NDR_OUT
) {
8982 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
8984 return NDR_ERR_SUCCESS
;
8987 _PUBLIC_
void ndr_print_wkssvc_NetrJoinDomain2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrJoinDomain2
*r
)
8989 ndr_print_struct(ndr
, name
, "wkssvc_NetrJoinDomain2");
8991 if (flags
& NDR_SET_VALUES
) {
8992 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8994 if (flags
& NDR_IN
) {
8995 ndr_print_struct(ndr
, "in", "wkssvc_NetrJoinDomain2");
8997 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
8999 if (r
->in
.server_name
) {
9000 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
9003 ndr_print_ptr(ndr
, "domain_name", r
->in
.domain_name
);
9005 ndr_print_string(ndr
, "domain_name", r
->in
.domain_name
);
9007 ndr_print_ptr(ndr
, "account_ou", r
->in
.account_ou
);
9009 if (r
->in
.account_ou
) {
9010 ndr_print_string(ndr
, "account_ou", r
->in
.account_ou
);
9013 ndr_print_ptr(ndr
, "admin_account", r
->in
.admin_account
);
9015 if (r
->in
.admin_account
) {
9016 ndr_print_string(ndr
, "admin_account", r
->in
.admin_account
);
9019 ndr_print_ptr(ndr
, "encrypted_password", r
->in
.encrypted_password
);
9021 if (r
->in
.encrypted_password
) {
9022 ndr_print_wkssvc_PasswordBuffer(ndr
, "encrypted_password", r
->in
.encrypted_password
);
9025 ndr_print_wkssvc_joinflags(ndr
, "join_flags", r
->in
.join_flags
);
9028 if (flags
& NDR_OUT
) {
9029 ndr_print_struct(ndr
, "out", "wkssvc_NetrJoinDomain2");
9031 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
9037 static enum ndr_err_code
ndr_push_wkssvc_NetrUnjoinDomain2(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrUnjoinDomain2
*r
)
9039 if (flags
& NDR_IN
) {
9040 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
9041 if (r
->in
.server_name
) {
9042 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
9043 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9044 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
9045 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
));
9047 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.account
));
9048 if (r
->in
.account
) {
9049 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account
, CH_UTF16
)));
9050 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9051 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account
, CH_UTF16
)));
9052 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.account
, ndr_charset_length(r
->in
.account
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9054 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.encrypted_password
));
9055 if (r
->in
.encrypted_password
) {
9056 NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.encrypted_password
));
9058 NDR_CHECK(ndr_push_wkssvc_joinflags(ndr
, NDR_SCALARS
, r
->in
.unjoin_flags
));
9060 if (flags
& NDR_OUT
) {
9061 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
9063 return NDR_ERR_SUCCESS
;
9066 static enum ndr_err_code
ndr_pull_wkssvc_NetrUnjoinDomain2(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrUnjoinDomain2
*r
)
9068 uint32_t _ptr_server_name
;
9069 uint32_t _ptr_account
;
9070 uint32_t _ptr_encrypted_password
;
9071 TALLOC_CTX
*_mem_save_server_name_0
;
9072 TALLOC_CTX
*_mem_save_account_0
;
9073 TALLOC_CTX
*_mem_save_encrypted_password_0
;
9074 if (flags
& NDR_IN
) {
9075 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
9076 if (_ptr_server_name
) {
9077 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
9079 r
->in
.server_name
= NULL
;
9081 if (r
->in
.server_name
) {
9082 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9083 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
9084 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
9085 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
9086 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
9087 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
9089 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
9090 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
9091 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
9093 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_account
));
9095 NDR_PULL_ALLOC(ndr
, r
->in
.account
);
9097 r
->in
.account
= NULL
;
9099 if (r
->in
.account
) {
9100 _mem_save_account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9101 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.account
, 0);
9102 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.account
));
9103 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.account
));
9104 if (ndr_get_array_length(ndr
, &r
->in
.account
) > ndr_get_array_size(ndr
, &r
->in
.account
)) {
9105 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.account
), ndr_get_array_length(ndr
, &r
->in
.account
));
9107 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.account
), sizeof(uint16_t)));
9108 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.account
, ndr_get_array_length(ndr
, &r
->in
.account
), sizeof(uint16_t), CH_UTF16
));
9109 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_0
, 0);
9111 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_encrypted_password
));
9112 if (_ptr_encrypted_password
) {
9113 NDR_PULL_ALLOC(ndr
, r
->in
.encrypted_password
);
9115 r
->in
.encrypted_password
= NULL
;
9117 if (r
->in
.encrypted_password
) {
9118 _mem_save_encrypted_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9119 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.encrypted_password
, 0);
9120 NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.encrypted_password
));
9121 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_encrypted_password_0
, 0);
9123 NDR_CHECK(ndr_pull_wkssvc_joinflags(ndr
, NDR_SCALARS
, &r
->in
.unjoin_flags
));
9125 if (flags
& NDR_OUT
) {
9126 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
9128 return NDR_ERR_SUCCESS
;
9131 _PUBLIC_
void ndr_print_wkssvc_NetrUnjoinDomain2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrUnjoinDomain2
*r
)
9133 ndr_print_struct(ndr
, name
, "wkssvc_NetrUnjoinDomain2");
9135 if (flags
& NDR_SET_VALUES
) {
9136 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9138 if (flags
& NDR_IN
) {
9139 ndr_print_struct(ndr
, "in", "wkssvc_NetrUnjoinDomain2");
9141 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
9143 if (r
->in
.server_name
) {
9144 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
9147 ndr_print_ptr(ndr
, "account", r
->in
.account
);
9149 if (r
->in
.account
) {
9150 ndr_print_string(ndr
, "account", r
->in
.account
);
9153 ndr_print_ptr(ndr
, "encrypted_password", r
->in
.encrypted_password
);
9155 if (r
->in
.encrypted_password
) {
9156 ndr_print_wkssvc_PasswordBuffer(ndr
, "encrypted_password", r
->in
.encrypted_password
);
9159 ndr_print_wkssvc_joinflags(ndr
, "unjoin_flags", r
->in
.unjoin_flags
);
9162 if (flags
& NDR_OUT
) {
9163 ndr_print_struct(ndr
, "out", "wkssvc_NetrUnjoinDomain2");
9165 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
9171 static enum ndr_err_code
ndr_push_wkssvc_NetrRenameMachineInDomain2(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrRenameMachineInDomain2
*r
)
9173 if (flags
& NDR_IN
) {
9174 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
9175 if (r
->in
.server_name
) {
9176 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
9177 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9178 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
9179 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
));
9181 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.NewMachineName
));
9182 if (r
->in
.NewMachineName
) {
9183 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.NewMachineName
, CH_UTF16
)));
9184 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9185 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.NewMachineName
, CH_UTF16
)));
9186 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.NewMachineName
, ndr_charset_length(r
->in
.NewMachineName
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9188 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.Account
));
9189 if (r
->in
.Account
) {
9190 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
9191 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9192 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
9193 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.Account
, ndr_charset_length(r
->in
.Account
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9195 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.EncryptedPassword
));
9196 if (r
->in
.EncryptedPassword
) {
9197 NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.EncryptedPassword
));
9199 NDR_CHECK(ndr_push_wkssvc_renameflags(ndr
, NDR_SCALARS
, r
->in
.RenameOptions
));
9201 if (flags
& NDR_OUT
) {
9202 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
9204 return NDR_ERR_SUCCESS
;
9207 static enum ndr_err_code
ndr_pull_wkssvc_NetrRenameMachineInDomain2(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrRenameMachineInDomain2
*r
)
9209 uint32_t _ptr_server_name
;
9210 uint32_t _ptr_NewMachineName
;
9211 uint32_t _ptr_Account
;
9212 uint32_t _ptr_EncryptedPassword
;
9213 TALLOC_CTX
*_mem_save_server_name_0
;
9214 TALLOC_CTX
*_mem_save_NewMachineName_0
;
9215 TALLOC_CTX
*_mem_save_Account_0
;
9216 TALLOC_CTX
*_mem_save_EncryptedPassword_0
;
9217 if (flags
& NDR_IN
) {
9218 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
9219 if (_ptr_server_name
) {
9220 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
9222 r
->in
.server_name
= NULL
;
9224 if (r
->in
.server_name
) {
9225 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9226 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
9227 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
9228 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
9229 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
9230 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
9232 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
9233 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
9234 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
9236 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_NewMachineName
));
9237 if (_ptr_NewMachineName
) {
9238 NDR_PULL_ALLOC(ndr
, r
->in
.NewMachineName
);
9240 r
->in
.NewMachineName
= NULL
;
9242 if (r
->in
.NewMachineName
) {
9243 _mem_save_NewMachineName_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9244 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.NewMachineName
, 0);
9245 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.NewMachineName
));
9246 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.NewMachineName
));
9247 if (ndr_get_array_length(ndr
, &r
->in
.NewMachineName
) > ndr_get_array_size(ndr
, &r
->in
.NewMachineName
)) {
9248 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.NewMachineName
), ndr_get_array_length(ndr
, &r
->in
.NewMachineName
));
9250 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.NewMachineName
), sizeof(uint16_t)));
9251 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.NewMachineName
, ndr_get_array_length(ndr
, &r
->in
.NewMachineName
), sizeof(uint16_t), CH_UTF16
));
9252 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_NewMachineName_0
, 0);
9254 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_Account
));
9256 NDR_PULL_ALLOC(ndr
, r
->in
.Account
);
9258 r
->in
.Account
= NULL
;
9260 if (r
->in
.Account
) {
9261 _mem_save_Account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9262 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.Account
, 0);
9263 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.Account
));
9264 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.Account
));
9265 if (ndr_get_array_length(ndr
, &r
->in
.Account
) > ndr_get_array_size(ndr
, &r
->in
.Account
)) {
9266 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.Account
), ndr_get_array_length(ndr
, &r
->in
.Account
));
9268 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t)));
9269 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.Account
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t), CH_UTF16
));
9270 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Account_0
, 0);
9272 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_EncryptedPassword
));
9273 if (_ptr_EncryptedPassword
) {
9274 NDR_PULL_ALLOC(ndr
, r
->in
.EncryptedPassword
);
9276 r
->in
.EncryptedPassword
= NULL
;
9278 if (r
->in
.EncryptedPassword
) {
9279 _mem_save_EncryptedPassword_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9280 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.EncryptedPassword
, 0);
9281 NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.EncryptedPassword
));
9282 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_EncryptedPassword_0
, 0);
9284 NDR_CHECK(ndr_pull_wkssvc_renameflags(ndr
, NDR_SCALARS
, &r
->in
.RenameOptions
));
9286 if (flags
& NDR_OUT
) {
9287 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
9289 return NDR_ERR_SUCCESS
;
9292 _PUBLIC_
void ndr_print_wkssvc_NetrRenameMachineInDomain2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrRenameMachineInDomain2
*r
)
9294 ndr_print_struct(ndr
, name
, "wkssvc_NetrRenameMachineInDomain2");
9296 if (flags
& NDR_SET_VALUES
) {
9297 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9299 if (flags
& NDR_IN
) {
9300 ndr_print_struct(ndr
, "in", "wkssvc_NetrRenameMachineInDomain2");
9302 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
9304 if (r
->in
.server_name
) {
9305 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
9308 ndr_print_ptr(ndr
, "NewMachineName", r
->in
.NewMachineName
);
9310 if (r
->in
.NewMachineName
) {
9311 ndr_print_string(ndr
, "NewMachineName", r
->in
.NewMachineName
);
9314 ndr_print_ptr(ndr
, "Account", r
->in
.Account
);
9316 if (r
->in
.Account
) {
9317 ndr_print_string(ndr
, "Account", r
->in
.Account
);
9320 ndr_print_ptr(ndr
, "EncryptedPassword", r
->in
.EncryptedPassword
);
9322 if (r
->in
.EncryptedPassword
) {
9323 ndr_print_wkssvc_PasswordBuffer(ndr
, "EncryptedPassword", r
->in
.EncryptedPassword
);
9326 ndr_print_wkssvc_renameflags(ndr
, "RenameOptions", r
->in
.RenameOptions
);
9329 if (flags
& NDR_OUT
) {
9330 ndr_print_struct(ndr
, "out", "wkssvc_NetrRenameMachineInDomain2");
9332 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
9338 static enum ndr_err_code
ndr_push_wkssvc_NetrValidateName2(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrValidateName2
*r
)
9340 if (flags
& NDR_IN
) {
9341 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
9342 if (r
->in
.server_name
) {
9343 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
9344 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9345 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
9346 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
));
9348 if (r
->in
.name
== NULL
) {
9349 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9351 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.name
, CH_UTF16
)));
9352 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9353 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.name
, CH_UTF16
)));
9354 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.name
, ndr_charset_length(r
->in
.name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9355 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.Account
));
9356 if (r
->in
.Account
) {
9357 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
9358 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9359 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
9360 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.Account
, ndr_charset_length(r
->in
.Account
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9362 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.EncryptedPassword
));
9363 if (r
->in
.EncryptedPassword
) {
9364 NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.EncryptedPassword
));
9366 NDR_CHECK(ndr_push_wkssvc_NetValidateNameType(ndr
, NDR_SCALARS
, r
->in
.name_type
));
9368 if (flags
& NDR_OUT
) {
9369 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
9371 return NDR_ERR_SUCCESS
;
9374 static enum ndr_err_code
ndr_pull_wkssvc_NetrValidateName2(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrValidateName2
*r
)
9376 uint32_t _ptr_server_name
;
9377 uint32_t _ptr_Account
;
9378 uint32_t _ptr_EncryptedPassword
;
9379 TALLOC_CTX
*_mem_save_server_name_0
;
9380 TALLOC_CTX
*_mem_save_Account_0
;
9381 TALLOC_CTX
*_mem_save_EncryptedPassword_0
;
9382 if (flags
& NDR_IN
) {
9383 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
9384 if (_ptr_server_name
) {
9385 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
9387 r
->in
.server_name
= NULL
;
9389 if (r
->in
.server_name
) {
9390 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9391 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
9392 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
9393 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
9394 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
9395 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
9397 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
9398 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
9399 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
9401 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.name
));
9402 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.name
));
9403 if (ndr_get_array_length(ndr
, &r
->in
.name
) > ndr_get_array_size(ndr
, &r
->in
.name
)) {
9404 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.name
), ndr_get_array_length(ndr
, &r
->in
.name
));
9406 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.name
), sizeof(uint16_t)));
9407 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.name
, ndr_get_array_length(ndr
, &r
->in
.name
), sizeof(uint16_t), CH_UTF16
));
9408 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_Account
));
9410 NDR_PULL_ALLOC(ndr
, r
->in
.Account
);
9412 r
->in
.Account
= NULL
;
9414 if (r
->in
.Account
) {
9415 _mem_save_Account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9416 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.Account
, 0);
9417 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.Account
));
9418 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.Account
));
9419 if (ndr_get_array_length(ndr
, &r
->in
.Account
) > ndr_get_array_size(ndr
, &r
->in
.Account
)) {
9420 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.Account
), ndr_get_array_length(ndr
, &r
->in
.Account
));
9422 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t)));
9423 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.Account
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t), CH_UTF16
));
9424 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Account_0
, 0);
9426 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_EncryptedPassword
));
9427 if (_ptr_EncryptedPassword
) {
9428 NDR_PULL_ALLOC(ndr
, r
->in
.EncryptedPassword
);
9430 r
->in
.EncryptedPassword
= NULL
;
9432 if (r
->in
.EncryptedPassword
) {
9433 _mem_save_EncryptedPassword_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9434 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.EncryptedPassword
, 0);
9435 NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.EncryptedPassword
));
9436 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_EncryptedPassword_0
, 0);
9438 NDR_CHECK(ndr_pull_wkssvc_NetValidateNameType(ndr
, NDR_SCALARS
, &r
->in
.name_type
));
9440 if (flags
& NDR_OUT
) {
9441 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
9443 return NDR_ERR_SUCCESS
;
9446 _PUBLIC_
void ndr_print_wkssvc_NetrValidateName2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrValidateName2
*r
)
9448 ndr_print_struct(ndr
, name
, "wkssvc_NetrValidateName2");
9450 if (flags
& NDR_SET_VALUES
) {
9451 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9453 if (flags
& NDR_IN
) {
9454 ndr_print_struct(ndr
, "in", "wkssvc_NetrValidateName2");
9456 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
9458 if (r
->in
.server_name
) {
9459 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
9462 ndr_print_ptr(ndr
, "name", r
->in
.name
);
9464 ndr_print_string(ndr
, "name", r
->in
.name
);
9466 ndr_print_ptr(ndr
, "Account", r
->in
.Account
);
9468 if (r
->in
.Account
) {
9469 ndr_print_string(ndr
, "Account", r
->in
.Account
);
9472 ndr_print_ptr(ndr
, "EncryptedPassword", r
->in
.EncryptedPassword
);
9474 if (r
->in
.EncryptedPassword
) {
9475 ndr_print_wkssvc_PasswordBuffer(ndr
, "EncryptedPassword", r
->in
.EncryptedPassword
);
9478 ndr_print_wkssvc_NetValidateNameType(ndr
, "name_type", r
->in
.name_type
);
9481 if (flags
& NDR_OUT
) {
9482 ndr_print_struct(ndr
, "out", "wkssvc_NetrValidateName2");
9484 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
9490 static enum ndr_err_code
ndr_push_wkssvc_NetrGetJoinableOus2(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrGetJoinableOus2
*r
)
9492 uint32_t cntr_ous_2
;
9493 if (flags
& NDR_IN
) {
9494 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
9495 if (r
->in
.server_name
) {
9496 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
9497 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9498 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
9499 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
));
9501 if (r
->in
.domain_name
== NULL
) {
9502 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9504 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
9505 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9506 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
9507 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
));
9508 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.Account
));
9509 if (r
->in
.Account
) {
9510 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
9511 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9512 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
9513 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.Account
, ndr_charset_length(r
->in
.Account
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9515 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.EncryptedPassword
));
9516 if (r
->in
.EncryptedPassword
) {
9517 NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.EncryptedPassword
));
9519 if (r
->in
.num_ous
== NULL
) {
9520 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9522 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.num_ous
));
9524 if (flags
& NDR_OUT
) {
9525 if (r
->out
.num_ous
== NULL
) {
9526 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9528 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.num_ous
));
9529 if (r
->out
.ous
== NULL
) {
9530 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9532 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.ous
));
9534 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.num_ous
));
9535 for (cntr_ous_2
= 0; cntr_ous_2
< *r
->out
.num_ous
; cntr_ous_2
++) {
9536 NDR_CHECK(ndr_push_unique_ptr(ndr
, (*r
->out
.ous
)[cntr_ous_2
]));
9538 for (cntr_ous_2
= 0; cntr_ous_2
< *r
->out
.num_ous
; cntr_ous_2
++) {
9539 if ((*r
->out
.ous
)[cntr_ous_2
]) {
9540 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length((*r
->out
.ous
)[cntr_ous_2
], CH_UTF16
)));
9541 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9542 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length((*r
->out
.ous
)[cntr_ous_2
], CH_UTF16
)));
9543 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
));
9547 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
9549 return NDR_ERR_SUCCESS
;
9552 static enum ndr_err_code
ndr_pull_wkssvc_NetrGetJoinableOus2(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrGetJoinableOus2
*r
)
9554 uint32_t _ptr_server_name
;
9555 uint32_t _ptr_Account
;
9556 uint32_t _ptr_EncryptedPassword
;
9558 uint32_t cntr_ous_2
;
9559 TALLOC_CTX
*_mem_save_server_name_0
;
9560 TALLOC_CTX
*_mem_save_Account_0
;
9561 TALLOC_CTX
*_mem_save_EncryptedPassword_0
;
9562 TALLOC_CTX
*_mem_save_num_ous_0
;
9563 TALLOC_CTX
*_mem_save_ous_0
;
9564 TALLOC_CTX
*_mem_save_ous_1
;
9565 TALLOC_CTX
*_mem_save_ous_2
;
9566 TALLOC_CTX
*_mem_save_ous_3
;
9567 if (flags
& NDR_IN
) {
9568 ZERO_STRUCT(r
->out
);
9570 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
9571 if (_ptr_server_name
) {
9572 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
9574 r
->in
.server_name
= NULL
;
9576 if (r
->in
.server_name
) {
9577 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9578 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
9579 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
9580 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
9581 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
9582 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
9584 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
9585 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
9586 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
9588 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.domain_name
));
9589 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.domain_name
));
9590 if (ndr_get_array_length(ndr
, &r
->in
.domain_name
) > ndr_get_array_size(ndr
, &r
->in
.domain_name
)) {
9591 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.domain_name
), ndr_get_array_length(ndr
, &r
->in
.domain_name
));
9593 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t)));
9594 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.domain_name
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t), CH_UTF16
));
9595 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_Account
));
9597 NDR_PULL_ALLOC(ndr
, r
->in
.Account
);
9599 r
->in
.Account
= NULL
;
9601 if (r
->in
.Account
) {
9602 _mem_save_Account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9603 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.Account
, 0);
9604 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.Account
));
9605 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.Account
));
9606 if (ndr_get_array_length(ndr
, &r
->in
.Account
) > ndr_get_array_size(ndr
, &r
->in
.Account
)) {
9607 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.Account
), ndr_get_array_length(ndr
, &r
->in
.Account
));
9609 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t)));
9610 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.Account
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t), CH_UTF16
));
9611 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Account_0
, 0);
9613 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_EncryptedPassword
));
9614 if (_ptr_EncryptedPassword
) {
9615 NDR_PULL_ALLOC(ndr
, r
->in
.EncryptedPassword
);
9617 r
->in
.EncryptedPassword
= NULL
;
9619 if (r
->in
.EncryptedPassword
) {
9620 _mem_save_EncryptedPassword_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9621 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.EncryptedPassword
, 0);
9622 NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.EncryptedPassword
));
9623 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_EncryptedPassword_0
, 0);
9625 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9626 NDR_PULL_ALLOC(ndr
, r
->in
.num_ous
);
9628 _mem_save_num_ous_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9629 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.num_ous
, LIBNDR_FLAG_REF_ALLOC
);
9630 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.num_ous
));
9631 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_num_ous_0
, LIBNDR_FLAG_REF_ALLOC
);
9632 NDR_PULL_ALLOC(ndr
, r
->out
.num_ous
);
9633 *r
->out
.num_ous
= *r
->in
.num_ous
;
9634 NDR_PULL_ALLOC(ndr
, r
->out
.ous
);
9635 ZERO_STRUCTP(r
->out
.ous
);
9637 if (flags
& NDR_OUT
) {
9638 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9639 NDR_PULL_ALLOC(ndr
, r
->out
.num_ous
);
9641 _mem_save_num_ous_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9642 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.num_ous
, LIBNDR_FLAG_REF_ALLOC
);
9643 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.num_ous
));
9644 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_num_ous_0
, LIBNDR_FLAG_REF_ALLOC
);
9645 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9646 NDR_PULL_ALLOC(ndr
, r
->out
.ous
);
9648 _mem_save_ous_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9649 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ous
, LIBNDR_FLAG_REF_ALLOC
);
9650 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ous
));
9652 NDR_PULL_ALLOC(ndr
, *r
->out
.ous
);
9657 _mem_save_ous_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9658 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.ous
, 0);
9659 NDR_CHECK(ndr_pull_array_size(ndr
, r
->out
.ous
));
9660 NDR_PULL_ALLOC_N(ndr
, *r
->out
.ous
, ndr_get_array_size(ndr
, r
->out
.ous
));
9661 _mem_save_ous_2
= NDR_PULL_GET_MEM_CTX(ndr
);
9662 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.ous
, 0);
9663 for (cntr_ous_2
= 0; cntr_ous_2
< *r
->out
.num_ous
; cntr_ous_2
++) {
9664 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ous
));
9666 NDR_PULL_ALLOC(ndr
, (*r
->out
.ous
)[cntr_ous_2
]);
9668 (*r
->out
.ous
)[cntr_ous_2
] = NULL
;
9671 for (cntr_ous_2
= 0; cntr_ous_2
< *r
->out
.num_ous
; cntr_ous_2
++) {
9672 if ((*r
->out
.ous
)[cntr_ous_2
]) {
9673 _mem_save_ous_3
= NDR_PULL_GET_MEM_CTX(ndr
);
9674 NDR_PULL_SET_MEM_CTX(ndr
, (*r
->out
.ous
)[cntr_ous_2
], 0);
9675 NDR_CHECK(ndr_pull_array_size(ndr
, &(*r
->out
.ous
)[cntr_ous_2
]));
9676 NDR_CHECK(ndr_pull_array_length(ndr
, &(*r
->out
.ous
)[cntr_ous_2
]));
9677 if (ndr_get_array_length(ndr
, &(*r
->out
.ous
)[cntr_ous_2
]) > ndr_get_array_size(ndr
, &(*r
->out
.ous
)[cntr_ous_2
])) {
9678 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &(*r
->out
.ous
)[cntr_ous_2
]), ndr_get_array_length(ndr
, &(*r
->out
.ous
)[cntr_ous_2
]));
9680 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &(*r
->out
.ous
)[cntr_ous_2
]), sizeof(uint16_t)));
9681 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &(*r
->out
.ous
)[cntr_ous_2
], ndr_get_array_length(ndr
, &(*r
->out
.ous
)[cntr_ous_2
]), sizeof(uint16_t), CH_UTF16
));
9682 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ous_3
, 0);
9685 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ous_2
, 0);
9686 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ous_1
, 0);
9688 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ous_0
, LIBNDR_FLAG_REF_ALLOC
);
9689 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
9691 NDR_CHECK(ndr_check_array_size(ndr
, (void*)r
->out
.ous
, *r
->out
.num_ous
));
9694 return NDR_ERR_SUCCESS
;
9697 _PUBLIC_
void ndr_print_wkssvc_NetrGetJoinableOus2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrGetJoinableOus2
*r
)
9699 uint32_t cntr_ous_2
;
9700 ndr_print_struct(ndr
, name
, "wkssvc_NetrGetJoinableOus2");
9702 if (flags
& NDR_SET_VALUES
) {
9703 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9705 if (flags
& NDR_IN
) {
9706 ndr_print_struct(ndr
, "in", "wkssvc_NetrGetJoinableOus2");
9708 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
9710 if (r
->in
.server_name
) {
9711 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
9714 ndr_print_ptr(ndr
, "domain_name", r
->in
.domain_name
);
9716 ndr_print_string(ndr
, "domain_name", r
->in
.domain_name
);
9718 ndr_print_ptr(ndr
, "Account", r
->in
.Account
);
9720 if (r
->in
.Account
) {
9721 ndr_print_string(ndr
, "Account", r
->in
.Account
);
9724 ndr_print_ptr(ndr
, "EncryptedPassword", r
->in
.EncryptedPassword
);
9726 if (r
->in
.EncryptedPassword
) {
9727 ndr_print_wkssvc_PasswordBuffer(ndr
, "EncryptedPassword", r
->in
.EncryptedPassword
);
9730 ndr_print_ptr(ndr
, "num_ous", r
->in
.num_ous
);
9732 ndr_print_uint32(ndr
, "num_ous", *r
->in
.num_ous
);
9736 if (flags
& NDR_OUT
) {
9737 ndr_print_struct(ndr
, "out", "wkssvc_NetrGetJoinableOus2");
9739 ndr_print_ptr(ndr
, "num_ous", r
->out
.num_ous
);
9741 ndr_print_uint32(ndr
, "num_ous", *r
->out
.num_ous
);
9743 ndr_print_ptr(ndr
, "ous", r
->out
.ous
);
9745 ndr_print_ptr(ndr
, "ous", *r
->out
.ous
);
9748 ndr
->print(ndr
, "%s: ARRAY(%d)", "ous", (int)*r
->out
.num_ous
);
9750 for (cntr_ous_2
=0;cntr_ous_2
<*r
->out
.num_ous
;cntr_ous_2
++) {
9752 if (asprintf(&idx_2
, "[%d]", cntr_ous_2
) != -1) {
9753 ndr_print_ptr(ndr
, "ous", (*r
->out
.ous
)[cntr_ous_2
]);
9755 if ((*r
->out
.ous
)[cntr_ous_2
]) {
9756 ndr_print_string(ndr
, "ous", (*r
->out
.ous
)[cntr_ous_2
]);
9766 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
9772 static enum ndr_err_code
ndr_push_wkssvc_NetrAddAlternateComputerName(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrAddAlternateComputerName
*r
)
9774 if (flags
& NDR_IN
) {
9775 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
9776 if (r
->in
.server_name
) {
9777 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
9778 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9779 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
9780 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
));
9782 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.NewAlternateMachineName
));
9783 if (r
->in
.NewAlternateMachineName
) {
9784 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.NewAlternateMachineName
, CH_UTF16
)));
9785 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9786 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.NewAlternateMachineName
, CH_UTF16
)));
9787 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.NewAlternateMachineName
, ndr_charset_length(r
->in
.NewAlternateMachineName
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9789 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.Account
));
9790 if (r
->in
.Account
) {
9791 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
9792 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9793 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
9794 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.Account
, ndr_charset_length(r
->in
.Account
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9796 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.EncryptedPassword
));
9797 if (r
->in
.EncryptedPassword
) {
9798 NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.EncryptedPassword
));
9800 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.Reserved
));
9802 if (flags
& NDR_OUT
) {
9803 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
9805 return NDR_ERR_SUCCESS
;
9808 static enum ndr_err_code
ndr_pull_wkssvc_NetrAddAlternateComputerName(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrAddAlternateComputerName
*r
)
9810 uint32_t _ptr_server_name
;
9811 uint32_t _ptr_NewAlternateMachineName
;
9812 uint32_t _ptr_Account
;
9813 uint32_t _ptr_EncryptedPassword
;
9814 TALLOC_CTX
*_mem_save_server_name_0
;
9815 TALLOC_CTX
*_mem_save_NewAlternateMachineName_0
;
9816 TALLOC_CTX
*_mem_save_Account_0
;
9817 TALLOC_CTX
*_mem_save_EncryptedPassword_0
;
9818 if (flags
& NDR_IN
) {
9819 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
9820 if (_ptr_server_name
) {
9821 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
9823 r
->in
.server_name
= NULL
;
9825 if (r
->in
.server_name
) {
9826 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9827 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
9828 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
9829 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
9830 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
9831 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
9833 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
9834 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
9835 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
9837 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_NewAlternateMachineName
));
9838 if (_ptr_NewAlternateMachineName
) {
9839 NDR_PULL_ALLOC(ndr
, r
->in
.NewAlternateMachineName
);
9841 r
->in
.NewAlternateMachineName
= NULL
;
9843 if (r
->in
.NewAlternateMachineName
) {
9844 _mem_save_NewAlternateMachineName_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9845 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.NewAlternateMachineName
, 0);
9846 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.NewAlternateMachineName
));
9847 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.NewAlternateMachineName
));
9848 if (ndr_get_array_length(ndr
, &r
->in
.NewAlternateMachineName
) > ndr_get_array_size(ndr
, &r
->in
.NewAlternateMachineName
)) {
9849 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.NewAlternateMachineName
), ndr_get_array_length(ndr
, &r
->in
.NewAlternateMachineName
));
9851 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.NewAlternateMachineName
), sizeof(uint16_t)));
9852 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.NewAlternateMachineName
, ndr_get_array_length(ndr
, &r
->in
.NewAlternateMachineName
), sizeof(uint16_t), CH_UTF16
));
9853 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_NewAlternateMachineName_0
, 0);
9855 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_Account
));
9857 NDR_PULL_ALLOC(ndr
, r
->in
.Account
);
9859 r
->in
.Account
= NULL
;
9861 if (r
->in
.Account
) {
9862 _mem_save_Account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9863 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.Account
, 0);
9864 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.Account
));
9865 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.Account
));
9866 if (ndr_get_array_length(ndr
, &r
->in
.Account
) > ndr_get_array_size(ndr
, &r
->in
.Account
)) {
9867 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.Account
), ndr_get_array_length(ndr
, &r
->in
.Account
));
9869 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t)));
9870 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.Account
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t), CH_UTF16
));
9871 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Account_0
, 0);
9873 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_EncryptedPassword
));
9874 if (_ptr_EncryptedPassword
) {
9875 NDR_PULL_ALLOC(ndr
, r
->in
.EncryptedPassword
);
9877 r
->in
.EncryptedPassword
= NULL
;
9879 if (r
->in
.EncryptedPassword
) {
9880 _mem_save_EncryptedPassword_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9881 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.EncryptedPassword
, 0);
9882 NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.EncryptedPassword
));
9883 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_EncryptedPassword_0
, 0);
9885 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.Reserved
));
9887 if (flags
& NDR_OUT
) {
9888 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
9890 return NDR_ERR_SUCCESS
;
9893 _PUBLIC_
void ndr_print_wkssvc_NetrAddAlternateComputerName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrAddAlternateComputerName
*r
)
9895 ndr_print_struct(ndr
, name
, "wkssvc_NetrAddAlternateComputerName");
9897 if (flags
& NDR_SET_VALUES
) {
9898 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9900 if (flags
& NDR_IN
) {
9901 ndr_print_struct(ndr
, "in", "wkssvc_NetrAddAlternateComputerName");
9903 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
9905 if (r
->in
.server_name
) {
9906 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
9909 ndr_print_ptr(ndr
, "NewAlternateMachineName", r
->in
.NewAlternateMachineName
);
9911 if (r
->in
.NewAlternateMachineName
) {
9912 ndr_print_string(ndr
, "NewAlternateMachineName", r
->in
.NewAlternateMachineName
);
9915 ndr_print_ptr(ndr
, "Account", r
->in
.Account
);
9917 if (r
->in
.Account
) {
9918 ndr_print_string(ndr
, "Account", r
->in
.Account
);
9921 ndr_print_ptr(ndr
, "EncryptedPassword", r
->in
.EncryptedPassword
);
9923 if (r
->in
.EncryptedPassword
) {
9924 ndr_print_wkssvc_PasswordBuffer(ndr
, "EncryptedPassword", r
->in
.EncryptedPassword
);
9927 ndr_print_uint32(ndr
, "Reserved", r
->in
.Reserved
);
9930 if (flags
& NDR_OUT
) {
9931 ndr_print_struct(ndr
, "out", "wkssvc_NetrAddAlternateComputerName");
9933 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
9939 static enum ndr_err_code
ndr_push_wkssvc_NetrRemoveAlternateComputerName(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrRemoveAlternateComputerName
*r
)
9941 if (flags
& NDR_IN
) {
9942 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
9943 if (r
->in
.server_name
) {
9944 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
9945 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9946 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
9947 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
));
9949 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.AlternateMachineNameToRemove
));
9950 if (r
->in
.AlternateMachineNameToRemove
) {
9951 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.AlternateMachineNameToRemove
, CH_UTF16
)));
9952 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9953 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.AlternateMachineNameToRemove
, CH_UTF16
)));
9954 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.AlternateMachineNameToRemove
, ndr_charset_length(r
->in
.AlternateMachineNameToRemove
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9956 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.Account
));
9957 if (r
->in
.Account
) {
9958 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
9959 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9960 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
9961 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.Account
, ndr_charset_length(r
->in
.Account
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9963 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.EncryptedPassword
));
9964 if (r
->in
.EncryptedPassword
) {
9965 NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.EncryptedPassword
));
9967 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.Reserved
));
9969 if (flags
& NDR_OUT
) {
9970 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
9972 return NDR_ERR_SUCCESS
;
9975 static enum ndr_err_code
ndr_pull_wkssvc_NetrRemoveAlternateComputerName(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrRemoveAlternateComputerName
*r
)
9977 uint32_t _ptr_server_name
;
9978 uint32_t _ptr_AlternateMachineNameToRemove
;
9979 uint32_t _ptr_Account
;
9980 uint32_t _ptr_EncryptedPassword
;
9981 TALLOC_CTX
*_mem_save_server_name_0
;
9982 TALLOC_CTX
*_mem_save_AlternateMachineNameToRemove_0
;
9983 TALLOC_CTX
*_mem_save_Account_0
;
9984 TALLOC_CTX
*_mem_save_EncryptedPassword_0
;
9985 if (flags
& NDR_IN
) {
9986 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
9987 if (_ptr_server_name
) {
9988 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
9990 r
->in
.server_name
= NULL
;
9992 if (r
->in
.server_name
) {
9993 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9994 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
9995 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
9996 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
9997 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
9998 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
10000 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
10001 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
10002 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
10004 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_AlternateMachineNameToRemove
));
10005 if (_ptr_AlternateMachineNameToRemove
) {
10006 NDR_PULL_ALLOC(ndr
, r
->in
.AlternateMachineNameToRemove
);
10008 r
->in
.AlternateMachineNameToRemove
= NULL
;
10010 if (r
->in
.AlternateMachineNameToRemove
) {
10011 _mem_save_AlternateMachineNameToRemove_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10012 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.AlternateMachineNameToRemove
, 0);
10013 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.AlternateMachineNameToRemove
));
10014 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.AlternateMachineNameToRemove
));
10015 if (ndr_get_array_length(ndr
, &r
->in
.AlternateMachineNameToRemove
) > ndr_get_array_size(ndr
, &r
->in
.AlternateMachineNameToRemove
)) {
10016 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.AlternateMachineNameToRemove
), ndr_get_array_length(ndr
, &r
->in
.AlternateMachineNameToRemove
));
10018 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.AlternateMachineNameToRemove
), sizeof(uint16_t)));
10019 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.AlternateMachineNameToRemove
, ndr_get_array_length(ndr
, &r
->in
.AlternateMachineNameToRemove
), sizeof(uint16_t), CH_UTF16
));
10020 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_AlternateMachineNameToRemove_0
, 0);
10022 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_Account
));
10023 if (_ptr_Account
) {
10024 NDR_PULL_ALLOC(ndr
, r
->in
.Account
);
10026 r
->in
.Account
= NULL
;
10028 if (r
->in
.Account
) {
10029 _mem_save_Account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10030 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.Account
, 0);
10031 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.Account
));
10032 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.Account
));
10033 if (ndr_get_array_length(ndr
, &r
->in
.Account
) > ndr_get_array_size(ndr
, &r
->in
.Account
)) {
10034 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.Account
), ndr_get_array_length(ndr
, &r
->in
.Account
));
10036 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t)));
10037 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.Account
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t), CH_UTF16
));
10038 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Account_0
, 0);
10040 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_EncryptedPassword
));
10041 if (_ptr_EncryptedPassword
) {
10042 NDR_PULL_ALLOC(ndr
, r
->in
.EncryptedPassword
);
10044 r
->in
.EncryptedPassword
= NULL
;
10046 if (r
->in
.EncryptedPassword
) {
10047 _mem_save_EncryptedPassword_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10048 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.EncryptedPassword
, 0);
10049 NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.EncryptedPassword
));
10050 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_EncryptedPassword_0
, 0);
10052 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.Reserved
));
10054 if (flags
& NDR_OUT
) {
10055 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
10057 return NDR_ERR_SUCCESS
;
10060 _PUBLIC_
void ndr_print_wkssvc_NetrRemoveAlternateComputerName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrRemoveAlternateComputerName
*r
)
10062 ndr_print_struct(ndr
, name
, "wkssvc_NetrRemoveAlternateComputerName");
10064 if (flags
& NDR_SET_VALUES
) {
10065 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10067 if (flags
& NDR_IN
) {
10068 ndr_print_struct(ndr
, "in", "wkssvc_NetrRemoveAlternateComputerName");
10070 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
10072 if (r
->in
.server_name
) {
10073 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
10076 ndr_print_ptr(ndr
, "AlternateMachineNameToRemove", r
->in
.AlternateMachineNameToRemove
);
10078 if (r
->in
.AlternateMachineNameToRemove
) {
10079 ndr_print_string(ndr
, "AlternateMachineNameToRemove", r
->in
.AlternateMachineNameToRemove
);
10082 ndr_print_ptr(ndr
, "Account", r
->in
.Account
);
10084 if (r
->in
.Account
) {
10085 ndr_print_string(ndr
, "Account", r
->in
.Account
);
10088 ndr_print_ptr(ndr
, "EncryptedPassword", r
->in
.EncryptedPassword
);
10090 if (r
->in
.EncryptedPassword
) {
10091 ndr_print_wkssvc_PasswordBuffer(ndr
, "EncryptedPassword", r
->in
.EncryptedPassword
);
10094 ndr_print_uint32(ndr
, "Reserved", r
->in
.Reserved
);
10097 if (flags
& NDR_OUT
) {
10098 ndr_print_struct(ndr
, "out", "wkssvc_NetrRemoveAlternateComputerName");
10100 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
10106 static enum ndr_err_code
ndr_push_wkssvc_NetrSetPrimaryComputername(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrSetPrimaryComputername
*r
)
10108 if (flags
& NDR_IN
) {
10109 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
10110 if (r
->in
.server_name
) {
10111 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
10112 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10113 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
10114 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
));
10116 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.primary_name
));
10117 if (r
->in
.primary_name
) {
10118 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.primary_name
, CH_UTF16
)));
10119 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10120 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.primary_name
, CH_UTF16
)));
10121 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
));
10123 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.Account
));
10124 if (r
->in
.Account
) {
10125 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
10126 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10127 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
10128 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.Account
, ndr_charset_length(r
->in
.Account
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10130 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.EncryptedPassword
));
10131 if (r
->in
.EncryptedPassword
) {
10132 NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.EncryptedPassword
));
10134 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.Reserved
));
10136 if (flags
& NDR_OUT
) {
10137 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
10139 return NDR_ERR_SUCCESS
;
10142 static enum ndr_err_code
ndr_pull_wkssvc_NetrSetPrimaryComputername(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrSetPrimaryComputername
*r
)
10144 uint32_t _ptr_server_name
;
10145 uint32_t _ptr_primary_name
;
10146 uint32_t _ptr_Account
;
10147 uint32_t _ptr_EncryptedPassword
;
10148 TALLOC_CTX
*_mem_save_server_name_0
;
10149 TALLOC_CTX
*_mem_save_primary_name_0
;
10150 TALLOC_CTX
*_mem_save_Account_0
;
10151 TALLOC_CTX
*_mem_save_EncryptedPassword_0
;
10152 if (flags
& NDR_IN
) {
10153 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
10154 if (_ptr_server_name
) {
10155 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
10157 r
->in
.server_name
= NULL
;
10159 if (r
->in
.server_name
) {
10160 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10161 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
10162 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
10163 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
10164 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
10165 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
10167 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
10168 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
10169 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
10171 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_primary_name
));
10172 if (_ptr_primary_name
) {
10173 NDR_PULL_ALLOC(ndr
, r
->in
.primary_name
);
10175 r
->in
.primary_name
= NULL
;
10177 if (r
->in
.primary_name
) {
10178 _mem_save_primary_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10179 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.primary_name
, 0);
10180 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.primary_name
));
10181 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.primary_name
));
10182 if (ndr_get_array_length(ndr
, &r
->in
.primary_name
) > ndr_get_array_size(ndr
, &r
->in
.primary_name
)) {
10183 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.primary_name
), ndr_get_array_length(ndr
, &r
->in
.primary_name
));
10185 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.primary_name
), sizeof(uint16_t)));
10186 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.primary_name
, ndr_get_array_length(ndr
, &r
->in
.primary_name
), sizeof(uint16_t), CH_UTF16
));
10187 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_primary_name_0
, 0);
10189 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_Account
));
10190 if (_ptr_Account
) {
10191 NDR_PULL_ALLOC(ndr
, r
->in
.Account
);
10193 r
->in
.Account
= NULL
;
10195 if (r
->in
.Account
) {
10196 _mem_save_Account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10197 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.Account
, 0);
10198 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.Account
));
10199 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.Account
));
10200 if (ndr_get_array_length(ndr
, &r
->in
.Account
) > ndr_get_array_size(ndr
, &r
->in
.Account
)) {
10201 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.Account
), ndr_get_array_length(ndr
, &r
->in
.Account
));
10203 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t)));
10204 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.Account
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t), CH_UTF16
));
10205 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Account_0
, 0);
10207 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_EncryptedPassword
));
10208 if (_ptr_EncryptedPassword
) {
10209 NDR_PULL_ALLOC(ndr
, r
->in
.EncryptedPassword
);
10211 r
->in
.EncryptedPassword
= NULL
;
10213 if (r
->in
.EncryptedPassword
) {
10214 _mem_save_EncryptedPassword_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10215 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.EncryptedPassword
, 0);
10216 NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.EncryptedPassword
));
10217 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_EncryptedPassword_0
, 0);
10219 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.Reserved
));
10221 if (flags
& NDR_OUT
) {
10222 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
10224 return NDR_ERR_SUCCESS
;
10227 _PUBLIC_
void ndr_print_wkssvc_NetrSetPrimaryComputername(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrSetPrimaryComputername
*r
)
10229 ndr_print_struct(ndr
, name
, "wkssvc_NetrSetPrimaryComputername");
10231 if (flags
& NDR_SET_VALUES
) {
10232 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10234 if (flags
& NDR_IN
) {
10235 ndr_print_struct(ndr
, "in", "wkssvc_NetrSetPrimaryComputername");
10237 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
10239 if (r
->in
.server_name
) {
10240 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
10243 ndr_print_ptr(ndr
, "primary_name", r
->in
.primary_name
);
10245 if (r
->in
.primary_name
) {
10246 ndr_print_string(ndr
, "primary_name", r
->in
.primary_name
);
10249 ndr_print_ptr(ndr
, "Account", r
->in
.Account
);
10251 if (r
->in
.Account
) {
10252 ndr_print_string(ndr
, "Account", r
->in
.Account
);
10255 ndr_print_ptr(ndr
, "EncryptedPassword", r
->in
.EncryptedPassword
);
10257 if (r
->in
.EncryptedPassword
) {
10258 ndr_print_wkssvc_PasswordBuffer(ndr
, "EncryptedPassword", r
->in
.EncryptedPassword
);
10261 ndr_print_uint32(ndr
, "Reserved", r
->in
.Reserved
);
10264 if (flags
& NDR_OUT
) {
10265 ndr_print_struct(ndr
, "out", "wkssvc_NetrSetPrimaryComputername");
10267 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
10273 static enum ndr_err_code
ndr_push_wkssvc_NetrEnumerateComputerNames(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrEnumerateComputerNames
*r
)
10275 if (flags
& NDR_IN
) {
10276 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
10277 if (r
->in
.server_name
) {
10278 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
10279 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
10280 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
10281 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
));
10283 NDR_CHECK(ndr_push_wkssvc_ComputerNameType(ndr
, NDR_SCALARS
, r
->in
.name_type
));
10284 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.Reserved
));
10286 if (flags
& NDR_OUT
) {
10287 if (r
->out
.ctr
== NULL
) {
10288 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10290 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.ctr
));
10292 NDR_CHECK(ndr_push_wkssvc_ComputerNamesCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.ctr
));
10294 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
10296 return NDR_ERR_SUCCESS
;
10299 static enum ndr_err_code
ndr_pull_wkssvc_NetrEnumerateComputerNames(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrEnumerateComputerNames
*r
)
10301 uint32_t _ptr_server_name
;
10303 TALLOC_CTX
*_mem_save_server_name_0
;
10304 TALLOC_CTX
*_mem_save_ctr_0
;
10305 TALLOC_CTX
*_mem_save_ctr_1
;
10306 if (flags
& NDR_IN
) {
10307 ZERO_STRUCT(r
->out
);
10309 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
10310 if (_ptr_server_name
) {
10311 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
10313 r
->in
.server_name
= NULL
;
10315 if (r
->in
.server_name
) {
10316 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10317 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
10318 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
10319 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
10320 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
10321 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.server_name
), ndr_get_array_length(ndr
, &r
->in
.server_name
));
10323 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
10324 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_name
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t), CH_UTF16
));
10325 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
10327 NDR_CHECK(ndr_pull_wkssvc_ComputerNameType(ndr
, NDR_SCALARS
, &r
->in
.name_type
));
10328 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.Reserved
));
10329 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
10330 ZERO_STRUCTP(r
->out
.ctr
);
10332 if (flags
& NDR_OUT
) {
10333 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10334 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
10336 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10337 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
10338 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ctr
));
10340 NDR_PULL_ALLOC(ndr
, *r
->out
.ctr
);
10342 *r
->out
.ctr
= NULL
;
10345 _mem_save_ctr_1
= NDR_PULL_GET_MEM_CTX(ndr
);
10346 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.ctr
, 0);
10347 NDR_CHECK(ndr_pull_wkssvc_ComputerNamesCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.ctr
));
10348 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_1
, 0);
10350 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
10351 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
10353 return NDR_ERR_SUCCESS
;
10356 _PUBLIC_
void ndr_print_wkssvc_NetrEnumerateComputerNames(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrEnumerateComputerNames
*r
)
10358 ndr_print_struct(ndr
, name
, "wkssvc_NetrEnumerateComputerNames");
10360 if (flags
& NDR_SET_VALUES
) {
10361 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10363 if (flags
& NDR_IN
) {
10364 ndr_print_struct(ndr
, "in", "wkssvc_NetrEnumerateComputerNames");
10366 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
10368 if (r
->in
.server_name
) {
10369 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
10372 ndr_print_wkssvc_ComputerNameType(ndr
, "name_type", r
->in
.name_type
);
10373 ndr_print_uint32(ndr
, "Reserved", r
->in
.Reserved
);
10376 if (flags
& NDR_OUT
) {
10377 ndr_print_struct(ndr
, "out", "wkssvc_NetrEnumerateComputerNames");
10379 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
10381 ndr_print_ptr(ndr
, "ctr", *r
->out
.ctr
);
10384 ndr_print_wkssvc_ComputerNamesCtr(ndr
, "ctr", *r
->out
.ctr
);
10388 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
10394 static const struct ndr_interface_call wkssvc_calls
[] = {
10396 "wkssvc_NetWkstaGetInfo",
10397 sizeof(struct wkssvc_NetWkstaGetInfo
),
10398 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetWkstaGetInfo
,
10399 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetWkstaGetInfo
,
10400 (ndr_print_function_t
) ndr_print_wkssvc_NetWkstaGetInfo
,
10404 "wkssvc_NetWkstaSetInfo",
10405 sizeof(struct wkssvc_NetWkstaSetInfo
),
10406 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetWkstaSetInfo
,
10407 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetWkstaSetInfo
,
10408 (ndr_print_function_t
) ndr_print_wkssvc_NetWkstaSetInfo
,
10412 "wkssvc_NetWkstaEnumUsers",
10413 sizeof(struct wkssvc_NetWkstaEnumUsers
),
10414 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetWkstaEnumUsers
,
10415 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetWkstaEnumUsers
,
10416 (ndr_print_function_t
) ndr_print_wkssvc_NetWkstaEnumUsers
,
10420 "wkssvc_NetrWkstaUserGetInfo",
10421 sizeof(struct wkssvc_NetrWkstaUserGetInfo
),
10422 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrWkstaUserGetInfo
,
10423 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrWkstaUserGetInfo
,
10424 (ndr_print_function_t
) ndr_print_wkssvc_NetrWkstaUserGetInfo
,
10428 "wkssvc_NetrWkstaUserSetInfo",
10429 sizeof(struct wkssvc_NetrWkstaUserSetInfo
),
10430 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrWkstaUserSetInfo
,
10431 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrWkstaUserSetInfo
,
10432 (ndr_print_function_t
) ndr_print_wkssvc_NetrWkstaUserSetInfo
,
10436 "wkssvc_NetWkstaTransportEnum",
10437 sizeof(struct wkssvc_NetWkstaTransportEnum
),
10438 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetWkstaTransportEnum
,
10439 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetWkstaTransportEnum
,
10440 (ndr_print_function_t
) ndr_print_wkssvc_NetWkstaTransportEnum
,
10444 "wkssvc_NetrWkstaTransportAdd",
10445 sizeof(struct wkssvc_NetrWkstaTransportAdd
),
10446 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrWkstaTransportAdd
,
10447 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrWkstaTransportAdd
,
10448 (ndr_print_function_t
) ndr_print_wkssvc_NetrWkstaTransportAdd
,
10452 "wkssvc_NetrWkstaTransportDel",
10453 sizeof(struct wkssvc_NetrWkstaTransportDel
),
10454 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrWkstaTransportDel
,
10455 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrWkstaTransportDel
,
10456 (ndr_print_function_t
) ndr_print_wkssvc_NetrWkstaTransportDel
,
10460 "wkssvc_NetrUseAdd",
10461 sizeof(struct wkssvc_NetrUseAdd
),
10462 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrUseAdd
,
10463 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrUseAdd
,
10464 (ndr_print_function_t
) ndr_print_wkssvc_NetrUseAdd
,
10468 "wkssvc_NetrUseGetInfo",
10469 sizeof(struct wkssvc_NetrUseGetInfo
),
10470 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrUseGetInfo
,
10471 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrUseGetInfo
,
10472 (ndr_print_function_t
) ndr_print_wkssvc_NetrUseGetInfo
,
10476 "wkssvc_NetrUseDel",
10477 sizeof(struct wkssvc_NetrUseDel
),
10478 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrUseDel
,
10479 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrUseDel
,
10480 (ndr_print_function_t
) ndr_print_wkssvc_NetrUseDel
,
10484 "wkssvc_NetrUseEnum",
10485 sizeof(struct wkssvc_NetrUseEnum
),
10486 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrUseEnum
,
10487 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrUseEnum
,
10488 (ndr_print_function_t
) ndr_print_wkssvc_NetrUseEnum
,
10492 "wkssvc_NetrMessageBufferSend",
10493 sizeof(struct wkssvc_NetrMessageBufferSend
),
10494 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrMessageBufferSend
,
10495 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrMessageBufferSend
,
10496 (ndr_print_function_t
) ndr_print_wkssvc_NetrMessageBufferSend
,
10500 "wkssvc_NetrWorkstationStatisticsGet",
10501 sizeof(struct wkssvc_NetrWorkstationStatisticsGet
),
10502 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrWorkstationStatisticsGet
,
10503 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrWorkstationStatisticsGet
,
10504 (ndr_print_function_t
) ndr_print_wkssvc_NetrWorkstationStatisticsGet
,
10508 "wkssvc_NetrLogonDomainNameAdd",
10509 sizeof(struct wkssvc_NetrLogonDomainNameAdd
),
10510 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrLogonDomainNameAdd
,
10511 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrLogonDomainNameAdd
,
10512 (ndr_print_function_t
) ndr_print_wkssvc_NetrLogonDomainNameAdd
,
10516 "wkssvc_NetrLogonDomainNameDel",
10517 sizeof(struct wkssvc_NetrLogonDomainNameDel
),
10518 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrLogonDomainNameDel
,
10519 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrLogonDomainNameDel
,
10520 (ndr_print_function_t
) ndr_print_wkssvc_NetrLogonDomainNameDel
,
10524 "wkssvc_NetrJoinDomain",
10525 sizeof(struct wkssvc_NetrJoinDomain
),
10526 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrJoinDomain
,
10527 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrJoinDomain
,
10528 (ndr_print_function_t
) ndr_print_wkssvc_NetrJoinDomain
,
10532 "wkssvc_NetrUnjoinDomain",
10533 sizeof(struct wkssvc_NetrUnjoinDomain
),
10534 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrUnjoinDomain
,
10535 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrUnjoinDomain
,
10536 (ndr_print_function_t
) ndr_print_wkssvc_NetrUnjoinDomain
,
10540 "wkssvc_NetrRenameMachineInDomain",
10541 sizeof(struct wkssvc_NetrRenameMachineInDomain
),
10542 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrRenameMachineInDomain
,
10543 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrRenameMachineInDomain
,
10544 (ndr_print_function_t
) ndr_print_wkssvc_NetrRenameMachineInDomain
,
10548 "wkssvc_NetrValidateName",
10549 sizeof(struct wkssvc_NetrValidateName
),
10550 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrValidateName
,
10551 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrValidateName
,
10552 (ndr_print_function_t
) ndr_print_wkssvc_NetrValidateName
,
10556 "wkssvc_NetrGetJoinInformation",
10557 sizeof(struct wkssvc_NetrGetJoinInformation
),
10558 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrGetJoinInformation
,
10559 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrGetJoinInformation
,
10560 (ndr_print_function_t
) ndr_print_wkssvc_NetrGetJoinInformation
,
10564 "wkssvc_NetrGetJoinableOus",
10565 sizeof(struct wkssvc_NetrGetJoinableOus
),
10566 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrGetJoinableOus
,
10567 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrGetJoinableOus
,
10568 (ndr_print_function_t
) ndr_print_wkssvc_NetrGetJoinableOus
,
10572 "wkssvc_NetrJoinDomain2",
10573 sizeof(struct wkssvc_NetrJoinDomain2
),
10574 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrJoinDomain2
,
10575 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrJoinDomain2
,
10576 (ndr_print_function_t
) ndr_print_wkssvc_NetrJoinDomain2
,
10580 "wkssvc_NetrUnjoinDomain2",
10581 sizeof(struct wkssvc_NetrUnjoinDomain2
),
10582 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrUnjoinDomain2
,
10583 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrUnjoinDomain2
,
10584 (ndr_print_function_t
) ndr_print_wkssvc_NetrUnjoinDomain2
,
10588 "wkssvc_NetrRenameMachineInDomain2",
10589 sizeof(struct wkssvc_NetrRenameMachineInDomain2
),
10590 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrRenameMachineInDomain2
,
10591 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrRenameMachineInDomain2
,
10592 (ndr_print_function_t
) ndr_print_wkssvc_NetrRenameMachineInDomain2
,
10596 "wkssvc_NetrValidateName2",
10597 sizeof(struct wkssvc_NetrValidateName2
),
10598 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrValidateName2
,
10599 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrValidateName2
,
10600 (ndr_print_function_t
) ndr_print_wkssvc_NetrValidateName2
,
10604 "wkssvc_NetrGetJoinableOus2",
10605 sizeof(struct wkssvc_NetrGetJoinableOus2
),
10606 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrGetJoinableOus2
,
10607 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrGetJoinableOus2
,
10608 (ndr_print_function_t
) ndr_print_wkssvc_NetrGetJoinableOus2
,
10612 "wkssvc_NetrAddAlternateComputerName",
10613 sizeof(struct wkssvc_NetrAddAlternateComputerName
),
10614 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrAddAlternateComputerName
,
10615 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrAddAlternateComputerName
,
10616 (ndr_print_function_t
) ndr_print_wkssvc_NetrAddAlternateComputerName
,
10620 "wkssvc_NetrRemoveAlternateComputerName",
10621 sizeof(struct wkssvc_NetrRemoveAlternateComputerName
),
10622 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrRemoveAlternateComputerName
,
10623 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrRemoveAlternateComputerName
,
10624 (ndr_print_function_t
) ndr_print_wkssvc_NetrRemoveAlternateComputerName
,
10628 "wkssvc_NetrSetPrimaryComputername",
10629 sizeof(struct wkssvc_NetrSetPrimaryComputername
),
10630 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrSetPrimaryComputername
,
10631 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrSetPrimaryComputername
,
10632 (ndr_print_function_t
) ndr_print_wkssvc_NetrSetPrimaryComputername
,
10636 "wkssvc_NetrEnumerateComputerNames",
10637 sizeof(struct wkssvc_NetrEnumerateComputerNames
),
10638 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrEnumerateComputerNames
,
10639 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrEnumerateComputerNames
,
10640 (ndr_print_function_t
) ndr_print_wkssvc_NetrEnumerateComputerNames
,
10643 { NULL
, 0, NULL
, NULL
, NULL
, false }
10646 static const char * const wkssvc_endpoint_strings
[] = {
10647 "ncacn_np:[\\pipe\\wkssvc]",
10652 static const struct ndr_interface_string_array wkssvc_endpoints
= {
10654 .names
= wkssvc_endpoint_strings
10657 static const char * const wkssvc_authservice_strings
[] = {
10661 static const struct ndr_interface_string_array wkssvc_authservices
= {
10663 .names
= wkssvc_authservice_strings
10667 const struct ndr_interface_table ndr_table_wkssvc
= {
10670 {0x6bffd098,0xa112,0x3610,{0x98,0x33},{0x46,0xc3,0xf8,0x7e,0x34,0x5a}},
10673 .helpstring
= NDR_WKSSVC_HELPSTRING
,
10675 .calls
= wkssvc_calls
,
10676 .endpoints
= &wkssvc_endpoints
,
10677 .authservices
= &wkssvc_authservices