1 /* parser auto-generated by pidl */
4 #include "librpc/gen_ndr/ndr_wkssvc.h"
6 #include "librpc/gen_ndr/ndr_srvsvc.h"
7 NTSTATUS
ndr_push_wkssvc_NetWkstaInfo100(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo100
*r
)
9 if (ndr_flags
& NDR_SCALARS
) {
10 NDR_CHECK(ndr_push_align(ndr
, 4));
11 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->platform_id
));
12 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_name
));
13 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain_name
));
14 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version_major
));
15 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version_minor
));
17 if (ndr_flags
& NDR_BUFFERS
) {
19 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
20 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
21 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
22 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server_name
, ndr_charset_length(r
->server_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
25 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
26 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
27 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
28 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->domain_name
, ndr_charset_length(r
->domain_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
34 NTSTATUS
ndr_pull_wkssvc_NetWkstaInfo100(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo100
*r
)
36 uint32_t _ptr_server_name
;
37 TALLOC_CTX
*_mem_save_server_name_0
;
38 uint32_t _ptr_domain_name
;
39 TALLOC_CTX
*_mem_save_domain_name_0
;
40 if (ndr_flags
& NDR_SCALARS
) {
41 NDR_CHECK(ndr_pull_align(ndr
, 4));
42 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->platform_id
));
43 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
44 if (_ptr_server_name
) {
45 NDR_PULL_ALLOC(ndr
, r
->server_name
);
47 r
->server_name
= NULL
;
49 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_name
));
50 if (_ptr_domain_name
) {
51 NDR_PULL_ALLOC(ndr
, r
->domain_name
);
53 r
->domain_name
= NULL
;
55 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version_major
));
56 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version_minor
));
58 if (ndr_flags
& NDR_BUFFERS
) {
60 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
61 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_name
, 0);
62 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_name
));
63 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_name
));
64 if (ndr_get_array_length(ndr
, &r
->server_name
) > ndr_get_array_size(ndr
, &r
->server_name
)) {
65 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
));
67 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t)));
68 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_name
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t), CH_UTF16
));
69 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
72 _mem_save_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
73 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain_name
, 0);
74 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domain_name
));
75 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->domain_name
));
76 if (ndr_get_array_length(ndr
, &r
->domain_name
) > ndr_get_array_size(ndr
, &r
->domain_name
)) {
77 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
));
79 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t)));
80 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->domain_name
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t), CH_UTF16
));
81 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_name_0
, 0);
87 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo100(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo100
*r
)
89 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo100");
91 ndr_print_uint16(ndr
, "platform_id", r
->platform_id
);
92 ndr_print_ptr(ndr
, "server_name", r
->server_name
);
95 ndr_print_string(ndr
, "server_name", r
->server_name
);
98 ndr_print_ptr(ndr
, "domain_name", r
->domain_name
);
100 if (r
->domain_name
) {
101 ndr_print_string(ndr
, "domain_name", r
->domain_name
);
104 ndr_print_uint32(ndr
, "version_major", r
->version_major
);
105 ndr_print_uint32(ndr
, "version_minor", r
->version_minor
);
109 NTSTATUS
ndr_push_wkssvc_NetWkstaInfo101(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo101
*r
)
111 if (ndr_flags
& NDR_SCALARS
) {
112 NDR_CHECK(ndr_push_align(ndr
, 4));
113 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->platform_id
));
114 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_name
));
115 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain_name
));
116 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version_major
));
117 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version_minor
));
118 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->lan_root
));
120 if (ndr_flags
& NDR_BUFFERS
) {
121 if (r
->server_name
) {
122 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
123 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
124 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
125 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server_name
, ndr_charset_length(r
->server_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
127 if (r
->domain_name
) {
128 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
129 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
130 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
131 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->domain_name
, ndr_charset_length(r
->domain_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
134 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->lan_root
, CH_UTF16
)));
135 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
136 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->lan_root
, CH_UTF16
)));
137 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->lan_root
, ndr_charset_length(r
->lan_root
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
143 NTSTATUS
ndr_pull_wkssvc_NetWkstaInfo101(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo101
*r
)
145 uint32_t _ptr_server_name
;
146 TALLOC_CTX
*_mem_save_server_name_0
;
147 uint32_t _ptr_domain_name
;
148 TALLOC_CTX
*_mem_save_domain_name_0
;
149 uint32_t _ptr_lan_root
;
150 TALLOC_CTX
*_mem_save_lan_root_0
;
151 if (ndr_flags
& NDR_SCALARS
) {
152 NDR_CHECK(ndr_pull_align(ndr
, 4));
153 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->platform_id
));
154 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
155 if (_ptr_server_name
) {
156 NDR_PULL_ALLOC(ndr
, r
->server_name
);
158 r
->server_name
= NULL
;
160 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_name
));
161 if (_ptr_domain_name
) {
162 NDR_PULL_ALLOC(ndr
, r
->domain_name
);
164 r
->domain_name
= NULL
;
166 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version_major
));
167 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version_minor
));
168 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_lan_root
));
170 NDR_PULL_ALLOC(ndr
, r
->lan_root
);
175 if (ndr_flags
& NDR_BUFFERS
) {
176 if (r
->server_name
) {
177 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
178 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_name
, 0);
179 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_name
));
180 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_name
));
181 if (ndr_get_array_length(ndr
, &r
->server_name
) > ndr_get_array_size(ndr
, &r
->server_name
)) {
182 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
));
184 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t)));
185 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_name
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t), CH_UTF16
));
186 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
188 if (r
->domain_name
) {
189 _mem_save_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
190 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain_name
, 0);
191 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domain_name
));
192 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->domain_name
));
193 if (ndr_get_array_length(ndr
, &r
->domain_name
) > ndr_get_array_size(ndr
, &r
->domain_name
)) {
194 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
));
196 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t)));
197 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->domain_name
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t), CH_UTF16
));
198 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_name_0
, 0);
201 _mem_save_lan_root_0
= NDR_PULL_GET_MEM_CTX(ndr
);
202 NDR_PULL_SET_MEM_CTX(ndr
, r
->lan_root
, 0);
203 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->lan_root
));
204 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->lan_root
));
205 if (ndr_get_array_length(ndr
, &r
->lan_root
) > ndr_get_array_size(ndr
, &r
->lan_root
)) {
206 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
));
208 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->lan_root
), sizeof(uint16_t)));
209 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->lan_root
, ndr_get_array_length(ndr
, &r
->lan_root
), sizeof(uint16_t), CH_UTF16
));
210 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_lan_root_0
, 0);
216 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo101(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo101
*r
)
218 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo101");
220 ndr_print_uint16(ndr
, "platform_id", r
->platform_id
);
221 ndr_print_ptr(ndr
, "server_name", r
->server_name
);
223 if (r
->server_name
) {
224 ndr_print_string(ndr
, "server_name", r
->server_name
);
227 ndr_print_ptr(ndr
, "domain_name", r
->domain_name
);
229 if (r
->domain_name
) {
230 ndr_print_string(ndr
, "domain_name", r
->domain_name
);
233 ndr_print_uint32(ndr
, "version_major", r
->version_major
);
234 ndr_print_uint32(ndr
, "version_minor", r
->version_minor
);
235 ndr_print_ptr(ndr
, "lan_root", r
->lan_root
);
238 ndr_print_string(ndr
, "lan_root", r
->lan_root
);
244 NTSTATUS
ndr_push_wkssvc_NetWkstaInfo102(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo102
*r
)
246 if (ndr_flags
& NDR_SCALARS
) {
247 NDR_CHECK(ndr_push_align(ndr
, 4));
248 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->platform_id
));
249 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_name
));
250 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain_name
));
251 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version_major
));
252 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version_minor
));
253 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->lan_root
));
254 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->logged_on_users
));
256 if (ndr_flags
& NDR_BUFFERS
) {
257 if (r
->server_name
) {
258 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
259 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
260 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
261 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server_name
, ndr_charset_length(r
->server_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
263 if (r
->domain_name
) {
264 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
265 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
266 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->domain_name
, CH_UTF16
)));
267 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->domain_name
, ndr_charset_length(r
->domain_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
270 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->lan_root
, CH_UTF16
)));
271 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
272 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->lan_root
, CH_UTF16
)));
273 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->lan_root
, ndr_charset_length(r
->lan_root
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
279 NTSTATUS
ndr_pull_wkssvc_NetWkstaInfo102(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo102
*r
)
281 uint32_t _ptr_server_name
;
282 TALLOC_CTX
*_mem_save_server_name_0
;
283 uint32_t _ptr_domain_name
;
284 TALLOC_CTX
*_mem_save_domain_name_0
;
285 uint32_t _ptr_lan_root
;
286 TALLOC_CTX
*_mem_save_lan_root_0
;
287 if (ndr_flags
& NDR_SCALARS
) {
288 NDR_CHECK(ndr_pull_align(ndr
, 4));
289 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->platform_id
));
290 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
291 if (_ptr_server_name
) {
292 NDR_PULL_ALLOC(ndr
, r
->server_name
);
294 r
->server_name
= NULL
;
296 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_name
));
297 if (_ptr_domain_name
) {
298 NDR_PULL_ALLOC(ndr
, r
->domain_name
);
300 r
->domain_name
= NULL
;
302 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version_major
));
303 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version_minor
));
304 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_lan_root
));
306 NDR_PULL_ALLOC(ndr
, r
->lan_root
);
310 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->logged_on_users
));
312 if (ndr_flags
& NDR_BUFFERS
) {
313 if (r
->server_name
) {
314 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
315 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_name
, 0);
316 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_name
));
317 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_name
));
318 if (ndr_get_array_length(ndr
, &r
->server_name
) > ndr_get_array_size(ndr
, &r
->server_name
)) {
319 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
));
321 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t)));
322 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_name
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t), CH_UTF16
));
323 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
325 if (r
->domain_name
) {
326 _mem_save_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
327 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain_name
, 0);
328 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domain_name
));
329 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->domain_name
));
330 if (ndr_get_array_length(ndr
, &r
->domain_name
) > ndr_get_array_size(ndr
, &r
->domain_name
)) {
331 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
));
333 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t)));
334 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->domain_name
, ndr_get_array_length(ndr
, &r
->domain_name
), sizeof(uint16_t), CH_UTF16
));
335 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_name_0
, 0);
338 _mem_save_lan_root_0
= NDR_PULL_GET_MEM_CTX(ndr
);
339 NDR_PULL_SET_MEM_CTX(ndr
, r
->lan_root
, 0);
340 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->lan_root
));
341 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->lan_root
));
342 if (ndr_get_array_length(ndr
, &r
->lan_root
) > ndr_get_array_size(ndr
, &r
->lan_root
)) {
343 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
));
345 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->lan_root
), sizeof(uint16_t)));
346 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->lan_root
, ndr_get_array_length(ndr
, &r
->lan_root
), sizeof(uint16_t), CH_UTF16
));
347 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_lan_root_0
, 0);
353 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo102(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo102
*r
)
355 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo102");
357 ndr_print_uint16(ndr
, "platform_id", r
->platform_id
);
358 ndr_print_ptr(ndr
, "server_name", r
->server_name
);
360 if (r
->server_name
) {
361 ndr_print_string(ndr
, "server_name", r
->server_name
);
364 ndr_print_ptr(ndr
, "domain_name", r
->domain_name
);
366 if (r
->domain_name
) {
367 ndr_print_string(ndr
, "domain_name", r
->domain_name
);
370 ndr_print_uint32(ndr
, "version_major", r
->version_major
);
371 ndr_print_uint32(ndr
, "version_minor", r
->version_minor
);
372 ndr_print_ptr(ndr
, "lan_root", r
->lan_root
);
375 ndr_print_string(ndr
, "lan_root", r
->lan_root
);
378 ndr_print_uint32(ndr
, "logged_on_users", r
->logged_on_users
);
382 NTSTATUS
ndr_push_wkssvc_NetWkstaInfo502(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo502
*r
)
384 if (ndr_flags
& NDR_SCALARS
) {
385 NDR_CHECK(ndr_push_align(ndr
, 4));
386 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->char_wait
));
387 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->collection_time
));
388 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->maximum_collection_count
));
389 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->keep_connection
));
390 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_commands
));
391 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->session_timeout
));
392 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size_char_buf
));
393 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_threads
));
394 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->lock_quota
));
395 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->lock_increment
));
396 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->lock_maximum
));
397 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pipe_increment
));
398 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pipe_maximum
));
399 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->cache_file_timeout
));
400 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->dormant_file_limit
));
401 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->read_ahead_throughput
));
402 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_mailslot_buffers
));
403 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_srv_announce_buffers
));
404 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_illegal_dgram_events
));
405 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->dgram_event_reset_freq
));
406 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->log_election_packets
));
407 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_opportunistic_locking
));
408 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_unlock_behind
));
409 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_close_behind
));
410 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->buf_named_pipes
));
411 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_lock_read_unlock
));
412 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->utilize_nt_caching
));
413 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_raw_read
));
414 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_raw_write
));
415 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_write_raw_data
));
416 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_encryption
));
417 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->buf_files_deny_write
));
418 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->buf_read_only_files
));
419 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->force_core_create_mode
));
420 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->use_512_byte_max_transfer
));
422 if (ndr_flags
& NDR_BUFFERS
) {
427 NTSTATUS
ndr_pull_wkssvc_NetWkstaInfo502(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo502
*r
)
429 if (ndr_flags
& NDR_SCALARS
) {
430 NDR_CHECK(ndr_pull_align(ndr
, 4));
431 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->char_wait
));
432 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->collection_time
));
433 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->maximum_collection_count
));
434 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->keep_connection
));
435 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_commands
));
436 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->session_timeout
));
437 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size_char_buf
));
438 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_threads
));
439 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->lock_quota
));
440 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->lock_increment
));
441 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->lock_maximum
));
442 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pipe_increment
));
443 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pipe_maximum
));
444 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->cache_file_timeout
));
445 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->dormant_file_limit
));
446 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->read_ahead_throughput
));
447 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_mailslot_buffers
));
448 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_srv_announce_buffers
));
449 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_illegal_dgram_events
));
450 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->dgram_event_reset_freq
));
451 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->log_election_packets
));
452 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_opportunistic_locking
));
453 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_unlock_behind
));
454 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_close_behind
));
455 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->buf_named_pipes
));
456 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_lock_read_unlock
));
457 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->utilize_nt_caching
));
458 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_raw_read
));
459 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_raw_write
));
460 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_write_raw_data
));
461 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_encryption
));
462 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->buf_files_deny_write
));
463 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->buf_read_only_files
));
464 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->force_core_create_mode
));
465 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->use_512_byte_max_transfer
));
467 if (ndr_flags
& NDR_BUFFERS
) {
472 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo502(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo502
*r
)
474 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo502");
476 ndr_print_uint32(ndr
, "char_wait", r
->char_wait
);
477 ndr_print_uint32(ndr
, "collection_time", r
->collection_time
);
478 ndr_print_uint32(ndr
, "maximum_collection_count", r
->maximum_collection_count
);
479 ndr_print_uint32(ndr
, "keep_connection", r
->keep_connection
);
480 ndr_print_uint32(ndr
, "max_commands", r
->max_commands
);
481 ndr_print_uint32(ndr
, "session_timeout", r
->session_timeout
);
482 ndr_print_uint32(ndr
, "size_char_buf", r
->size_char_buf
);
483 ndr_print_uint32(ndr
, "max_threads", r
->max_threads
);
484 ndr_print_uint32(ndr
, "lock_quota", r
->lock_quota
);
485 ndr_print_uint32(ndr
, "lock_increment", r
->lock_increment
);
486 ndr_print_uint32(ndr
, "lock_maximum", r
->lock_maximum
);
487 ndr_print_uint32(ndr
, "pipe_increment", r
->pipe_increment
);
488 ndr_print_uint32(ndr
, "pipe_maximum", r
->pipe_maximum
);
489 ndr_print_uint32(ndr
, "cache_file_timeout", r
->cache_file_timeout
);
490 ndr_print_uint32(ndr
, "dormant_file_limit", r
->dormant_file_limit
);
491 ndr_print_uint32(ndr
, "read_ahead_throughput", r
->read_ahead_throughput
);
492 ndr_print_uint32(ndr
, "num_mailslot_buffers", r
->num_mailslot_buffers
);
493 ndr_print_uint32(ndr
, "num_srv_announce_buffers", r
->num_srv_announce_buffers
);
494 ndr_print_uint32(ndr
, "max_illegal_dgram_events", r
->max_illegal_dgram_events
);
495 ndr_print_uint32(ndr
, "dgram_event_reset_freq", r
->dgram_event_reset_freq
);
496 ndr_print_uint32(ndr
, "log_election_packets", r
->log_election_packets
);
497 ndr_print_uint32(ndr
, "use_opportunistic_locking", r
->use_opportunistic_locking
);
498 ndr_print_uint32(ndr
, "use_unlock_behind", r
->use_unlock_behind
);
499 ndr_print_uint32(ndr
, "use_close_behind", r
->use_close_behind
);
500 ndr_print_uint32(ndr
, "buf_named_pipes", r
->buf_named_pipes
);
501 ndr_print_uint32(ndr
, "use_lock_read_unlock", r
->use_lock_read_unlock
);
502 ndr_print_uint32(ndr
, "utilize_nt_caching", r
->utilize_nt_caching
);
503 ndr_print_uint32(ndr
, "use_raw_read", r
->use_raw_read
);
504 ndr_print_uint32(ndr
, "use_raw_write", r
->use_raw_write
);
505 ndr_print_uint32(ndr
, "use_write_raw_data", r
->use_write_raw_data
);
506 ndr_print_uint32(ndr
, "use_encryption", r
->use_encryption
);
507 ndr_print_uint32(ndr
, "buf_files_deny_write", r
->buf_files_deny_write
);
508 ndr_print_uint32(ndr
, "buf_read_only_files", r
->buf_read_only_files
);
509 ndr_print_uint32(ndr
, "force_core_create_mode", r
->force_core_create_mode
);
510 ndr_print_uint32(ndr
, "use_512_byte_max_transfer", r
->use_512_byte_max_transfer
);
514 NTSTATUS
ndr_push_wkssvc_NetWkstaInfo1010(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1010
*r
)
516 if (ndr_flags
& NDR_SCALARS
) {
517 NDR_CHECK(ndr_push_align(ndr
, 4));
518 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->char_wait
));
520 if (ndr_flags
& NDR_BUFFERS
) {
525 NTSTATUS
ndr_pull_wkssvc_NetWkstaInfo1010(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1010
*r
)
527 if (ndr_flags
& NDR_SCALARS
) {
528 NDR_CHECK(ndr_pull_align(ndr
, 4));
529 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->char_wait
));
531 if (ndr_flags
& NDR_BUFFERS
) {
536 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1010(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1010
*r
)
538 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1010");
540 ndr_print_uint32(ndr
, "char_wait", r
->char_wait
);
544 NTSTATUS
ndr_push_wkssvc_NetWkstaInfo1011(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1011
*r
)
546 if (ndr_flags
& NDR_SCALARS
) {
547 NDR_CHECK(ndr_push_align(ndr
, 4));
548 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->collection_time
));
550 if (ndr_flags
& NDR_BUFFERS
) {
555 NTSTATUS
ndr_pull_wkssvc_NetWkstaInfo1011(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1011
*r
)
557 if (ndr_flags
& NDR_SCALARS
) {
558 NDR_CHECK(ndr_pull_align(ndr
, 4));
559 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->collection_time
));
561 if (ndr_flags
& NDR_BUFFERS
) {
566 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1011(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1011
*r
)
568 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1011");
570 ndr_print_uint32(ndr
, "collection_time", r
->collection_time
);
574 NTSTATUS
ndr_push_wkssvc_NetWkstaInfo1012(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1012
*r
)
576 if (ndr_flags
& NDR_SCALARS
) {
577 NDR_CHECK(ndr_push_align(ndr
, 4));
578 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->maximum_collection_count
));
580 if (ndr_flags
& NDR_BUFFERS
) {
585 NTSTATUS
ndr_pull_wkssvc_NetWkstaInfo1012(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1012
*r
)
587 if (ndr_flags
& NDR_SCALARS
) {
588 NDR_CHECK(ndr_pull_align(ndr
, 4));
589 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->maximum_collection_count
));
591 if (ndr_flags
& NDR_BUFFERS
) {
596 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1012(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1012
*r
)
598 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1012");
600 ndr_print_uint32(ndr
, "maximum_collection_count", r
->maximum_collection_count
);
604 NTSTATUS
ndr_push_wkssvc_NetWkstaInfo1013(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1013
*r
)
606 if (ndr_flags
& NDR_SCALARS
) {
607 NDR_CHECK(ndr_push_align(ndr
, 4));
608 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->keep_connection
));
610 if (ndr_flags
& NDR_BUFFERS
) {
615 NTSTATUS
ndr_pull_wkssvc_NetWkstaInfo1013(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1013
*r
)
617 if (ndr_flags
& NDR_SCALARS
) {
618 NDR_CHECK(ndr_pull_align(ndr
, 4));
619 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->keep_connection
));
621 if (ndr_flags
& NDR_BUFFERS
) {
626 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1013(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1013
*r
)
628 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1013");
630 ndr_print_uint32(ndr
, "keep_connection", r
->keep_connection
);
634 NTSTATUS
ndr_push_wkssvc_NetWkstaInfo1018(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1018
*r
)
636 if (ndr_flags
& NDR_SCALARS
) {
637 NDR_CHECK(ndr_push_align(ndr
, 4));
638 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->session_timeout
));
640 if (ndr_flags
& NDR_BUFFERS
) {
645 NTSTATUS
ndr_pull_wkssvc_NetWkstaInfo1018(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1018
*r
)
647 if (ndr_flags
& NDR_SCALARS
) {
648 NDR_CHECK(ndr_pull_align(ndr
, 4));
649 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->session_timeout
));
651 if (ndr_flags
& NDR_BUFFERS
) {
656 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1018(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1018
*r
)
658 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1018");
660 ndr_print_uint32(ndr
, "session_timeout", r
->session_timeout
);
664 NTSTATUS
ndr_push_wkssvc_NetWkstaInfo1023(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1023
*r
)
666 if (ndr_flags
& NDR_SCALARS
) {
667 NDR_CHECK(ndr_push_align(ndr
, 4));
668 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size_char_buf
));
670 if (ndr_flags
& NDR_BUFFERS
) {
675 NTSTATUS
ndr_pull_wkssvc_NetWkstaInfo1023(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1023
*r
)
677 if (ndr_flags
& NDR_SCALARS
) {
678 NDR_CHECK(ndr_pull_align(ndr
, 4));
679 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size_char_buf
));
681 if (ndr_flags
& NDR_BUFFERS
) {
686 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1023(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1023
*r
)
688 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1023");
690 ndr_print_uint32(ndr
, "size_char_buf", r
->size_char_buf
);
694 NTSTATUS
ndr_push_wkssvc_NetWkstaInfo1027(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1027
*r
)
696 if (ndr_flags
& NDR_SCALARS
) {
697 NDR_CHECK(ndr_push_align(ndr
, 4));
698 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->errorlog_sz
));
700 if (ndr_flags
& NDR_BUFFERS
) {
705 NTSTATUS
ndr_pull_wkssvc_NetWkstaInfo1027(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1027
*r
)
707 if (ndr_flags
& NDR_SCALARS
) {
708 NDR_CHECK(ndr_pull_align(ndr
, 4));
709 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->errorlog_sz
));
711 if (ndr_flags
& NDR_BUFFERS
) {
716 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1027(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1027
*r
)
718 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1027");
720 ndr_print_uint32(ndr
, "errorlog_sz", r
->errorlog_sz
);
724 NTSTATUS
ndr_push_wkssvc_NetWkstaInfo1033(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaInfo1033
*r
)
726 if (ndr_flags
& NDR_SCALARS
) {
727 NDR_CHECK(ndr_push_align(ndr
, 4));
728 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_threads
));
730 if (ndr_flags
& NDR_BUFFERS
) {
735 NTSTATUS
ndr_pull_wkssvc_NetWkstaInfo1033(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaInfo1033
*r
)
737 if (ndr_flags
& NDR_SCALARS
) {
738 NDR_CHECK(ndr_pull_align(ndr
, 4));
739 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_threads
));
741 if (ndr_flags
& NDR_BUFFERS
) {
746 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo1033(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaInfo1033
*r
)
748 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaInfo1033");
750 ndr_print_uint32(ndr
, "max_threads", r
->max_threads
);
754 NTSTATUS
ndr_push_wkssvc_NetWkstaInfo(struct ndr_push
*ndr
, int ndr_flags
, const union wkssvc_NetWkstaInfo
*r
)
757 level
= ndr_push_get_switch_value(ndr
, r
);
758 if (ndr_flags
& NDR_SCALARS
) {
759 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
762 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info100
));
766 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info101
));
770 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info102
));
774 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info502
));
778 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1010
));
782 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1011
));
786 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1012
));
790 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1013
));
794 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1018
));
798 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1023
));
802 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1027
));
806 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1033
));
814 if (ndr_flags
& NDR_BUFFERS
) {
818 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo100(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info100
));
824 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo101(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info101
));
830 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo102(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info102
));
836 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo502(ndr
, NDR_SCALARS
, r
->info502
));
842 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1010(ndr
, NDR_SCALARS
, r
->info1010
));
848 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1011(ndr
, NDR_SCALARS
, r
->info1011
));
854 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1012(ndr
, NDR_SCALARS
, r
->info1012
));
860 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1013(ndr
, NDR_SCALARS
, r
->info1013
));
866 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1018(ndr
, NDR_SCALARS
, r
->info1018
));
872 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1023(ndr
, NDR_SCALARS
, r
->info1023
));
878 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1027(ndr
, NDR_SCALARS
, r
->info1027
));
884 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo1033(ndr
, NDR_SCALARS
, r
->info1033
));
896 NTSTATUS
ndr_pull_wkssvc_NetWkstaInfo(struct ndr_pull
*ndr
, int ndr_flags
, union wkssvc_NetWkstaInfo
*r
)
900 TALLOC_CTX
*_mem_save_info100_0
;
901 TALLOC_CTX
*_mem_save_info101_0
;
902 TALLOC_CTX
*_mem_save_info102_0
;
903 TALLOC_CTX
*_mem_save_info502_0
;
904 TALLOC_CTX
*_mem_save_info1010_0
;
905 TALLOC_CTX
*_mem_save_info1011_0
;
906 TALLOC_CTX
*_mem_save_info1012_0
;
907 TALLOC_CTX
*_mem_save_info1013_0
;
908 TALLOC_CTX
*_mem_save_info1018_0
;
909 TALLOC_CTX
*_mem_save_info1023_0
;
910 TALLOC_CTX
*_mem_save_info1027_0
;
911 TALLOC_CTX
*_mem_save_info1033_0
;
912 level
= ndr_pull_get_switch_value(ndr
, r
);
913 if (ndr_flags
& NDR_SCALARS
) {
914 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
915 if (_level
!= level
) {
916 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for wkssvc_NetWkstaInfo", _level
);
920 uint32_t _ptr_info100
;
921 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info100
));
923 NDR_PULL_ALLOC(ndr
, r
->info100
);
930 uint32_t _ptr_info101
;
931 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info101
));
933 NDR_PULL_ALLOC(ndr
, r
->info101
);
940 uint32_t _ptr_info102
;
941 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info102
));
943 NDR_PULL_ALLOC(ndr
, r
->info102
);
950 uint32_t _ptr_info502
;
951 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info502
));
953 NDR_PULL_ALLOC(ndr
, r
->info502
);
960 uint32_t _ptr_info1010
;
961 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1010
));
963 NDR_PULL_ALLOC(ndr
, r
->info1010
);
970 uint32_t _ptr_info1011
;
971 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1011
));
973 NDR_PULL_ALLOC(ndr
, r
->info1011
);
980 uint32_t _ptr_info1012
;
981 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1012
));
983 NDR_PULL_ALLOC(ndr
, r
->info1012
);
990 uint32_t _ptr_info1013
;
991 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1013
));
993 NDR_PULL_ALLOC(ndr
, r
->info1013
);
1000 uint32_t _ptr_info1018
;
1001 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1018
));
1002 if (_ptr_info1018
) {
1003 NDR_PULL_ALLOC(ndr
, r
->info1018
);
1010 uint32_t _ptr_info1023
;
1011 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1023
));
1012 if (_ptr_info1023
) {
1013 NDR_PULL_ALLOC(ndr
, r
->info1023
);
1020 uint32_t _ptr_info1027
;
1021 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1027
));
1022 if (_ptr_info1027
) {
1023 NDR_PULL_ALLOC(ndr
, r
->info1027
);
1030 uint32_t _ptr_info1033
;
1031 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1033
));
1032 if (_ptr_info1033
) {
1033 NDR_PULL_ALLOC(ndr
, r
->info1033
);
1044 if (ndr_flags
& NDR_BUFFERS
) {
1048 _mem_save_info100_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1049 NDR_PULL_SET_MEM_CTX(ndr
, r
->info100
, 0);
1050 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo100(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info100
));
1051 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info100_0
, 0);
1057 _mem_save_info101_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1058 NDR_PULL_SET_MEM_CTX(ndr
, r
->info101
, 0);
1059 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo101(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info101
));
1060 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info101_0
, 0);
1066 _mem_save_info102_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1067 NDR_PULL_SET_MEM_CTX(ndr
, r
->info102
, 0);
1068 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo102(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info102
));
1069 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info102_0
, 0);
1075 _mem_save_info502_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1076 NDR_PULL_SET_MEM_CTX(ndr
, r
->info502
, 0);
1077 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo502(ndr
, NDR_SCALARS
, r
->info502
));
1078 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info502_0
, 0);
1084 _mem_save_info1010_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1085 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1010
, 0);
1086 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1010(ndr
, NDR_SCALARS
, r
->info1010
));
1087 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1010_0
, 0);
1093 _mem_save_info1011_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1094 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1011
, 0);
1095 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1011(ndr
, NDR_SCALARS
, r
->info1011
));
1096 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1011_0
, 0);
1102 _mem_save_info1012_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1103 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1012
, 0);
1104 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1012(ndr
, NDR_SCALARS
, r
->info1012
));
1105 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1012_0
, 0);
1111 _mem_save_info1013_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1112 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1013
, 0);
1113 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1013(ndr
, NDR_SCALARS
, r
->info1013
));
1114 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1013_0
, 0);
1120 _mem_save_info1018_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1121 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1018
, 0);
1122 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1018(ndr
, NDR_SCALARS
, r
->info1018
));
1123 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1018_0
, 0);
1129 _mem_save_info1023_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1130 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1023
, 0);
1131 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1023(ndr
, NDR_SCALARS
, r
->info1023
));
1132 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1023_0
, 0);
1138 _mem_save_info1027_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1139 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1027
, 0);
1140 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1027(ndr
, NDR_SCALARS
, r
->info1027
));
1141 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1027_0
, 0);
1147 _mem_save_info1033_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1148 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1033
, 0);
1149 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo1033(ndr
, NDR_SCALARS
, r
->info1033
));
1150 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1033_0
, 0);
1159 return NT_STATUS_OK
;
1162 _PUBLIC_
void ndr_print_wkssvc_NetWkstaInfo(struct ndr_print
*ndr
, const char *name
, const union wkssvc_NetWkstaInfo
*r
)
1165 level
= ndr_print_get_switch_value(ndr
, r
);
1166 ndr_print_union(ndr
, name
, level
, "wkssvc_NetWkstaInfo");
1169 ndr_print_ptr(ndr
, "info100", r
->info100
);
1172 ndr_print_wkssvc_NetWkstaInfo100(ndr
, "info100", r
->info100
);
1178 ndr_print_ptr(ndr
, "info101", r
->info101
);
1181 ndr_print_wkssvc_NetWkstaInfo101(ndr
, "info101", r
->info101
);
1187 ndr_print_ptr(ndr
, "info102", r
->info102
);
1190 ndr_print_wkssvc_NetWkstaInfo102(ndr
, "info102", r
->info102
);
1196 ndr_print_ptr(ndr
, "info502", r
->info502
);
1199 ndr_print_wkssvc_NetWkstaInfo502(ndr
, "info502", r
->info502
);
1205 ndr_print_ptr(ndr
, "info1010", r
->info1010
);
1208 ndr_print_wkssvc_NetWkstaInfo1010(ndr
, "info1010", r
->info1010
);
1214 ndr_print_ptr(ndr
, "info1011", r
->info1011
);
1217 ndr_print_wkssvc_NetWkstaInfo1011(ndr
, "info1011", r
->info1011
);
1223 ndr_print_ptr(ndr
, "info1012", r
->info1012
);
1226 ndr_print_wkssvc_NetWkstaInfo1012(ndr
, "info1012", r
->info1012
);
1232 ndr_print_ptr(ndr
, "info1013", r
->info1013
);
1235 ndr_print_wkssvc_NetWkstaInfo1013(ndr
, "info1013", r
->info1013
);
1241 ndr_print_ptr(ndr
, "info1018", r
->info1018
);
1244 ndr_print_wkssvc_NetWkstaInfo1018(ndr
, "info1018", r
->info1018
);
1250 ndr_print_ptr(ndr
, "info1023", r
->info1023
);
1253 ndr_print_wkssvc_NetWkstaInfo1023(ndr
, "info1023", r
->info1023
);
1259 ndr_print_ptr(ndr
, "info1027", r
->info1027
);
1262 ndr_print_wkssvc_NetWkstaInfo1027(ndr
, "info1027", r
->info1027
);
1268 ndr_print_ptr(ndr
, "info1033", r
->info1033
);
1271 ndr_print_wkssvc_NetWkstaInfo1033(ndr
, "info1033", r
->info1033
);
1282 NTSTATUS
ndr_push_USER_INFO_0(struct ndr_push
*ndr
, int ndr_flags
, const struct USER_INFO_0
*r
)
1284 if (ndr_flags
& NDR_SCALARS
) {
1285 NDR_CHECK(ndr_push_align(ndr
, 4));
1286 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user
));
1288 if (ndr_flags
& NDR_BUFFERS
) {
1290 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user
, CH_UTF16
)));
1291 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1292 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user
, CH_UTF16
)));
1293 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->user
, ndr_charset_length(r
->user
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1296 return NT_STATUS_OK
;
1299 NTSTATUS
ndr_pull_USER_INFO_0(struct ndr_pull
*ndr
, int ndr_flags
, struct USER_INFO_0
*r
)
1302 TALLOC_CTX
*_mem_save_user_0
;
1303 if (ndr_flags
& NDR_SCALARS
) {
1304 NDR_CHECK(ndr_pull_align(ndr
, 4));
1305 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user
));
1307 NDR_PULL_ALLOC(ndr
, r
->user
);
1312 if (ndr_flags
& NDR_BUFFERS
) {
1314 _mem_save_user_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1315 NDR_PULL_SET_MEM_CTX(ndr
, r
->user
, 0);
1316 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->user
));
1317 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->user
));
1318 if (ndr_get_array_length(ndr
, &r
->user
) > ndr_get_array_size(ndr
, &r
->user
)) {
1319 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
), ndr_get_array_length(ndr
, &r
->user
));
1321 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->user
), sizeof(uint16_t)));
1322 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->user
, ndr_get_array_length(ndr
, &r
->user
), sizeof(uint16_t), CH_UTF16
));
1323 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_0
, 0);
1326 return NT_STATUS_OK
;
1329 _PUBLIC_
void ndr_print_USER_INFO_0(struct ndr_print
*ndr
, const char *name
, const struct USER_INFO_0
*r
)
1331 ndr_print_struct(ndr
, name
, "USER_INFO_0");
1333 ndr_print_ptr(ndr
, "user", r
->user
);
1336 ndr_print_string(ndr
, "user", r
->user
);
1342 NTSTATUS
ndr_push_USER_INFO_0_CONTAINER(struct ndr_push
*ndr
, int ndr_flags
, const struct USER_INFO_0_CONTAINER
*r
)
1344 uint32_t cntr_user0_1
;
1345 if (ndr_flags
& NDR_SCALARS
) {
1346 NDR_CHECK(ndr_push_align(ndr
, 4));
1347 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->entries_read
));
1348 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user0
));
1350 if (ndr_flags
& NDR_BUFFERS
) {
1352 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->entries_read
));
1353 for (cntr_user0_1
= 0; cntr_user0_1
< r
->entries_read
; cntr_user0_1
++) {
1354 NDR_CHECK(ndr_push_USER_INFO_0(ndr
, NDR_SCALARS
, &r
->user0
[cntr_user0_1
]));
1356 for (cntr_user0_1
= 0; cntr_user0_1
< r
->entries_read
; cntr_user0_1
++) {
1357 NDR_CHECK(ndr_push_USER_INFO_0(ndr
, NDR_BUFFERS
, &r
->user0
[cntr_user0_1
]));
1361 return NT_STATUS_OK
;
1364 NTSTATUS
ndr_pull_USER_INFO_0_CONTAINER(struct ndr_pull
*ndr
, int ndr_flags
, struct USER_INFO_0_CONTAINER
*r
)
1366 uint32_t _ptr_user0
;
1367 uint32_t cntr_user0_1
;
1368 TALLOC_CTX
*_mem_save_user0_0
;
1369 TALLOC_CTX
*_mem_save_user0_1
;
1370 if (ndr_flags
& NDR_SCALARS
) {
1371 NDR_CHECK(ndr_pull_align(ndr
, 4));
1372 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->entries_read
));
1373 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user0
));
1375 NDR_PULL_ALLOC(ndr
, r
->user0
);
1380 if (ndr_flags
& NDR_BUFFERS
) {
1382 _mem_save_user0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1383 NDR_PULL_SET_MEM_CTX(ndr
, r
->user0
, 0);
1384 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->user0
));
1385 NDR_PULL_ALLOC_N(ndr
, r
->user0
, ndr_get_array_size(ndr
, &r
->user0
));
1386 _mem_save_user0_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1387 NDR_PULL_SET_MEM_CTX(ndr
, r
->user0
, 0);
1388 for (cntr_user0_1
= 0; cntr_user0_1
< r
->entries_read
; cntr_user0_1
++) {
1389 NDR_CHECK(ndr_pull_USER_INFO_0(ndr
, NDR_SCALARS
, &r
->user0
[cntr_user0_1
]));
1391 for (cntr_user0_1
= 0; cntr_user0_1
< r
->entries_read
; cntr_user0_1
++) {
1392 NDR_CHECK(ndr_pull_USER_INFO_0(ndr
, NDR_BUFFERS
, &r
->user0
[cntr_user0_1
]));
1394 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user0_1
, 0);
1395 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user0_0
, 0);
1398 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->user0
, r
->entries_read
));
1401 return NT_STATUS_OK
;
1404 _PUBLIC_
void ndr_print_USER_INFO_0_CONTAINER(struct ndr_print
*ndr
, const char *name
, const struct USER_INFO_0_CONTAINER
*r
)
1406 uint32_t cntr_user0_1
;
1407 ndr_print_struct(ndr
, name
, "USER_INFO_0_CONTAINER");
1409 ndr_print_uint32(ndr
, "entries_read", r
->entries_read
);
1410 ndr_print_ptr(ndr
, "user0", r
->user0
);
1413 ndr
->print(ndr
, "%s: ARRAY(%d)", "user0", r
->entries_read
);
1415 for (cntr_user0_1
=0;cntr_user0_1
<r
->entries_read
;cntr_user0_1
++) {
1417 asprintf(&idx_1
, "[%d]", cntr_user0_1
);
1419 ndr_print_USER_INFO_0(ndr
, "user0", &r
->user0
[cntr_user0_1
]);
1429 NTSTATUS
ndr_push_USER_INFO_1(struct ndr_push
*ndr
, int ndr_flags
, const struct USER_INFO_1
*r
)
1431 if (ndr_flags
& NDR_SCALARS
) {
1432 NDR_CHECK(ndr_push_align(ndr
, 4));
1433 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user_name
));
1434 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->logon_domain
));
1435 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->other_domains
));
1436 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->logon_server
));
1438 if (ndr_flags
& NDR_BUFFERS
) {
1440 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
1441 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1442 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
1443 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->user_name
, ndr_charset_length(r
->user_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1445 if (r
->logon_domain
) {
1446 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->logon_domain
, CH_UTF16
)));
1447 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1448 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->logon_domain
, CH_UTF16
)));
1449 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->logon_domain
, ndr_charset_length(r
->logon_domain
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1451 if (r
->other_domains
) {
1452 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->other_domains
, CH_UTF16
)));
1453 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1454 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->other_domains
, CH_UTF16
)));
1455 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->other_domains
, ndr_charset_length(r
->other_domains
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1457 if (r
->logon_server
) {
1458 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->logon_server
, CH_UTF16
)));
1459 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1460 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->logon_server
, CH_UTF16
)));
1461 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->logon_server
, ndr_charset_length(r
->logon_server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1464 return NT_STATUS_OK
;
1467 NTSTATUS
ndr_pull_USER_INFO_1(struct ndr_pull
*ndr
, int ndr_flags
, struct USER_INFO_1
*r
)
1469 uint32_t _ptr_user_name
;
1470 TALLOC_CTX
*_mem_save_user_name_0
;
1471 uint32_t _ptr_logon_domain
;
1472 TALLOC_CTX
*_mem_save_logon_domain_0
;
1473 uint32_t _ptr_other_domains
;
1474 TALLOC_CTX
*_mem_save_other_domains_0
;
1475 uint32_t _ptr_logon_server
;
1476 TALLOC_CTX
*_mem_save_logon_server_0
;
1477 if (ndr_flags
& NDR_SCALARS
) {
1478 NDR_CHECK(ndr_pull_align(ndr
, 4));
1479 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_name
));
1480 if (_ptr_user_name
) {
1481 NDR_PULL_ALLOC(ndr
, r
->user_name
);
1483 r
->user_name
= NULL
;
1485 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_logon_domain
));
1486 if (_ptr_logon_domain
) {
1487 NDR_PULL_ALLOC(ndr
, r
->logon_domain
);
1489 r
->logon_domain
= NULL
;
1491 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_other_domains
));
1492 if (_ptr_other_domains
) {
1493 NDR_PULL_ALLOC(ndr
, r
->other_domains
);
1495 r
->other_domains
= NULL
;
1497 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_logon_server
));
1498 if (_ptr_logon_server
) {
1499 NDR_PULL_ALLOC(ndr
, r
->logon_server
);
1501 r
->logon_server
= NULL
;
1504 if (ndr_flags
& NDR_BUFFERS
) {
1506 _mem_save_user_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1507 NDR_PULL_SET_MEM_CTX(ndr
, r
->user_name
, 0);
1508 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->user_name
));
1509 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->user_name
));
1510 if (ndr_get_array_length(ndr
, &r
->user_name
) > ndr_get_array_size(ndr
, &r
->user_name
)) {
1511 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
));
1513 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t)));
1514 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->user_name
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t), CH_UTF16
));
1515 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_name_0
, 0);
1517 if (r
->logon_domain
) {
1518 _mem_save_logon_domain_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1519 NDR_PULL_SET_MEM_CTX(ndr
, r
->logon_domain
, 0);
1520 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->logon_domain
));
1521 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->logon_domain
));
1522 if (ndr_get_array_length(ndr
, &r
->logon_domain
) > ndr_get_array_size(ndr
, &r
->logon_domain
)) {
1523 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
));
1525 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->logon_domain
), sizeof(uint16_t)));
1526 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->logon_domain
, ndr_get_array_length(ndr
, &r
->logon_domain
), sizeof(uint16_t), CH_UTF16
));
1527 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_logon_domain_0
, 0);
1529 if (r
->other_domains
) {
1530 _mem_save_other_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1531 NDR_PULL_SET_MEM_CTX(ndr
, r
->other_domains
, 0);
1532 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->other_domains
));
1533 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->other_domains
));
1534 if (ndr_get_array_length(ndr
, &r
->other_domains
) > ndr_get_array_size(ndr
, &r
->other_domains
)) {
1535 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
));
1537 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->other_domains
), sizeof(uint16_t)));
1538 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->other_domains
, ndr_get_array_length(ndr
, &r
->other_domains
), sizeof(uint16_t), CH_UTF16
));
1539 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_other_domains_0
, 0);
1541 if (r
->logon_server
) {
1542 _mem_save_logon_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1543 NDR_PULL_SET_MEM_CTX(ndr
, r
->logon_server
, 0);
1544 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->logon_server
));
1545 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->logon_server
));
1546 if (ndr_get_array_length(ndr
, &r
->logon_server
) > ndr_get_array_size(ndr
, &r
->logon_server
)) {
1547 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
));
1549 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->logon_server
), sizeof(uint16_t)));
1550 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->logon_server
, ndr_get_array_length(ndr
, &r
->logon_server
), sizeof(uint16_t), CH_UTF16
));
1551 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_logon_server_0
, 0);
1554 return NT_STATUS_OK
;
1557 _PUBLIC_
void ndr_print_USER_INFO_1(struct ndr_print
*ndr
, const char *name
, const struct USER_INFO_1
*r
)
1559 ndr_print_struct(ndr
, name
, "USER_INFO_1");
1561 ndr_print_ptr(ndr
, "user_name", r
->user_name
);
1564 ndr_print_string(ndr
, "user_name", r
->user_name
);
1567 ndr_print_ptr(ndr
, "logon_domain", r
->logon_domain
);
1569 if (r
->logon_domain
) {
1570 ndr_print_string(ndr
, "logon_domain", r
->logon_domain
);
1573 ndr_print_ptr(ndr
, "other_domains", r
->other_domains
);
1575 if (r
->other_domains
) {
1576 ndr_print_string(ndr
, "other_domains", r
->other_domains
);
1579 ndr_print_ptr(ndr
, "logon_server", r
->logon_server
);
1581 if (r
->logon_server
) {
1582 ndr_print_string(ndr
, "logon_server", r
->logon_server
);
1588 NTSTATUS
ndr_push_USER_INFO_1_CONTAINER(struct ndr_push
*ndr
, int ndr_flags
, const struct USER_INFO_1_CONTAINER
*r
)
1590 uint32_t cntr_user1_1
;
1591 if (ndr_flags
& NDR_SCALARS
) {
1592 NDR_CHECK(ndr_push_align(ndr
, 4));
1593 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->entries_read
));
1594 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user1
));
1596 if (ndr_flags
& NDR_BUFFERS
) {
1598 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->entries_read
));
1599 for (cntr_user1_1
= 0; cntr_user1_1
< r
->entries_read
; cntr_user1_1
++) {
1600 NDR_CHECK(ndr_push_USER_INFO_1(ndr
, NDR_SCALARS
, &r
->user1
[cntr_user1_1
]));
1602 for (cntr_user1_1
= 0; cntr_user1_1
< r
->entries_read
; cntr_user1_1
++) {
1603 NDR_CHECK(ndr_push_USER_INFO_1(ndr
, NDR_BUFFERS
, &r
->user1
[cntr_user1_1
]));
1607 return NT_STATUS_OK
;
1610 NTSTATUS
ndr_pull_USER_INFO_1_CONTAINER(struct ndr_pull
*ndr
, int ndr_flags
, struct USER_INFO_1_CONTAINER
*r
)
1612 uint32_t _ptr_user1
;
1613 uint32_t cntr_user1_1
;
1614 TALLOC_CTX
*_mem_save_user1_0
;
1615 TALLOC_CTX
*_mem_save_user1_1
;
1616 if (ndr_flags
& NDR_SCALARS
) {
1617 NDR_CHECK(ndr_pull_align(ndr
, 4));
1618 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->entries_read
));
1619 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user1
));
1621 NDR_PULL_ALLOC(ndr
, r
->user1
);
1626 if (ndr_flags
& NDR_BUFFERS
) {
1628 _mem_save_user1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1629 NDR_PULL_SET_MEM_CTX(ndr
, r
->user1
, 0);
1630 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->user1
));
1631 NDR_PULL_ALLOC_N(ndr
, r
->user1
, ndr_get_array_size(ndr
, &r
->user1
));
1632 _mem_save_user1_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1633 NDR_PULL_SET_MEM_CTX(ndr
, r
->user1
, 0);
1634 for (cntr_user1_1
= 0; cntr_user1_1
< r
->entries_read
; cntr_user1_1
++) {
1635 NDR_CHECK(ndr_pull_USER_INFO_1(ndr
, NDR_SCALARS
, &r
->user1
[cntr_user1_1
]));
1637 for (cntr_user1_1
= 0; cntr_user1_1
< r
->entries_read
; cntr_user1_1
++) {
1638 NDR_CHECK(ndr_pull_USER_INFO_1(ndr
, NDR_BUFFERS
, &r
->user1
[cntr_user1_1
]));
1640 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user1_1
, 0);
1641 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user1_0
, 0);
1644 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->user1
, r
->entries_read
));
1647 return NT_STATUS_OK
;
1650 _PUBLIC_
void ndr_print_USER_INFO_1_CONTAINER(struct ndr_print
*ndr
, const char *name
, const struct USER_INFO_1_CONTAINER
*r
)
1652 uint32_t cntr_user1_1
;
1653 ndr_print_struct(ndr
, name
, "USER_INFO_1_CONTAINER");
1655 ndr_print_uint32(ndr
, "entries_read", r
->entries_read
);
1656 ndr_print_ptr(ndr
, "user1", r
->user1
);
1659 ndr
->print(ndr
, "%s: ARRAY(%d)", "user1", r
->entries_read
);
1661 for (cntr_user1_1
=0;cntr_user1_1
<r
->entries_read
;cntr_user1_1
++) {
1663 asprintf(&idx_1
, "[%d]", cntr_user1_1
);
1665 ndr_print_USER_INFO_1(ndr
, "user1", &r
->user1
[cntr_user1_1
]);
1675 NTSTATUS
ndr_push_WKS_USER_ENUM_UNION(struct ndr_push
*ndr
, int ndr_flags
, const union WKS_USER_ENUM_UNION
*r
)
1678 level
= ndr_push_get_switch_value(ndr
, r
);
1679 if (ndr_flags
& NDR_SCALARS
) {
1680 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
1683 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user0
));
1687 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user1
));
1691 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1694 if (ndr_flags
& NDR_BUFFERS
) {
1698 NDR_CHECK(ndr_push_USER_INFO_0_CONTAINER(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->user0
));
1704 NDR_CHECK(ndr_push_USER_INFO_1_CONTAINER(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->user1
));
1709 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1712 return NT_STATUS_OK
;
1715 NTSTATUS
ndr_pull_WKS_USER_ENUM_UNION(struct ndr_pull
*ndr
, int ndr_flags
, union WKS_USER_ENUM_UNION
*r
)
1719 TALLOC_CTX
*_mem_save_user0_0
;
1720 TALLOC_CTX
*_mem_save_user1_0
;
1721 level
= ndr_pull_get_switch_value(ndr
, r
);
1722 if (ndr_flags
& NDR_SCALARS
) {
1723 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
1724 if (_level
!= level
) {
1725 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for WKS_USER_ENUM_UNION", _level
);
1729 uint32_t _ptr_user0
;
1730 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user0
));
1732 NDR_PULL_ALLOC(ndr
, r
->user0
);
1739 uint32_t _ptr_user1
;
1740 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user1
));
1742 NDR_PULL_ALLOC(ndr
, r
->user1
);
1749 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1752 if (ndr_flags
& NDR_BUFFERS
) {
1756 _mem_save_user0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1757 NDR_PULL_SET_MEM_CTX(ndr
, r
->user0
, 0);
1758 NDR_CHECK(ndr_pull_USER_INFO_0_CONTAINER(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->user0
));
1759 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user0_0
, 0);
1765 _mem_save_user1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1766 NDR_PULL_SET_MEM_CTX(ndr
, r
->user1
, 0);
1767 NDR_CHECK(ndr_pull_USER_INFO_1_CONTAINER(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->user1
));
1768 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user1_0
, 0);
1773 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1776 return NT_STATUS_OK
;
1779 _PUBLIC_
void ndr_print_WKS_USER_ENUM_UNION(struct ndr_print
*ndr
, const char *name
, const union WKS_USER_ENUM_UNION
*r
)
1782 level
= ndr_print_get_switch_value(ndr
, r
);
1783 ndr_print_union(ndr
, name
, level
, "WKS_USER_ENUM_UNION");
1786 ndr_print_ptr(ndr
, "user0", r
->user0
);
1789 ndr_print_USER_INFO_0_CONTAINER(ndr
, "user0", r
->user0
);
1795 ndr_print_ptr(ndr
, "user1", r
->user1
);
1798 ndr_print_USER_INFO_1_CONTAINER(ndr
, "user1", r
->user1
);
1804 ndr_print_bad_level(ndr
, name
, level
);
1808 NTSTATUS
ndr_push_wkssvc_NetWkstaTransportInfo0(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaTransportInfo0
*r
)
1810 if (ndr_flags
& NDR_SCALARS
) {
1811 NDR_CHECK(ndr_push_align(ndr
, 4));
1812 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->quality_of_service
));
1813 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->vc_count
));
1814 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->name
));
1815 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->address
));
1816 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->wan_link
));
1818 if (ndr_flags
& NDR_BUFFERS
) {
1820 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->name
, CH_UTF16
)));
1821 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1822 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->name
, CH_UTF16
)));
1823 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->name
, ndr_charset_length(r
->name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1826 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->address
, CH_UTF16
)));
1827 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1828 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->address
, CH_UTF16
)));
1829 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->address
, ndr_charset_length(r
->address
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1832 return NT_STATUS_OK
;
1835 NTSTATUS
ndr_pull_wkssvc_NetWkstaTransportInfo0(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaTransportInfo0
*r
)
1838 TALLOC_CTX
*_mem_save_name_0
;
1839 uint32_t _ptr_address
;
1840 TALLOC_CTX
*_mem_save_address_0
;
1841 if (ndr_flags
& NDR_SCALARS
) {
1842 NDR_CHECK(ndr_pull_align(ndr
, 4));
1843 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->quality_of_service
));
1844 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->vc_count
));
1845 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
1847 NDR_PULL_ALLOC(ndr
, r
->name
);
1851 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_address
));
1853 NDR_PULL_ALLOC(ndr
, r
->address
);
1857 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->wan_link
));
1859 if (ndr_flags
& NDR_BUFFERS
) {
1861 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1862 NDR_PULL_SET_MEM_CTX(ndr
, r
->name
, 0);
1863 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->name
));
1864 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->name
));
1865 if (ndr_get_array_length(ndr
, &r
->name
) > ndr_get_array_size(ndr
, &r
->name
)) {
1866 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
));
1868 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->name
), sizeof(uint16_t)));
1869 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->name
, ndr_get_array_length(ndr
, &r
->name
), sizeof(uint16_t), CH_UTF16
));
1870 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, 0);
1873 _mem_save_address_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1874 NDR_PULL_SET_MEM_CTX(ndr
, r
->address
, 0);
1875 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->address
));
1876 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->address
));
1877 if (ndr_get_array_length(ndr
, &r
->address
) > ndr_get_array_size(ndr
, &r
->address
)) {
1878 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
));
1880 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->address
), sizeof(uint16_t)));
1881 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->address
, ndr_get_array_length(ndr
, &r
->address
), sizeof(uint16_t), CH_UTF16
));
1882 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_address_0
, 0);
1885 return NT_STATUS_OK
;
1888 _PUBLIC_
void ndr_print_wkssvc_NetWkstaTransportInfo0(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaTransportInfo0
*r
)
1890 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaTransportInfo0");
1892 ndr_print_uint32(ndr
, "quality_of_service", r
->quality_of_service
);
1893 ndr_print_uint32(ndr
, "vc_count", r
->vc_count
);
1894 ndr_print_ptr(ndr
, "name", r
->name
);
1897 ndr_print_string(ndr
, "name", r
->name
);
1900 ndr_print_ptr(ndr
, "address", r
->address
);
1903 ndr_print_string(ndr
, "address", r
->address
);
1906 ndr_print_uint32(ndr
, "wan_link", r
->wan_link
);
1910 NTSTATUS
ndr_push_wkssvc_NetWkstaTransportCtr0(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_NetWkstaTransportCtr0
*r
)
1912 uint32_t cntr_array_1
;
1913 if (ndr_flags
& NDR_SCALARS
) {
1914 NDR_CHECK(ndr_push_align(ndr
, 4));
1915 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1916 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->array
));
1918 if (ndr_flags
& NDR_BUFFERS
) {
1920 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1921 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
1922 NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportInfo0(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
1924 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
1925 NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportInfo0(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
1929 return NT_STATUS_OK
;
1932 NTSTATUS
ndr_pull_wkssvc_NetWkstaTransportCtr0(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_NetWkstaTransportCtr0
*r
)
1934 uint32_t _ptr_array
;
1935 uint32_t cntr_array_1
;
1936 TALLOC_CTX
*_mem_save_array_0
;
1937 TALLOC_CTX
*_mem_save_array_1
;
1938 if (ndr_flags
& NDR_SCALARS
) {
1939 NDR_CHECK(ndr_pull_align(ndr
, 4));
1940 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
1941 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_array
));
1943 NDR_PULL_ALLOC(ndr
, r
->array
);
1948 if (ndr_flags
& NDR_BUFFERS
) {
1950 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1951 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
1952 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
1953 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
1954 _mem_save_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1955 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
1956 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
1957 NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportInfo0(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
1959 for (cntr_array_1
= 0; cntr_array_1
< r
->count
; cntr_array_1
++) {
1960 NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportInfo0(ndr
, NDR_BUFFERS
, &r
->array
[cntr_array_1
]));
1962 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
1963 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
1966 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->count
));
1969 return NT_STATUS_OK
;
1972 _PUBLIC_
void ndr_print_wkssvc_NetWkstaTransportCtr0(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_NetWkstaTransportCtr0
*r
)
1974 uint32_t cntr_array_1
;
1975 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaTransportCtr0");
1977 ndr_print_uint32(ndr
, "count", r
->count
);
1978 ndr_print_ptr(ndr
, "array", r
->array
);
1981 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", r
->count
);
1983 for (cntr_array_1
=0;cntr_array_1
<r
->count
;cntr_array_1
++) {
1985 asprintf(&idx_1
, "[%d]", cntr_array_1
);
1987 ndr_print_wkssvc_NetWkstaTransportInfo0(ndr
, "array", &r
->array
[cntr_array_1
]);
1997 NTSTATUS
ndr_push_wkssvc_NetWkstaTransportCtr(struct ndr_push
*ndr
, int ndr_flags
, const union wkssvc_NetWkstaTransportCtr
*r
)
2000 level
= ndr_push_get_switch_value(ndr
, r
);
2001 if (ndr_flags
& NDR_SCALARS
) {
2002 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
2005 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->ctr0
));
2013 if (ndr_flags
& NDR_BUFFERS
) {
2017 NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportCtr0(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->ctr0
));
2026 return NT_STATUS_OK
;
2029 NTSTATUS
ndr_pull_wkssvc_NetWkstaTransportCtr(struct ndr_pull
*ndr
, int ndr_flags
, union wkssvc_NetWkstaTransportCtr
*r
)
2033 TALLOC_CTX
*_mem_save_ctr0_0
;
2034 level
= ndr_pull_get_switch_value(ndr
, r
);
2035 if (ndr_flags
& NDR_SCALARS
) {
2036 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
2037 if (_level
!= level
) {
2038 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for wkssvc_NetWkstaTransportCtr", _level
);
2043 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ctr0
));
2045 NDR_PULL_ALLOC(ndr
, r
->ctr0
);
2056 if (ndr_flags
& NDR_BUFFERS
) {
2060 _mem_save_ctr0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2061 NDR_PULL_SET_MEM_CTX(ndr
, r
->ctr0
, 0);
2062 NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportCtr0(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->ctr0
));
2063 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr0_0
, 0);
2072 return NT_STATUS_OK
;
2075 _PUBLIC_
void ndr_print_wkssvc_NetWkstaTransportCtr(struct ndr_print
*ndr
, const char *name
, const union wkssvc_NetWkstaTransportCtr
*r
)
2078 level
= ndr_print_get_switch_value(ndr
, r
);
2079 ndr_print_union(ndr
, name
, level
, "wkssvc_NetWkstaTransportCtr");
2082 ndr_print_ptr(ndr
, "ctr0", r
->ctr0
);
2085 ndr_print_wkssvc_NetWkstaTransportCtr0(ndr
, "ctr0", r
->ctr0
);
2096 NTSTATUS
ndr_push_wkssvc_PasswordBuffer(struct ndr_push
*ndr
, int ndr_flags
, const struct wkssvc_PasswordBuffer
*r
)
2098 if (ndr_flags
& NDR_SCALARS
) {
2099 NDR_CHECK(ndr_push_align(ndr
, 1));
2100 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, 524));
2102 if (ndr_flags
& NDR_BUFFERS
) {
2104 return NT_STATUS_OK
;
2107 NTSTATUS
ndr_pull_wkssvc_PasswordBuffer(struct ndr_pull
*ndr
, int ndr_flags
, struct wkssvc_PasswordBuffer
*r
)
2109 if (ndr_flags
& NDR_SCALARS
) {
2110 NDR_CHECK(ndr_pull_align(ndr
, 1));
2111 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, 524));
2113 if (ndr_flags
& NDR_BUFFERS
) {
2115 return NT_STATUS_OK
;
2118 _PUBLIC_
void ndr_print_wkssvc_PasswordBuffer(struct ndr_print
*ndr
, const char *name
, const struct wkssvc_PasswordBuffer
*r
)
2120 ndr_print_struct(ndr
, name
, "wkssvc_PasswordBuffer");
2122 ndr_print_array_uint8(ndr
, "data", r
->data
, 524);
2126 NTSTATUS
ndr_push_wkssvc_joinflags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
2128 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2129 return NT_STATUS_OK
;
2132 NTSTATUS
ndr_pull_wkssvc_joinflags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
2135 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2137 return NT_STATUS_OK
;
2140 _PUBLIC_
void ndr_print_wkssvc_joinflags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
2142 ndr_print_uint32(ndr
, name
, r
);
2144 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_DEFER_SPN", WKSSVC_JOIN_FLAGS_DEFER_SPN
, r
);
2145 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_MACHINE_PWD_PASSED", WKSSVC_JOIN_FLAGS_MACHINE_PWD_PASSED
, r
);
2146 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_JOIN_UNSECURE", WKSSVC_JOIN_FLAGS_JOIN_UNSECURE
, r
);
2147 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_DOMAIN_JOIN_IF_JOINED", WKSSVC_JOIN_FLAGS_DOMAIN_JOIN_IF_JOINED
, r
);
2148 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_WIN9X_UPGRADE", WKSSVC_JOIN_FLAGS_WIN9X_UPGRADE
, r
);
2149 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE", WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE
, r
);
2150 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE", WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE
, r
);
2151 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_JOIN_TYPE", WKSSVC_JOIN_FLAGS_JOIN_TYPE
, r
);
2155 NTSTATUS
ndr_push_wkssvc_renameflags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
2157 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2158 return NT_STATUS_OK
;
2161 NTSTATUS
ndr_pull_wkssvc_renameflags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
2164 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2166 return NT_STATUS_OK
;
2169 _PUBLIC_
void ndr_print_wkssvc_renameflags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
2171 ndr_print_uint32(ndr
, name
, r
);
2173 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE", WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE
, r
);
2177 NTSTATUS
ndr_push_wkssvc_NetWkstaGetInfo(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetWkstaGetInfo
*r
)
2179 if (flags
& NDR_IN
) {
2180 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
2181 if (r
->in
.server_name
) {
2182 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
2183 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
2184 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
2185 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
));
2187 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
2189 if (flags
& NDR_OUT
) {
2190 if (r
->out
.info
== NULL
) return NT_STATUS_INVALID_PARAMETER_MIX
;
2191 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
2192 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
2193 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2195 return NT_STATUS_OK
;
2198 NTSTATUS
ndr_pull_wkssvc_NetWkstaGetInfo(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetWkstaGetInfo
*r
)
2200 uint32_t _ptr_server_name
;
2201 TALLOC_CTX
*_mem_save_server_name_0
;
2202 TALLOC_CTX
*_mem_save_info_0
;
2203 if (flags
& NDR_IN
) {
2204 ZERO_STRUCT(r
->out
);
2206 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
2207 if (_ptr_server_name
) {
2208 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
2210 r
->in
.server_name
= NULL
;
2212 if (r
->in
.server_name
) {
2213 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2214 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
2215 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
2216 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
2217 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
2218 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
));
2220 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
2221 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
));
2222 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
2224 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
2225 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
2226 ZERO_STRUCTP(r
->out
.info
);
2228 if (flags
& NDR_OUT
) {
2229 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2230 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
2232 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2233 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
2234 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
2235 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
2236 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
2237 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2239 return NT_STATUS_OK
;
2242 _PUBLIC_
void ndr_print_wkssvc_NetWkstaGetInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetWkstaGetInfo
*r
)
2244 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaGetInfo");
2246 if (flags
& NDR_SET_VALUES
) {
2247 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2249 if (flags
& NDR_IN
) {
2250 ndr_print_struct(ndr
, "in", "wkssvc_NetWkstaGetInfo");
2252 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
2254 if (r
->in
.server_name
) {
2255 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
2258 ndr_print_uint32(ndr
, "level", r
->in
.level
);
2261 if (flags
& NDR_OUT
) {
2262 ndr_print_struct(ndr
, "out", "wkssvc_NetWkstaGetInfo");
2264 ndr_print_ptr(ndr
, "info", r
->out
.info
);
2266 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
2267 ndr_print_wkssvc_NetWkstaInfo(ndr
, "info", r
->out
.info
);
2269 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2275 NTSTATUS
ndr_push_wkssvc_NetWkstaSetInfo(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetWkstaSetInfo
*r
)
2277 if (flags
& NDR_IN
) {
2278 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
2279 if (r
->in
.server_name
) {
2280 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
2281 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
2282 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
2283 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
));
2285 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
2286 if (r
->in
.info
== NULL
) return NT_STATUS_INVALID_PARAMETER_MIX
;
2287 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
2288 NDR_CHECK(ndr_push_wkssvc_NetWkstaInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
2289 if (r
->in
.parm_error
== NULL
) return NT_STATUS_INVALID_PARAMETER_MIX
;
2290 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.parm_error
));
2292 if (flags
& NDR_OUT
) {
2293 if (r
->out
.parm_error
== NULL
) return NT_STATUS_INVALID_PARAMETER_MIX
;
2294 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.parm_error
));
2295 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2297 return NT_STATUS_OK
;
2300 NTSTATUS
ndr_pull_wkssvc_NetWkstaSetInfo(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetWkstaSetInfo
*r
)
2302 uint32_t _ptr_server_name
;
2303 TALLOC_CTX
*_mem_save_server_name_0
;
2304 TALLOC_CTX
*_mem_save_info_0
;
2305 TALLOC_CTX
*_mem_save_parm_error_0
;
2306 if (flags
& NDR_IN
) {
2307 ZERO_STRUCT(r
->out
);
2309 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
2310 if (_ptr_server_name
) {
2311 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
2313 r
->in
.server_name
= NULL
;
2315 if (r
->in
.server_name
) {
2316 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2317 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
2318 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
2319 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
2320 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
2321 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
));
2323 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
2324 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
));
2325 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
2327 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
2328 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2329 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
2331 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2332 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
2333 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
2334 NDR_CHECK(ndr_pull_wkssvc_NetWkstaInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
2335 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
2336 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2337 NDR_PULL_ALLOC(ndr
, r
->in
.parm_error
);
2339 _mem_save_parm_error_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2340 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.parm_error
, LIBNDR_FLAG_REF_ALLOC
);
2341 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.parm_error
));
2342 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parm_error_0
, LIBNDR_FLAG_REF_ALLOC
);
2343 NDR_PULL_ALLOC(ndr
, r
->out
.parm_error
);
2344 *r
->out
.parm_error
= *r
->in
.parm_error
;
2346 if (flags
& NDR_OUT
) {
2347 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2348 NDR_PULL_ALLOC(ndr
, r
->out
.parm_error
);
2350 _mem_save_parm_error_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2351 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.parm_error
, LIBNDR_FLAG_REF_ALLOC
);
2352 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.parm_error
));
2353 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parm_error_0
, LIBNDR_FLAG_REF_ALLOC
);
2354 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2356 return NT_STATUS_OK
;
2359 _PUBLIC_
void ndr_print_wkssvc_NetWkstaSetInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetWkstaSetInfo
*r
)
2361 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaSetInfo");
2363 if (flags
& NDR_SET_VALUES
) {
2364 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2366 if (flags
& NDR_IN
) {
2367 ndr_print_struct(ndr
, "in", "wkssvc_NetWkstaSetInfo");
2369 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
2371 if (r
->in
.server_name
) {
2372 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
2375 ndr_print_uint32(ndr
, "level", r
->in
.level
);
2376 ndr_print_ptr(ndr
, "info", r
->in
.info
);
2378 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
2379 ndr_print_wkssvc_NetWkstaInfo(ndr
, "info", r
->in
.info
);
2381 ndr_print_ptr(ndr
, "parm_error", r
->in
.parm_error
);
2383 ndr_print_uint32(ndr
, "parm_error", *r
->in
.parm_error
);
2387 if (flags
& NDR_OUT
) {
2388 ndr_print_struct(ndr
, "out", "wkssvc_NetWkstaSetInfo");
2390 ndr_print_ptr(ndr
, "parm_error", r
->out
.parm_error
);
2392 ndr_print_uint32(ndr
, "parm_error", *r
->out
.parm_error
);
2394 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2400 NTSTATUS
ndr_push_wkssvc_NetWkstaEnumUsers(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetWkstaEnumUsers
*r
)
2402 if (flags
& NDR_IN
) {
2403 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
2404 if (r
->in
.server_name
) {
2405 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
2406 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
2407 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
2408 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
));
2410 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
2411 if (r
->in
.users
== NULL
) return NT_STATUS_INVALID_PARAMETER_MIX
;
2412 NDR_CHECK(ndr_push_WKS_USER_ENUM_UNION(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.users
));
2413 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.prefmaxlen
));
2414 if (r
->in
.resumehandle
== NULL
) return NT_STATUS_INVALID_PARAMETER_MIX
;
2415 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resumehandle
));
2417 if (flags
& NDR_OUT
) {
2418 if (r
->out
.users
== NULL
) return NT_STATUS_INVALID_PARAMETER_MIX
;
2419 NDR_CHECK(ndr_push_WKS_USER_ENUM_UNION(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.users
));
2420 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.entriesread
));
2421 if (r
->out
.entriesread
) {
2422 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.entriesread
));
2424 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.totalentries
));
2425 if (r
->out
.totalentries
) {
2426 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.totalentries
));
2428 if (r
->out
.resumehandle
== NULL
) return NT_STATUS_INVALID_PARAMETER_MIX
;
2429 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resumehandle
));
2430 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2432 return NT_STATUS_OK
;
2435 NTSTATUS
ndr_pull_wkssvc_NetWkstaEnumUsers(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetWkstaEnumUsers
*r
)
2437 uint32_t _ptr_server_name
;
2438 uint32_t _ptr_entriesread
;
2439 uint32_t _ptr_totalentries
;
2440 TALLOC_CTX
*_mem_save_server_name_0
;
2441 TALLOC_CTX
*_mem_save_users_0
;
2442 TALLOC_CTX
*_mem_save_entriesread_0
;
2443 TALLOC_CTX
*_mem_save_totalentries_0
;
2444 TALLOC_CTX
*_mem_save_resumehandle_0
;
2445 if (flags
& NDR_IN
) {
2446 ZERO_STRUCT(r
->out
);
2448 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
2449 if (_ptr_server_name
) {
2450 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
2452 r
->in
.server_name
= NULL
;
2454 if (r
->in
.server_name
) {
2455 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2456 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
2457 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
2458 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
2459 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
2460 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
));
2462 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
2463 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
));
2464 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
2466 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
2467 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2468 NDR_PULL_ALLOC(ndr
, r
->in
.users
);
2470 _mem_save_users_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2471 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.users
, LIBNDR_FLAG_REF_ALLOC
);
2472 NDR_CHECK(ndr_pull_WKS_USER_ENUM_UNION(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.users
));
2473 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_users_0
, LIBNDR_FLAG_REF_ALLOC
);
2474 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.prefmaxlen
));
2475 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2476 NDR_PULL_ALLOC(ndr
, r
->in
.resumehandle
);
2478 _mem_save_resumehandle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2479 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resumehandle
, LIBNDR_FLAG_REF_ALLOC
);
2480 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resumehandle
));
2481 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resumehandle_0
, LIBNDR_FLAG_REF_ALLOC
);
2482 NDR_PULL_ALLOC(ndr
, r
->out
.users
);
2483 *r
->out
.users
= *r
->in
.users
;
2484 NDR_PULL_ALLOC(ndr
, r
->out
.resumehandle
);
2485 *r
->out
.resumehandle
= *r
->in
.resumehandle
;
2487 if (flags
& NDR_OUT
) {
2488 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2489 NDR_PULL_ALLOC(ndr
, r
->out
.users
);
2491 _mem_save_users_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2492 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.users
, LIBNDR_FLAG_REF_ALLOC
);
2493 NDR_CHECK(ndr_pull_WKS_USER_ENUM_UNION(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.users
));
2494 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_users_0
, LIBNDR_FLAG_REF_ALLOC
);
2495 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entriesread
));
2496 if (_ptr_entriesread
) {
2497 NDR_PULL_ALLOC(ndr
, r
->out
.entriesread
);
2499 r
->out
.entriesread
= NULL
;
2501 if (r
->out
.entriesread
) {
2502 _mem_save_entriesread_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2503 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.entriesread
, 0);
2504 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.entriesread
));
2505 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entriesread_0
, 0);
2507 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_totalentries
));
2508 if (_ptr_totalentries
) {
2509 NDR_PULL_ALLOC(ndr
, r
->out
.totalentries
);
2511 r
->out
.totalentries
= NULL
;
2513 if (r
->out
.totalentries
) {
2514 _mem_save_totalentries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2515 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.totalentries
, 0);
2516 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.totalentries
));
2517 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_totalentries_0
, 0);
2519 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2520 NDR_PULL_ALLOC(ndr
, r
->out
.resumehandle
);
2522 _mem_save_resumehandle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2523 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resumehandle
, LIBNDR_FLAG_REF_ALLOC
);
2524 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resumehandle
));
2525 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resumehandle_0
, LIBNDR_FLAG_REF_ALLOC
);
2526 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2528 return NT_STATUS_OK
;
2531 _PUBLIC_
void ndr_print_wkssvc_NetWkstaEnumUsers(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetWkstaEnumUsers
*r
)
2533 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaEnumUsers");
2535 if (flags
& NDR_SET_VALUES
) {
2536 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2538 if (flags
& NDR_IN
) {
2539 ndr_print_struct(ndr
, "in", "wkssvc_NetWkstaEnumUsers");
2541 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
2543 if (r
->in
.server_name
) {
2544 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
2547 ndr_print_uint32(ndr
, "level", r
->in
.level
);
2548 ndr_print_ptr(ndr
, "users", r
->in
.users
);
2550 ndr_print_WKS_USER_ENUM_UNION(ndr
, "users", r
->in
.users
);
2552 ndr_print_uint32(ndr
, "prefmaxlen", r
->in
.prefmaxlen
);
2553 ndr_print_ptr(ndr
, "resumehandle", r
->in
.resumehandle
);
2555 ndr_print_uint32(ndr
, "resumehandle", *r
->in
.resumehandle
);
2559 if (flags
& NDR_OUT
) {
2560 ndr_print_struct(ndr
, "out", "wkssvc_NetWkstaEnumUsers");
2562 ndr_print_ptr(ndr
, "users", r
->out
.users
);
2564 ndr_print_WKS_USER_ENUM_UNION(ndr
, "users", r
->out
.users
);
2566 ndr_print_ptr(ndr
, "entriesread", r
->out
.entriesread
);
2568 if (r
->out
.entriesread
) {
2569 ndr_print_uint32(ndr
, "entriesread", *r
->out
.entriesread
);
2572 ndr_print_ptr(ndr
, "totalentries", r
->out
.totalentries
);
2574 if (r
->out
.totalentries
) {
2575 ndr_print_uint32(ndr
, "totalentries", *r
->out
.totalentries
);
2578 ndr_print_ptr(ndr
, "resumehandle", r
->out
.resumehandle
);
2580 ndr_print_uint32(ndr
, "resumehandle", *r
->out
.resumehandle
);
2582 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2588 NTSTATUS
ndr_push_WKSSVC_NETRWKSTAUSERGETINFO(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRWKSTAUSERGETINFO
*r
)
2590 if (flags
& NDR_IN
) {
2592 if (flags
& NDR_OUT
) {
2593 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2595 return NT_STATUS_OK
;
2598 NTSTATUS
ndr_pull_WKSSVC_NETRWKSTAUSERGETINFO(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRWKSTAUSERGETINFO
*r
)
2600 if (flags
& NDR_IN
) {
2602 if (flags
& NDR_OUT
) {
2603 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2605 return NT_STATUS_OK
;
2608 _PUBLIC_
void ndr_print_WKSSVC_NETRWKSTAUSERGETINFO(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRWKSTAUSERGETINFO
*r
)
2610 ndr_print_struct(ndr
, name
, "WKSSVC_NETRWKSTAUSERGETINFO");
2612 if (flags
& NDR_SET_VALUES
) {
2613 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2615 if (flags
& NDR_IN
) {
2616 ndr_print_struct(ndr
, "in", "WKSSVC_NETRWKSTAUSERGETINFO");
2620 if (flags
& NDR_OUT
) {
2621 ndr_print_struct(ndr
, "out", "WKSSVC_NETRWKSTAUSERGETINFO");
2623 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2629 NTSTATUS
ndr_push_WKSSVC_NETRWKSTAUSERSETINFO(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRWKSTAUSERSETINFO
*r
)
2631 if (flags
& NDR_IN
) {
2633 if (flags
& NDR_OUT
) {
2634 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2636 return NT_STATUS_OK
;
2639 NTSTATUS
ndr_pull_WKSSVC_NETRWKSTAUSERSETINFO(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRWKSTAUSERSETINFO
*r
)
2641 if (flags
& NDR_IN
) {
2643 if (flags
& NDR_OUT
) {
2644 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2646 return NT_STATUS_OK
;
2649 _PUBLIC_
void ndr_print_WKSSVC_NETRWKSTAUSERSETINFO(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRWKSTAUSERSETINFO
*r
)
2651 ndr_print_struct(ndr
, name
, "WKSSVC_NETRWKSTAUSERSETINFO");
2653 if (flags
& NDR_SET_VALUES
) {
2654 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2656 if (flags
& NDR_IN
) {
2657 ndr_print_struct(ndr
, "in", "WKSSVC_NETRWKSTAUSERSETINFO");
2661 if (flags
& NDR_OUT
) {
2662 ndr_print_struct(ndr
, "out", "WKSSVC_NETRWKSTAUSERSETINFO");
2664 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2670 NTSTATUS
ndr_push_wkssvc_NetWkstaTransportEnum(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetWkstaTransportEnum
*r
)
2672 if (flags
& NDR_IN
) {
2673 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
2674 if (r
->in
.server_name
) {
2675 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
2676 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
2677 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
2678 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
));
2680 if (r
->in
.level
== NULL
) return NT_STATUS_INVALID_PARAMETER_MIX
;
2681 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.level
));
2682 if (r
->in
.ctr
== NULL
) return NT_STATUS_INVALID_PARAMETER_MIX
;
2683 if (r
->in
.level
== NULL
) return NT_STATUS_INVALID_PARAMETER_MIX
;
2684 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.ctr
, *r
->in
.level
));
2685 NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.ctr
));
2686 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_buffer
));
2687 if (r
->in
.resume_handle
== NULL
) return NT_STATUS_INVALID_PARAMETER_MIX
;
2688 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
2690 if (flags
& NDR_OUT
) {
2691 if (r
->out
.level
== NULL
) return NT_STATUS_INVALID_PARAMETER_MIX
;
2692 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.level
));
2693 if (r
->out
.ctr
== NULL
) return NT_STATUS_INVALID_PARAMETER_MIX
;
2694 if (r
->out
.level
== NULL
) return NT_STATUS_INVALID_PARAMETER_MIX
;
2695 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level
));
2696 NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
2697 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.totalentries
));
2698 if (r
->out
.totalentries
) {
2699 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.totalentries
));
2701 if (r
->out
.resume_handle
== NULL
) return NT_STATUS_INVALID_PARAMETER_MIX
;
2702 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
2703 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2705 return NT_STATUS_OK
;
2708 NTSTATUS
ndr_pull_wkssvc_NetWkstaTransportEnum(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetWkstaTransportEnum
*r
)
2710 uint32_t _ptr_server_name
;
2711 uint32_t _ptr_totalentries
;
2712 TALLOC_CTX
*_mem_save_server_name_0
;
2713 TALLOC_CTX
*_mem_save_level_0
;
2714 TALLOC_CTX
*_mem_save_ctr_0
;
2715 TALLOC_CTX
*_mem_save_totalentries_0
;
2716 TALLOC_CTX
*_mem_save_resume_handle_0
;
2717 if (flags
& NDR_IN
) {
2718 ZERO_STRUCT(r
->out
);
2720 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
2721 if (_ptr_server_name
) {
2722 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
2724 r
->in
.server_name
= NULL
;
2726 if (r
->in
.server_name
) {
2727 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2728 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
2729 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
2730 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
2731 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
2732 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
));
2734 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
2735 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
));
2736 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
2738 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2739 NDR_PULL_ALLOC(ndr
, r
->in
.level
);
2741 _mem_save_level_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2742 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.level
, LIBNDR_FLAG_REF_ALLOC
);
2743 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
2744 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_0
, LIBNDR_FLAG_REF_ALLOC
);
2745 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2746 NDR_PULL_ALLOC(ndr
, r
->in
.ctr
);
2748 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2749 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
2750 if (r
->in
.level
== NULL
) return NT_STATUS_INVALID_PARAMETER_MIX
;
2751 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.ctr
, *r
->in
.level
));
2752 NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.ctr
));
2753 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
2754 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_buffer
));
2755 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2756 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
2758 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2759 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
2760 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
2761 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2762 NDR_PULL_ALLOC(ndr
, r
->out
.level
);
2763 *r
->out
.level
= *r
->in
.level
;
2764 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
2765 *r
->out
.ctr
= *r
->in
.ctr
;
2766 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
2767 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
2769 if (flags
& NDR_OUT
) {
2770 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2771 NDR_PULL_ALLOC(ndr
, r
->out
.level
);
2773 _mem_save_level_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2774 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.level
, LIBNDR_FLAG_REF_ALLOC
);
2775 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.level
));
2776 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level_0
, LIBNDR_FLAG_REF_ALLOC
);
2777 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2778 NDR_PULL_ALLOC(ndr
, r
->out
.ctr
);
2780 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2781 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ctr
, LIBNDR_FLAG_REF_ALLOC
);
2782 if (r
->out
.level
== NULL
) return NT_STATUS_INVALID_PARAMETER_MIX
;
2783 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level
));
2784 NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.ctr
));
2785 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
2786 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_totalentries
));
2787 if (_ptr_totalentries
) {
2788 NDR_PULL_ALLOC(ndr
, r
->out
.totalentries
);
2790 r
->out
.totalentries
= NULL
;
2792 if (r
->out
.totalentries
) {
2793 _mem_save_totalentries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2794 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.totalentries
, 0);
2795 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.totalentries
));
2796 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_totalentries_0
, 0);
2798 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2799 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
2801 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2802 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
2803 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
2804 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2805 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2807 return NT_STATUS_OK
;
2810 _PUBLIC_
void ndr_print_wkssvc_NetWkstaTransportEnum(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetWkstaTransportEnum
*r
)
2812 ndr_print_struct(ndr
, name
, "wkssvc_NetWkstaTransportEnum");
2814 if (flags
& NDR_SET_VALUES
) {
2815 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2817 if (flags
& NDR_IN
) {
2818 ndr_print_struct(ndr
, "in", "wkssvc_NetWkstaTransportEnum");
2820 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
2822 if (r
->in
.server_name
) {
2823 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
2826 ndr_print_ptr(ndr
, "level", r
->in
.level
);
2828 ndr_print_uint32(ndr
, "level", *r
->in
.level
);
2830 ndr_print_ptr(ndr
, "ctr", r
->in
.ctr
);
2832 if (r
->in
.level
== NULL
) return;
2833 ndr_print_set_switch_value(ndr
, r
->in
.ctr
, *r
->in
.level
);
2834 ndr_print_wkssvc_NetWkstaTransportCtr(ndr
, "ctr", r
->in
.ctr
);
2836 ndr_print_uint32(ndr
, "max_buffer", r
->in
.max_buffer
);
2837 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
2839 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
2843 if (flags
& NDR_OUT
) {
2844 ndr_print_struct(ndr
, "out", "wkssvc_NetWkstaTransportEnum");
2846 ndr_print_ptr(ndr
, "level", r
->out
.level
);
2848 ndr_print_uint32(ndr
, "level", *r
->out
.level
);
2850 ndr_print_ptr(ndr
, "ctr", r
->out
.ctr
);
2852 if (r
->out
.level
== NULL
) return;
2853 ndr_print_set_switch_value(ndr
, r
->out
.ctr
, *r
->out
.level
);
2854 ndr_print_wkssvc_NetWkstaTransportCtr(ndr
, "ctr", r
->out
.ctr
);
2856 ndr_print_ptr(ndr
, "totalentries", r
->out
.totalentries
);
2858 if (r
->out
.totalentries
) {
2859 ndr_print_uint32(ndr
, "totalentries", *r
->out
.totalentries
);
2862 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
2864 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
2866 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2872 NTSTATUS
ndr_push_WKSSVC_NETRWKSTATRANSPORTADD(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRWKSTATRANSPORTADD
*r
)
2874 if (flags
& NDR_IN
) {
2876 if (flags
& NDR_OUT
) {
2877 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2879 return NT_STATUS_OK
;
2882 NTSTATUS
ndr_pull_WKSSVC_NETRWKSTATRANSPORTADD(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRWKSTATRANSPORTADD
*r
)
2884 if (flags
& NDR_IN
) {
2886 if (flags
& NDR_OUT
) {
2887 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2889 return NT_STATUS_OK
;
2892 _PUBLIC_
void ndr_print_WKSSVC_NETRWKSTATRANSPORTADD(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRWKSTATRANSPORTADD
*r
)
2894 ndr_print_struct(ndr
, name
, "WKSSVC_NETRWKSTATRANSPORTADD");
2896 if (flags
& NDR_SET_VALUES
) {
2897 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2899 if (flags
& NDR_IN
) {
2900 ndr_print_struct(ndr
, "in", "WKSSVC_NETRWKSTATRANSPORTADD");
2904 if (flags
& NDR_OUT
) {
2905 ndr_print_struct(ndr
, "out", "WKSSVC_NETRWKSTATRANSPORTADD");
2907 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2913 NTSTATUS
ndr_push_WKSSVC_NETRWKSTATRANSPORTDEL(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRWKSTATRANSPORTDEL
*r
)
2915 if (flags
& NDR_IN
) {
2917 if (flags
& NDR_OUT
) {
2918 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2920 return NT_STATUS_OK
;
2923 NTSTATUS
ndr_pull_WKSSVC_NETRWKSTATRANSPORTDEL(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRWKSTATRANSPORTDEL
*r
)
2925 if (flags
& NDR_IN
) {
2927 if (flags
& NDR_OUT
) {
2928 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2930 return NT_STATUS_OK
;
2933 _PUBLIC_
void ndr_print_WKSSVC_NETRWKSTATRANSPORTDEL(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRWKSTATRANSPORTDEL
*r
)
2935 ndr_print_struct(ndr
, name
, "WKSSVC_NETRWKSTATRANSPORTDEL");
2937 if (flags
& NDR_SET_VALUES
) {
2938 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2940 if (flags
& NDR_IN
) {
2941 ndr_print_struct(ndr
, "in", "WKSSVC_NETRWKSTATRANSPORTDEL");
2945 if (flags
& NDR_OUT
) {
2946 ndr_print_struct(ndr
, "out", "WKSSVC_NETRWKSTATRANSPORTDEL");
2948 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2954 NTSTATUS
ndr_push_WKSSVC_NETRUSEADD(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRUSEADD
*r
)
2956 if (flags
& NDR_IN
) {
2958 if (flags
& NDR_OUT
) {
2959 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2961 return NT_STATUS_OK
;
2964 NTSTATUS
ndr_pull_WKSSVC_NETRUSEADD(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRUSEADD
*r
)
2966 if (flags
& NDR_IN
) {
2968 if (flags
& NDR_OUT
) {
2969 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2971 return NT_STATUS_OK
;
2974 _PUBLIC_
void ndr_print_WKSSVC_NETRUSEADD(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRUSEADD
*r
)
2976 ndr_print_struct(ndr
, name
, "WKSSVC_NETRUSEADD");
2978 if (flags
& NDR_SET_VALUES
) {
2979 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2981 if (flags
& NDR_IN
) {
2982 ndr_print_struct(ndr
, "in", "WKSSVC_NETRUSEADD");
2986 if (flags
& NDR_OUT
) {
2987 ndr_print_struct(ndr
, "out", "WKSSVC_NETRUSEADD");
2989 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2995 NTSTATUS
ndr_push_WKSSVC_NETRUSEGETINFO(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRUSEGETINFO
*r
)
2997 if (flags
& NDR_IN
) {
2999 if (flags
& NDR_OUT
) {
3000 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3002 return NT_STATUS_OK
;
3005 NTSTATUS
ndr_pull_WKSSVC_NETRUSEGETINFO(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRUSEGETINFO
*r
)
3007 if (flags
& NDR_IN
) {
3009 if (flags
& NDR_OUT
) {
3010 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3012 return NT_STATUS_OK
;
3015 _PUBLIC_
void ndr_print_WKSSVC_NETRUSEGETINFO(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRUSEGETINFO
*r
)
3017 ndr_print_struct(ndr
, name
, "WKSSVC_NETRUSEGETINFO");
3019 if (flags
& NDR_SET_VALUES
) {
3020 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3022 if (flags
& NDR_IN
) {
3023 ndr_print_struct(ndr
, "in", "WKSSVC_NETRUSEGETINFO");
3027 if (flags
& NDR_OUT
) {
3028 ndr_print_struct(ndr
, "out", "WKSSVC_NETRUSEGETINFO");
3030 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3036 NTSTATUS
ndr_push_WKSSVC_NETRUSEDEL(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRUSEDEL
*r
)
3038 if (flags
& NDR_IN
) {
3040 if (flags
& NDR_OUT
) {
3041 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3043 return NT_STATUS_OK
;
3046 NTSTATUS
ndr_pull_WKSSVC_NETRUSEDEL(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRUSEDEL
*r
)
3048 if (flags
& NDR_IN
) {
3050 if (flags
& NDR_OUT
) {
3051 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3053 return NT_STATUS_OK
;
3056 _PUBLIC_
void ndr_print_WKSSVC_NETRUSEDEL(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRUSEDEL
*r
)
3058 ndr_print_struct(ndr
, name
, "WKSSVC_NETRUSEDEL");
3060 if (flags
& NDR_SET_VALUES
) {
3061 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3063 if (flags
& NDR_IN
) {
3064 ndr_print_struct(ndr
, "in", "WKSSVC_NETRUSEDEL");
3068 if (flags
& NDR_OUT
) {
3069 ndr_print_struct(ndr
, "out", "WKSSVC_NETRUSEDEL");
3071 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3077 NTSTATUS
ndr_push_WKSSVC_NETRUSEENUM(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRUSEENUM
*r
)
3079 if (flags
& NDR_IN
) {
3081 if (flags
& NDR_OUT
) {
3082 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3084 return NT_STATUS_OK
;
3087 NTSTATUS
ndr_pull_WKSSVC_NETRUSEENUM(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRUSEENUM
*r
)
3089 if (flags
& NDR_IN
) {
3091 if (flags
& NDR_OUT
) {
3092 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3094 return NT_STATUS_OK
;
3097 _PUBLIC_
void ndr_print_WKSSVC_NETRUSEENUM(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRUSEENUM
*r
)
3099 ndr_print_struct(ndr
, name
, "WKSSVC_NETRUSEENUM");
3101 if (flags
& NDR_SET_VALUES
) {
3102 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3104 if (flags
& NDR_IN
) {
3105 ndr_print_struct(ndr
, "in", "WKSSVC_NETRUSEENUM");
3109 if (flags
& NDR_OUT
) {
3110 ndr_print_struct(ndr
, "out", "WKSSVC_NETRUSEENUM");
3112 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3118 NTSTATUS
ndr_push_WKSSVC_NETRMESSAGEBUFFERSEND(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRMESSAGEBUFFERSEND
*r
)
3120 if (flags
& NDR_IN
) {
3122 if (flags
& NDR_OUT
) {
3123 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3125 return NT_STATUS_OK
;
3128 NTSTATUS
ndr_pull_WKSSVC_NETRMESSAGEBUFFERSEND(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRMESSAGEBUFFERSEND
*r
)
3130 if (flags
& NDR_IN
) {
3132 if (flags
& NDR_OUT
) {
3133 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3135 return NT_STATUS_OK
;
3138 _PUBLIC_
void ndr_print_WKSSVC_NETRMESSAGEBUFFERSEND(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRMESSAGEBUFFERSEND
*r
)
3140 ndr_print_struct(ndr
, name
, "WKSSVC_NETRMESSAGEBUFFERSEND");
3142 if (flags
& NDR_SET_VALUES
) {
3143 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3145 if (flags
& NDR_IN
) {
3146 ndr_print_struct(ndr
, "in", "WKSSVC_NETRMESSAGEBUFFERSEND");
3150 if (flags
& NDR_OUT
) {
3151 ndr_print_struct(ndr
, "out", "WKSSVC_NETRMESSAGEBUFFERSEND");
3153 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3159 NTSTATUS
ndr_push_WKSSVC_NETRWORKSTATIONSTATISTICSGET(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRWORKSTATIONSTATISTICSGET
*r
)
3161 if (flags
& NDR_IN
) {
3163 if (flags
& NDR_OUT
) {
3164 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3166 return NT_STATUS_OK
;
3169 NTSTATUS
ndr_pull_WKSSVC_NETRWORKSTATIONSTATISTICSGET(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRWORKSTATIONSTATISTICSGET
*r
)
3171 if (flags
& NDR_IN
) {
3173 if (flags
& NDR_OUT
) {
3174 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3176 return NT_STATUS_OK
;
3179 _PUBLIC_
void ndr_print_WKSSVC_NETRWORKSTATIONSTATISTICSGET(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRWORKSTATIONSTATISTICSGET
*r
)
3181 ndr_print_struct(ndr
, name
, "WKSSVC_NETRWORKSTATIONSTATISTICSGET");
3183 if (flags
& NDR_SET_VALUES
) {
3184 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3186 if (flags
& NDR_IN
) {
3187 ndr_print_struct(ndr
, "in", "WKSSVC_NETRWORKSTATIONSTATISTICSGET");
3191 if (flags
& NDR_OUT
) {
3192 ndr_print_struct(ndr
, "out", "WKSSVC_NETRWORKSTATIONSTATISTICSGET");
3194 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3200 NTSTATUS
ndr_push_WKSSVC_NETRLOGONDOMAINNAMEADD(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRLOGONDOMAINNAMEADD
*r
)
3202 if (flags
& NDR_IN
) {
3204 if (flags
& NDR_OUT
) {
3205 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3207 return NT_STATUS_OK
;
3210 NTSTATUS
ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEADD(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRLOGONDOMAINNAMEADD
*r
)
3212 if (flags
& NDR_IN
) {
3214 if (flags
& NDR_OUT
) {
3215 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3217 return NT_STATUS_OK
;
3220 _PUBLIC_
void ndr_print_WKSSVC_NETRLOGONDOMAINNAMEADD(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRLOGONDOMAINNAMEADD
*r
)
3222 ndr_print_struct(ndr
, name
, "WKSSVC_NETRLOGONDOMAINNAMEADD");
3224 if (flags
& NDR_SET_VALUES
) {
3225 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3227 if (flags
& NDR_IN
) {
3228 ndr_print_struct(ndr
, "in", "WKSSVC_NETRLOGONDOMAINNAMEADD");
3232 if (flags
& NDR_OUT
) {
3233 ndr_print_struct(ndr
, "out", "WKSSVC_NETRLOGONDOMAINNAMEADD");
3235 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3241 NTSTATUS
ndr_push_WKSSVC_NETRLOGONDOMAINNAMEDEL(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRLOGONDOMAINNAMEDEL
*r
)
3243 if (flags
& NDR_IN
) {
3245 if (flags
& NDR_OUT
) {
3246 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3248 return NT_STATUS_OK
;
3251 NTSTATUS
ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEDEL(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRLOGONDOMAINNAMEDEL
*r
)
3253 if (flags
& NDR_IN
) {
3255 if (flags
& NDR_OUT
) {
3256 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3258 return NT_STATUS_OK
;
3261 _PUBLIC_
void ndr_print_WKSSVC_NETRLOGONDOMAINNAMEDEL(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRLOGONDOMAINNAMEDEL
*r
)
3263 ndr_print_struct(ndr
, name
, "WKSSVC_NETRLOGONDOMAINNAMEDEL");
3265 if (flags
& NDR_SET_VALUES
) {
3266 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3268 if (flags
& NDR_IN
) {
3269 ndr_print_struct(ndr
, "in", "WKSSVC_NETRLOGONDOMAINNAMEDEL");
3273 if (flags
& NDR_OUT
) {
3274 ndr_print_struct(ndr
, "out", "WKSSVC_NETRLOGONDOMAINNAMEDEL");
3276 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3282 NTSTATUS
ndr_push_WKSSVC_NETRJOINDOMAIN(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRJOINDOMAIN
*r
)
3284 if (flags
& NDR_IN
) {
3286 if (flags
& NDR_OUT
) {
3287 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3289 return NT_STATUS_OK
;
3292 NTSTATUS
ndr_pull_WKSSVC_NETRJOINDOMAIN(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRJOINDOMAIN
*r
)
3294 if (flags
& NDR_IN
) {
3296 if (flags
& NDR_OUT
) {
3297 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3299 return NT_STATUS_OK
;
3302 _PUBLIC_
void ndr_print_WKSSVC_NETRJOINDOMAIN(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRJOINDOMAIN
*r
)
3304 ndr_print_struct(ndr
, name
, "WKSSVC_NETRJOINDOMAIN");
3306 if (flags
& NDR_SET_VALUES
) {
3307 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3309 if (flags
& NDR_IN
) {
3310 ndr_print_struct(ndr
, "in", "WKSSVC_NETRJOINDOMAIN");
3314 if (flags
& NDR_OUT
) {
3315 ndr_print_struct(ndr
, "out", "WKSSVC_NETRJOINDOMAIN");
3317 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3323 NTSTATUS
ndr_push_WKSSVC_NETRUNJOINDOMAIN(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRUNJOINDOMAIN
*r
)
3325 if (flags
& NDR_IN
) {
3327 if (flags
& NDR_OUT
) {
3328 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3330 return NT_STATUS_OK
;
3333 NTSTATUS
ndr_pull_WKSSVC_NETRUNJOINDOMAIN(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRUNJOINDOMAIN
*r
)
3335 if (flags
& NDR_IN
) {
3337 if (flags
& NDR_OUT
) {
3338 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3340 return NT_STATUS_OK
;
3343 _PUBLIC_
void ndr_print_WKSSVC_NETRUNJOINDOMAIN(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRUNJOINDOMAIN
*r
)
3345 ndr_print_struct(ndr
, name
, "WKSSVC_NETRUNJOINDOMAIN");
3347 if (flags
& NDR_SET_VALUES
) {
3348 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3350 if (flags
& NDR_IN
) {
3351 ndr_print_struct(ndr
, "in", "WKSSVC_NETRUNJOINDOMAIN");
3355 if (flags
& NDR_OUT
) {
3356 ndr_print_struct(ndr
, "out", "WKSSVC_NETRUNJOINDOMAIN");
3358 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3364 NTSTATUS
ndr_push_WKSSVC_NETRRENAMEMACHINEINDOMAIN(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRRENAMEMACHINEINDOMAIN
*r
)
3366 if (flags
& NDR_IN
) {
3368 if (flags
& NDR_OUT
) {
3369 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3371 return NT_STATUS_OK
;
3374 NTSTATUS
ndr_pull_WKSSVC_NETRRENAMEMACHINEINDOMAIN(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRRENAMEMACHINEINDOMAIN
*r
)
3376 if (flags
& NDR_IN
) {
3378 if (flags
& NDR_OUT
) {
3379 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3381 return NT_STATUS_OK
;
3384 _PUBLIC_
void ndr_print_WKSSVC_NETRRENAMEMACHINEINDOMAIN(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRRENAMEMACHINEINDOMAIN
*r
)
3386 ndr_print_struct(ndr
, name
, "WKSSVC_NETRRENAMEMACHINEINDOMAIN");
3388 if (flags
& NDR_SET_VALUES
) {
3389 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3391 if (flags
& NDR_IN
) {
3392 ndr_print_struct(ndr
, "in", "WKSSVC_NETRRENAMEMACHINEINDOMAIN");
3396 if (flags
& NDR_OUT
) {
3397 ndr_print_struct(ndr
, "out", "WKSSVC_NETRRENAMEMACHINEINDOMAIN");
3399 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3405 NTSTATUS
ndr_push_WKSSVC_NETRVALIDATENAME(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRVALIDATENAME
*r
)
3407 if (flags
& NDR_IN
) {
3409 if (flags
& NDR_OUT
) {
3410 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3412 return NT_STATUS_OK
;
3415 NTSTATUS
ndr_pull_WKSSVC_NETRVALIDATENAME(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRVALIDATENAME
*r
)
3417 if (flags
& NDR_IN
) {
3419 if (flags
& NDR_OUT
) {
3420 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3422 return NT_STATUS_OK
;
3425 _PUBLIC_
void ndr_print_WKSSVC_NETRVALIDATENAME(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRVALIDATENAME
*r
)
3427 ndr_print_struct(ndr
, name
, "WKSSVC_NETRVALIDATENAME");
3429 if (flags
& NDR_SET_VALUES
) {
3430 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3432 if (flags
& NDR_IN
) {
3433 ndr_print_struct(ndr
, "in", "WKSSVC_NETRVALIDATENAME");
3437 if (flags
& NDR_OUT
) {
3438 ndr_print_struct(ndr
, "out", "WKSSVC_NETRVALIDATENAME");
3440 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3446 NTSTATUS
ndr_push_WKSSVC_NETRGETJOININFORMATION(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRGETJOININFORMATION
*r
)
3448 if (flags
& NDR_IN
) {
3450 if (flags
& NDR_OUT
) {
3451 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3453 return NT_STATUS_OK
;
3456 NTSTATUS
ndr_pull_WKSSVC_NETRGETJOININFORMATION(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRGETJOININFORMATION
*r
)
3458 if (flags
& NDR_IN
) {
3460 if (flags
& NDR_OUT
) {
3461 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3463 return NT_STATUS_OK
;
3466 _PUBLIC_
void ndr_print_WKSSVC_NETRGETJOININFORMATION(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRGETJOININFORMATION
*r
)
3468 ndr_print_struct(ndr
, name
, "WKSSVC_NETRGETJOININFORMATION");
3470 if (flags
& NDR_SET_VALUES
) {
3471 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3473 if (flags
& NDR_IN
) {
3474 ndr_print_struct(ndr
, "in", "WKSSVC_NETRGETJOININFORMATION");
3478 if (flags
& NDR_OUT
) {
3479 ndr_print_struct(ndr
, "out", "WKSSVC_NETRGETJOININFORMATION");
3481 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3487 NTSTATUS
ndr_push_WKSSVC_NETRGETJOINABLEOUS(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRGETJOINABLEOUS
*r
)
3489 if (flags
& NDR_IN
) {
3491 if (flags
& NDR_OUT
) {
3492 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3494 return NT_STATUS_OK
;
3497 NTSTATUS
ndr_pull_WKSSVC_NETRGETJOINABLEOUS(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRGETJOINABLEOUS
*r
)
3499 if (flags
& NDR_IN
) {
3501 if (flags
& NDR_OUT
) {
3502 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3504 return NT_STATUS_OK
;
3507 _PUBLIC_
void ndr_print_WKSSVC_NETRGETJOINABLEOUS(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRGETJOINABLEOUS
*r
)
3509 ndr_print_struct(ndr
, name
, "WKSSVC_NETRGETJOINABLEOUS");
3511 if (flags
& NDR_SET_VALUES
) {
3512 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3514 if (flags
& NDR_IN
) {
3515 ndr_print_struct(ndr
, "in", "WKSSVC_NETRGETJOINABLEOUS");
3519 if (flags
& NDR_OUT
) {
3520 ndr_print_struct(ndr
, "out", "WKSSVC_NETRGETJOINABLEOUS");
3522 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3528 NTSTATUS
ndr_push_wkssvc_NetrJoinDomain2(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrJoinDomain2
*r
)
3530 if (flags
& NDR_IN
) {
3531 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
3532 if (r
->in
.server_name
) {
3533 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
3534 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3535 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
3536 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
));
3538 if (r
->in
.domain_name
== NULL
) return NT_STATUS_INVALID_PARAMETER_MIX
;
3539 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
3540 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3541 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.domain_name
, CH_UTF16
)));
3542 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
));
3543 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.account_name
));
3544 if (r
->in
.account_name
) {
3545 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
3546 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3547 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
)));
3548 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.account_name
, ndr_charset_length(r
->in
.account_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3550 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.admin_account
));
3551 if (r
->in
.admin_account
) {
3552 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.admin_account
, CH_UTF16
)));
3553 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3554 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.admin_account
, CH_UTF16
)));
3555 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
));
3557 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.encrypted_password
));
3558 if (r
->in
.encrypted_password
) {
3559 NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.encrypted_password
));
3561 NDR_CHECK(ndr_push_wkssvc_joinflags(ndr
, NDR_SCALARS
, r
->in
.join_flags
));
3563 if (flags
& NDR_OUT
) {
3564 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3566 return NT_STATUS_OK
;
3569 NTSTATUS
ndr_pull_wkssvc_NetrJoinDomain2(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrJoinDomain2
*r
)
3571 uint32_t _ptr_server_name
;
3572 uint32_t _ptr_account_name
;
3573 uint32_t _ptr_admin_account
;
3574 uint32_t _ptr_encrypted_password
;
3575 TALLOC_CTX
*_mem_save_server_name_0
;
3576 TALLOC_CTX
*_mem_save_account_name_0
;
3577 TALLOC_CTX
*_mem_save_admin_account_0
;
3578 TALLOC_CTX
*_mem_save_encrypted_password_0
;
3579 if (flags
& NDR_IN
) {
3580 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
3581 if (_ptr_server_name
) {
3582 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
3584 r
->in
.server_name
= NULL
;
3586 if (r
->in
.server_name
) {
3587 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3588 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
3589 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
3590 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
3591 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
3592 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
));
3594 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
3595 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
));
3596 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
3598 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.domain_name
));
3599 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.domain_name
));
3600 if (ndr_get_array_length(ndr
, &r
->in
.domain_name
) > ndr_get_array_size(ndr
, &r
->in
.domain_name
)) {
3601 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
));
3603 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.domain_name
), sizeof(uint16_t)));
3604 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
));
3605 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_account_name
));
3606 if (_ptr_account_name
) {
3607 NDR_PULL_ALLOC(ndr
, r
->in
.account_name
);
3609 r
->in
.account_name
= NULL
;
3611 if (r
->in
.account_name
) {
3612 _mem_save_account_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3613 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.account_name
, 0);
3614 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.account_name
));
3615 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.account_name
));
3616 if (ndr_get_array_length(ndr
, &r
->in
.account_name
) > ndr_get_array_size(ndr
, &r
->in
.account_name
)) {
3617 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_name
), ndr_get_array_length(ndr
, &r
->in
.account_name
));
3619 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t)));
3620 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.account_name
, ndr_get_array_length(ndr
, &r
->in
.account_name
), sizeof(uint16_t), CH_UTF16
));
3621 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_0
, 0);
3623 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_admin_account
));
3624 if (_ptr_admin_account
) {
3625 NDR_PULL_ALLOC(ndr
, r
->in
.admin_account
);
3627 r
->in
.admin_account
= NULL
;
3629 if (r
->in
.admin_account
) {
3630 _mem_save_admin_account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3631 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.admin_account
, 0);
3632 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.admin_account
));
3633 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.admin_account
));
3634 if (ndr_get_array_length(ndr
, &r
->in
.admin_account
) > ndr_get_array_size(ndr
, &r
->in
.admin_account
)) {
3635 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
));
3637 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.admin_account
), sizeof(uint16_t)));
3638 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
));
3639 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_admin_account_0
, 0);
3641 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_encrypted_password
));
3642 if (_ptr_encrypted_password
) {
3643 NDR_PULL_ALLOC(ndr
, r
->in
.encrypted_password
);
3645 r
->in
.encrypted_password
= NULL
;
3647 if (r
->in
.encrypted_password
) {
3648 _mem_save_encrypted_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3649 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.encrypted_password
, 0);
3650 NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.encrypted_password
));
3651 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_encrypted_password_0
, 0);
3653 NDR_CHECK(ndr_pull_wkssvc_joinflags(ndr
, NDR_SCALARS
, &r
->in
.join_flags
));
3655 if (flags
& NDR_OUT
) {
3656 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3658 return NT_STATUS_OK
;
3661 _PUBLIC_
void ndr_print_wkssvc_NetrJoinDomain2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrJoinDomain2
*r
)
3663 ndr_print_struct(ndr
, name
, "wkssvc_NetrJoinDomain2");
3665 if (flags
& NDR_SET_VALUES
) {
3666 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3668 if (flags
& NDR_IN
) {
3669 ndr_print_struct(ndr
, "in", "wkssvc_NetrJoinDomain2");
3671 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
3673 if (r
->in
.server_name
) {
3674 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
3677 ndr_print_ptr(ndr
, "domain_name", r
->in
.domain_name
);
3679 ndr_print_string(ndr
, "domain_name", r
->in
.domain_name
);
3681 ndr_print_ptr(ndr
, "account_name", r
->in
.account_name
);
3683 if (r
->in
.account_name
) {
3684 ndr_print_string(ndr
, "account_name", r
->in
.account_name
);
3687 ndr_print_ptr(ndr
, "admin_account", r
->in
.admin_account
);
3689 if (r
->in
.admin_account
) {
3690 ndr_print_string(ndr
, "admin_account", r
->in
.admin_account
);
3693 ndr_print_ptr(ndr
, "encrypted_password", r
->in
.encrypted_password
);
3695 if (r
->in
.encrypted_password
) {
3696 ndr_print_wkssvc_PasswordBuffer(ndr
, "encrypted_password", r
->in
.encrypted_password
);
3699 ndr_print_wkssvc_joinflags(ndr
, "join_flags", r
->in
.join_flags
);
3702 if (flags
& NDR_OUT
) {
3703 ndr_print_struct(ndr
, "out", "wkssvc_NetrJoinDomain2");
3705 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3711 NTSTATUS
ndr_push_wkssvc_NetrUnjoinDomain2(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrUnjoinDomain2
*r
)
3713 if (flags
& NDR_IN
) {
3714 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
3715 if (r
->in
.server_name
) {
3716 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
3717 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3718 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
3719 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
));
3721 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.account
));
3722 if (r
->in
.account
) {
3723 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account
, CH_UTF16
)));
3724 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3725 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.account
, CH_UTF16
)));
3726 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.account
, ndr_charset_length(r
->in
.account
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3728 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.encrypted_password
));
3729 if (r
->in
.encrypted_password
) {
3730 NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.encrypted_password
));
3732 NDR_CHECK(ndr_push_wkssvc_joinflags(ndr
, NDR_SCALARS
, r
->in
.unjoin_flags
));
3734 if (flags
& NDR_OUT
) {
3735 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3737 return NT_STATUS_OK
;
3740 NTSTATUS
ndr_pull_wkssvc_NetrUnjoinDomain2(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrUnjoinDomain2
*r
)
3742 uint32_t _ptr_server_name
;
3743 uint32_t _ptr_account
;
3744 uint32_t _ptr_encrypted_password
;
3745 TALLOC_CTX
*_mem_save_server_name_0
;
3746 TALLOC_CTX
*_mem_save_account_0
;
3747 TALLOC_CTX
*_mem_save_encrypted_password_0
;
3748 if (flags
& NDR_IN
) {
3749 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
3750 if (_ptr_server_name
) {
3751 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
3753 r
->in
.server_name
= NULL
;
3755 if (r
->in
.server_name
) {
3756 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3757 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
3758 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
3759 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
3760 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
3761 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
));
3763 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
3764 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
));
3765 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
3767 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_account
));
3769 NDR_PULL_ALLOC(ndr
, r
->in
.account
);
3771 r
->in
.account
= NULL
;
3773 if (r
->in
.account
) {
3774 _mem_save_account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3775 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.account
, 0);
3776 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.account
));
3777 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.account
));
3778 if (ndr_get_array_length(ndr
, &r
->in
.account
) > ndr_get_array_size(ndr
, &r
->in
.account
)) {
3779 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
));
3781 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.account
), sizeof(uint16_t)));
3782 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.account
, ndr_get_array_length(ndr
, &r
->in
.account
), sizeof(uint16_t), CH_UTF16
));
3783 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_0
, 0);
3785 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_encrypted_password
));
3786 if (_ptr_encrypted_password
) {
3787 NDR_PULL_ALLOC(ndr
, r
->in
.encrypted_password
);
3789 r
->in
.encrypted_password
= NULL
;
3791 if (r
->in
.encrypted_password
) {
3792 _mem_save_encrypted_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3793 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.encrypted_password
, 0);
3794 NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.encrypted_password
));
3795 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_encrypted_password_0
, 0);
3797 NDR_CHECK(ndr_pull_wkssvc_joinflags(ndr
, NDR_SCALARS
, &r
->in
.unjoin_flags
));
3799 if (flags
& NDR_OUT
) {
3800 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3802 return NT_STATUS_OK
;
3805 _PUBLIC_
void ndr_print_wkssvc_NetrUnjoinDomain2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrUnjoinDomain2
*r
)
3807 ndr_print_struct(ndr
, name
, "wkssvc_NetrUnjoinDomain2");
3809 if (flags
& NDR_SET_VALUES
) {
3810 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3812 if (flags
& NDR_IN
) {
3813 ndr_print_struct(ndr
, "in", "wkssvc_NetrUnjoinDomain2");
3815 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
3817 if (r
->in
.server_name
) {
3818 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
3821 ndr_print_ptr(ndr
, "account", r
->in
.account
);
3823 if (r
->in
.account
) {
3824 ndr_print_string(ndr
, "account", r
->in
.account
);
3827 ndr_print_ptr(ndr
, "encrypted_password", r
->in
.encrypted_password
);
3829 if (r
->in
.encrypted_password
) {
3830 ndr_print_wkssvc_PasswordBuffer(ndr
, "encrypted_password", r
->in
.encrypted_password
);
3833 ndr_print_wkssvc_joinflags(ndr
, "unjoin_flags", r
->in
.unjoin_flags
);
3836 if (flags
& NDR_OUT
) {
3837 ndr_print_struct(ndr
, "out", "wkssvc_NetrUnjoinDomain2");
3839 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3845 NTSTATUS
ndr_push_wkssvc_NetrRenameMachineInDomain2(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrRenameMachineInDomain2
*r
)
3847 if (flags
& NDR_IN
) {
3848 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
3849 if (r
->in
.server_name
) {
3850 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
3851 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3852 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
3853 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
));
3855 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.NewMachineName
));
3856 if (r
->in
.NewMachineName
) {
3857 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.NewMachineName
, CH_UTF16
)));
3858 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3859 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.NewMachineName
, CH_UTF16
)));
3860 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.NewMachineName
, ndr_charset_length(r
->in
.NewMachineName
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3862 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.Account
));
3863 if (r
->in
.Account
) {
3864 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
3865 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3866 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
3867 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.Account
, ndr_charset_length(r
->in
.Account
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3869 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.EncryptedPassword
));
3870 if (r
->in
.EncryptedPassword
) {
3871 NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.EncryptedPassword
));
3873 NDR_CHECK(ndr_push_wkssvc_renameflags(ndr
, NDR_SCALARS
, r
->in
.RenameOptions
));
3875 if (flags
& NDR_OUT
) {
3876 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3878 return NT_STATUS_OK
;
3881 NTSTATUS
ndr_pull_wkssvc_NetrRenameMachineInDomain2(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrRenameMachineInDomain2
*r
)
3883 uint32_t _ptr_server_name
;
3884 uint32_t _ptr_NewMachineName
;
3885 uint32_t _ptr_Account
;
3886 uint32_t _ptr_EncryptedPassword
;
3887 TALLOC_CTX
*_mem_save_server_name_0
;
3888 TALLOC_CTX
*_mem_save_NewMachineName_0
;
3889 TALLOC_CTX
*_mem_save_Account_0
;
3890 TALLOC_CTX
*_mem_save_EncryptedPassword_0
;
3891 if (flags
& NDR_IN
) {
3892 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
3893 if (_ptr_server_name
) {
3894 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
3896 r
->in
.server_name
= NULL
;
3898 if (r
->in
.server_name
) {
3899 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3900 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
3901 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
3902 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
3903 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
3904 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
));
3906 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
3907 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
));
3908 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
3910 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_NewMachineName
));
3911 if (_ptr_NewMachineName
) {
3912 NDR_PULL_ALLOC(ndr
, r
->in
.NewMachineName
);
3914 r
->in
.NewMachineName
= NULL
;
3916 if (r
->in
.NewMachineName
) {
3917 _mem_save_NewMachineName_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3918 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.NewMachineName
, 0);
3919 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.NewMachineName
));
3920 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.NewMachineName
));
3921 if (ndr_get_array_length(ndr
, &r
->in
.NewMachineName
) > ndr_get_array_size(ndr
, &r
->in
.NewMachineName
)) {
3922 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
));
3924 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.NewMachineName
), sizeof(uint16_t)));
3925 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.NewMachineName
, ndr_get_array_length(ndr
, &r
->in
.NewMachineName
), sizeof(uint16_t), CH_UTF16
));
3926 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_NewMachineName_0
, 0);
3928 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_Account
));
3930 NDR_PULL_ALLOC(ndr
, r
->in
.Account
);
3932 r
->in
.Account
= NULL
;
3934 if (r
->in
.Account
) {
3935 _mem_save_Account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3936 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.Account
, 0);
3937 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.Account
));
3938 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.Account
));
3939 if (ndr_get_array_length(ndr
, &r
->in
.Account
) > ndr_get_array_size(ndr
, &r
->in
.Account
)) {
3940 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
));
3942 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t)));
3943 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.Account
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t), CH_UTF16
));
3944 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Account_0
, 0);
3946 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_EncryptedPassword
));
3947 if (_ptr_EncryptedPassword
) {
3948 NDR_PULL_ALLOC(ndr
, r
->in
.EncryptedPassword
);
3950 r
->in
.EncryptedPassword
= NULL
;
3952 if (r
->in
.EncryptedPassword
) {
3953 _mem_save_EncryptedPassword_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3954 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.EncryptedPassword
, 0);
3955 NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.EncryptedPassword
));
3956 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_EncryptedPassword_0
, 0);
3958 NDR_CHECK(ndr_pull_wkssvc_renameflags(ndr
, NDR_SCALARS
, &r
->in
.RenameOptions
));
3960 if (flags
& NDR_OUT
) {
3961 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3963 return NT_STATUS_OK
;
3966 _PUBLIC_
void ndr_print_wkssvc_NetrRenameMachineInDomain2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrRenameMachineInDomain2
*r
)
3968 ndr_print_struct(ndr
, name
, "wkssvc_NetrRenameMachineInDomain2");
3970 if (flags
& NDR_SET_VALUES
) {
3971 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3973 if (flags
& NDR_IN
) {
3974 ndr_print_struct(ndr
, "in", "wkssvc_NetrRenameMachineInDomain2");
3976 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
3978 if (r
->in
.server_name
) {
3979 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
3982 ndr_print_ptr(ndr
, "NewMachineName", r
->in
.NewMachineName
);
3984 if (r
->in
.NewMachineName
) {
3985 ndr_print_string(ndr
, "NewMachineName", r
->in
.NewMachineName
);
3988 ndr_print_ptr(ndr
, "Account", r
->in
.Account
);
3990 if (r
->in
.Account
) {
3991 ndr_print_string(ndr
, "Account", r
->in
.Account
);
3994 ndr_print_ptr(ndr
, "EncryptedPassword", r
->in
.EncryptedPassword
);
3996 if (r
->in
.EncryptedPassword
) {
3997 ndr_print_wkssvc_PasswordBuffer(ndr
, "EncryptedPassword", r
->in
.EncryptedPassword
);
4000 ndr_print_wkssvc_renameflags(ndr
, "RenameOptions", r
->in
.RenameOptions
);
4003 if (flags
& NDR_OUT
) {
4004 ndr_print_struct(ndr
, "out", "wkssvc_NetrRenameMachineInDomain2");
4006 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4012 NTSTATUS
ndr_push_WKSSVC_NETRVALIDATENAME2(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRVALIDATENAME2
*r
)
4014 if (flags
& NDR_IN
) {
4016 if (flags
& NDR_OUT
) {
4017 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4019 return NT_STATUS_OK
;
4022 NTSTATUS
ndr_pull_WKSSVC_NETRVALIDATENAME2(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRVALIDATENAME2
*r
)
4024 if (flags
& NDR_IN
) {
4026 if (flags
& NDR_OUT
) {
4027 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4029 return NT_STATUS_OK
;
4032 _PUBLIC_
void ndr_print_WKSSVC_NETRVALIDATENAME2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRVALIDATENAME2
*r
)
4034 ndr_print_struct(ndr
, name
, "WKSSVC_NETRVALIDATENAME2");
4036 if (flags
& NDR_SET_VALUES
) {
4037 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4039 if (flags
& NDR_IN
) {
4040 ndr_print_struct(ndr
, "in", "WKSSVC_NETRVALIDATENAME2");
4044 if (flags
& NDR_OUT
) {
4045 ndr_print_struct(ndr
, "out", "WKSSVC_NETRVALIDATENAME2");
4047 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4053 NTSTATUS
ndr_push_WKSSVC_NETRGETJOINABLEOUS2(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRGETJOINABLEOUS2
*r
)
4055 if (flags
& NDR_IN
) {
4057 if (flags
& NDR_OUT
) {
4058 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4060 return NT_STATUS_OK
;
4063 NTSTATUS
ndr_pull_WKSSVC_NETRGETJOINABLEOUS2(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRGETJOINABLEOUS2
*r
)
4065 if (flags
& NDR_IN
) {
4067 if (flags
& NDR_OUT
) {
4068 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4070 return NT_STATUS_OK
;
4073 _PUBLIC_
void ndr_print_WKSSVC_NETRGETJOINABLEOUS2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRGETJOINABLEOUS2
*r
)
4075 ndr_print_struct(ndr
, name
, "WKSSVC_NETRGETJOINABLEOUS2");
4077 if (flags
& NDR_SET_VALUES
) {
4078 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4080 if (flags
& NDR_IN
) {
4081 ndr_print_struct(ndr
, "in", "WKSSVC_NETRGETJOINABLEOUS2");
4085 if (flags
& NDR_OUT
) {
4086 ndr_print_struct(ndr
, "out", "WKSSVC_NETRGETJOINABLEOUS2");
4088 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4094 NTSTATUS
ndr_push_wkssvc_NetrAddAlternateComputerName(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrAddAlternateComputerName
*r
)
4096 if (flags
& NDR_IN
) {
4097 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
4098 if (r
->in
.server_name
) {
4099 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
4100 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4101 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
4102 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
));
4104 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.NewAlternateMachineName
));
4105 if (r
->in
.NewAlternateMachineName
) {
4106 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.NewAlternateMachineName
, CH_UTF16
)));
4107 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4108 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.NewAlternateMachineName
, CH_UTF16
)));
4109 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.NewAlternateMachineName
, ndr_charset_length(r
->in
.NewAlternateMachineName
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4111 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.Account
));
4112 if (r
->in
.Account
) {
4113 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
4114 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4115 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
4116 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.Account
, ndr_charset_length(r
->in
.Account
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4118 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.EncryptedPassword
));
4119 if (r
->in
.EncryptedPassword
) {
4120 NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.EncryptedPassword
));
4122 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.Reserved
));
4124 if (flags
& NDR_OUT
) {
4125 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4127 return NT_STATUS_OK
;
4130 NTSTATUS
ndr_pull_wkssvc_NetrAddAlternateComputerName(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrAddAlternateComputerName
*r
)
4132 uint32_t _ptr_server_name
;
4133 uint32_t _ptr_NewAlternateMachineName
;
4134 uint32_t _ptr_Account
;
4135 uint32_t _ptr_EncryptedPassword
;
4136 TALLOC_CTX
*_mem_save_server_name_0
;
4137 TALLOC_CTX
*_mem_save_NewAlternateMachineName_0
;
4138 TALLOC_CTX
*_mem_save_Account_0
;
4139 TALLOC_CTX
*_mem_save_EncryptedPassword_0
;
4140 if (flags
& NDR_IN
) {
4141 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
4142 if (_ptr_server_name
) {
4143 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
4145 r
->in
.server_name
= NULL
;
4147 if (r
->in
.server_name
) {
4148 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4149 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
4150 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
4151 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
4152 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
4153 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
));
4155 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
4156 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
));
4157 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
4159 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_NewAlternateMachineName
));
4160 if (_ptr_NewAlternateMachineName
) {
4161 NDR_PULL_ALLOC(ndr
, r
->in
.NewAlternateMachineName
);
4163 r
->in
.NewAlternateMachineName
= NULL
;
4165 if (r
->in
.NewAlternateMachineName
) {
4166 _mem_save_NewAlternateMachineName_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4167 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.NewAlternateMachineName
, 0);
4168 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.NewAlternateMachineName
));
4169 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.NewAlternateMachineName
));
4170 if (ndr_get_array_length(ndr
, &r
->in
.NewAlternateMachineName
) > ndr_get_array_size(ndr
, &r
->in
.NewAlternateMachineName
)) {
4171 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
));
4173 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.NewAlternateMachineName
), sizeof(uint16_t)));
4174 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.NewAlternateMachineName
, ndr_get_array_length(ndr
, &r
->in
.NewAlternateMachineName
), sizeof(uint16_t), CH_UTF16
));
4175 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_NewAlternateMachineName_0
, 0);
4177 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_Account
));
4179 NDR_PULL_ALLOC(ndr
, r
->in
.Account
);
4181 r
->in
.Account
= NULL
;
4183 if (r
->in
.Account
) {
4184 _mem_save_Account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4185 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.Account
, 0);
4186 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.Account
));
4187 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.Account
));
4188 if (ndr_get_array_length(ndr
, &r
->in
.Account
) > ndr_get_array_size(ndr
, &r
->in
.Account
)) {
4189 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
));
4191 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t)));
4192 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.Account
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t), CH_UTF16
));
4193 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Account_0
, 0);
4195 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_EncryptedPassword
));
4196 if (_ptr_EncryptedPassword
) {
4197 NDR_PULL_ALLOC(ndr
, r
->in
.EncryptedPassword
);
4199 r
->in
.EncryptedPassword
= NULL
;
4201 if (r
->in
.EncryptedPassword
) {
4202 _mem_save_EncryptedPassword_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4203 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.EncryptedPassword
, 0);
4204 NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.EncryptedPassword
));
4205 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_EncryptedPassword_0
, 0);
4207 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.Reserved
));
4209 if (flags
& NDR_OUT
) {
4210 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4212 return NT_STATUS_OK
;
4215 _PUBLIC_
void ndr_print_wkssvc_NetrAddAlternateComputerName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrAddAlternateComputerName
*r
)
4217 ndr_print_struct(ndr
, name
, "wkssvc_NetrAddAlternateComputerName");
4219 if (flags
& NDR_SET_VALUES
) {
4220 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4222 if (flags
& NDR_IN
) {
4223 ndr_print_struct(ndr
, "in", "wkssvc_NetrAddAlternateComputerName");
4225 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
4227 if (r
->in
.server_name
) {
4228 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
4231 ndr_print_ptr(ndr
, "NewAlternateMachineName", r
->in
.NewAlternateMachineName
);
4233 if (r
->in
.NewAlternateMachineName
) {
4234 ndr_print_string(ndr
, "NewAlternateMachineName", r
->in
.NewAlternateMachineName
);
4237 ndr_print_ptr(ndr
, "Account", r
->in
.Account
);
4239 if (r
->in
.Account
) {
4240 ndr_print_string(ndr
, "Account", r
->in
.Account
);
4243 ndr_print_ptr(ndr
, "EncryptedPassword", r
->in
.EncryptedPassword
);
4245 if (r
->in
.EncryptedPassword
) {
4246 ndr_print_wkssvc_PasswordBuffer(ndr
, "EncryptedPassword", r
->in
.EncryptedPassword
);
4249 ndr_print_uint32(ndr
, "Reserved", r
->in
.Reserved
);
4252 if (flags
& NDR_OUT
) {
4253 ndr_print_struct(ndr
, "out", "wkssvc_NetrAddAlternateComputerName");
4255 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4261 NTSTATUS
ndr_push_wkssvc_NetrRemoveAlternateComputerName(struct ndr_push
*ndr
, int flags
, const struct wkssvc_NetrRemoveAlternateComputerName
*r
)
4263 if (flags
& NDR_IN
) {
4264 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
4265 if (r
->in
.server_name
) {
4266 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
4267 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4268 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
4269 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
));
4271 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.AlternateMachineNameToRemove
));
4272 if (r
->in
.AlternateMachineNameToRemove
) {
4273 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.AlternateMachineNameToRemove
, CH_UTF16
)));
4274 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4275 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.AlternateMachineNameToRemove
, CH_UTF16
)));
4276 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.AlternateMachineNameToRemove
, ndr_charset_length(r
->in
.AlternateMachineNameToRemove
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4278 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.Account
));
4279 if (r
->in
.Account
) {
4280 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
4281 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4282 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Account
, CH_UTF16
)));
4283 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.Account
, ndr_charset_length(r
->in
.Account
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4285 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.EncryptedPassword
));
4286 if (r
->in
.EncryptedPassword
) {
4287 NDR_CHECK(ndr_push_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.EncryptedPassword
));
4289 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.Reserved
));
4291 if (flags
& NDR_OUT
) {
4292 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4294 return NT_STATUS_OK
;
4297 NTSTATUS
ndr_pull_wkssvc_NetrRemoveAlternateComputerName(struct ndr_pull
*ndr
, int flags
, struct wkssvc_NetrRemoveAlternateComputerName
*r
)
4299 uint32_t _ptr_server_name
;
4300 uint32_t _ptr_AlternateMachineNameToRemove
;
4301 uint32_t _ptr_Account
;
4302 uint32_t _ptr_EncryptedPassword
;
4303 TALLOC_CTX
*_mem_save_server_name_0
;
4304 TALLOC_CTX
*_mem_save_AlternateMachineNameToRemove_0
;
4305 TALLOC_CTX
*_mem_save_Account_0
;
4306 TALLOC_CTX
*_mem_save_EncryptedPassword_0
;
4307 if (flags
& NDR_IN
) {
4308 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
4309 if (_ptr_server_name
) {
4310 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
4312 r
->in
.server_name
= NULL
;
4314 if (r
->in
.server_name
) {
4315 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4316 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
4317 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
4318 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
4319 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
4320 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
));
4322 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
4323 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
));
4324 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
4326 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_AlternateMachineNameToRemove
));
4327 if (_ptr_AlternateMachineNameToRemove
) {
4328 NDR_PULL_ALLOC(ndr
, r
->in
.AlternateMachineNameToRemove
);
4330 r
->in
.AlternateMachineNameToRemove
= NULL
;
4332 if (r
->in
.AlternateMachineNameToRemove
) {
4333 _mem_save_AlternateMachineNameToRemove_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4334 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.AlternateMachineNameToRemove
, 0);
4335 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.AlternateMachineNameToRemove
));
4336 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.AlternateMachineNameToRemove
));
4337 if (ndr_get_array_length(ndr
, &r
->in
.AlternateMachineNameToRemove
) > ndr_get_array_size(ndr
, &r
->in
.AlternateMachineNameToRemove
)) {
4338 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
));
4340 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.AlternateMachineNameToRemove
), sizeof(uint16_t)));
4341 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.AlternateMachineNameToRemove
, ndr_get_array_length(ndr
, &r
->in
.AlternateMachineNameToRemove
), sizeof(uint16_t), CH_UTF16
));
4342 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_AlternateMachineNameToRemove_0
, 0);
4344 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_Account
));
4346 NDR_PULL_ALLOC(ndr
, r
->in
.Account
);
4348 r
->in
.Account
= NULL
;
4350 if (r
->in
.Account
) {
4351 _mem_save_Account_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4352 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.Account
, 0);
4353 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.Account
));
4354 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.Account
));
4355 if (ndr_get_array_length(ndr
, &r
->in
.Account
) > ndr_get_array_size(ndr
, &r
->in
.Account
)) {
4356 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
));
4358 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t)));
4359 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.Account
, ndr_get_array_length(ndr
, &r
->in
.Account
), sizeof(uint16_t), CH_UTF16
));
4360 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Account_0
, 0);
4362 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_EncryptedPassword
));
4363 if (_ptr_EncryptedPassword
) {
4364 NDR_PULL_ALLOC(ndr
, r
->in
.EncryptedPassword
);
4366 r
->in
.EncryptedPassword
= NULL
;
4368 if (r
->in
.EncryptedPassword
) {
4369 _mem_save_EncryptedPassword_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4370 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.EncryptedPassword
, 0);
4371 NDR_CHECK(ndr_pull_wkssvc_PasswordBuffer(ndr
, NDR_SCALARS
, r
->in
.EncryptedPassword
));
4372 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_EncryptedPassword_0
, 0);
4374 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.Reserved
));
4376 if (flags
& NDR_OUT
) {
4377 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4379 return NT_STATUS_OK
;
4382 _PUBLIC_
void ndr_print_wkssvc_NetrRemoveAlternateComputerName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct wkssvc_NetrRemoveAlternateComputerName
*r
)
4384 ndr_print_struct(ndr
, name
, "wkssvc_NetrRemoveAlternateComputerName");
4386 if (flags
& NDR_SET_VALUES
) {
4387 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4389 if (flags
& NDR_IN
) {
4390 ndr_print_struct(ndr
, "in", "wkssvc_NetrRemoveAlternateComputerName");
4392 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
4394 if (r
->in
.server_name
) {
4395 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
4398 ndr_print_ptr(ndr
, "AlternateMachineNameToRemove", r
->in
.AlternateMachineNameToRemove
);
4400 if (r
->in
.AlternateMachineNameToRemove
) {
4401 ndr_print_string(ndr
, "AlternateMachineNameToRemove", r
->in
.AlternateMachineNameToRemove
);
4404 ndr_print_ptr(ndr
, "Account", r
->in
.Account
);
4406 if (r
->in
.Account
) {
4407 ndr_print_string(ndr
, "Account", r
->in
.Account
);
4410 ndr_print_ptr(ndr
, "EncryptedPassword", r
->in
.EncryptedPassword
);
4412 if (r
->in
.EncryptedPassword
) {
4413 ndr_print_wkssvc_PasswordBuffer(ndr
, "EncryptedPassword", r
->in
.EncryptedPassword
);
4416 ndr_print_uint32(ndr
, "Reserved", r
->in
.Reserved
);
4419 if (flags
& NDR_OUT
) {
4420 ndr_print_struct(ndr
, "out", "wkssvc_NetrRemoveAlternateComputerName");
4422 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4428 NTSTATUS
ndr_push_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRSETPRIMARYCOMPUTERNAME
*r
)
4430 if (flags
& NDR_IN
) {
4432 if (flags
& NDR_OUT
) {
4433 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4435 return NT_STATUS_OK
;
4438 NTSTATUS
ndr_pull_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRSETPRIMARYCOMPUTERNAME
*r
)
4440 if (flags
& NDR_IN
) {
4442 if (flags
& NDR_OUT
) {
4443 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4445 return NT_STATUS_OK
;
4448 _PUBLIC_
void ndr_print_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRSETPRIMARYCOMPUTERNAME
*r
)
4450 ndr_print_struct(ndr
, name
, "WKSSVC_NETRSETPRIMARYCOMPUTERNAME");
4452 if (flags
& NDR_SET_VALUES
) {
4453 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4455 if (flags
& NDR_IN
) {
4456 ndr_print_struct(ndr
, "in", "WKSSVC_NETRSETPRIMARYCOMPUTERNAME");
4460 if (flags
& NDR_OUT
) {
4461 ndr_print_struct(ndr
, "out", "WKSSVC_NETRSETPRIMARYCOMPUTERNAME");
4463 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4469 NTSTATUS
ndr_push_WKSSVC_NETRENUMERATECOMPUTERNAMES(struct ndr_push
*ndr
, int flags
, const struct WKSSVC_NETRENUMERATECOMPUTERNAMES
*r
)
4471 if (flags
& NDR_IN
) {
4473 if (flags
& NDR_OUT
) {
4474 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4476 return NT_STATUS_OK
;
4479 NTSTATUS
ndr_pull_WKSSVC_NETRENUMERATECOMPUTERNAMES(struct ndr_pull
*ndr
, int flags
, struct WKSSVC_NETRENUMERATECOMPUTERNAMES
*r
)
4481 if (flags
& NDR_IN
) {
4483 if (flags
& NDR_OUT
) {
4484 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4486 return NT_STATUS_OK
;
4489 _PUBLIC_
void ndr_print_WKSSVC_NETRENUMERATECOMPUTERNAMES(struct ndr_print
*ndr
, const char *name
, int flags
, const struct WKSSVC_NETRENUMERATECOMPUTERNAMES
*r
)
4491 ndr_print_struct(ndr
, name
, "WKSSVC_NETRENUMERATECOMPUTERNAMES");
4493 if (flags
& NDR_SET_VALUES
) {
4494 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4496 if (flags
& NDR_IN
) {
4497 ndr_print_struct(ndr
, "in", "WKSSVC_NETRENUMERATECOMPUTERNAMES");
4501 if (flags
& NDR_OUT
) {
4502 ndr_print_struct(ndr
, "out", "WKSSVC_NETRENUMERATECOMPUTERNAMES");
4504 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4510 const struct dcerpc_interface_call wkssvc_calls
[] = {
4512 "wkssvc_NetWkstaGetInfo",
4513 sizeof(struct wkssvc_NetWkstaGetInfo
),
4514 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetWkstaGetInfo
,
4515 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetWkstaGetInfo
,
4516 (ndr_print_function_t
) ndr_print_wkssvc_NetWkstaGetInfo
,
4520 "wkssvc_NetWkstaSetInfo",
4521 sizeof(struct wkssvc_NetWkstaSetInfo
),
4522 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetWkstaSetInfo
,
4523 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetWkstaSetInfo
,
4524 (ndr_print_function_t
) ndr_print_wkssvc_NetWkstaSetInfo
,
4528 "wkssvc_NetWkstaEnumUsers",
4529 sizeof(struct wkssvc_NetWkstaEnumUsers
),
4530 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetWkstaEnumUsers
,
4531 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetWkstaEnumUsers
,
4532 (ndr_print_function_t
) ndr_print_wkssvc_NetWkstaEnumUsers
,
4536 "WKSSVC_NETRWKSTAUSERGETINFO",
4537 sizeof(struct WKSSVC_NETRWKSTAUSERGETINFO
),
4538 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRWKSTAUSERGETINFO
,
4539 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRWKSTAUSERGETINFO
,
4540 (ndr_print_function_t
) ndr_print_WKSSVC_NETRWKSTAUSERGETINFO
,
4544 "WKSSVC_NETRWKSTAUSERSETINFO",
4545 sizeof(struct WKSSVC_NETRWKSTAUSERSETINFO
),
4546 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRWKSTAUSERSETINFO
,
4547 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRWKSTAUSERSETINFO
,
4548 (ndr_print_function_t
) ndr_print_WKSSVC_NETRWKSTAUSERSETINFO
,
4552 "wkssvc_NetWkstaTransportEnum",
4553 sizeof(struct wkssvc_NetWkstaTransportEnum
),
4554 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetWkstaTransportEnum
,
4555 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetWkstaTransportEnum
,
4556 (ndr_print_function_t
) ndr_print_wkssvc_NetWkstaTransportEnum
,
4560 "WKSSVC_NETRWKSTATRANSPORTADD",
4561 sizeof(struct WKSSVC_NETRWKSTATRANSPORTADD
),
4562 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRWKSTATRANSPORTADD
,
4563 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRWKSTATRANSPORTADD
,
4564 (ndr_print_function_t
) ndr_print_WKSSVC_NETRWKSTATRANSPORTADD
,
4568 "WKSSVC_NETRWKSTATRANSPORTDEL",
4569 sizeof(struct WKSSVC_NETRWKSTATRANSPORTDEL
),
4570 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRWKSTATRANSPORTDEL
,
4571 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRWKSTATRANSPORTDEL
,
4572 (ndr_print_function_t
) ndr_print_WKSSVC_NETRWKSTATRANSPORTDEL
,
4576 "WKSSVC_NETRUSEADD",
4577 sizeof(struct WKSSVC_NETRUSEADD
),
4578 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRUSEADD
,
4579 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRUSEADD
,
4580 (ndr_print_function_t
) ndr_print_WKSSVC_NETRUSEADD
,
4584 "WKSSVC_NETRUSEGETINFO",
4585 sizeof(struct WKSSVC_NETRUSEGETINFO
),
4586 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRUSEGETINFO
,
4587 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRUSEGETINFO
,
4588 (ndr_print_function_t
) ndr_print_WKSSVC_NETRUSEGETINFO
,
4592 "WKSSVC_NETRUSEDEL",
4593 sizeof(struct WKSSVC_NETRUSEDEL
),
4594 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRUSEDEL
,
4595 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRUSEDEL
,
4596 (ndr_print_function_t
) ndr_print_WKSSVC_NETRUSEDEL
,
4600 "WKSSVC_NETRUSEENUM",
4601 sizeof(struct WKSSVC_NETRUSEENUM
),
4602 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRUSEENUM
,
4603 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRUSEENUM
,
4604 (ndr_print_function_t
) ndr_print_WKSSVC_NETRUSEENUM
,
4608 "WKSSVC_NETRMESSAGEBUFFERSEND",
4609 sizeof(struct WKSSVC_NETRMESSAGEBUFFERSEND
),
4610 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRMESSAGEBUFFERSEND
,
4611 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRMESSAGEBUFFERSEND
,
4612 (ndr_print_function_t
) ndr_print_WKSSVC_NETRMESSAGEBUFFERSEND
,
4616 "WKSSVC_NETRWORKSTATIONSTATISTICSGET",
4617 sizeof(struct WKSSVC_NETRWORKSTATIONSTATISTICSGET
),
4618 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRWORKSTATIONSTATISTICSGET
,
4619 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRWORKSTATIONSTATISTICSGET
,
4620 (ndr_print_function_t
) ndr_print_WKSSVC_NETRWORKSTATIONSTATISTICSGET
,
4624 "WKSSVC_NETRLOGONDOMAINNAMEADD",
4625 sizeof(struct WKSSVC_NETRLOGONDOMAINNAMEADD
),
4626 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRLOGONDOMAINNAMEADD
,
4627 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEADD
,
4628 (ndr_print_function_t
) ndr_print_WKSSVC_NETRLOGONDOMAINNAMEADD
,
4632 "WKSSVC_NETRLOGONDOMAINNAMEDEL",
4633 sizeof(struct WKSSVC_NETRLOGONDOMAINNAMEDEL
),
4634 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRLOGONDOMAINNAMEDEL
,
4635 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEDEL
,
4636 (ndr_print_function_t
) ndr_print_WKSSVC_NETRLOGONDOMAINNAMEDEL
,
4640 "WKSSVC_NETRJOINDOMAIN",
4641 sizeof(struct WKSSVC_NETRJOINDOMAIN
),
4642 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRJOINDOMAIN
,
4643 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRJOINDOMAIN
,
4644 (ndr_print_function_t
) ndr_print_WKSSVC_NETRJOINDOMAIN
,
4648 "WKSSVC_NETRUNJOINDOMAIN",
4649 sizeof(struct WKSSVC_NETRUNJOINDOMAIN
),
4650 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRUNJOINDOMAIN
,
4651 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRUNJOINDOMAIN
,
4652 (ndr_print_function_t
) ndr_print_WKSSVC_NETRUNJOINDOMAIN
,
4656 "WKSSVC_NETRRENAMEMACHINEINDOMAIN",
4657 sizeof(struct WKSSVC_NETRRENAMEMACHINEINDOMAIN
),
4658 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRRENAMEMACHINEINDOMAIN
,
4659 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRRENAMEMACHINEINDOMAIN
,
4660 (ndr_print_function_t
) ndr_print_WKSSVC_NETRRENAMEMACHINEINDOMAIN
,
4664 "WKSSVC_NETRVALIDATENAME",
4665 sizeof(struct WKSSVC_NETRVALIDATENAME
),
4666 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRVALIDATENAME
,
4667 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRVALIDATENAME
,
4668 (ndr_print_function_t
) ndr_print_WKSSVC_NETRVALIDATENAME
,
4672 "WKSSVC_NETRGETJOININFORMATION",
4673 sizeof(struct WKSSVC_NETRGETJOININFORMATION
),
4674 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRGETJOININFORMATION
,
4675 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRGETJOININFORMATION
,
4676 (ndr_print_function_t
) ndr_print_WKSSVC_NETRGETJOININFORMATION
,
4680 "WKSSVC_NETRGETJOINABLEOUS",
4681 sizeof(struct WKSSVC_NETRGETJOINABLEOUS
),
4682 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRGETJOINABLEOUS
,
4683 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRGETJOINABLEOUS
,
4684 (ndr_print_function_t
) ndr_print_WKSSVC_NETRGETJOINABLEOUS
,
4688 "wkssvc_NetrJoinDomain2",
4689 sizeof(struct wkssvc_NetrJoinDomain2
),
4690 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrJoinDomain2
,
4691 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrJoinDomain2
,
4692 (ndr_print_function_t
) ndr_print_wkssvc_NetrJoinDomain2
,
4696 "wkssvc_NetrUnjoinDomain2",
4697 sizeof(struct wkssvc_NetrUnjoinDomain2
),
4698 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrUnjoinDomain2
,
4699 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrUnjoinDomain2
,
4700 (ndr_print_function_t
) ndr_print_wkssvc_NetrUnjoinDomain2
,
4704 "wkssvc_NetrRenameMachineInDomain2",
4705 sizeof(struct wkssvc_NetrRenameMachineInDomain2
),
4706 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrRenameMachineInDomain2
,
4707 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrRenameMachineInDomain2
,
4708 (ndr_print_function_t
) ndr_print_wkssvc_NetrRenameMachineInDomain2
,
4712 "WKSSVC_NETRVALIDATENAME2",
4713 sizeof(struct WKSSVC_NETRVALIDATENAME2
),
4714 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRVALIDATENAME2
,
4715 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRVALIDATENAME2
,
4716 (ndr_print_function_t
) ndr_print_WKSSVC_NETRVALIDATENAME2
,
4720 "WKSSVC_NETRGETJOINABLEOUS2",
4721 sizeof(struct WKSSVC_NETRGETJOINABLEOUS2
),
4722 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRGETJOINABLEOUS2
,
4723 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRGETJOINABLEOUS2
,
4724 (ndr_print_function_t
) ndr_print_WKSSVC_NETRGETJOINABLEOUS2
,
4728 "wkssvc_NetrAddAlternateComputerName",
4729 sizeof(struct wkssvc_NetrAddAlternateComputerName
),
4730 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrAddAlternateComputerName
,
4731 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrAddAlternateComputerName
,
4732 (ndr_print_function_t
) ndr_print_wkssvc_NetrAddAlternateComputerName
,
4736 "wkssvc_NetrRemoveAlternateComputerName",
4737 sizeof(struct wkssvc_NetrRemoveAlternateComputerName
),
4738 (ndr_push_flags_fn_t
) ndr_push_wkssvc_NetrRemoveAlternateComputerName
,
4739 (ndr_pull_flags_fn_t
) ndr_pull_wkssvc_NetrRemoveAlternateComputerName
,
4740 (ndr_print_function_t
) ndr_print_wkssvc_NetrRemoveAlternateComputerName
,
4744 "WKSSVC_NETRSETPRIMARYCOMPUTERNAME",
4745 sizeof(struct WKSSVC_NETRSETPRIMARYCOMPUTERNAME
),
4746 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRSETPRIMARYCOMPUTERNAME
,
4747 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRSETPRIMARYCOMPUTERNAME
,
4748 (ndr_print_function_t
) ndr_print_WKSSVC_NETRSETPRIMARYCOMPUTERNAME
,
4752 "WKSSVC_NETRENUMERATECOMPUTERNAMES",
4753 sizeof(struct WKSSVC_NETRENUMERATECOMPUTERNAMES
),
4754 (ndr_push_flags_fn_t
) ndr_push_WKSSVC_NETRENUMERATECOMPUTERNAMES
,
4755 (ndr_pull_flags_fn_t
) ndr_pull_WKSSVC_NETRENUMERATECOMPUTERNAMES
,
4756 (ndr_print_function_t
) ndr_print_WKSSVC_NETRENUMERATECOMPUTERNAMES
,
4759 { NULL
, 0, NULL
, NULL
, NULL
, False
}
4762 const char * const wkssvc_endpoint_strings
[] = {
4763 "ncacn_np:[\\pipe\\wkssvc]",
4766 const struct dcerpc_endpoint_list wkssvc_endpoints
= {
4768 .names
= wkssvc_endpoint_strings
4771 const char * const wkssvc_authservice_strings
[] = {
4775 const struct dcerpc_authservice_list wkssvc_authservices
= {
4777 .names
= wkssvc_authservice_strings
4781 const struct dcerpc_interface_table dcerpc_table_wkssvc
= {
4784 {0x6bffd098,0xa112,0x3610,{0x98,0x33},{0x46,0xc3,0xf8,0x7e,0x34,0x5a}},
4785 DCERPC_WKSSVC_VERSION
4787 .helpstring
= DCERPC_WKSSVC_HELPSTRING
,
4789 .calls
= wkssvc_calls
,
4790 .endpoints
= &wkssvc_endpoints
,
4791 .authservices
= &wkssvc_authservices