1 /* parser auto-generated by pidl */
4 #include "../librpc/gen_ndr/ndr_dfs.h"
6 #include "librpc/gen_ndr/ndr_misc.h"
7 static enum ndr_err_code
ndr_push_dfs_ManagerVersion(struct ndr_push
*ndr
, int ndr_flags
, enum dfs_ManagerVersion r
)
9 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
10 return NDR_ERR_SUCCESS
;
13 static enum ndr_err_code
ndr_pull_dfs_ManagerVersion(struct ndr_pull
*ndr
, int ndr_flags
, enum dfs_ManagerVersion
*r
)
16 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
18 return NDR_ERR_SUCCESS
;
21 _PUBLIC_
void ndr_print_dfs_ManagerVersion(struct ndr_print
*ndr
, const char *name
, enum dfs_ManagerVersion r
)
23 const char *val
= NULL
;
26 case DFS_MANAGER_VERSION_NT4
: val
= "DFS_MANAGER_VERSION_NT4"; break;
27 case DFS_MANAGER_VERSION_W2K
: val
= "DFS_MANAGER_VERSION_W2K"; break;
28 case DFS_MANAGER_VERSION_W2K3
: val
= "DFS_MANAGER_VERSION_W2K3"; break;
29 case DFS_MANAGER_VERSION_W2K8
: val
= "DFS_MANAGER_VERSION_W2K8"; break;
31 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
34 static enum ndr_err_code
ndr_push_dfs_Info0(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info0
*r
)
36 if (ndr_flags
& NDR_SCALARS
) {
37 NDR_CHECK(ndr_push_align(ndr
, 1));
38 NDR_CHECK(ndr_push_trailer_align(ndr
, 1));
40 if (ndr_flags
& NDR_BUFFERS
) {
42 return NDR_ERR_SUCCESS
;
45 static enum ndr_err_code
ndr_pull_dfs_Info0(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info0
*r
)
47 if (ndr_flags
& NDR_SCALARS
) {
48 NDR_CHECK(ndr_pull_align(ndr
, 1));
49 NDR_CHECK(ndr_pull_trailer_align(ndr
, 1));
51 if (ndr_flags
& NDR_BUFFERS
) {
53 return NDR_ERR_SUCCESS
;
56 _PUBLIC_
void ndr_print_dfs_Info0(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info0
*r
)
58 ndr_print_struct(ndr
, name
, "dfs_Info0");
63 static enum ndr_err_code
ndr_push_dfs_Info1(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info1
*r
)
65 if (ndr_flags
& NDR_SCALARS
) {
66 NDR_CHECK(ndr_push_align(ndr
, 5));
67 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->path
));
68 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
70 if (ndr_flags
& NDR_BUFFERS
) {
72 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
73 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
74 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
75 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->path
, ndr_charset_length(r
->path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
78 return NDR_ERR_SUCCESS
;
81 static enum ndr_err_code
ndr_pull_dfs_Info1(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info1
*r
)
84 TALLOC_CTX
*_mem_save_path_0
;
85 if (ndr_flags
& NDR_SCALARS
) {
86 NDR_CHECK(ndr_pull_align(ndr
, 5));
87 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_path
));
89 NDR_PULL_ALLOC(ndr
, r
->path
);
93 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
95 if (ndr_flags
& NDR_BUFFERS
) {
97 _mem_save_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
98 NDR_PULL_SET_MEM_CTX(ndr
, r
->path
, 0);
99 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->path
));
100 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->path
));
101 if (ndr_get_array_length(ndr
, &r
->path
) > ndr_get_array_size(ndr
, &r
->path
)) {
102 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->path
), ndr_get_array_length(ndr
, &r
->path
));
104 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t)));
105 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->path
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t), CH_UTF16
));
106 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_path_0
, 0);
109 return NDR_ERR_SUCCESS
;
112 _PUBLIC_
void ndr_print_dfs_Info1(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info1
*r
)
114 ndr_print_struct(ndr
, name
, "dfs_Info1");
116 ndr_print_ptr(ndr
, "path", r
->path
);
119 ndr_print_string(ndr
, "path", r
->path
);
125 _PUBLIC_
enum ndr_err_code
ndr_push_dfs_VolumeState(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
127 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
128 return NDR_ERR_SUCCESS
;
131 _PUBLIC_
enum ndr_err_code
ndr_pull_dfs_VolumeState(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
134 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
136 return NDR_ERR_SUCCESS
;
139 _PUBLIC_
void ndr_print_dfs_VolumeState(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
141 ndr_print_uint32(ndr
, name
, r
);
143 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_VOLUME_STATE_OK", DFS_VOLUME_STATE_OK
, r
);
144 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_VOLUME_STATE_INCONSISTENT", DFS_VOLUME_STATE_INCONSISTENT
, r
);
145 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_VOLUME_STATE_OFFLINE", DFS_VOLUME_STATE_OFFLINE
, r
);
146 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_VOLUME_STATE_ONLINE", DFS_VOLUME_STATE_ONLINE
, r
);
147 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_VOLUME_STATE_STANDALONE", DFS_VOLUME_STATE_STANDALONE
, r
);
148 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_VOLUME_STATE_AD_BLOB", DFS_VOLUME_STATE_AD_BLOB
, r
);
152 static enum ndr_err_code
ndr_push_dfs_Info2(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info2
*r
)
154 if (ndr_flags
& NDR_SCALARS
) {
155 NDR_CHECK(ndr_push_align(ndr
, 5));
156 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->path
));
157 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
158 NDR_CHECK(ndr_push_dfs_VolumeState(ndr
, NDR_SCALARS
, r
->state
));
159 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_stores
));
160 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
162 if (ndr_flags
& NDR_BUFFERS
) {
164 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
165 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
166 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
167 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->path
, ndr_charset_length(r
->path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
170 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
171 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
172 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
173 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
176 return NDR_ERR_SUCCESS
;
179 static enum ndr_err_code
ndr_pull_dfs_Info2(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info2
*r
)
182 TALLOC_CTX
*_mem_save_path_0
;
183 uint32_t _ptr_comment
;
184 TALLOC_CTX
*_mem_save_comment_0
;
185 if (ndr_flags
& NDR_SCALARS
) {
186 NDR_CHECK(ndr_pull_align(ndr
, 5));
187 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_path
));
189 NDR_PULL_ALLOC(ndr
, r
->path
);
193 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
195 NDR_PULL_ALLOC(ndr
, r
->comment
);
199 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr
, NDR_SCALARS
, &r
->state
));
200 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_stores
));
201 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
203 if (ndr_flags
& NDR_BUFFERS
) {
205 _mem_save_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
206 NDR_PULL_SET_MEM_CTX(ndr
, r
->path
, 0);
207 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->path
));
208 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->path
));
209 if (ndr_get_array_length(ndr
, &r
->path
) > ndr_get_array_size(ndr
, &r
->path
)) {
210 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->path
), ndr_get_array_length(ndr
, &r
->path
));
212 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t)));
213 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->path
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t), CH_UTF16
));
214 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_path_0
, 0);
217 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
218 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
219 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
220 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
221 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
222 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->comment
), ndr_get_array_length(ndr
, &r
->comment
));
224 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
225 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
226 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
229 return NDR_ERR_SUCCESS
;
232 _PUBLIC_
void ndr_print_dfs_Info2(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info2
*r
)
234 ndr_print_struct(ndr
, name
, "dfs_Info2");
236 ndr_print_ptr(ndr
, "path", r
->path
);
239 ndr_print_string(ndr
, "path", r
->path
);
242 ndr_print_ptr(ndr
, "comment", r
->comment
);
245 ndr_print_string(ndr
, "comment", r
->comment
);
248 ndr_print_dfs_VolumeState(ndr
, "state", r
->state
);
249 ndr_print_uint32(ndr
, "num_stores", r
->num_stores
);
253 _PUBLIC_
enum ndr_err_code
ndr_push_dfs_StorageState(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
255 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
256 return NDR_ERR_SUCCESS
;
259 _PUBLIC_
enum ndr_err_code
ndr_pull_dfs_StorageState(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
262 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
264 return NDR_ERR_SUCCESS
;
267 _PUBLIC_
void ndr_print_dfs_StorageState(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
269 ndr_print_uint32(ndr
, name
, r
);
271 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_STORAGE_STATE_OFFLINE", DFS_STORAGE_STATE_OFFLINE
, r
);
272 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_STORAGE_STATE_ONLINE", DFS_STORAGE_STATE_ONLINE
, r
);
273 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_STORAGE_STATE_ACTIVE", DFS_STORAGE_STATE_ACTIVE
, r
);
277 static enum ndr_err_code
ndr_push_dfs_StorageInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_StorageInfo
*r
)
279 if (ndr_flags
& NDR_SCALARS
) {
280 NDR_CHECK(ndr_push_align(ndr
, 5));
281 NDR_CHECK(ndr_push_dfs_StorageState(ndr
, NDR_SCALARS
, r
->state
));
282 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server
));
283 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->share
));
284 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
286 if (ndr_flags
& NDR_BUFFERS
) {
288 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server
, CH_UTF16
)));
289 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
290 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server
, CH_UTF16
)));
291 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server
, ndr_charset_length(r
->server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
294 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->share
, CH_UTF16
)));
295 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
296 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->share
, CH_UTF16
)));
297 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->share
, ndr_charset_length(r
->share
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
300 return NDR_ERR_SUCCESS
;
303 static enum ndr_err_code
ndr_pull_dfs_StorageInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_StorageInfo
*r
)
305 uint32_t _ptr_server
;
306 TALLOC_CTX
*_mem_save_server_0
;
308 TALLOC_CTX
*_mem_save_share_0
;
309 if (ndr_flags
& NDR_SCALARS
) {
310 NDR_CHECK(ndr_pull_align(ndr
, 5));
311 NDR_CHECK(ndr_pull_dfs_StorageState(ndr
, NDR_SCALARS
, &r
->state
));
312 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
314 NDR_PULL_ALLOC(ndr
, r
->server
);
318 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_share
));
320 NDR_PULL_ALLOC(ndr
, r
->share
);
324 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
326 if (ndr_flags
& NDR_BUFFERS
) {
328 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
329 NDR_PULL_SET_MEM_CTX(ndr
, r
->server
, 0);
330 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server
));
331 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server
));
332 if (ndr_get_array_length(ndr
, &r
->server
) > ndr_get_array_size(ndr
, &r
->server
)) {
333 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
), ndr_get_array_length(ndr
, &r
->server
));
335 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server
), sizeof(uint16_t)));
336 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server
, ndr_get_array_length(ndr
, &r
->server
), sizeof(uint16_t), CH_UTF16
));
337 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
340 _mem_save_share_0
= NDR_PULL_GET_MEM_CTX(ndr
);
341 NDR_PULL_SET_MEM_CTX(ndr
, r
->share
, 0);
342 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->share
));
343 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->share
));
344 if (ndr_get_array_length(ndr
, &r
->share
) > ndr_get_array_size(ndr
, &r
->share
)) {
345 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->share
), ndr_get_array_length(ndr
, &r
->share
));
347 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->share
), sizeof(uint16_t)));
348 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->share
, ndr_get_array_length(ndr
, &r
->share
), sizeof(uint16_t), CH_UTF16
));
349 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_share_0
, 0);
352 return NDR_ERR_SUCCESS
;
355 _PUBLIC_
void ndr_print_dfs_StorageInfo(struct ndr_print
*ndr
, const char *name
, const struct dfs_StorageInfo
*r
)
357 ndr_print_struct(ndr
, name
, "dfs_StorageInfo");
359 ndr_print_dfs_StorageState(ndr
, "state", r
->state
);
360 ndr_print_ptr(ndr
, "server", r
->server
);
363 ndr_print_string(ndr
, "server", r
->server
);
366 ndr_print_ptr(ndr
, "share", r
->share
);
369 ndr_print_string(ndr
, "share", r
->share
);
375 static enum ndr_err_code
ndr_push_dfs_Info3(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info3
*r
)
377 uint32_t cntr_stores_1
;
378 if (ndr_flags
& NDR_SCALARS
) {
379 NDR_CHECK(ndr_push_align(ndr
, 5));
380 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->path
));
381 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
382 NDR_CHECK(ndr_push_dfs_VolumeState(ndr
, NDR_SCALARS
, r
->state
));
383 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_stores
));
384 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->stores
));
385 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
387 if (ndr_flags
& NDR_BUFFERS
) {
389 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
390 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
391 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
392 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->path
, ndr_charset_length(r
->path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
395 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
396 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
397 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
398 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
401 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->num_stores
));
402 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
403 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr
, NDR_SCALARS
, &r
->stores
[cntr_stores_1
]));
405 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
406 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr
, NDR_BUFFERS
, &r
->stores
[cntr_stores_1
]));
410 return NDR_ERR_SUCCESS
;
413 static enum ndr_err_code
ndr_pull_dfs_Info3(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info3
*r
)
416 TALLOC_CTX
*_mem_save_path_0
;
417 uint32_t _ptr_comment
;
418 TALLOC_CTX
*_mem_save_comment_0
;
419 uint32_t _ptr_stores
;
420 uint32_t cntr_stores_1
;
421 TALLOC_CTX
*_mem_save_stores_0
;
422 TALLOC_CTX
*_mem_save_stores_1
;
423 if (ndr_flags
& NDR_SCALARS
) {
424 NDR_CHECK(ndr_pull_align(ndr
, 5));
425 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_path
));
427 NDR_PULL_ALLOC(ndr
, r
->path
);
431 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
433 NDR_PULL_ALLOC(ndr
, r
->comment
);
437 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr
, NDR_SCALARS
, &r
->state
));
438 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_stores
));
439 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_stores
));
441 NDR_PULL_ALLOC(ndr
, r
->stores
);
445 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
447 if (ndr_flags
& NDR_BUFFERS
) {
449 _mem_save_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
450 NDR_PULL_SET_MEM_CTX(ndr
, r
->path
, 0);
451 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->path
));
452 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->path
));
453 if (ndr_get_array_length(ndr
, &r
->path
) > ndr_get_array_size(ndr
, &r
->path
)) {
454 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->path
), ndr_get_array_length(ndr
, &r
->path
));
456 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t)));
457 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->path
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t), CH_UTF16
));
458 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_path_0
, 0);
461 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
462 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
463 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
464 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
465 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
466 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->comment
), ndr_get_array_length(ndr
, &r
->comment
));
468 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
469 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
470 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
473 _mem_save_stores_0
= NDR_PULL_GET_MEM_CTX(ndr
);
474 NDR_PULL_SET_MEM_CTX(ndr
, r
->stores
, 0);
475 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->stores
));
476 NDR_PULL_ALLOC_N(ndr
, r
->stores
, ndr_get_array_size(ndr
, &r
->stores
));
477 _mem_save_stores_1
= NDR_PULL_GET_MEM_CTX(ndr
);
478 NDR_PULL_SET_MEM_CTX(ndr
, r
->stores
, 0);
479 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
480 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr
, NDR_SCALARS
, &r
->stores
[cntr_stores_1
]));
482 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
483 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr
, NDR_BUFFERS
, &r
->stores
[cntr_stores_1
]));
485 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_stores_1
, 0);
486 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_stores_0
, 0);
489 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->stores
, r
->num_stores
));
492 return NDR_ERR_SUCCESS
;
495 _PUBLIC_
void ndr_print_dfs_Info3(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info3
*r
)
497 uint32_t cntr_stores_1
;
498 ndr_print_struct(ndr
, name
, "dfs_Info3");
500 ndr_print_ptr(ndr
, "path", r
->path
);
503 ndr_print_string(ndr
, "path", r
->path
);
506 ndr_print_ptr(ndr
, "comment", r
->comment
);
509 ndr_print_string(ndr
, "comment", r
->comment
);
512 ndr_print_dfs_VolumeState(ndr
, "state", r
->state
);
513 ndr_print_uint32(ndr
, "num_stores", r
->num_stores
);
514 ndr_print_ptr(ndr
, "stores", r
->stores
);
517 ndr
->print(ndr
, "%s: ARRAY(%d)", "stores", (int)r
->num_stores
);
519 for (cntr_stores_1
=0;cntr_stores_1
<r
->num_stores
;cntr_stores_1
++) {
521 if (asprintf(&idx_1
, "[%d]", cntr_stores_1
) != -1) {
522 ndr_print_dfs_StorageInfo(ndr
, "stores", &r
->stores
[cntr_stores_1
]);
532 static enum ndr_err_code
ndr_push_dfs_Info4(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info4
*r
)
534 uint32_t cntr_stores_1
;
535 if (ndr_flags
& NDR_SCALARS
) {
536 NDR_CHECK(ndr_push_align(ndr
, 5));
537 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->path
));
538 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
539 NDR_CHECK(ndr_push_dfs_VolumeState(ndr
, NDR_SCALARS
, r
->state
));
540 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->timeout
));
541 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
542 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_stores
));
543 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->stores
));
544 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
546 if (ndr_flags
& NDR_BUFFERS
) {
548 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
549 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
550 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
551 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->path
, ndr_charset_length(r
->path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
554 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
555 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
556 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
557 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
560 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->num_stores
));
561 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
562 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr
, NDR_SCALARS
, &r
->stores
[cntr_stores_1
]));
564 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
565 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr
, NDR_BUFFERS
, &r
->stores
[cntr_stores_1
]));
569 return NDR_ERR_SUCCESS
;
572 static enum ndr_err_code
ndr_pull_dfs_Info4(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info4
*r
)
575 TALLOC_CTX
*_mem_save_path_0
;
576 uint32_t _ptr_comment
;
577 TALLOC_CTX
*_mem_save_comment_0
;
578 uint32_t _ptr_stores
;
579 uint32_t cntr_stores_1
;
580 TALLOC_CTX
*_mem_save_stores_0
;
581 TALLOC_CTX
*_mem_save_stores_1
;
582 if (ndr_flags
& NDR_SCALARS
) {
583 NDR_CHECK(ndr_pull_align(ndr
, 5));
584 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_path
));
586 NDR_PULL_ALLOC(ndr
, r
->path
);
590 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
592 NDR_PULL_ALLOC(ndr
, r
->comment
);
596 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr
, NDR_SCALARS
, &r
->state
));
597 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->timeout
));
598 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
599 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_stores
));
600 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_stores
));
602 NDR_PULL_ALLOC(ndr
, r
->stores
);
606 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
608 if (ndr_flags
& NDR_BUFFERS
) {
610 _mem_save_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
611 NDR_PULL_SET_MEM_CTX(ndr
, r
->path
, 0);
612 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->path
));
613 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->path
));
614 if (ndr_get_array_length(ndr
, &r
->path
) > ndr_get_array_size(ndr
, &r
->path
)) {
615 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->path
), ndr_get_array_length(ndr
, &r
->path
));
617 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t)));
618 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->path
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t), CH_UTF16
));
619 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_path_0
, 0);
622 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
623 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
624 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
625 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
626 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
627 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->comment
), ndr_get_array_length(ndr
, &r
->comment
));
629 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
630 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
631 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
634 _mem_save_stores_0
= NDR_PULL_GET_MEM_CTX(ndr
);
635 NDR_PULL_SET_MEM_CTX(ndr
, r
->stores
, 0);
636 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->stores
));
637 NDR_PULL_ALLOC_N(ndr
, r
->stores
, ndr_get_array_size(ndr
, &r
->stores
));
638 _mem_save_stores_1
= NDR_PULL_GET_MEM_CTX(ndr
);
639 NDR_PULL_SET_MEM_CTX(ndr
, r
->stores
, 0);
640 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
641 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr
, NDR_SCALARS
, &r
->stores
[cntr_stores_1
]));
643 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
644 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr
, NDR_BUFFERS
, &r
->stores
[cntr_stores_1
]));
646 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_stores_1
, 0);
647 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_stores_0
, 0);
650 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->stores
, r
->num_stores
));
653 return NDR_ERR_SUCCESS
;
656 _PUBLIC_
void ndr_print_dfs_Info4(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info4
*r
)
658 uint32_t cntr_stores_1
;
659 ndr_print_struct(ndr
, name
, "dfs_Info4");
661 ndr_print_ptr(ndr
, "path", r
->path
);
664 ndr_print_string(ndr
, "path", r
->path
);
667 ndr_print_ptr(ndr
, "comment", r
->comment
);
670 ndr_print_string(ndr
, "comment", r
->comment
);
673 ndr_print_dfs_VolumeState(ndr
, "state", r
->state
);
674 ndr_print_uint32(ndr
, "timeout", r
->timeout
);
675 ndr_print_GUID(ndr
, "guid", &r
->guid
);
676 ndr_print_uint32(ndr
, "num_stores", r
->num_stores
);
677 ndr_print_ptr(ndr
, "stores", r
->stores
);
680 ndr
->print(ndr
, "%s: ARRAY(%d)", "stores", (int)r
->num_stores
);
682 for (cntr_stores_1
=0;cntr_stores_1
<r
->num_stores
;cntr_stores_1
++) {
684 if (asprintf(&idx_1
, "[%d]", cntr_stores_1
) != -1) {
685 ndr_print_dfs_StorageInfo(ndr
, "stores", &r
->stores
[cntr_stores_1
]);
695 _PUBLIC_
enum ndr_err_code
ndr_push_dfs_PropertyFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
697 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
698 return NDR_ERR_SUCCESS
;
701 _PUBLIC_
enum ndr_err_code
ndr_pull_dfs_PropertyFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
704 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
706 return NDR_ERR_SUCCESS
;
709 _PUBLIC_
void ndr_print_dfs_PropertyFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
711 ndr_print_uint32(ndr
, name
, r
);
713 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_PROPERTY_FLAG_INSITE_REFERRALS", DFS_PROPERTY_FLAG_INSITE_REFERRALS
, r
);
714 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_PROPERTY_FLAG_ROOT_SCALABILITY", DFS_PROPERTY_FLAG_ROOT_SCALABILITY
, r
);
715 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_PROPERTY_FLAG_SITE_COSTING", DFS_PROPERTY_FLAG_SITE_COSTING
, r
);
716 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_PROPERTY_FLAG_TARGET_FAILBACK", DFS_PROPERTY_FLAG_TARGET_FAILBACK
, r
);
717 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_PROPERTY_FLAG_CLUSTER_ENABLED", DFS_PROPERTY_FLAG_CLUSTER_ENABLED
, r
);
721 static enum ndr_err_code
ndr_push_dfs_Info5(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info5
*r
)
723 if (ndr_flags
& NDR_SCALARS
) {
724 NDR_CHECK(ndr_push_align(ndr
, 5));
725 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->path
));
726 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
727 NDR_CHECK(ndr_push_dfs_VolumeState(ndr
, NDR_SCALARS
, r
->state
));
728 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->timeout
));
729 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
730 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr
, NDR_SCALARS
, r
->flags
));
731 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pktsize
));
732 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_stores
));
733 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
735 if (ndr_flags
& NDR_BUFFERS
) {
737 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
738 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
739 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
740 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->path
, ndr_charset_length(r
->path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
743 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
744 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
745 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
746 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
749 return NDR_ERR_SUCCESS
;
752 static enum ndr_err_code
ndr_pull_dfs_Info5(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info5
*r
)
755 TALLOC_CTX
*_mem_save_path_0
;
756 uint32_t _ptr_comment
;
757 TALLOC_CTX
*_mem_save_comment_0
;
758 if (ndr_flags
& NDR_SCALARS
) {
759 NDR_CHECK(ndr_pull_align(ndr
, 5));
760 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_path
));
762 NDR_PULL_ALLOC(ndr
, r
->path
);
766 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
768 NDR_PULL_ALLOC(ndr
, r
->comment
);
772 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr
, NDR_SCALARS
, &r
->state
));
773 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->timeout
));
774 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
775 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr
, NDR_SCALARS
, &r
->flags
));
776 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pktsize
));
777 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_stores
));
778 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
780 if (ndr_flags
& NDR_BUFFERS
) {
782 _mem_save_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
783 NDR_PULL_SET_MEM_CTX(ndr
, r
->path
, 0);
784 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->path
));
785 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->path
));
786 if (ndr_get_array_length(ndr
, &r
->path
) > ndr_get_array_size(ndr
, &r
->path
)) {
787 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->path
), ndr_get_array_length(ndr
, &r
->path
));
789 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t)));
790 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->path
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t), CH_UTF16
));
791 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_path_0
, 0);
794 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
795 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
796 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
797 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
798 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
799 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->comment
), ndr_get_array_length(ndr
, &r
->comment
));
801 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
802 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
803 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
806 return NDR_ERR_SUCCESS
;
809 _PUBLIC_
void ndr_print_dfs_Info5(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info5
*r
)
811 ndr_print_struct(ndr
, name
, "dfs_Info5");
813 ndr_print_ptr(ndr
, "path", r
->path
);
816 ndr_print_string(ndr
, "path", r
->path
);
819 ndr_print_ptr(ndr
, "comment", r
->comment
);
822 ndr_print_string(ndr
, "comment", r
->comment
);
825 ndr_print_dfs_VolumeState(ndr
, "state", r
->state
);
826 ndr_print_uint32(ndr
, "timeout", r
->timeout
);
827 ndr_print_GUID(ndr
, "guid", &r
->guid
);
828 ndr_print_dfs_PropertyFlags(ndr
, "flags", r
->flags
);
829 ndr_print_uint32(ndr
, "pktsize", r
->pktsize
);
830 ndr_print_uint32(ndr
, "num_stores", r
->num_stores
);
834 static enum ndr_err_code
ndr_push_dfs_Target_PriorityClass(struct ndr_push
*ndr
, int ndr_flags
, enum dfs_Target_PriorityClass r
)
836 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
837 return NDR_ERR_SUCCESS
;
840 static enum ndr_err_code
ndr_pull_dfs_Target_PriorityClass(struct ndr_pull
*ndr
, int ndr_flags
, enum dfs_Target_PriorityClass
*r
)
843 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
845 return NDR_ERR_SUCCESS
;
848 _PUBLIC_
void ndr_print_dfs_Target_PriorityClass(struct ndr_print
*ndr
, const char *name
, enum dfs_Target_PriorityClass r
)
850 const char *val
= NULL
;
853 case DFS_INVALID_PRIORITY_CLASS
: val
= "DFS_INVALID_PRIORITY_CLASS"; break;
854 case DFS_SITE_COST_NORMAL_PRIORITY_CLASS
: val
= "DFS_SITE_COST_NORMAL_PRIORITY_CLASS"; break;
855 case DFS_GLOBAL_HIGH_PRIORITY_CLASS
: val
= "DFS_GLOBAL_HIGH_PRIORITY_CLASS"; break;
856 case DFS_SITE_COST_HIGH_PRIORITY_CLASS
: val
= "DFS_SITE_COST_HIGH_PRIORITY_CLASS"; break;
857 case DFS_SITE_COST_LOW_PRIORITY_CLASS
: val
= "DFS_SITE_COST_LOW_PRIORITY_CLASS"; break;
858 case DFS_GLOBAL_LOW_PRIORITY_CLASS
: val
= "DFS_GLOBAL_LOW_PRIORITY_CLASS"; break;
860 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
863 static enum ndr_err_code
ndr_push_dfs_Target_Priority(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Target_Priority
*r
)
865 if (ndr_flags
& NDR_SCALARS
) {
866 NDR_CHECK(ndr_push_align(ndr
, 4));
867 NDR_CHECK(ndr_push_dfs_Target_PriorityClass(ndr
, NDR_SCALARS
, r
->target_priority_class
));
868 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->target_priority_rank
));
869 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->reserved
));
870 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
872 if (ndr_flags
& NDR_BUFFERS
) {
874 return NDR_ERR_SUCCESS
;
877 static enum ndr_err_code
ndr_pull_dfs_Target_Priority(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Target_Priority
*r
)
879 if (ndr_flags
& NDR_SCALARS
) {
880 NDR_CHECK(ndr_pull_align(ndr
, 4));
881 NDR_CHECK(ndr_pull_dfs_Target_PriorityClass(ndr
, NDR_SCALARS
, &r
->target_priority_class
));
882 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->target_priority_rank
));
883 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->reserved
));
884 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
886 if (ndr_flags
& NDR_BUFFERS
) {
888 return NDR_ERR_SUCCESS
;
891 _PUBLIC_
void ndr_print_dfs_Target_Priority(struct ndr_print
*ndr
, const char *name
, const struct dfs_Target_Priority
*r
)
893 ndr_print_struct(ndr
, name
, "dfs_Target_Priority");
895 ndr_print_dfs_Target_PriorityClass(ndr
, "target_priority_class", r
->target_priority_class
);
896 ndr_print_uint16(ndr
, "target_priority_rank", r
->target_priority_rank
);
897 ndr_print_uint16(ndr
, "reserved", r
->reserved
);
901 static enum ndr_err_code
ndr_push_dfs_StorageInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_StorageInfo2
*r
)
903 if (ndr_flags
& NDR_SCALARS
) {
904 NDR_CHECK(ndr_push_align(ndr
, 5));
905 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr
, NDR_SCALARS
, &r
->info
));
906 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr
, NDR_SCALARS
, &r
->target_priority
));
907 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
909 if (ndr_flags
& NDR_BUFFERS
) {
910 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr
, NDR_BUFFERS
, &r
->info
));
912 return NDR_ERR_SUCCESS
;
915 static enum ndr_err_code
ndr_pull_dfs_StorageInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_StorageInfo2
*r
)
917 if (ndr_flags
& NDR_SCALARS
) {
918 NDR_CHECK(ndr_pull_align(ndr
, 5));
919 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr
, NDR_SCALARS
, &r
->info
));
920 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr
, NDR_SCALARS
, &r
->target_priority
));
921 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
923 if (ndr_flags
& NDR_BUFFERS
) {
924 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr
, NDR_BUFFERS
, &r
->info
));
926 return NDR_ERR_SUCCESS
;
929 _PUBLIC_
void ndr_print_dfs_StorageInfo2(struct ndr_print
*ndr
, const char *name
, const struct dfs_StorageInfo2
*r
)
931 ndr_print_struct(ndr
, name
, "dfs_StorageInfo2");
933 ndr_print_dfs_StorageInfo(ndr
, "info", &r
->info
);
934 ndr_print_dfs_Target_Priority(ndr
, "target_priority", &r
->target_priority
);
938 static enum ndr_err_code
ndr_push_dfs_Info6(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info6
*r
)
940 uint32_t cntr_stores_1
;
941 if (ndr_flags
& NDR_SCALARS
) {
942 NDR_CHECK(ndr_push_align(ndr
, 5));
943 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entry_path
));
944 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
945 NDR_CHECK(ndr_push_dfs_VolumeState(ndr
, NDR_SCALARS
, r
->state
));
946 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->timeout
));
947 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
948 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr
, NDR_SCALARS
, r
->flags
));
949 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pktsize
));
950 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->num_stores
));
951 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->stores
));
952 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
954 if (ndr_flags
& NDR_BUFFERS
) {
956 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->entry_path
, CH_UTF16
)));
957 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
958 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->entry_path
, CH_UTF16
)));
959 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->entry_path
, ndr_charset_length(r
->entry_path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
962 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
963 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
964 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
965 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
968 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->num_stores
));
969 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
970 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr
, NDR_SCALARS
, &r
->stores
[cntr_stores_1
]));
972 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
973 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr
, NDR_BUFFERS
, &r
->stores
[cntr_stores_1
]));
977 return NDR_ERR_SUCCESS
;
980 static enum ndr_err_code
ndr_pull_dfs_Info6(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info6
*r
)
982 uint32_t _ptr_entry_path
;
983 TALLOC_CTX
*_mem_save_entry_path_0
;
984 uint32_t _ptr_comment
;
985 TALLOC_CTX
*_mem_save_comment_0
;
986 uint32_t _ptr_stores
;
987 uint32_t cntr_stores_1
;
988 TALLOC_CTX
*_mem_save_stores_0
;
989 TALLOC_CTX
*_mem_save_stores_1
;
990 if (ndr_flags
& NDR_SCALARS
) {
991 NDR_CHECK(ndr_pull_align(ndr
, 5));
992 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entry_path
));
993 if (_ptr_entry_path
) {
994 NDR_PULL_ALLOC(ndr
, r
->entry_path
);
996 r
->entry_path
= NULL
;
998 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
1000 NDR_PULL_ALLOC(ndr
, r
->comment
);
1004 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr
, NDR_SCALARS
, &r
->state
));
1005 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->timeout
));
1006 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
1007 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr
, NDR_SCALARS
, &r
->flags
));
1008 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pktsize
));
1009 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->num_stores
));
1010 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_stores
));
1012 NDR_PULL_ALLOC(ndr
, r
->stores
);
1016 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1018 if (ndr_flags
& NDR_BUFFERS
) {
1019 if (r
->entry_path
) {
1020 _mem_save_entry_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1021 NDR_PULL_SET_MEM_CTX(ndr
, r
->entry_path
, 0);
1022 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->entry_path
));
1023 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->entry_path
));
1024 if (ndr_get_array_length(ndr
, &r
->entry_path
) > ndr_get_array_size(ndr
, &r
->entry_path
)) {
1025 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->entry_path
), ndr_get_array_length(ndr
, &r
->entry_path
));
1027 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->entry_path
), sizeof(uint16_t)));
1028 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->entry_path
, ndr_get_array_length(ndr
, &r
->entry_path
), sizeof(uint16_t), CH_UTF16
));
1029 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entry_path_0
, 0);
1032 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1033 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
1034 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
1035 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
1036 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
1037 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->comment
), ndr_get_array_length(ndr
, &r
->comment
));
1039 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
1040 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
1041 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
1044 _mem_save_stores_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1045 NDR_PULL_SET_MEM_CTX(ndr
, r
->stores
, 0);
1046 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->stores
));
1047 NDR_PULL_ALLOC_N(ndr
, r
->stores
, ndr_get_array_size(ndr
, &r
->stores
));
1048 _mem_save_stores_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1049 NDR_PULL_SET_MEM_CTX(ndr
, r
->stores
, 0);
1050 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
1051 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr
, NDR_SCALARS
, &r
->stores
[cntr_stores_1
]));
1053 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
1054 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr
, NDR_BUFFERS
, &r
->stores
[cntr_stores_1
]));
1056 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_stores_1
, 0);
1057 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_stores_0
, 0);
1060 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->stores
, r
->num_stores
));
1063 return NDR_ERR_SUCCESS
;
1066 _PUBLIC_
void ndr_print_dfs_Info6(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info6
*r
)
1068 uint32_t cntr_stores_1
;
1069 ndr_print_struct(ndr
, name
, "dfs_Info6");
1071 ndr_print_ptr(ndr
, "entry_path", r
->entry_path
);
1073 if (r
->entry_path
) {
1074 ndr_print_string(ndr
, "entry_path", r
->entry_path
);
1077 ndr_print_ptr(ndr
, "comment", r
->comment
);
1080 ndr_print_string(ndr
, "comment", r
->comment
);
1083 ndr_print_dfs_VolumeState(ndr
, "state", r
->state
);
1084 ndr_print_uint32(ndr
, "timeout", r
->timeout
);
1085 ndr_print_GUID(ndr
, "guid", &r
->guid
);
1086 ndr_print_dfs_PropertyFlags(ndr
, "flags", r
->flags
);
1087 ndr_print_uint32(ndr
, "pktsize", r
->pktsize
);
1088 ndr_print_uint16(ndr
, "num_stores", r
->num_stores
);
1089 ndr_print_ptr(ndr
, "stores", r
->stores
);
1092 ndr
->print(ndr
, "%s: ARRAY(%d)", "stores", (int)r
->num_stores
);
1094 for (cntr_stores_1
=0;cntr_stores_1
<r
->num_stores
;cntr_stores_1
++) {
1096 if (asprintf(&idx_1
, "[%d]", cntr_stores_1
) != -1) {
1097 ndr_print_dfs_StorageInfo2(ndr
, "stores", &r
->stores
[cntr_stores_1
]);
1107 static enum ndr_err_code
ndr_push_dfs_Info7(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info7
*r
)
1109 if (ndr_flags
& NDR_SCALARS
) {
1110 NDR_CHECK(ndr_push_align(ndr
, 4));
1111 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->generation_guid
));
1112 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
1114 if (ndr_flags
& NDR_BUFFERS
) {
1116 return NDR_ERR_SUCCESS
;
1119 static enum ndr_err_code
ndr_pull_dfs_Info7(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info7
*r
)
1121 if (ndr_flags
& NDR_SCALARS
) {
1122 NDR_CHECK(ndr_pull_align(ndr
, 4));
1123 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->generation_guid
));
1124 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
1126 if (ndr_flags
& NDR_BUFFERS
) {
1128 return NDR_ERR_SUCCESS
;
1131 _PUBLIC_
void ndr_print_dfs_Info7(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info7
*r
)
1133 ndr_print_struct(ndr
, name
, "dfs_Info7");
1135 ndr_print_GUID(ndr
, "generation_guid", &r
->generation_guid
);
1139 static enum ndr_err_code
ndr_push_dfs_Info100(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info100
*r
)
1141 if (ndr_flags
& NDR_SCALARS
) {
1142 NDR_CHECK(ndr_push_align(ndr
, 5));
1143 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
1144 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1146 if (ndr_flags
& NDR_BUFFERS
) {
1148 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
1149 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
1150 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
1151 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1154 return NDR_ERR_SUCCESS
;
1157 static enum ndr_err_code
ndr_pull_dfs_Info100(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info100
*r
)
1159 uint32_t _ptr_comment
;
1160 TALLOC_CTX
*_mem_save_comment_0
;
1161 if (ndr_flags
& NDR_SCALARS
) {
1162 NDR_CHECK(ndr_pull_align(ndr
, 5));
1163 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
1165 NDR_PULL_ALLOC(ndr
, r
->comment
);
1169 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1171 if (ndr_flags
& NDR_BUFFERS
) {
1173 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1174 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
1175 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
1176 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
1177 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
1178 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->comment
), ndr_get_array_length(ndr
, &r
->comment
));
1180 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
1181 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
1182 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
1185 return NDR_ERR_SUCCESS
;
1188 _PUBLIC_
void ndr_print_dfs_Info100(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info100
*r
)
1190 ndr_print_struct(ndr
, name
, "dfs_Info100");
1192 ndr_print_ptr(ndr
, "comment", r
->comment
);
1195 ndr_print_string(ndr
, "comment", r
->comment
);
1201 static enum ndr_err_code
ndr_push_dfs_Info101(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info101
*r
)
1203 if (ndr_flags
& NDR_SCALARS
) {
1204 NDR_CHECK(ndr_push_align(ndr
, 4));
1205 NDR_CHECK(ndr_push_dfs_StorageState(ndr
, NDR_SCALARS
, r
->state
));
1206 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
1208 if (ndr_flags
& NDR_BUFFERS
) {
1210 return NDR_ERR_SUCCESS
;
1213 static enum ndr_err_code
ndr_pull_dfs_Info101(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info101
*r
)
1215 if (ndr_flags
& NDR_SCALARS
) {
1216 NDR_CHECK(ndr_pull_align(ndr
, 4));
1217 NDR_CHECK(ndr_pull_dfs_StorageState(ndr
, NDR_SCALARS
, &r
->state
));
1218 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
1220 if (ndr_flags
& NDR_BUFFERS
) {
1222 return NDR_ERR_SUCCESS
;
1225 _PUBLIC_
void ndr_print_dfs_Info101(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info101
*r
)
1227 ndr_print_struct(ndr
, name
, "dfs_Info101");
1229 ndr_print_dfs_StorageState(ndr
, "state", r
->state
);
1233 static enum ndr_err_code
ndr_push_dfs_Info102(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info102
*r
)
1235 if (ndr_flags
& NDR_SCALARS
) {
1236 NDR_CHECK(ndr_push_align(ndr
, 4));
1237 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->timeout
));
1238 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
1240 if (ndr_flags
& NDR_BUFFERS
) {
1242 return NDR_ERR_SUCCESS
;
1245 static enum ndr_err_code
ndr_pull_dfs_Info102(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info102
*r
)
1247 if (ndr_flags
& NDR_SCALARS
) {
1248 NDR_CHECK(ndr_pull_align(ndr
, 4));
1249 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->timeout
));
1250 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
1252 if (ndr_flags
& NDR_BUFFERS
) {
1254 return NDR_ERR_SUCCESS
;
1257 _PUBLIC_
void ndr_print_dfs_Info102(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info102
*r
)
1259 ndr_print_struct(ndr
, name
, "dfs_Info102");
1261 ndr_print_uint32(ndr
, "timeout", r
->timeout
);
1265 static enum ndr_err_code
ndr_push_dfs_Info103(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info103
*r
)
1267 if (ndr_flags
& NDR_SCALARS
) {
1268 NDR_CHECK(ndr_push_align(ndr
, 4));
1269 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr
, NDR_SCALARS
, r
->flags
));
1270 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
1272 if (ndr_flags
& NDR_BUFFERS
) {
1274 return NDR_ERR_SUCCESS
;
1277 static enum ndr_err_code
ndr_pull_dfs_Info103(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info103
*r
)
1279 if (ndr_flags
& NDR_SCALARS
) {
1280 NDR_CHECK(ndr_pull_align(ndr
, 4));
1281 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr
, NDR_SCALARS
, &r
->flags
));
1282 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
1284 if (ndr_flags
& NDR_BUFFERS
) {
1286 return NDR_ERR_SUCCESS
;
1289 _PUBLIC_
void ndr_print_dfs_Info103(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info103
*r
)
1291 ndr_print_struct(ndr
, name
, "dfs_Info103");
1293 ndr_print_dfs_PropertyFlags(ndr
, "flags", r
->flags
);
1297 static enum ndr_err_code
ndr_push_dfs_Info104(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info104
*r
)
1299 if (ndr_flags
& NDR_SCALARS
) {
1300 NDR_CHECK(ndr_push_align(ndr
, 4));
1301 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr
, NDR_SCALARS
, &r
->priority
));
1302 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
1304 if (ndr_flags
& NDR_BUFFERS
) {
1306 return NDR_ERR_SUCCESS
;
1309 static enum ndr_err_code
ndr_pull_dfs_Info104(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info104
*r
)
1311 if (ndr_flags
& NDR_SCALARS
) {
1312 NDR_CHECK(ndr_pull_align(ndr
, 4));
1313 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr
, NDR_SCALARS
, &r
->priority
));
1314 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
1316 if (ndr_flags
& NDR_BUFFERS
) {
1318 return NDR_ERR_SUCCESS
;
1321 _PUBLIC_
void ndr_print_dfs_Info104(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info104
*r
)
1323 ndr_print_struct(ndr
, name
, "dfs_Info104");
1325 ndr_print_dfs_Target_Priority(ndr
, "priority", &r
->priority
);
1329 static enum ndr_err_code
ndr_push_dfs_Info105(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info105
*r
)
1331 if (ndr_flags
& NDR_SCALARS
) {
1332 NDR_CHECK(ndr_push_align(ndr
, 5));
1333 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
1334 NDR_CHECK(ndr_push_dfs_VolumeState(ndr
, NDR_SCALARS
, r
->state
));
1335 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->timeout
));
1336 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->property_flag_mask
));
1337 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->property_flags
));
1338 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1340 if (ndr_flags
& NDR_BUFFERS
) {
1342 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
1343 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
1344 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
1345 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1348 return NDR_ERR_SUCCESS
;
1351 static enum ndr_err_code
ndr_pull_dfs_Info105(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info105
*r
)
1353 uint32_t _ptr_comment
;
1354 TALLOC_CTX
*_mem_save_comment_0
;
1355 if (ndr_flags
& NDR_SCALARS
) {
1356 NDR_CHECK(ndr_pull_align(ndr
, 5));
1357 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
1359 NDR_PULL_ALLOC(ndr
, r
->comment
);
1363 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr
, NDR_SCALARS
, &r
->state
));
1364 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->timeout
));
1365 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->property_flag_mask
));
1366 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->property_flags
));
1367 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1369 if (ndr_flags
& NDR_BUFFERS
) {
1371 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1372 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
1373 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
1374 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
1375 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
1376 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->comment
), ndr_get_array_length(ndr
, &r
->comment
));
1378 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
1379 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
1380 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
1383 return NDR_ERR_SUCCESS
;
1386 _PUBLIC_
void ndr_print_dfs_Info105(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info105
*r
)
1388 ndr_print_struct(ndr
, name
, "dfs_Info105");
1390 ndr_print_ptr(ndr
, "comment", r
->comment
);
1393 ndr_print_string(ndr
, "comment", r
->comment
);
1396 ndr_print_dfs_VolumeState(ndr
, "state", r
->state
);
1397 ndr_print_uint32(ndr
, "timeout", r
->timeout
);
1398 ndr_print_uint32(ndr
, "property_flag_mask", r
->property_flag_mask
);
1399 ndr_print_uint32(ndr
, "property_flags", r
->property_flags
);
1403 static enum ndr_err_code
ndr_push_dfs_Info106(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info106
*r
)
1405 if (ndr_flags
& NDR_SCALARS
) {
1406 NDR_CHECK(ndr_push_align(ndr
, 4));
1407 NDR_CHECK(ndr_push_dfs_StorageState(ndr
, NDR_SCALARS
, r
->state
));
1408 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr
, NDR_SCALARS
, &r
->priority
));
1409 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
1411 if (ndr_flags
& NDR_BUFFERS
) {
1413 return NDR_ERR_SUCCESS
;
1416 static enum ndr_err_code
ndr_pull_dfs_Info106(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info106
*r
)
1418 if (ndr_flags
& NDR_SCALARS
) {
1419 NDR_CHECK(ndr_pull_align(ndr
, 4));
1420 NDR_CHECK(ndr_pull_dfs_StorageState(ndr
, NDR_SCALARS
, &r
->state
));
1421 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr
, NDR_SCALARS
, &r
->priority
));
1422 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
1424 if (ndr_flags
& NDR_BUFFERS
) {
1426 return NDR_ERR_SUCCESS
;
1429 _PUBLIC_
void ndr_print_dfs_Info106(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info106
*r
)
1431 ndr_print_struct(ndr
, name
, "dfs_Info106");
1433 ndr_print_dfs_StorageState(ndr
, "state", r
->state
);
1434 ndr_print_dfs_Target_Priority(ndr
, "priority", &r
->priority
);
1438 static enum ndr_err_code
ndr_push_dfs_Info200(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info200
*r
)
1440 if (ndr_flags
& NDR_SCALARS
) {
1441 NDR_CHECK(ndr_push_align(ndr
, 5));
1442 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dom_root
));
1443 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1445 if (ndr_flags
& NDR_BUFFERS
) {
1447 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dom_root
, CH_UTF16
)));
1448 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
1449 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dom_root
, CH_UTF16
)));
1450 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dom_root
, ndr_charset_length(r
->dom_root
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1453 return NDR_ERR_SUCCESS
;
1456 static enum ndr_err_code
ndr_pull_dfs_Info200(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info200
*r
)
1458 uint32_t _ptr_dom_root
;
1459 TALLOC_CTX
*_mem_save_dom_root_0
;
1460 if (ndr_flags
& NDR_SCALARS
) {
1461 NDR_CHECK(ndr_pull_align(ndr
, 5));
1462 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dom_root
));
1463 if (_ptr_dom_root
) {
1464 NDR_PULL_ALLOC(ndr
, r
->dom_root
);
1468 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1470 if (ndr_flags
& NDR_BUFFERS
) {
1472 _mem_save_dom_root_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1473 NDR_PULL_SET_MEM_CTX(ndr
, r
->dom_root
, 0);
1474 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dom_root
));
1475 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dom_root
));
1476 if (ndr_get_array_length(ndr
, &r
->dom_root
) > ndr_get_array_size(ndr
, &r
->dom_root
)) {
1477 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->dom_root
), ndr_get_array_length(ndr
, &r
->dom_root
));
1479 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dom_root
), sizeof(uint16_t)));
1480 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dom_root
, ndr_get_array_length(ndr
, &r
->dom_root
), sizeof(uint16_t), CH_UTF16
));
1481 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dom_root_0
, 0);
1484 return NDR_ERR_SUCCESS
;
1487 _PUBLIC_
void ndr_print_dfs_Info200(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info200
*r
)
1489 ndr_print_struct(ndr
, name
, "dfs_Info200");
1491 ndr_print_ptr(ndr
, "dom_root", r
->dom_root
);
1494 ndr_print_string(ndr
, "dom_root", r
->dom_root
);
1500 static enum ndr_err_code
ndr_push_dfs_VolumeFlavor(struct ndr_push
*ndr
, int ndr_flags
, enum dfs_VolumeFlavor r
)
1502 NDR_CHECK(ndr_push_enum_uint1632(ndr
, NDR_SCALARS
, r
));
1503 return NDR_ERR_SUCCESS
;
1506 static enum ndr_err_code
ndr_pull_dfs_VolumeFlavor(struct ndr_pull
*ndr
, int ndr_flags
, enum dfs_VolumeFlavor
*r
)
1509 NDR_CHECK(ndr_pull_enum_uint1632(ndr
, NDR_SCALARS
, &v
));
1511 return NDR_ERR_SUCCESS
;
1514 _PUBLIC_
void ndr_print_dfs_VolumeFlavor(struct ndr_print
*ndr
, const char *name
, enum dfs_VolumeFlavor r
)
1516 const char *val
= NULL
;
1519 case DFS_VOLUME_FLAVOR_STANDALONE
: val
= "DFS_VOLUME_FLAVOR_STANDALONE"; break;
1520 case DFS_VOLUME_FLAVOR_AD_BLOB
: val
= "DFS_VOLUME_FLAVOR_AD_BLOB"; break;
1522 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1525 static enum ndr_err_code
ndr_push_dfs_Info300(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info300
*r
)
1527 if (ndr_flags
& NDR_SCALARS
) {
1528 NDR_CHECK(ndr_push_align(ndr
, 5));
1529 NDR_CHECK(ndr_push_dfs_VolumeFlavor(ndr
, NDR_SCALARS
, r
->flavor
));
1530 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dom_root
));
1531 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1533 if (ndr_flags
& NDR_BUFFERS
) {
1535 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dom_root
, CH_UTF16
)));
1536 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
1537 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dom_root
, CH_UTF16
)));
1538 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dom_root
, ndr_charset_length(r
->dom_root
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1541 return NDR_ERR_SUCCESS
;
1544 static enum ndr_err_code
ndr_pull_dfs_Info300(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info300
*r
)
1546 uint32_t _ptr_dom_root
;
1547 TALLOC_CTX
*_mem_save_dom_root_0
;
1548 if (ndr_flags
& NDR_SCALARS
) {
1549 NDR_CHECK(ndr_pull_align(ndr
, 5));
1550 NDR_CHECK(ndr_pull_dfs_VolumeFlavor(ndr
, NDR_SCALARS
, &r
->flavor
));
1551 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dom_root
));
1552 if (_ptr_dom_root
) {
1553 NDR_PULL_ALLOC(ndr
, r
->dom_root
);
1557 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1559 if (ndr_flags
& NDR_BUFFERS
) {
1561 _mem_save_dom_root_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1562 NDR_PULL_SET_MEM_CTX(ndr
, r
->dom_root
, 0);
1563 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dom_root
));
1564 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dom_root
));
1565 if (ndr_get_array_length(ndr
, &r
->dom_root
) > ndr_get_array_size(ndr
, &r
->dom_root
)) {
1566 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->dom_root
), ndr_get_array_length(ndr
, &r
->dom_root
));
1568 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dom_root
), sizeof(uint16_t)));
1569 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dom_root
, ndr_get_array_length(ndr
, &r
->dom_root
), sizeof(uint16_t), CH_UTF16
));
1570 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dom_root_0
, 0);
1573 return NDR_ERR_SUCCESS
;
1576 _PUBLIC_
void ndr_print_dfs_Info300(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info300
*r
)
1578 ndr_print_struct(ndr
, name
, "dfs_Info300");
1580 ndr_print_dfs_VolumeFlavor(ndr
, "flavor", r
->flavor
);
1581 ndr_print_ptr(ndr
, "dom_root", r
->dom_root
);
1584 ndr_print_string(ndr
, "dom_root", r
->dom_root
);
1590 static enum ndr_err_code
ndr_push_dfs_Info(struct ndr_push
*ndr
, int ndr_flags
, const union dfs_Info
*r
)
1592 if (ndr_flags
& NDR_SCALARS
) {
1593 int level
= ndr_push_get_switch_value(ndr
, r
);
1594 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
1595 NDR_CHECK(ndr_push_union_align(ndr
, 5));
1598 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info0
));
1602 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
1606 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info2
));
1610 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info3
));
1614 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info4
));
1618 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info5
));
1622 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info6
));
1626 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info7
));
1630 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info100
));
1634 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info101
));
1638 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info102
));
1642 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info103
));
1646 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info104
));
1650 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info105
));
1654 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info106
));
1658 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1661 if (ndr_flags
& NDR_BUFFERS
) {
1662 int level
= ndr_push_get_switch_value(ndr
, r
);
1666 NDR_CHECK(ndr_push_dfs_Info0(ndr
, NDR_SCALARS
, r
->info0
));
1672 NDR_CHECK(ndr_push_dfs_Info1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
1678 NDR_CHECK(ndr_push_dfs_Info2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
1684 NDR_CHECK(ndr_push_dfs_Info3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info3
));
1690 NDR_CHECK(ndr_push_dfs_Info4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
1696 NDR_CHECK(ndr_push_dfs_Info5(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info5
));
1702 NDR_CHECK(ndr_push_dfs_Info6(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info6
));
1708 NDR_CHECK(ndr_push_dfs_Info7(ndr
, NDR_SCALARS
, r
->info7
));
1714 NDR_CHECK(ndr_push_dfs_Info100(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info100
));
1720 NDR_CHECK(ndr_push_dfs_Info101(ndr
, NDR_SCALARS
, r
->info101
));
1726 NDR_CHECK(ndr_push_dfs_Info102(ndr
, NDR_SCALARS
, r
->info102
));
1732 NDR_CHECK(ndr_push_dfs_Info103(ndr
, NDR_SCALARS
, r
->info103
));
1738 NDR_CHECK(ndr_push_dfs_Info104(ndr
, NDR_SCALARS
, r
->info104
));
1744 NDR_CHECK(ndr_push_dfs_Info105(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info105
));
1750 NDR_CHECK(ndr_push_dfs_Info106(ndr
, NDR_SCALARS
, r
->info106
));
1755 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1758 return NDR_ERR_SUCCESS
;
1761 static enum ndr_err_code
ndr_pull_dfs_Info(struct ndr_pull
*ndr
, int ndr_flags
, union dfs_Info
*r
)
1765 TALLOC_CTX
*_mem_save_info0_0
;
1766 TALLOC_CTX
*_mem_save_info1_0
;
1767 TALLOC_CTX
*_mem_save_info2_0
;
1768 TALLOC_CTX
*_mem_save_info3_0
;
1769 TALLOC_CTX
*_mem_save_info4_0
;
1770 TALLOC_CTX
*_mem_save_info5_0
;
1771 TALLOC_CTX
*_mem_save_info6_0
;
1772 TALLOC_CTX
*_mem_save_info7_0
;
1773 TALLOC_CTX
*_mem_save_info100_0
;
1774 TALLOC_CTX
*_mem_save_info101_0
;
1775 TALLOC_CTX
*_mem_save_info102_0
;
1776 TALLOC_CTX
*_mem_save_info103_0
;
1777 TALLOC_CTX
*_mem_save_info104_0
;
1778 TALLOC_CTX
*_mem_save_info105_0
;
1779 TALLOC_CTX
*_mem_save_info106_0
;
1780 level
= ndr_pull_get_switch_value(ndr
, r
);
1781 if (ndr_flags
& NDR_SCALARS
) {
1782 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
1783 if (_level
!= level
) {
1784 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
1786 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
1789 uint32_t _ptr_info0
;
1790 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info0
));
1792 NDR_PULL_ALLOC(ndr
, r
->info0
);
1799 uint32_t _ptr_info1
;
1800 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
1802 NDR_PULL_ALLOC(ndr
, r
->info1
);
1809 uint32_t _ptr_info2
;
1810 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info2
));
1812 NDR_PULL_ALLOC(ndr
, r
->info2
);
1819 uint32_t _ptr_info3
;
1820 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info3
));
1822 NDR_PULL_ALLOC(ndr
, r
->info3
);
1829 uint32_t _ptr_info4
;
1830 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info4
));
1832 NDR_PULL_ALLOC(ndr
, r
->info4
);
1839 uint32_t _ptr_info5
;
1840 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info5
));
1842 NDR_PULL_ALLOC(ndr
, r
->info5
);
1849 uint32_t _ptr_info6
;
1850 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info6
));
1852 NDR_PULL_ALLOC(ndr
, r
->info6
);
1859 uint32_t _ptr_info7
;
1860 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info7
));
1862 NDR_PULL_ALLOC(ndr
, r
->info7
);
1869 uint32_t _ptr_info100
;
1870 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info100
));
1872 NDR_PULL_ALLOC(ndr
, r
->info100
);
1879 uint32_t _ptr_info101
;
1880 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info101
));
1882 NDR_PULL_ALLOC(ndr
, r
->info101
);
1889 uint32_t _ptr_info102
;
1890 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info102
));
1892 NDR_PULL_ALLOC(ndr
, r
->info102
);
1899 uint32_t _ptr_info103
;
1900 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info103
));
1902 NDR_PULL_ALLOC(ndr
, r
->info103
);
1909 uint32_t _ptr_info104
;
1910 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info104
));
1912 NDR_PULL_ALLOC(ndr
, r
->info104
);
1919 uint32_t _ptr_info105
;
1920 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info105
));
1922 NDR_PULL_ALLOC(ndr
, r
->info105
);
1929 uint32_t _ptr_info106
;
1930 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info106
));
1932 NDR_PULL_ALLOC(ndr
, r
->info106
);
1939 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1942 if (ndr_flags
& NDR_BUFFERS
) {
1946 _mem_save_info0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1947 NDR_PULL_SET_MEM_CTX(ndr
, r
->info0
, 0);
1948 NDR_CHECK(ndr_pull_dfs_Info0(ndr
, NDR_SCALARS
, r
->info0
));
1949 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info0_0
, 0);
1955 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1956 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
1957 NDR_CHECK(ndr_pull_dfs_Info1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
1958 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
1964 _mem_save_info2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1965 NDR_PULL_SET_MEM_CTX(ndr
, r
->info2
, 0);
1966 NDR_CHECK(ndr_pull_dfs_Info2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
1967 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info2_0
, 0);
1973 _mem_save_info3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1974 NDR_PULL_SET_MEM_CTX(ndr
, r
->info3
, 0);
1975 NDR_CHECK(ndr_pull_dfs_Info3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info3
));
1976 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info3_0
, 0);
1982 _mem_save_info4_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1983 NDR_PULL_SET_MEM_CTX(ndr
, r
->info4
, 0);
1984 NDR_CHECK(ndr_pull_dfs_Info4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
1985 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info4_0
, 0);
1991 _mem_save_info5_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1992 NDR_PULL_SET_MEM_CTX(ndr
, r
->info5
, 0);
1993 NDR_CHECK(ndr_pull_dfs_Info5(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info5
));
1994 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info5_0
, 0);
2000 _mem_save_info6_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2001 NDR_PULL_SET_MEM_CTX(ndr
, r
->info6
, 0);
2002 NDR_CHECK(ndr_pull_dfs_Info6(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info6
));
2003 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info6_0
, 0);
2009 _mem_save_info7_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2010 NDR_PULL_SET_MEM_CTX(ndr
, r
->info7
, 0);
2011 NDR_CHECK(ndr_pull_dfs_Info7(ndr
, NDR_SCALARS
, r
->info7
));
2012 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info7_0
, 0);
2018 _mem_save_info100_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2019 NDR_PULL_SET_MEM_CTX(ndr
, r
->info100
, 0);
2020 NDR_CHECK(ndr_pull_dfs_Info100(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info100
));
2021 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info100_0
, 0);
2027 _mem_save_info101_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2028 NDR_PULL_SET_MEM_CTX(ndr
, r
->info101
, 0);
2029 NDR_CHECK(ndr_pull_dfs_Info101(ndr
, NDR_SCALARS
, r
->info101
));
2030 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info101_0
, 0);
2036 _mem_save_info102_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2037 NDR_PULL_SET_MEM_CTX(ndr
, r
->info102
, 0);
2038 NDR_CHECK(ndr_pull_dfs_Info102(ndr
, NDR_SCALARS
, r
->info102
));
2039 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info102_0
, 0);
2045 _mem_save_info103_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2046 NDR_PULL_SET_MEM_CTX(ndr
, r
->info103
, 0);
2047 NDR_CHECK(ndr_pull_dfs_Info103(ndr
, NDR_SCALARS
, r
->info103
));
2048 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info103_0
, 0);
2054 _mem_save_info104_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2055 NDR_PULL_SET_MEM_CTX(ndr
, r
->info104
, 0);
2056 NDR_CHECK(ndr_pull_dfs_Info104(ndr
, NDR_SCALARS
, r
->info104
));
2057 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info104_0
, 0);
2063 _mem_save_info105_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2064 NDR_PULL_SET_MEM_CTX(ndr
, r
->info105
, 0);
2065 NDR_CHECK(ndr_pull_dfs_Info105(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info105
));
2066 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info105_0
, 0);
2072 _mem_save_info106_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2073 NDR_PULL_SET_MEM_CTX(ndr
, r
->info106
, 0);
2074 NDR_CHECK(ndr_pull_dfs_Info106(ndr
, NDR_SCALARS
, r
->info106
));
2075 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info106_0
, 0);
2080 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
2083 return NDR_ERR_SUCCESS
;
2086 _PUBLIC_
void ndr_print_dfs_Info(struct ndr_print
*ndr
, const char *name
, const union dfs_Info
*r
)
2089 level
= ndr_print_get_switch_value(ndr
, r
);
2090 ndr_print_union(ndr
, name
, level
, "dfs_Info");
2093 ndr_print_ptr(ndr
, "info0", r
->info0
);
2096 ndr_print_dfs_Info0(ndr
, "info0", r
->info0
);
2102 ndr_print_ptr(ndr
, "info1", r
->info1
);
2105 ndr_print_dfs_Info1(ndr
, "info1", r
->info1
);
2111 ndr_print_ptr(ndr
, "info2", r
->info2
);
2114 ndr_print_dfs_Info2(ndr
, "info2", r
->info2
);
2120 ndr_print_ptr(ndr
, "info3", r
->info3
);
2123 ndr_print_dfs_Info3(ndr
, "info3", r
->info3
);
2129 ndr_print_ptr(ndr
, "info4", r
->info4
);
2132 ndr_print_dfs_Info4(ndr
, "info4", r
->info4
);
2138 ndr_print_ptr(ndr
, "info5", r
->info5
);
2141 ndr_print_dfs_Info5(ndr
, "info5", r
->info5
);
2147 ndr_print_ptr(ndr
, "info6", r
->info6
);
2150 ndr_print_dfs_Info6(ndr
, "info6", r
->info6
);
2156 ndr_print_ptr(ndr
, "info7", r
->info7
);
2159 ndr_print_dfs_Info7(ndr
, "info7", r
->info7
);
2165 ndr_print_ptr(ndr
, "info100", r
->info100
);
2168 ndr_print_dfs_Info100(ndr
, "info100", r
->info100
);
2174 ndr_print_ptr(ndr
, "info101", r
->info101
);
2177 ndr_print_dfs_Info101(ndr
, "info101", r
->info101
);
2183 ndr_print_ptr(ndr
, "info102", r
->info102
);
2186 ndr_print_dfs_Info102(ndr
, "info102", r
->info102
);
2192 ndr_print_ptr(ndr
, "info103", r
->info103
);
2195 ndr_print_dfs_Info103(ndr
, "info103", r
->info103
);
2201 ndr_print_ptr(ndr
, "info104", r
->info104
);
2204 ndr_print_dfs_Info104(ndr
, "info104", r
->info104
);
2210 ndr_print_ptr(ndr
, "info105", r
->info105
);
2213 ndr_print_dfs_Info105(ndr
, "info105", r
->info105
);
2219 ndr_print_ptr(ndr
, "info106", r
->info106
);
2222 ndr_print_dfs_Info106(ndr
, "info106", r
->info106
);
2228 ndr_print_bad_level(ndr
, name
, level
);
2232 static enum ndr_err_code
ndr_push_dfs_EnumArray1(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray1
*r
)
2235 if (ndr_flags
& NDR_SCALARS
) {
2236 NDR_CHECK(ndr_push_align(ndr
, 5));
2237 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2238 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2239 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2241 if (ndr_flags
& NDR_BUFFERS
) {
2243 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
2244 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2245 NDR_CHECK(ndr_push_dfs_Info1(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2247 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2248 NDR_CHECK(ndr_push_dfs_Info1(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2252 return NDR_ERR_SUCCESS
;
2255 static enum ndr_err_code
ndr_pull_dfs_EnumArray1(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray1
*r
)
2259 TALLOC_CTX
*_mem_save_s_0
;
2260 TALLOC_CTX
*_mem_save_s_1
;
2261 if (ndr_flags
& NDR_SCALARS
) {
2262 NDR_CHECK(ndr_pull_align(ndr
, 5));
2263 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2264 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2266 NDR_PULL_ALLOC(ndr
, r
->s
);
2270 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2272 if (ndr_flags
& NDR_BUFFERS
) {
2274 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2275 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2276 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2277 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2278 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2279 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2280 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2281 NDR_CHECK(ndr_pull_dfs_Info1(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2283 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2284 NDR_CHECK(ndr_pull_dfs_Info1(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2286 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2287 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2290 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2293 return NDR_ERR_SUCCESS
;
2296 _PUBLIC_
void ndr_print_dfs_EnumArray1(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray1
*r
)
2299 ndr_print_struct(ndr
, name
, "dfs_EnumArray1");
2301 ndr_print_uint32(ndr
, "count", r
->count
);
2302 ndr_print_ptr(ndr
, "s", r
->s
);
2305 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", (int)r
->count
);
2307 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2309 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2310 ndr_print_dfs_Info1(ndr
, "s", &r
->s
[cntr_s_1
]);
2320 static enum ndr_err_code
ndr_push_dfs_EnumArray2(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray2
*r
)
2323 if (ndr_flags
& NDR_SCALARS
) {
2324 NDR_CHECK(ndr_push_align(ndr
, 5));
2325 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2326 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2327 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2329 if (ndr_flags
& NDR_BUFFERS
) {
2331 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
2332 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2333 NDR_CHECK(ndr_push_dfs_Info2(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2335 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2336 NDR_CHECK(ndr_push_dfs_Info2(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2340 return NDR_ERR_SUCCESS
;
2343 static enum ndr_err_code
ndr_pull_dfs_EnumArray2(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray2
*r
)
2347 TALLOC_CTX
*_mem_save_s_0
;
2348 TALLOC_CTX
*_mem_save_s_1
;
2349 if (ndr_flags
& NDR_SCALARS
) {
2350 NDR_CHECK(ndr_pull_align(ndr
, 5));
2351 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2352 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2354 NDR_PULL_ALLOC(ndr
, r
->s
);
2358 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2360 if (ndr_flags
& NDR_BUFFERS
) {
2362 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2363 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2364 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2365 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2366 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2367 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2368 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2369 NDR_CHECK(ndr_pull_dfs_Info2(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2371 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2372 NDR_CHECK(ndr_pull_dfs_Info2(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2374 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2375 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2378 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2381 return NDR_ERR_SUCCESS
;
2384 _PUBLIC_
void ndr_print_dfs_EnumArray2(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray2
*r
)
2387 ndr_print_struct(ndr
, name
, "dfs_EnumArray2");
2389 ndr_print_uint32(ndr
, "count", r
->count
);
2390 ndr_print_ptr(ndr
, "s", r
->s
);
2393 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", (int)r
->count
);
2395 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2397 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2398 ndr_print_dfs_Info2(ndr
, "s", &r
->s
[cntr_s_1
]);
2408 static enum ndr_err_code
ndr_push_dfs_EnumArray3(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray3
*r
)
2411 if (ndr_flags
& NDR_SCALARS
) {
2412 NDR_CHECK(ndr_push_align(ndr
, 5));
2413 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2414 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2415 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2417 if (ndr_flags
& NDR_BUFFERS
) {
2419 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
2420 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2421 NDR_CHECK(ndr_push_dfs_Info3(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2423 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2424 NDR_CHECK(ndr_push_dfs_Info3(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2428 return NDR_ERR_SUCCESS
;
2431 static enum ndr_err_code
ndr_pull_dfs_EnumArray3(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray3
*r
)
2435 TALLOC_CTX
*_mem_save_s_0
;
2436 TALLOC_CTX
*_mem_save_s_1
;
2437 if (ndr_flags
& NDR_SCALARS
) {
2438 NDR_CHECK(ndr_pull_align(ndr
, 5));
2439 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2440 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2442 NDR_PULL_ALLOC(ndr
, r
->s
);
2446 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2448 if (ndr_flags
& NDR_BUFFERS
) {
2450 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2451 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2452 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2453 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2454 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2455 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2456 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2457 NDR_CHECK(ndr_pull_dfs_Info3(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2459 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2460 NDR_CHECK(ndr_pull_dfs_Info3(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2462 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2463 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2466 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2469 return NDR_ERR_SUCCESS
;
2472 _PUBLIC_
void ndr_print_dfs_EnumArray3(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray3
*r
)
2475 ndr_print_struct(ndr
, name
, "dfs_EnumArray3");
2477 ndr_print_uint32(ndr
, "count", r
->count
);
2478 ndr_print_ptr(ndr
, "s", r
->s
);
2481 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", (int)r
->count
);
2483 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2485 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2486 ndr_print_dfs_Info3(ndr
, "s", &r
->s
[cntr_s_1
]);
2496 static enum ndr_err_code
ndr_push_dfs_EnumArray4(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray4
*r
)
2499 if (ndr_flags
& NDR_SCALARS
) {
2500 NDR_CHECK(ndr_push_align(ndr
, 5));
2501 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2502 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2503 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2505 if (ndr_flags
& NDR_BUFFERS
) {
2507 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
2508 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2509 NDR_CHECK(ndr_push_dfs_Info4(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2511 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2512 NDR_CHECK(ndr_push_dfs_Info4(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2516 return NDR_ERR_SUCCESS
;
2519 static enum ndr_err_code
ndr_pull_dfs_EnumArray4(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray4
*r
)
2523 TALLOC_CTX
*_mem_save_s_0
;
2524 TALLOC_CTX
*_mem_save_s_1
;
2525 if (ndr_flags
& NDR_SCALARS
) {
2526 NDR_CHECK(ndr_pull_align(ndr
, 5));
2527 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2528 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2530 NDR_PULL_ALLOC(ndr
, r
->s
);
2534 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2536 if (ndr_flags
& NDR_BUFFERS
) {
2538 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2539 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2540 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2541 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2542 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2543 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2544 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2545 NDR_CHECK(ndr_pull_dfs_Info4(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2547 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2548 NDR_CHECK(ndr_pull_dfs_Info4(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2550 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2551 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2554 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2557 return NDR_ERR_SUCCESS
;
2560 _PUBLIC_
void ndr_print_dfs_EnumArray4(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray4
*r
)
2563 ndr_print_struct(ndr
, name
, "dfs_EnumArray4");
2565 ndr_print_uint32(ndr
, "count", r
->count
);
2566 ndr_print_ptr(ndr
, "s", r
->s
);
2569 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", (int)r
->count
);
2571 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2573 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2574 ndr_print_dfs_Info4(ndr
, "s", &r
->s
[cntr_s_1
]);
2584 static enum ndr_err_code
ndr_push_dfs_EnumArray5(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray5
*r
)
2587 if (ndr_flags
& NDR_SCALARS
) {
2588 NDR_CHECK(ndr_push_align(ndr
, 5));
2589 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2590 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2591 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2593 if (ndr_flags
& NDR_BUFFERS
) {
2595 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
2596 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2597 NDR_CHECK(ndr_push_dfs_Info5(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2599 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2600 NDR_CHECK(ndr_push_dfs_Info5(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2604 return NDR_ERR_SUCCESS
;
2607 static enum ndr_err_code
ndr_pull_dfs_EnumArray5(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray5
*r
)
2611 TALLOC_CTX
*_mem_save_s_0
;
2612 TALLOC_CTX
*_mem_save_s_1
;
2613 if (ndr_flags
& NDR_SCALARS
) {
2614 NDR_CHECK(ndr_pull_align(ndr
, 5));
2615 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2616 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2618 NDR_PULL_ALLOC(ndr
, r
->s
);
2622 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2624 if (ndr_flags
& NDR_BUFFERS
) {
2626 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2627 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2628 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2629 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2630 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2631 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2632 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2633 NDR_CHECK(ndr_pull_dfs_Info5(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2635 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2636 NDR_CHECK(ndr_pull_dfs_Info5(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2638 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2639 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2642 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2645 return NDR_ERR_SUCCESS
;
2648 _PUBLIC_
void ndr_print_dfs_EnumArray5(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray5
*r
)
2651 ndr_print_struct(ndr
, name
, "dfs_EnumArray5");
2653 ndr_print_uint32(ndr
, "count", r
->count
);
2654 ndr_print_ptr(ndr
, "s", r
->s
);
2657 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", (int)r
->count
);
2659 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2661 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2662 ndr_print_dfs_Info5(ndr
, "s", &r
->s
[cntr_s_1
]);
2672 static enum ndr_err_code
ndr_push_dfs_EnumArray6(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray6
*r
)
2675 if (ndr_flags
& NDR_SCALARS
) {
2676 NDR_CHECK(ndr_push_align(ndr
, 5));
2677 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2678 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2679 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2681 if (ndr_flags
& NDR_BUFFERS
) {
2683 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
2684 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2685 NDR_CHECK(ndr_push_dfs_Info6(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2687 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2688 NDR_CHECK(ndr_push_dfs_Info6(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2692 return NDR_ERR_SUCCESS
;
2695 static enum ndr_err_code
ndr_pull_dfs_EnumArray6(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray6
*r
)
2699 TALLOC_CTX
*_mem_save_s_0
;
2700 TALLOC_CTX
*_mem_save_s_1
;
2701 if (ndr_flags
& NDR_SCALARS
) {
2702 NDR_CHECK(ndr_pull_align(ndr
, 5));
2703 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2704 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2706 NDR_PULL_ALLOC(ndr
, r
->s
);
2710 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2712 if (ndr_flags
& NDR_BUFFERS
) {
2714 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2715 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2716 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2717 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2718 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2719 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2720 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2721 NDR_CHECK(ndr_pull_dfs_Info6(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2723 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2724 NDR_CHECK(ndr_pull_dfs_Info6(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2726 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2727 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2730 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2733 return NDR_ERR_SUCCESS
;
2736 _PUBLIC_
void ndr_print_dfs_EnumArray6(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray6
*r
)
2739 ndr_print_struct(ndr
, name
, "dfs_EnumArray6");
2741 ndr_print_uint32(ndr
, "count", r
->count
);
2742 ndr_print_ptr(ndr
, "s", r
->s
);
2745 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", (int)r
->count
);
2747 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2749 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2750 ndr_print_dfs_Info6(ndr
, "s", &r
->s
[cntr_s_1
]);
2760 static enum ndr_err_code
ndr_push_dfs_EnumArray200(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray200
*r
)
2763 if (ndr_flags
& NDR_SCALARS
) {
2764 NDR_CHECK(ndr_push_align(ndr
, 5));
2765 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2766 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2767 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2769 if (ndr_flags
& NDR_BUFFERS
) {
2771 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
2772 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2773 NDR_CHECK(ndr_push_dfs_Info200(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2775 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2776 NDR_CHECK(ndr_push_dfs_Info200(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2780 return NDR_ERR_SUCCESS
;
2783 static enum ndr_err_code
ndr_pull_dfs_EnumArray200(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray200
*r
)
2787 TALLOC_CTX
*_mem_save_s_0
;
2788 TALLOC_CTX
*_mem_save_s_1
;
2789 if (ndr_flags
& NDR_SCALARS
) {
2790 NDR_CHECK(ndr_pull_align(ndr
, 5));
2791 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2792 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2794 NDR_PULL_ALLOC(ndr
, r
->s
);
2798 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2800 if (ndr_flags
& NDR_BUFFERS
) {
2802 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2803 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2804 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2805 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2806 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2807 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2808 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2809 NDR_CHECK(ndr_pull_dfs_Info200(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2811 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2812 NDR_CHECK(ndr_pull_dfs_Info200(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2814 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2815 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2818 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2821 return NDR_ERR_SUCCESS
;
2824 _PUBLIC_
void ndr_print_dfs_EnumArray200(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray200
*r
)
2827 ndr_print_struct(ndr
, name
, "dfs_EnumArray200");
2829 ndr_print_uint32(ndr
, "count", r
->count
);
2830 ndr_print_ptr(ndr
, "s", r
->s
);
2833 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", (int)r
->count
);
2835 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2837 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2838 ndr_print_dfs_Info200(ndr
, "s", &r
->s
[cntr_s_1
]);
2848 static enum ndr_err_code
ndr_push_dfs_EnumArray300(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray300
*r
)
2851 if (ndr_flags
& NDR_SCALARS
) {
2852 NDR_CHECK(ndr_push_align(ndr
, 5));
2853 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2854 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2855 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2857 if (ndr_flags
& NDR_BUFFERS
) {
2859 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
2860 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2861 NDR_CHECK(ndr_push_dfs_Info300(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2863 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2864 NDR_CHECK(ndr_push_dfs_Info300(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2868 return NDR_ERR_SUCCESS
;
2871 static enum ndr_err_code
ndr_pull_dfs_EnumArray300(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray300
*r
)
2875 TALLOC_CTX
*_mem_save_s_0
;
2876 TALLOC_CTX
*_mem_save_s_1
;
2877 if (ndr_flags
& NDR_SCALARS
) {
2878 NDR_CHECK(ndr_pull_align(ndr
, 5));
2879 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2880 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2882 NDR_PULL_ALLOC(ndr
, r
->s
);
2886 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2888 if (ndr_flags
& NDR_BUFFERS
) {
2890 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2891 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2892 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2893 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2894 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2895 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2896 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2897 NDR_CHECK(ndr_pull_dfs_Info300(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2899 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2900 NDR_CHECK(ndr_pull_dfs_Info300(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2902 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2903 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2906 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2909 return NDR_ERR_SUCCESS
;
2912 _PUBLIC_
void ndr_print_dfs_EnumArray300(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray300
*r
)
2915 ndr_print_struct(ndr
, name
, "dfs_EnumArray300");
2917 ndr_print_uint32(ndr
, "count", r
->count
);
2918 ndr_print_ptr(ndr
, "s", r
->s
);
2921 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", (int)r
->count
);
2923 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2925 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2926 ndr_print_dfs_Info300(ndr
, "s", &r
->s
[cntr_s_1
]);
2936 static enum ndr_err_code
ndr_push_dfs_EnumInfo(struct ndr_push
*ndr
, int ndr_flags
, const union dfs_EnumInfo
*r
)
2938 if (ndr_flags
& NDR_SCALARS
) {
2939 int level
= ndr_push_get_switch_value(ndr
, r
);
2940 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
2941 NDR_CHECK(ndr_push_union_align(ndr
, 5));
2944 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
2948 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info2
));
2952 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info3
));
2956 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info4
));
2960 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info5
));
2964 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info6
));
2968 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info200
));
2972 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info300
));
2976 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
2979 if (ndr_flags
& NDR_BUFFERS
) {
2980 int level
= ndr_push_get_switch_value(ndr
, r
);
2984 NDR_CHECK(ndr_push_dfs_EnumArray1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
2990 NDR_CHECK(ndr_push_dfs_EnumArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
2996 NDR_CHECK(ndr_push_dfs_EnumArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info3
));
3002 NDR_CHECK(ndr_push_dfs_EnumArray4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
3008 NDR_CHECK(ndr_push_dfs_EnumArray5(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info5
));
3014 NDR_CHECK(ndr_push_dfs_EnumArray6(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info6
));
3020 NDR_CHECK(ndr_push_dfs_EnumArray200(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info200
));
3026 NDR_CHECK(ndr_push_dfs_EnumArray300(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info300
));
3031 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3034 return NDR_ERR_SUCCESS
;
3037 static enum ndr_err_code
ndr_pull_dfs_EnumInfo(struct ndr_pull
*ndr
, int ndr_flags
, union dfs_EnumInfo
*r
)
3041 TALLOC_CTX
*_mem_save_info1_0
;
3042 TALLOC_CTX
*_mem_save_info2_0
;
3043 TALLOC_CTX
*_mem_save_info3_0
;
3044 TALLOC_CTX
*_mem_save_info4_0
;
3045 TALLOC_CTX
*_mem_save_info5_0
;
3046 TALLOC_CTX
*_mem_save_info6_0
;
3047 TALLOC_CTX
*_mem_save_info200_0
;
3048 TALLOC_CTX
*_mem_save_info300_0
;
3049 level
= ndr_pull_get_switch_value(ndr
, r
);
3050 if (ndr_flags
& NDR_SCALARS
) {
3051 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
3052 if (_level
!= level
) {
3053 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
3055 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
3058 uint32_t _ptr_info1
;
3059 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
3061 NDR_PULL_ALLOC(ndr
, r
->info1
);
3068 uint32_t _ptr_info2
;
3069 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info2
));
3071 NDR_PULL_ALLOC(ndr
, r
->info2
);
3078 uint32_t _ptr_info3
;
3079 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info3
));
3081 NDR_PULL_ALLOC(ndr
, r
->info3
);
3088 uint32_t _ptr_info4
;
3089 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info4
));
3091 NDR_PULL_ALLOC(ndr
, r
->info4
);
3098 uint32_t _ptr_info5
;
3099 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info5
));
3101 NDR_PULL_ALLOC(ndr
, r
->info5
);
3108 uint32_t _ptr_info6
;
3109 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info6
));
3111 NDR_PULL_ALLOC(ndr
, r
->info6
);
3118 uint32_t _ptr_info200
;
3119 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info200
));
3121 NDR_PULL_ALLOC(ndr
, r
->info200
);
3128 uint32_t _ptr_info300
;
3129 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info300
));
3131 NDR_PULL_ALLOC(ndr
, r
->info300
);
3138 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3141 if (ndr_flags
& NDR_BUFFERS
) {
3145 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3146 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
3147 NDR_CHECK(ndr_pull_dfs_EnumArray1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
3148 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
3154 _mem_save_info2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3155 NDR_PULL_SET_MEM_CTX(ndr
, r
->info2
, 0);
3156 NDR_CHECK(ndr_pull_dfs_EnumArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
3157 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info2_0
, 0);
3163 _mem_save_info3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3164 NDR_PULL_SET_MEM_CTX(ndr
, r
->info3
, 0);
3165 NDR_CHECK(ndr_pull_dfs_EnumArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info3
));
3166 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info3_0
, 0);
3172 _mem_save_info4_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3173 NDR_PULL_SET_MEM_CTX(ndr
, r
->info4
, 0);
3174 NDR_CHECK(ndr_pull_dfs_EnumArray4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
3175 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info4_0
, 0);
3181 _mem_save_info5_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3182 NDR_PULL_SET_MEM_CTX(ndr
, r
->info5
, 0);
3183 NDR_CHECK(ndr_pull_dfs_EnumArray5(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info5
));
3184 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info5_0
, 0);
3190 _mem_save_info6_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3191 NDR_PULL_SET_MEM_CTX(ndr
, r
->info6
, 0);
3192 NDR_CHECK(ndr_pull_dfs_EnumArray6(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info6
));
3193 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info6_0
, 0);
3199 _mem_save_info200_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3200 NDR_PULL_SET_MEM_CTX(ndr
, r
->info200
, 0);
3201 NDR_CHECK(ndr_pull_dfs_EnumArray200(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info200
));
3202 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info200_0
, 0);
3208 _mem_save_info300_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3209 NDR_PULL_SET_MEM_CTX(ndr
, r
->info300
, 0);
3210 NDR_CHECK(ndr_pull_dfs_EnumArray300(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info300
));
3211 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info300_0
, 0);
3216 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3219 return NDR_ERR_SUCCESS
;
3222 _PUBLIC_
void ndr_print_dfs_EnumInfo(struct ndr_print
*ndr
, const char *name
, const union dfs_EnumInfo
*r
)
3225 level
= ndr_print_get_switch_value(ndr
, r
);
3226 ndr_print_union(ndr
, name
, level
, "dfs_EnumInfo");
3229 ndr_print_ptr(ndr
, "info1", r
->info1
);
3232 ndr_print_dfs_EnumArray1(ndr
, "info1", r
->info1
);
3238 ndr_print_ptr(ndr
, "info2", r
->info2
);
3241 ndr_print_dfs_EnumArray2(ndr
, "info2", r
->info2
);
3247 ndr_print_ptr(ndr
, "info3", r
->info3
);
3250 ndr_print_dfs_EnumArray3(ndr
, "info3", r
->info3
);
3256 ndr_print_ptr(ndr
, "info4", r
->info4
);
3259 ndr_print_dfs_EnumArray4(ndr
, "info4", r
->info4
);
3265 ndr_print_ptr(ndr
, "info5", r
->info5
);
3268 ndr_print_dfs_EnumArray5(ndr
, "info5", r
->info5
);
3274 ndr_print_ptr(ndr
, "info6", r
->info6
);
3277 ndr_print_dfs_EnumArray6(ndr
, "info6", r
->info6
);
3283 ndr_print_ptr(ndr
, "info200", r
->info200
);
3286 ndr_print_dfs_EnumArray200(ndr
, "info200", r
->info200
);
3292 ndr_print_ptr(ndr
, "info300", r
->info300
);
3295 ndr_print_dfs_EnumArray300(ndr
, "info300", r
->info300
);
3301 ndr_print_bad_level(ndr
, name
, level
);
3305 static enum ndr_err_code
ndr_push_dfs_EnumStruct(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumStruct
*r
)
3307 if (ndr_flags
& NDR_SCALARS
) {
3308 NDR_CHECK(ndr_push_align(ndr
, 5));
3309 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->level
));
3310 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->e
, r
->level
));
3311 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr
, NDR_SCALARS
, &r
->e
));
3312 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3314 if (ndr_flags
& NDR_BUFFERS
) {
3315 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr
, NDR_BUFFERS
, &r
->e
));
3317 return NDR_ERR_SUCCESS
;
3320 static enum ndr_err_code
ndr_pull_dfs_EnumStruct(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumStruct
*r
)
3322 if (ndr_flags
& NDR_SCALARS
) {
3323 NDR_CHECK(ndr_pull_align(ndr
, 5));
3324 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->level
));
3325 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->e
, r
->level
));
3326 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr
, NDR_SCALARS
, &r
->e
));
3327 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3329 if (ndr_flags
& NDR_BUFFERS
) {
3330 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr
, NDR_BUFFERS
, &r
->e
));
3332 return NDR_ERR_SUCCESS
;
3335 _PUBLIC_
void ndr_print_dfs_EnumStruct(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumStruct
*r
)
3337 ndr_print_struct(ndr
, name
, "dfs_EnumStruct");
3339 ndr_print_uint32(ndr
, "level", r
->level
);
3340 ndr_print_set_switch_value(ndr
, &r
->e
, r
->level
);
3341 ndr_print_dfs_EnumInfo(ndr
, "e", &r
->e
);
3345 static enum ndr_err_code
ndr_push_dfs_UnknownStruct(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_UnknownStruct
*r
)
3347 if (ndr_flags
& NDR_SCALARS
) {
3348 NDR_CHECK(ndr_push_align(ndr
, 5));
3349 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown1
));
3350 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->unknown2
));
3351 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3353 if (ndr_flags
& NDR_BUFFERS
) {
3355 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->unknown2
, CH_UTF16
)));
3356 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3357 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->unknown2
, CH_UTF16
)));
3358 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->unknown2
, ndr_charset_length(r
->unknown2
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3361 return NDR_ERR_SUCCESS
;
3364 static enum ndr_err_code
ndr_pull_dfs_UnknownStruct(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_UnknownStruct
*r
)
3366 uint32_t _ptr_unknown2
;
3367 TALLOC_CTX
*_mem_save_unknown2_0
;
3368 if (ndr_flags
& NDR_SCALARS
) {
3369 NDR_CHECK(ndr_pull_align(ndr
, 5));
3370 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
3371 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown2
));
3372 if (_ptr_unknown2
) {
3373 NDR_PULL_ALLOC(ndr
, r
->unknown2
);
3377 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3379 if (ndr_flags
& NDR_BUFFERS
) {
3381 _mem_save_unknown2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3382 NDR_PULL_SET_MEM_CTX(ndr
, r
->unknown2
, 0);
3383 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->unknown2
));
3384 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->unknown2
));
3385 if (ndr_get_array_length(ndr
, &r
->unknown2
) > ndr_get_array_size(ndr
, &r
->unknown2
)) {
3386 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->unknown2
), ndr_get_array_length(ndr
, &r
->unknown2
));
3388 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->unknown2
), sizeof(uint16_t)));
3389 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->unknown2
, ndr_get_array_length(ndr
, &r
->unknown2
), sizeof(uint16_t), CH_UTF16
));
3390 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown2_0
, 0);
3393 return NDR_ERR_SUCCESS
;
3396 _PUBLIC_
void ndr_print_dfs_UnknownStruct(struct ndr_print
*ndr
, const char *name
, const struct dfs_UnknownStruct
*r
)
3398 ndr_print_struct(ndr
, name
, "dfs_UnknownStruct");
3400 ndr_print_uint32(ndr
, "unknown1", r
->unknown1
);
3401 ndr_print_ptr(ndr
, "unknown2", r
->unknown2
);
3404 ndr_print_string(ndr
, "unknown2", r
->unknown2
);
3410 _PUBLIC_
enum ndr_err_code
ndr_push_dfs_GetManagerVersion(struct ndr_push
*ndr
, int flags
, const struct dfs_GetManagerVersion
*r
)
3412 if (flags
& NDR_IN
) {
3414 if (flags
& NDR_OUT
) {
3415 if (r
->out
.version
== NULL
) {
3416 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3418 NDR_CHECK(ndr_push_dfs_ManagerVersion(ndr
, NDR_SCALARS
, *r
->out
.version
));
3420 return NDR_ERR_SUCCESS
;
3423 _PUBLIC_
enum ndr_err_code
ndr_pull_dfs_GetManagerVersion(struct ndr_pull
*ndr
, int flags
, struct dfs_GetManagerVersion
*r
)
3425 TALLOC_CTX
*_mem_save_version_0
;
3426 if (flags
& NDR_IN
) {
3427 ZERO_STRUCT(r
->out
);
3429 NDR_PULL_ALLOC(ndr
, r
->out
.version
);
3430 ZERO_STRUCTP(r
->out
.version
);
3432 if (flags
& NDR_OUT
) {
3433 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3434 NDR_PULL_ALLOC(ndr
, r
->out
.version
);
3436 _mem_save_version_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3437 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.version
, LIBNDR_FLAG_REF_ALLOC
);
3438 NDR_CHECK(ndr_pull_dfs_ManagerVersion(ndr
, NDR_SCALARS
, r
->out
.version
));
3439 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_version_0
, LIBNDR_FLAG_REF_ALLOC
);
3441 return NDR_ERR_SUCCESS
;
3444 _PUBLIC_
void ndr_print_dfs_GetManagerVersion(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_GetManagerVersion
*r
)
3446 ndr_print_struct(ndr
, name
, "dfs_GetManagerVersion");
3448 if (flags
& NDR_SET_VALUES
) {
3449 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3451 if (flags
& NDR_IN
) {
3452 ndr_print_struct(ndr
, "in", "dfs_GetManagerVersion");
3456 if (flags
& NDR_OUT
) {
3457 ndr_print_struct(ndr
, "out", "dfs_GetManagerVersion");
3459 ndr_print_ptr(ndr
, "version", r
->out
.version
);
3461 ndr_print_dfs_ManagerVersion(ndr
, "version", *r
->out
.version
);
3468 static enum ndr_err_code
ndr_push_dfs_Add(struct ndr_push
*ndr
, int flags
, const struct dfs_Add
*r
)
3470 if (flags
& NDR_IN
) {
3471 if (r
->in
.path
== NULL
) {
3472 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3474 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.path
, CH_UTF16
)));
3475 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3476 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.path
, CH_UTF16
)));
3477 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.path
, ndr_charset_length(r
->in
.path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3478 if (r
->in
.server
== NULL
) {
3479 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3481 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
3482 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3483 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
3484 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3485 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.share
));
3487 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.share
, CH_UTF16
)));
3488 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3489 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.share
, CH_UTF16
)));
3490 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.share
, ndr_charset_length(r
->in
.share
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3492 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.comment
));
3493 if (r
->in
.comment
) {
3494 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
3495 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3496 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
3497 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.comment
, ndr_charset_length(r
->in
.comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3499 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
3501 if (flags
& NDR_OUT
) {
3502 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3504 return NDR_ERR_SUCCESS
;
3507 static enum ndr_err_code
ndr_pull_dfs_Add(struct ndr_pull
*ndr
, int flags
, struct dfs_Add
*r
)
3509 uint32_t _ptr_share
;
3510 uint32_t _ptr_comment
;
3511 TALLOC_CTX
*_mem_save_share_0
;
3512 TALLOC_CTX
*_mem_save_comment_0
;
3513 if (flags
& NDR_IN
) {
3514 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.path
));
3515 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.path
));
3516 if (ndr_get_array_length(ndr
, &r
->in
.path
) > ndr_get_array_size(ndr
, &r
->in
.path
)) {
3517 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
.path
), ndr_get_array_length(ndr
, &r
->in
.path
));
3519 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.path
), sizeof(uint16_t)));
3520 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.path
, ndr_get_array_length(ndr
, &r
->in
.path
), sizeof(uint16_t), CH_UTF16
));
3521 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
3522 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
3523 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
3524 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
), ndr_get_array_length(ndr
, &r
->in
.server
));
3526 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
3527 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
3528 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_share
));
3530 NDR_PULL_ALLOC(ndr
, r
->in
.share
);
3535 _mem_save_share_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3536 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.share
, 0);
3537 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.share
));
3538 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.share
));
3539 if (ndr_get_array_length(ndr
, &r
->in
.share
) > ndr_get_array_size(ndr
, &r
->in
.share
)) {
3540 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
.share
), ndr_get_array_length(ndr
, &r
->in
.share
));
3542 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.share
), sizeof(uint16_t)));
3543 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.share
, ndr_get_array_length(ndr
, &r
->in
.share
), sizeof(uint16_t), CH_UTF16
));
3544 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_share_0
, 0);
3546 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
3548 NDR_PULL_ALLOC(ndr
, r
->in
.comment
);
3550 r
->in
.comment
= NULL
;
3552 if (r
->in
.comment
) {
3553 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3554 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.comment
, 0);
3555 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.comment
));
3556 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.comment
));
3557 if (ndr_get_array_length(ndr
, &r
->in
.comment
) > ndr_get_array_size(ndr
, &r
->in
.comment
)) {
3558 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
.comment
), ndr_get_array_length(ndr
, &r
->in
.comment
));
3560 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t)));
3561 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.comment
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t), CH_UTF16
));
3562 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
3564 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
3566 if (flags
& NDR_OUT
) {
3567 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3569 return NDR_ERR_SUCCESS
;
3572 _PUBLIC_
void ndr_print_dfs_Add(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Add
*r
)
3574 ndr_print_struct(ndr
, name
, "dfs_Add");
3576 if (flags
& NDR_SET_VALUES
) {
3577 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3579 if (flags
& NDR_IN
) {
3580 ndr_print_struct(ndr
, "in", "dfs_Add");
3582 ndr_print_ptr(ndr
, "path", r
->in
.path
);
3584 ndr_print_string(ndr
, "path", r
->in
.path
);
3586 ndr_print_ptr(ndr
, "server", r
->in
.server
);
3588 ndr_print_string(ndr
, "server", r
->in
.server
);
3590 ndr_print_ptr(ndr
, "share", r
->in
.share
);
3593 ndr_print_string(ndr
, "share", r
->in
.share
);
3596 ndr_print_ptr(ndr
, "comment", r
->in
.comment
);
3598 if (r
->in
.comment
) {
3599 ndr_print_string(ndr
, "comment", r
->in
.comment
);
3602 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
3605 if (flags
& NDR_OUT
) {
3606 ndr_print_struct(ndr
, "out", "dfs_Add");
3608 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3614 static enum ndr_err_code
ndr_push_dfs_Remove(struct ndr_push
*ndr
, int flags
, const struct dfs_Remove
*r
)
3616 if (flags
& NDR_IN
) {
3617 if (r
->in
.dfs_entry_path
== NULL
) {
3618 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3620 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
)));
3621 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3622 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
)));
3623 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.dfs_entry_path
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3624 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
3625 if (r
->in
.servername
) {
3626 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
3627 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3628 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
3629 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3631 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.sharename
));
3632 if (r
->in
.sharename
) {
3633 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
)));
3634 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3635 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
)));
3636 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.sharename
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3639 if (flags
& NDR_OUT
) {
3640 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3642 return NDR_ERR_SUCCESS
;
3645 static enum ndr_err_code
ndr_pull_dfs_Remove(struct ndr_pull
*ndr
, int flags
, struct dfs_Remove
*r
)
3647 uint32_t _ptr_servername
;
3648 uint32_t _ptr_sharename
;
3649 TALLOC_CTX
*_mem_save_servername_0
;
3650 TALLOC_CTX
*_mem_save_sharename_0
;
3651 if (flags
& NDR_IN
) {
3652 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfs_entry_path
));
3653 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfs_entry_path
));
3654 if (ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
) > ndr_get_array_size(ndr
, &r
->in
.dfs_entry_path
)) {
3655 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
.dfs_entry_path
), ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
));
3657 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
), sizeof(uint16_t)));
3658 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.dfs_entry_path
, ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
), sizeof(uint16_t), CH_UTF16
));
3659 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
3660 if (_ptr_servername
) {
3661 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
3663 r
->in
.servername
= NULL
;
3665 if (r
->in
.servername
) {
3666 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3667 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
3668 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
3669 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
3670 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
3671 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
.servername
), ndr_get_array_length(ndr
, &r
->in
.servername
));
3673 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
3674 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
3675 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
3677 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sharename
));
3678 if (_ptr_sharename
) {
3679 NDR_PULL_ALLOC(ndr
, r
->in
.sharename
);
3681 r
->in
.sharename
= NULL
;
3683 if (r
->in
.sharename
) {
3684 _mem_save_sharename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3685 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sharename
, 0);
3686 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.sharename
));
3687 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.sharename
));
3688 if (ndr_get_array_length(ndr
, &r
->in
.sharename
) > ndr_get_array_size(ndr
, &r
->in
.sharename
)) {
3689 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
.sharename
), ndr_get_array_length(ndr
, &r
->in
.sharename
));
3691 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.sharename
), sizeof(uint16_t)));
3692 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.sharename
, ndr_get_array_length(ndr
, &r
->in
.sharename
), sizeof(uint16_t), CH_UTF16
));
3693 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sharename_0
, 0);
3696 if (flags
& NDR_OUT
) {
3697 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3699 return NDR_ERR_SUCCESS
;
3702 _PUBLIC_
void ndr_print_dfs_Remove(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Remove
*r
)
3704 ndr_print_struct(ndr
, name
, "dfs_Remove");
3706 if (flags
& NDR_SET_VALUES
) {
3707 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3709 if (flags
& NDR_IN
) {
3710 ndr_print_struct(ndr
, "in", "dfs_Remove");
3712 ndr_print_ptr(ndr
, "dfs_entry_path", r
->in
.dfs_entry_path
);
3714 ndr_print_string(ndr
, "dfs_entry_path", r
->in
.dfs_entry_path
);
3716 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
3718 if (r
->in
.servername
) {
3719 ndr_print_string(ndr
, "servername", r
->in
.servername
);
3722 ndr_print_ptr(ndr
, "sharename", r
->in
.sharename
);
3724 if (r
->in
.sharename
) {
3725 ndr_print_string(ndr
, "sharename", r
->in
.sharename
);
3730 if (flags
& NDR_OUT
) {
3731 ndr_print_struct(ndr
, "out", "dfs_Remove");
3733 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3739 static enum ndr_err_code
ndr_push_dfs_SetInfo(struct ndr_push
*ndr
, int flags
, const struct dfs_SetInfo
*r
)
3741 if (flags
& NDR_IN
) {
3742 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
)));
3743 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3744 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
)));
3745 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.dfs_entry_path
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3746 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
3747 if (r
->in
.servername
) {
3748 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
3749 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3750 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
3751 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3753 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.sharename
));
3754 if (r
->in
.sharename
) {
3755 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
)));
3756 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3757 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
)));
3758 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.sharename
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3760 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
3761 if (r
->in
.info
== NULL
) {
3762 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3764 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
3765 NDR_CHECK(ndr_push_dfs_Info(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
3767 if (flags
& NDR_OUT
) {
3768 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3770 return NDR_ERR_SUCCESS
;
3773 static enum ndr_err_code
ndr_pull_dfs_SetInfo(struct ndr_pull
*ndr
, int flags
, struct dfs_SetInfo
*r
)
3775 uint32_t _ptr_servername
;
3776 uint32_t _ptr_sharename
;
3777 TALLOC_CTX
*_mem_save_servername_0
;
3778 TALLOC_CTX
*_mem_save_sharename_0
;
3779 TALLOC_CTX
*_mem_save_info_0
;
3780 if (flags
& NDR_IN
) {
3781 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfs_entry_path
));
3782 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfs_entry_path
));
3783 if (ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
) > ndr_get_array_size(ndr
, &r
->in
.dfs_entry_path
)) {
3784 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
.dfs_entry_path
), ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
));
3786 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
), sizeof(uint16_t)));
3787 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.dfs_entry_path
, ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
), sizeof(uint16_t), CH_UTF16
));
3788 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
3789 if (_ptr_servername
) {
3790 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
3792 r
->in
.servername
= NULL
;
3794 if (r
->in
.servername
) {
3795 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3796 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
3797 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
3798 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
3799 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
3800 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
.servername
), ndr_get_array_length(ndr
, &r
->in
.servername
));
3802 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
3803 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
3804 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
3806 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sharename
));
3807 if (_ptr_sharename
) {
3808 NDR_PULL_ALLOC(ndr
, r
->in
.sharename
);
3810 r
->in
.sharename
= NULL
;
3812 if (r
->in
.sharename
) {
3813 _mem_save_sharename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3814 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sharename
, 0);
3815 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.sharename
));
3816 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.sharename
));
3817 if (ndr_get_array_length(ndr
, &r
->in
.sharename
) > ndr_get_array_size(ndr
, &r
->in
.sharename
)) {
3818 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
.sharename
), ndr_get_array_length(ndr
, &r
->in
.sharename
));
3820 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.sharename
), sizeof(uint16_t)));
3821 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.sharename
, ndr_get_array_length(ndr
, &r
->in
.sharename
), sizeof(uint16_t), CH_UTF16
));
3822 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sharename_0
, 0);
3824 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
3825 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3826 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
3828 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3829 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
3830 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
3831 NDR_CHECK(ndr_pull_dfs_Info(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
3832 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
3834 if (flags
& NDR_OUT
) {
3835 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3837 return NDR_ERR_SUCCESS
;
3840 _PUBLIC_
void ndr_print_dfs_SetInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_SetInfo
*r
)
3842 ndr_print_struct(ndr
, name
, "dfs_SetInfo");
3844 if (flags
& NDR_SET_VALUES
) {
3845 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3847 if (flags
& NDR_IN
) {
3848 ndr_print_struct(ndr
, "in", "dfs_SetInfo");
3850 ndr_print_string(ndr
, "dfs_entry_path", r
->in
.dfs_entry_path
);
3851 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
3853 if (r
->in
.servername
) {
3854 ndr_print_string(ndr
, "servername", r
->in
.servername
);
3857 ndr_print_ptr(ndr
, "sharename", r
->in
.sharename
);
3859 if (r
->in
.sharename
) {
3860 ndr_print_string(ndr
, "sharename", r
->in
.sharename
);
3863 ndr_print_uint32(ndr
, "level", r
->in
.level
);
3864 ndr_print_ptr(ndr
, "info", r
->in
.info
);
3866 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
3867 ndr_print_dfs_Info(ndr
, "info", r
->in
.info
);
3871 if (flags
& NDR_OUT
) {
3872 ndr_print_struct(ndr
, "out", "dfs_SetInfo");
3874 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3880 static enum ndr_err_code
ndr_push_dfs_GetInfo(struct ndr_push
*ndr
, int flags
, const struct dfs_GetInfo
*r
)
3882 if (flags
& NDR_IN
) {
3883 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
)));
3884 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3885 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
)));
3886 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.dfs_entry_path
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3887 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
3888 if (r
->in
.servername
) {
3889 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
3890 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3891 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
3892 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3894 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.sharename
));
3895 if (r
->in
.sharename
) {
3896 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
)));
3897 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3898 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
)));
3899 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.sharename
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3901 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
3903 if (flags
& NDR_OUT
) {
3904 if (r
->out
.info
== NULL
) {
3905 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3907 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
3908 NDR_CHECK(ndr_push_dfs_Info(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
3909 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3911 return NDR_ERR_SUCCESS
;
3914 static enum ndr_err_code
ndr_pull_dfs_GetInfo(struct ndr_pull
*ndr
, int flags
, struct dfs_GetInfo
*r
)
3916 uint32_t _ptr_servername
;
3917 uint32_t _ptr_sharename
;
3918 TALLOC_CTX
*_mem_save_servername_0
;
3919 TALLOC_CTX
*_mem_save_sharename_0
;
3920 TALLOC_CTX
*_mem_save_info_0
;
3921 if (flags
& NDR_IN
) {
3922 ZERO_STRUCT(r
->out
);
3924 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfs_entry_path
));
3925 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfs_entry_path
));
3926 if (ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
) > ndr_get_array_size(ndr
, &r
->in
.dfs_entry_path
)) {
3927 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
.dfs_entry_path
), ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
));
3929 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
), sizeof(uint16_t)));
3930 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.dfs_entry_path
, ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
), sizeof(uint16_t), CH_UTF16
));
3931 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
3932 if (_ptr_servername
) {
3933 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
3935 r
->in
.servername
= NULL
;
3937 if (r
->in
.servername
) {
3938 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3939 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
3940 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
3941 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
3942 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
3943 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
.servername
), ndr_get_array_length(ndr
, &r
->in
.servername
));
3945 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
3946 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
3947 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
3949 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sharename
));
3950 if (_ptr_sharename
) {
3951 NDR_PULL_ALLOC(ndr
, r
->in
.sharename
);
3953 r
->in
.sharename
= NULL
;
3955 if (r
->in
.sharename
) {
3956 _mem_save_sharename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3957 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sharename
, 0);
3958 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.sharename
));
3959 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.sharename
));
3960 if (ndr_get_array_length(ndr
, &r
->in
.sharename
) > ndr_get_array_size(ndr
, &r
->in
.sharename
)) {
3961 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
.sharename
), ndr_get_array_length(ndr
, &r
->in
.sharename
));
3963 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.sharename
), sizeof(uint16_t)));
3964 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.sharename
, ndr_get_array_length(ndr
, &r
->in
.sharename
), sizeof(uint16_t), CH_UTF16
));
3965 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sharename_0
, 0);
3967 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
3968 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
3969 ZERO_STRUCTP(r
->out
.info
);
3971 if (flags
& NDR_OUT
) {
3972 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3973 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
3975 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3976 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
3977 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
3978 NDR_CHECK(ndr_pull_dfs_Info(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
3979 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
3980 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3982 return NDR_ERR_SUCCESS
;
3985 _PUBLIC_
void ndr_print_dfs_GetInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_GetInfo
*r
)
3987 ndr_print_struct(ndr
, name
, "dfs_GetInfo");
3989 if (flags
& NDR_SET_VALUES
) {
3990 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3992 if (flags
& NDR_IN
) {
3993 ndr_print_struct(ndr
, "in", "dfs_GetInfo");
3995 ndr_print_string(ndr
, "dfs_entry_path", r
->in
.dfs_entry_path
);
3996 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
3998 if (r
->in
.servername
) {
3999 ndr_print_string(ndr
, "servername", r
->in
.servername
);
4002 ndr_print_ptr(ndr
, "sharename", r
->in
.sharename
);
4004 if (r
->in
.sharename
) {
4005 ndr_print_string(ndr
, "sharename", r
->in
.sharename
);
4008 ndr_print_uint32(ndr
, "level", r
->in
.level
);
4011 if (flags
& NDR_OUT
) {
4012 ndr_print_struct(ndr
, "out", "dfs_GetInfo");
4014 ndr_print_ptr(ndr
, "info", r
->out
.info
);
4016 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
4017 ndr_print_dfs_Info(ndr
, "info", r
->out
.info
);
4019 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4025 static enum ndr_err_code
ndr_push_dfs_Enum(struct ndr_push
*ndr
, int flags
, const struct dfs_Enum
*r
)
4027 if (flags
& NDR_IN
) {
4028 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
4029 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.bufsize
));
4030 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.info
));
4032 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
4034 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.total
));
4036 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.total
));
4039 if (flags
& NDR_OUT
) {
4040 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
4042 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
4044 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.total
));
4046 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.total
));
4048 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4050 return NDR_ERR_SUCCESS
;
4053 static enum ndr_err_code
ndr_pull_dfs_Enum(struct ndr_pull
*ndr
, int flags
, struct dfs_Enum
*r
)
4056 uint32_t _ptr_total
;
4057 TALLOC_CTX
*_mem_save_info_0
;
4058 TALLOC_CTX
*_mem_save_total_0
;
4059 if (flags
& NDR_IN
) {
4060 ZERO_STRUCT(r
->out
);
4062 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
4063 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.bufsize
));
4064 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
4066 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
4071 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4072 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, 0);
4073 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
4074 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
4076 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_total
));
4078 NDR_PULL_ALLOC(ndr
, r
->in
.total
);
4083 _mem_save_total_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4084 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.total
, 0);
4085 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.total
));
4086 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_0
, 0);
4089 if (flags
& NDR_OUT
) {
4090 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
4092 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
4097 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4098 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
4099 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
4100 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
4102 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_total
));
4104 NDR_PULL_ALLOC(ndr
, r
->out
.total
);
4106 r
->out
.total
= NULL
;
4109 _mem_save_total_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4110 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.total
, 0);
4111 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.total
));
4112 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_0
, 0);
4114 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4116 return NDR_ERR_SUCCESS
;
4119 _PUBLIC_
void ndr_print_dfs_Enum(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Enum
*r
)
4121 ndr_print_struct(ndr
, name
, "dfs_Enum");
4123 if (flags
& NDR_SET_VALUES
) {
4124 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4126 if (flags
& NDR_IN
) {
4127 ndr_print_struct(ndr
, "in", "dfs_Enum");
4129 ndr_print_uint32(ndr
, "level", r
->in
.level
);
4130 ndr_print_uint32(ndr
, "bufsize", r
->in
.bufsize
);
4131 ndr_print_ptr(ndr
, "info", r
->in
.info
);
4134 ndr_print_dfs_EnumStruct(ndr
, "info", r
->in
.info
);
4137 ndr_print_ptr(ndr
, "total", r
->in
.total
);
4140 ndr_print_uint32(ndr
, "total", *r
->in
.total
);
4145 if (flags
& NDR_OUT
) {
4146 ndr_print_struct(ndr
, "out", "dfs_Enum");
4148 ndr_print_ptr(ndr
, "info", r
->out
.info
);
4151 ndr_print_dfs_EnumStruct(ndr
, "info", r
->out
.info
);
4154 ndr_print_ptr(ndr
, "total", r
->out
.total
);
4157 ndr_print_uint32(ndr
, "total", *r
->out
.total
);
4160 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4166 static enum ndr_err_code
ndr_push_dfs_Rename(struct ndr_push
*ndr
, int flags
, const struct dfs_Rename
*r
)
4168 if (flags
& NDR_IN
) {
4170 if (flags
& NDR_OUT
) {
4171 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4173 return NDR_ERR_SUCCESS
;
4176 static enum ndr_err_code
ndr_pull_dfs_Rename(struct ndr_pull
*ndr
, int flags
, struct dfs_Rename
*r
)
4178 if (flags
& NDR_IN
) {
4180 if (flags
& NDR_OUT
) {
4181 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4183 return NDR_ERR_SUCCESS
;
4186 _PUBLIC_
void ndr_print_dfs_Rename(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Rename
*r
)
4188 ndr_print_struct(ndr
, name
, "dfs_Rename");
4190 if (flags
& NDR_SET_VALUES
) {
4191 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4193 if (flags
& NDR_IN
) {
4194 ndr_print_struct(ndr
, "in", "dfs_Rename");
4198 if (flags
& NDR_OUT
) {
4199 ndr_print_struct(ndr
, "out", "dfs_Rename");
4201 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4207 static enum ndr_err_code
ndr_push_dfs_Move(struct ndr_push
*ndr
, int flags
, const struct dfs_Move
*r
)
4209 if (flags
& NDR_IN
) {
4211 if (flags
& NDR_OUT
) {
4212 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4214 return NDR_ERR_SUCCESS
;
4217 static enum ndr_err_code
ndr_pull_dfs_Move(struct ndr_pull
*ndr
, int flags
, struct dfs_Move
*r
)
4219 if (flags
& NDR_IN
) {
4221 if (flags
& NDR_OUT
) {
4222 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4224 return NDR_ERR_SUCCESS
;
4227 _PUBLIC_
void ndr_print_dfs_Move(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Move
*r
)
4229 ndr_print_struct(ndr
, name
, "dfs_Move");
4231 if (flags
& NDR_SET_VALUES
) {
4232 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4234 if (flags
& NDR_IN
) {
4235 ndr_print_struct(ndr
, "in", "dfs_Move");
4239 if (flags
& NDR_OUT
) {
4240 ndr_print_struct(ndr
, "out", "dfs_Move");
4242 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4248 static enum ndr_err_code
ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push
*ndr
, int flags
, const struct dfs_ManagerGetConfigInfo
*r
)
4250 if (flags
& NDR_IN
) {
4252 if (flags
& NDR_OUT
) {
4253 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4255 return NDR_ERR_SUCCESS
;
4258 static enum ndr_err_code
ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull
*ndr
, int flags
, struct dfs_ManagerGetConfigInfo
*r
)
4260 if (flags
& NDR_IN
) {
4262 if (flags
& NDR_OUT
) {
4263 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4265 return NDR_ERR_SUCCESS
;
4268 _PUBLIC_
void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_ManagerGetConfigInfo
*r
)
4270 ndr_print_struct(ndr
, name
, "dfs_ManagerGetConfigInfo");
4272 if (flags
& NDR_SET_VALUES
) {
4273 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4275 if (flags
& NDR_IN
) {
4276 ndr_print_struct(ndr
, "in", "dfs_ManagerGetConfigInfo");
4280 if (flags
& NDR_OUT
) {
4281 ndr_print_struct(ndr
, "out", "dfs_ManagerGetConfigInfo");
4283 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4289 static enum ndr_err_code
ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push
*ndr
, int flags
, const struct dfs_ManagerSendSiteInfo
*r
)
4291 if (flags
& NDR_IN
) {
4293 if (flags
& NDR_OUT
) {
4294 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4296 return NDR_ERR_SUCCESS
;
4299 static enum ndr_err_code
ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull
*ndr
, int flags
, struct dfs_ManagerSendSiteInfo
*r
)
4301 if (flags
& NDR_IN
) {
4303 if (flags
& NDR_OUT
) {
4304 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4306 return NDR_ERR_SUCCESS
;
4309 _PUBLIC_
void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_ManagerSendSiteInfo
*r
)
4311 ndr_print_struct(ndr
, name
, "dfs_ManagerSendSiteInfo");
4313 if (flags
& NDR_SET_VALUES
) {
4314 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4316 if (flags
& NDR_IN
) {
4317 ndr_print_struct(ndr
, "in", "dfs_ManagerSendSiteInfo");
4321 if (flags
& NDR_OUT
) {
4322 ndr_print_struct(ndr
, "out", "dfs_ManagerSendSiteInfo");
4324 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4330 static enum ndr_err_code
ndr_push_dfs_AddFtRoot(struct ndr_push
*ndr
, int flags
, const struct dfs_AddFtRoot
*r
)
4332 if (flags
& NDR_IN
) {
4333 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4334 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4335 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4336 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4337 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dns_servername
, CH_UTF16
)));
4338 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4339 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dns_servername
, CH_UTF16
)));
4340 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.dns_servername
, ndr_charset_length(r
->in
.dns_servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4341 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfsname
, CH_UTF16
)));
4342 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4343 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfsname
, CH_UTF16
)));
4344 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.dfsname
, ndr_charset_length(r
->in
.dfsname
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4345 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4346 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4347 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4348 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.rootshare
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4349 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
4350 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4351 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
4352 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.comment
, ndr_charset_length(r
->in
.comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4353 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_config_dn
, CH_UTF16
)));
4354 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4355 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_config_dn
, CH_UTF16
)));
4356 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.dfs_config_dn
, ndr_charset_length(r
->in
.dfs_config_dn
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4357 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.unknown1
));
4358 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
4359 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.unknown2
));
4360 if (r
->in
.unknown2
) {
4361 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.unknown2
));
4362 if (*r
->in
.unknown2
) {
4363 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.unknown2
));
4367 if (flags
& NDR_OUT
) {
4368 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.unknown2
));
4369 if (r
->out
.unknown2
) {
4370 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.unknown2
));
4371 if (*r
->out
.unknown2
) {
4372 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.unknown2
));
4375 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4377 return NDR_ERR_SUCCESS
;
4380 static enum ndr_err_code
ndr_pull_dfs_AddFtRoot(struct ndr_pull
*ndr
, int flags
, struct dfs_AddFtRoot
*r
)
4382 uint32_t _ptr_unknown2
;
4383 TALLOC_CTX
*_mem_save_unknown2_0
;
4384 TALLOC_CTX
*_mem_save_unknown2_1
;
4385 if (flags
& NDR_IN
) {
4386 ZERO_STRUCT(r
->out
);
4388 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
4389 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
4390 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
4391 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
.servername
), ndr_get_array_length(ndr
, &r
->in
.servername
));
4393 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
4394 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
4395 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dns_servername
));
4396 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dns_servername
));
4397 if (ndr_get_array_length(ndr
, &r
->in
.dns_servername
) > ndr_get_array_size(ndr
, &r
->in
.dns_servername
)) {
4398 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
.dns_servername
), ndr_get_array_length(ndr
, &r
->in
.dns_servername
));
4400 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dns_servername
), sizeof(uint16_t)));
4401 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.dns_servername
, ndr_get_array_length(ndr
, &r
->in
.dns_servername
), sizeof(uint16_t), CH_UTF16
));
4402 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfsname
));
4403 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfsname
));
4404 if (ndr_get_array_length(ndr
, &r
->in
.dfsname
) > ndr_get_array_size(ndr
, &r
->in
.dfsname
)) {
4405 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
.dfsname
), ndr_get_array_length(ndr
, &r
->in
.dfsname
));
4407 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfsname
), sizeof(uint16_t)));
4408 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.dfsname
, ndr_get_array_length(ndr
, &r
->in
.dfsname
), sizeof(uint16_t), CH_UTF16
));
4409 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rootshare
));
4410 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rootshare
));
4411 if (ndr_get_array_length(ndr
, &r
->in
.rootshare
) > ndr_get_array_size(ndr
, &r
->in
.rootshare
)) {
4412 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
.rootshare
), ndr_get_array_length(ndr
, &r
->in
.rootshare
));
4414 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t)));
4415 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.rootshare
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t), CH_UTF16
));
4416 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.comment
));
4417 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.comment
));
4418 if (ndr_get_array_length(ndr
, &r
->in
.comment
) > ndr_get_array_size(ndr
, &r
->in
.comment
)) {
4419 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
.comment
), ndr_get_array_length(ndr
, &r
->in
.comment
));
4421 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t)));
4422 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.comment
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t), CH_UTF16
));
4423 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfs_config_dn
));
4424 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfs_config_dn
));
4425 if (ndr_get_array_length(ndr
, &r
->in
.dfs_config_dn
) > ndr_get_array_size(ndr
, &r
->in
.dfs_config_dn
)) {
4426 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
.dfs_config_dn
), ndr_get_array_length(ndr
, &r
->in
.dfs_config_dn
));
4428 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfs_config_dn
), sizeof(uint16_t)));
4429 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.dfs_config_dn
, ndr_get_array_length(ndr
, &r
->in
.dfs_config_dn
), sizeof(uint16_t), CH_UTF16
));
4430 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.unknown1
));
4431 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
4432 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown2
));
4433 if (_ptr_unknown2
) {
4434 NDR_PULL_ALLOC(ndr
, r
->in
.unknown2
);
4436 r
->in
.unknown2
= NULL
;
4438 if (r
->in
.unknown2
) {
4439 _mem_save_unknown2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4440 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.unknown2
, 0);
4441 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown2
));
4442 if (_ptr_unknown2
) {
4443 NDR_PULL_ALLOC(ndr
, *r
->in
.unknown2
);
4445 *r
->in
.unknown2
= NULL
;
4447 if (*r
->in
.unknown2
) {
4448 _mem_save_unknown2_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4449 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.unknown2
, 0);
4450 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.unknown2
));
4451 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown2_1
, 0);
4453 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown2_0
, 0);
4456 if (flags
& NDR_OUT
) {
4457 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown2
));
4458 if (_ptr_unknown2
) {
4459 NDR_PULL_ALLOC(ndr
, r
->out
.unknown2
);
4461 r
->out
.unknown2
= NULL
;
4463 if (r
->out
.unknown2
) {
4464 _mem_save_unknown2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4465 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.unknown2
, 0);
4466 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown2
));
4467 if (_ptr_unknown2
) {
4468 NDR_PULL_ALLOC(ndr
, *r
->out
.unknown2
);
4470 *r
->out
.unknown2
= NULL
;
4472 if (*r
->out
.unknown2
) {
4473 _mem_save_unknown2_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4474 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.unknown2
, 0);
4475 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.unknown2
));
4476 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown2_1
, 0);
4478 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown2_0
, 0);
4480 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4482 return NDR_ERR_SUCCESS
;
4485 _PUBLIC_
void ndr_print_dfs_AddFtRoot(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_AddFtRoot
*r
)
4487 ndr_print_struct(ndr
, name
, "dfs_AddFtRoot");
4489 if (flags
& NDR_SET_VALUES
) {
4490 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4492 if (flags
& NDR_IN
) {
4493 ndr_print_struct(ndr
, "in", "dfs_AddFtRoot");
4495 ndr_print_string(ndr
, "servername", r
->in
.servername
);
4496 ndr_print_string(ndr
, "dns_servername", r
->in
.dns_servername
);
4497 ndr_print_string(ndr
, "dfsname", r
->in
.dfsname
);
4498 ndr_print_string(ndr
, "rootshare", r
->in
.rootshare
);
4499 ndr_print_string(ndr
, "comment", r
->in
.comment
);
4500 ndr_print_string(ndr
, "dfs_config_dn", r
->in
.dfs_config_dn
);
4501 ndr_print_uint8(ndr
, "unknown1", r
->in
.unknown1
);
4502 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
4503 ndr_print_ptr(ndr
, "unknown2", r
->in
.unknown2
);
4505 if (r
->in
.unknown2
) {
4506 ndr_print_ptr(ndr
, "unknown2", *r
->in
.unknown2
);
4508 if (*r
->in
.unknown2
) {
4509 ndr_print_dfs_UnknownStruct(ndr
, "unknown2", *r
->in
.unknown2
);
4516 if (flags
& NDR_OUT
) {
4517 ndr_print_struct(ndr
, "out", "dfs_AddFtRoot");
4519 ndr_print_ptr(ndr
, "unknown2", r
->out
.unknown2
);
4521 if (r
->out
.unknown2
) {
4522 ndr_print_ptr(ndr
, "unknown2", *r
->out
.unknown2
);
4524 if (*r
->out
.unknown2
) {
4525 ndr_print_dfs_UnknownStruct(ndr
, "unknown2", *r
->out
.unknown2
);
4530 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4536 static enum ndr_err_code
ndr_push_dfs_RemoveFtRoot(struct ndr_push
*ndr
, int flags
, const struct dfs_RemoveFtRoot
*r
)
4538 if (flags
& NDR_IN
) {
4539 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4540 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4541 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4542 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4543 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dns_servername
, CH_UTF16
)));
4544 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4545 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dns_servername
, CH_UTF16
)));
4546 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.dns_servername
, ndr_charset_length(r
->in
.dns_servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4547 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfsname
, CH_UTF16
)));
4548 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4549 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfsname
, CH_UTF16
)));
4550 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.dfsname
, ndr_charset_length(r
->in
.dfsname
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4551 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4552 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4553 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4554 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.rootshare
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4555 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
4556 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.unknown
));
4557 if (r
->in
.unknown
) {
4558 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.unknown
));
4559 if (*r
->in
.unknown
) {
4560 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.unknown
));
4564 if (flags
& NDR_OUT
) {
4565 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.unknown
));
4566 if (r
->out
.unknown
) {
4567 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.unknown
));
4568 if (*r
->out
.unknown
) {
4569 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.unknown
));
4572 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4574 return NDR_ERR_SUCCESS
;
4577 static enum ndr_err_code
ndr_pull_dfs_RemoveFtRoot(struct ndr_pull
*ndr
, int flags
, struct dfs_RemoveFtRoot
*r
)
4579 uint32_t _ptr_unknown
;
4580 TALLOC_CTX
*_mem_save_unknown_0
;
4581 TALLOC_CTX
*_mem_save_unknown_1
;
4582 if (flags
& NDR_IN
) {
4583 ZERO_STRUCT(r
->out
);
4585 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
4586 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
4587 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
4588 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
.servername
), ndr_get_array_length(ndr
, &r
->in
.servername
));
4590 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
4591 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
4592 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dns_servername
));
4593 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dns_servername
));
4594 if (ndr_get_array_length(ndr
, &r
->in
.dns_servername
) > ndr_get_array_size(ndr
, &r
->in
.dns_servername
)) {
4595 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
.dns_servername
), ndr_get_array_length(ndr
, &r
->in
.dns_servername
));
4597 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dns_servername
), sizeof(uint16_t)));
4598 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.dns_servername
, ndr_get_array_length(ndr
, &r
->in
.dns_servername
), sizeof(uint16_t), CH_UTF16
));
4599 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfsname
));
4600 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfsname
));
4601 if (ndr_get_array_length(ndr
, &r
->in
.dfsname
) > ndr_get_array_size(ndr
, &r
->in
.dfsname
)) {
4602 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
.dfsname
), ndr_get_array_length(ndr
, &r
->in
.dfsname
));
4604 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfsname
), sizeof(uint16_t)));
4605 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.dfsname
, ndr_get_array_length(ndr
, &r
->in
.dfsname
), sizeof(uint16_t), CH_UTF16
));
4606 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rootshare
));
4607 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rootshare
));
4608 if (ndr_get_array_length(ndr
, &r
->in
.rootshare
) > ndr_get_array_size(ndr
, &r
->in
.rootshare
)) {
4609 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
.rootshare
), ndr_get_array_length(ndr
, &r
->in
.rootshare
));
4611 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t)));
4612 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.rootshare
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t), CH_UTF16
));
4613 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
4614 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown
));
4616 NDR_PULL_ALLOC(ndr
, r
->in
.unknown
);
4618 r
->in
.unknown
= NULL
;
4620 if (r
->in
.unknown
) {
4621 _mem_save_unknown_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4622 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.unknown
, 0);
4623 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown
));
4625 NDR_PULL_ALLOC(ndr
, *r
->in
.unknown
);
4627 *r
->in
.unknown
= NULL
;
4629 if (*r
->in
.unknown
) {
4630 _mem_save_unknown_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4631 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.unknown
, 0);
4632 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.unknown
));
4633 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown_1
, 0);
4635 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown_0
, 0);
4638 if (flags
& NDR_OUT
) {
4639 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown
));
4641 NDR_PULL_ALLOC(ndr
, r
->out
.unknown
);
4643 r
->out
.unknown
= NULL
;
4645 if (r
->out
.unknown
) {
4646 _mem_save_unknown_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4647 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.unknown
, 0);
4648 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown
));
4650 NDR_PULL_ALLOC(ndr
, *r
->out
.unknown
);
4652 *r
->out
.unknown
= NULL
;
4654 if (*r
->out
.unknown
) {
4655 _mem_save_unknown_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4656 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.unknown
, 0);
4657 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.unknown
));
4658 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown_1
, 0);
4660 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown_0
, 0);
4662 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4664 return NDR_ERR_SUCCESS
;
4667 _PUBLIC_
void ndr_print_dfs_RemoveFtRoot(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_RemoveFtRoot
*r
)
4669 ndr_print_struct(ndr
, name
, "dfs_RemoveFtRoot");
4671 if (flags
& NDR_SET_VALUES
) {
4672 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4674 if (flags
& NDR_IN
) {
4675 ndr_print_struct(ndr
, "in", "dfs_RemoveFtRoot");
4677 ndr_print_string(ndr
, "servername", r
->in
.servername
);
4678 ndr_print_string(ndr
, "dns_servername", r
->in
.dns_servername
);
4679 ndr_print_string(ndr
, "dfsname", r
->in
.dfsname
);
4680 ndr_print_string(ndr
, "rootshare", r
->in
.rootshare
);
4681 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
4682 ndr_print_ptr(ndr
, "unknown", r
->in
.unknown
);
4684 if (r
->in
.unknown
) {
4685 ndr_print_ptr(ndr
, "unknown", *r
->in
.unknown
);
4687 if (*r
->in
.unknown
) {
4688 ndr_print_dfs_UnknownStruct(ndr
, "unknown", *r
->in
.unknown
);
4695 if (flags
& NDR_OUT
) {
4696 ndr_print_struct(ndr
, "out", "dfs_RemoveFtRoot");
4698 ndr_print_ptr(ndr
, "unknown", r
->out
.unknown
);
4700 if (r
->out
.unknown
) {
4701 ndr_print_ptr(ndr
, "unknown", *r
->out
.unknown
);
4703 if (*r
->out
.unknown
) {
4704 ndr_print_dfs_UnknownStruct(ndr
, "unknown", *r
->out
.unknown
);
4709 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4715 static enum ndr_err_code
ndr_push_dfs_AddStdRoot(struct ndr_push
*ndr
, int flags
, const struct dfs_AddStdRoot
*r
)
4717 if (flags
& NDR_IN
) {
4718 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4719 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4720 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4721 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4722 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4723 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4724 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4725 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.rootshare
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4726 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
4727 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4728 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
4729 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.comment
, ndr_charset_length(r
->in
.comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4730 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
4732 if (flags
& NDR_OUT
) {
4733 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4735 return NDR_ERR_SUCCESS
;
4738 static enum ndr_err_code
ndr_pull_dfs_AddStdRoot(struct ndr_pull
*ndr
, int flags
, struct dfs_AddStdRoot
*r
)
4740 if (flags
& NDR_IN
) {
4741 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
4742 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
4743 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
4744 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
.servername
), ndr_get_array_length(ndr
, &r
->in
.servername
));
4746 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
4747 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
4748 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rootshare
));
4749 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rootshare
));
4750 if (ndr_get_array_length(ndr
, &r
->in
.rootshare
) > ndr_get_array_size(ndr
, &r
->in
.rootshare
)) {
4751 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
.rootshare
), ndr_get_array_length(ndr
, &r
->in
.rootshare
));
4753 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t)));
4754 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.rootshare
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t), CH_UTF16
));
4755 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.comment
));
4756 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.comment
));
4757 if (ndr_get_array_length(ndr
, &r
->in
.comment
) > ndr_get_array_size(ndr
, &r
->in
.comment
)) {
4758 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
.comment
), ndr_get_array_length(ndr
, &r
->in
.comment
));
4760 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t)));
4761 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.comment
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t), CH_UTF16
));
4762 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
4764 if (flags
& NDR_OUT
) {
4765 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4767 return NDR_ERR_SUCCESS
;
4770 _PUBLIC_
void ndr_print_dfs_AddStdRoot(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_AddStdRoot
*r
)
4772 ndr_print_struct(ndr
, name
, "dfs_AddStdRoot");
4774 if (flags
& NDR_SET_VALUES
) {
4775 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4777 if (flags
& NDR_IN
) {
4778 ndr_print_struct(ndr
, "in", "dfs_AddStdRoot");
4780 ndr_print_string(ndr
, "servername", r
->in
.servername
);
4781 ndr_print_string(ndr
, "rootshare", r
->in
.rootshare
);
4782 ndr_print_string(ndr
, "comment", r
->in
.comment
);
4783 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
4786 if (flags
& NDR_OUT
) {
4787 ndr_print_struct(ndr
, "out", "dfs_AddStdRoot");
4789 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4795 static enum ndr_err_code
ndr_push_dfs_RemoveStdRoot(struct ndr_push
*ndr
, int flags
, const struct dfs_RemoveStdRoot
*r
)
4797 if (flags
& NDR_IN
) {
4798 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4799 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4800 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4801 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4802 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4803 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4804 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4805 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.rootshare
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4806 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
4808 if (flags
& NDR_OUT
) {
4809 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4811 return NDR_ERR_SUCCESS
;
4814 static enum ndr_err_code
ndr_pull_dfs_RemoveStdRoot(struct ndr_pull
*ndr
, int flags
, struct dfs_RemoveStdRoot
*r
)
4816 if (flags
& NDR_IN
) {
4817 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
4818 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
4819 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
4820 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
.servername
), ndr_get_array_length(ndr
, &r
->in
.servername
));
4822 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
4823 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
4824 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rootshare
));
4825 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rootshare
));
4826 if (ndr_get_array_length(ndr
, &r
->in
.rootshare
) > ndr_get_array_size(ndr
, &r
->in
.rootshare
)) {
4827 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
.rootshare
), ndr_get_array_length(ndr
, &r
->in
.rootshare
));
4829 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t)));
4830 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.rootshare
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t), CH_UTF16
));
4831 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
4833 if (flags
& NDR_OUT
) {
4834 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4836 return NDR_ERR_SUCCESS
;
4839 _PUBLIC_
void ndr_print_dfs_RemoveStdRoot(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_RemoveStdRoot
*r
)
4841 ndr_print_struct(ndr
, name
, "dfs_RemoveStdRoot");
4843 if (flags
& NDR_SET_VALUES
) {
4844 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4846 if (flags
& NDR_IN
) {
4847 ndr_print_struct(ndr
, "in", "dfs_RemoveStdRoot");
4849 ndr_print_string(ndr
, "servername", r
->in
.servername
);
4850 ndr_print_string(ndr
, "rootshare", r
->in
.rootshare
);
4851 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
4854 if (flags
& NDR_OUT
) {
4855 ndr_print_struct(ndr
, "out", "dfs_RemoveStdRoot");
4857 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4863 static enum ndr_err_code
ndr_push_dfs_ManagerInitialize(struct ndr_push
*ndr
, int flags
, const struct dfs_ManagerInitialize
*r
)
4865 if (flags
& NDR_IN
) {
4866 if (r
->in
.servername
== NULL
) {
4867 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4869 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4870 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4871 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4872 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4873 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
4875 if (flags
& NDR_OUT
) {
4876 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4878 return NDR_ERR_SUCCESS
;
4881 static enum ndr_err_code
ndr_pull_dfs_ManagerInitialize(struct ndr_pull
*ndr
, int flags
, struct dfs_ManagerInitialize
*r
)
4883 if (flags
& NDR_IN
) {
4884 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
4885 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
4886 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
4887 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
.servername
), ndr_get_array_length(ndr
, &r
->in
.servername
));
4889 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
4890 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
4891 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
4893 if (flags
& NDR_OUT
) {
4894 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4896 return NDR_ERR_SUCCESS
;
4899 _PUBLIC_
void ndr_print_dfs_ManagerInitialize(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_ManagerInitialize
*r
)
4901 ndr_print_struct(ndr
, name
, "dfs_ManagerInitialize");
4903 if (flags
& NDR_SET_VALUES
) {
4904 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4906 if (flags
& NDR_IN
) {
4907 ndr_print_struct(ndr
, "in", "dfs_ManagerInitialize");
4909 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
4911 ndr_print_string(ndr
, "servername", r
->in
.servername
);
4913 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
4916 if (flags
& NDR_OUT
) {
4917 ndr_print_struct(ndr
, "out", "dfs_ManagerInitialize");
4919 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4925 static enum ndr_err_code
ndr_push_dfs_AddStdRootForced(struct ndr_push
*ndr
, int flags
, const struct dfs_AddStdRootForced
*r
)
4927 if (flags
& NDR_IN
) {
4928 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4929 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4930 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4931 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4932 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4933 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4934 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4935 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.rootshare
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4936 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
4937 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4938 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
4939 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.comment
, ndr_charset_length(r
->in
.comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4940 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.store
, CH_UTF16
)));
4941 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4942 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.store
, CH_UTF16
)));
4943 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.store
, ndr_charset_length(r
->in
.store
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4945 if (flags
& NDR_OUT
) {
4946 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4948 return NDR_ERR_SUCCESS
;
4951 static enum ndr_err_code
ndr_pull_dfs_AddStdRootForced(struct ndr_pull
*ndr
, int flags
, struct dfs_AddStdRootForced
*r
)
4953 if (flags
& NDR_IN
) {
4954 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
4955 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
4956 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
4957 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
.servername
), ndr_get_array_length(ndr
, &r
->in
.servername
));
4959 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
4960 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
4961 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rootshare
));
4962 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rootshare
));
4963 if (ndr_get_array_length(ndr
, &r
->in
.rootshare
) > ndr_get_array_size(ndr
, &r
->in
.rootshare
)) {
4964 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
.rootshare
), ndr_get_array_length(ndr
, &r
->in
.rootshare
));
4966 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t)));
4967 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.rootshare
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t), CH_UTF16
));
4968 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.comment
));
4969 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.comment
));
4970 if (ndr_get_array_length(ndr
, &r
->in
.comment
) > ndr_get_array_size(ndr
, &r
->in
.comment
)) {
4971 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
.comment
), ndr_get_array_length(ndr
, &r
->in
.comment
));
4973 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t)));
4974 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.comment
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t), CH_UTF16
));
4975 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.store
));
4976 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.store
));
4977 if (ndr_get_array_length(ndr
, &r
->in
.store
) > ndr_get_array_size(ndr
, &r
->in
.store
)) {
4978 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
.store
), ndr_get_array_length(ndr
, &r
->in
.store
));
4980 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.store
), sizeof(uint16_t)));
4981 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.store
, ndr_get_array_length(ndr
, &r
->in
.store
), sizeof(uint16_t), CH_UTF16
));
4983 if (flags
& NDR_OUT
) {
4984 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4986 return NDR_ERR_SUCCESS
;
4989 _PUBLIC_
void ndr_print_dfs_AddStdRootForced(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_AddStdRootForced
*r
)
4991 ndr_print_struct(ndr
, name
, "dfs_AddStdRootForced");
4993 if (flags
& NDR_SET_VALUES
) {
4994 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4996 if (flags
& NDR_IN
) {
4997 ndr_print_struct(ndr
, "in", "dfs_AddStdRootForced");
4999 ndr_print_string(ndr
, "servername", r
->in
.servername
);
5000 ndr_print_string(ndr
, "rootshare", r
->in
.rootshare
);
5001 ndr_print_string(ndr
, "comment", r
->in
.comment
);
5002 ndr_print_string(ndr
, "store", r
->in
.store
);
5005 if (flags
& NDR_OUT
) {
5006 ndr_print_struct(ndr
, "out", "dfs_AddStdRootForced");
5008 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5014 static enum ndr_err_code
ndr_push_dfs_GetDcAddress(struct ndr_push
*ndr
, int flags
, const struct dfs_GetDcAddress
*r
)
5016 if (flags
& NDR_IN
) {
5017 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
5018 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5019 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
5020 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5021 if (r
->in
.server_fullname
== NULL
) {
5022 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5024 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.server_fullname
));
5025 if (*r
->in
.server_fullname
) {
5026 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->in
.server_fullname
, CH_UTF16
)));
5027 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5028 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->in
.server_fullname
, CH_UTF16
)));
5029 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, *r
->in
.server_fullname
, ndr_charset_length(*r
->in
.server_fullname
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5031 if (r
->in
.is_root
== NULL
) {
5032 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5034 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, *r
->in
.is_root
));
5035 if (r
->in
.ttl
== NULL
) {
5036 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5038 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.ttl
));
5040 if (flags
& NDR_OUT
) {
5041 if (r
->out
.server_fullname
== NULL
) {
5042 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5044 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.server_fullname
));
5045 if (*r
->out
.server_fullname
) {
5046 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.server_fullname
, CH_UTF16
)));
5047 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5048 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.server_fullname
, CH_UTF16
)));
5049 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, *r
->out
.server_fullname
, ndr_charset_length(*r
->out
.server_fullname
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5051 if (r
->out
.is_root
== NULL
) {
5052 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5054 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, *r
->out
.is_root
));
5055 if (r
->out
.ttl
== NULL
) {
5056 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5058 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.ttl
));
5059 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5061 return NDR_ERR_SUCCESS
;
5064 static enum ndr_err_code
ndr_pull_dfs_GetDcAddress(struct ndr_pull
*ndr
, int flags
, struct dfs_GetDcAddress
*r
)
5066 uint32_t _ptr_server_fullname
;
5067 TALLOC_CTX
*_mem_save_server_fullname_0
;
5068 TALLOC_CTX
*_mem_save_server_fullname_1
;
5069 TALLOC_CTX
*_mem_save_is_root_0
;
5070 TALLOC_CTX
*_mem_save_ttl_0
;
5071 if (flags
& NDR_IN
) {
5072 ZERO_STRUCT(r
->out
);
5074 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
5075 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
5076 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
5077 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
.servername
), ndr_get_array_length(ndr
, &r
->in
.servername
));
5079 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
5080 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
5081 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5082 NDR_PULL_ALLOC(ndr
, r
->in
.server_fullname
);
5084 _mem_save_server_fullname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5085 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_fullname
, LIBNDR_FLAG_REF_ALLOC
);
5086 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_fullname
));
5087 if (_ptr_server_fullname
) {
5088 NDR_PULL_ALLOC(ndr
, *r
->in
.server_fullname
);
5090 *r
->in
.server_fullname
= NULL
;
5092 if (*r
->in
.server_fullname
) {
5093 _mem_save_server_fullname_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5094 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.server_fullname
, 0);
5095 NDR_CHECK(ndr_pull_array_size(ndr
, r
->in
.server_fullname
));
5096 NDR_CHECK(ndr_pull_array_length(ndr
, r
->in
.server_fullname
));
5097 if (ndr_get_array_length(ndr
, r
->in
.server_fullname
) > ndr_get_array_size(ndr
, r
->in
.server_fullname
)) {
5098 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_fullname
), ndr_get_array_length(ndr
, r
->in
.server_fullname
));
5100 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, r
->in
.server_fullname
), sizeof(uint16_t)));
5101 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, r
->in
.server_fullname
, ndr_get_array_length(ndr
, r
->in
.server_fullname
), sizeof(uint16_t), CH_UTF16
));
5102 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_fullname_1
, 0);
5104 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_fullname_0
, LIBNDR_FLAG_REF_ALLOC
);
5105 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5106 NDR_PULL_ALLOC(ndr
, r
->in
.is_root
);
5108 _mem_save_is_root_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5109 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.is_root
, LIBNDR_FLAG_REF_ALLOC
);
5110 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, r
->in
.is_root
));
5111 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_is_root_0
, LIBNDR_FLAG_REF_ALLOC
);
5112 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5113 NDR_PULL_ALLOC(ndr
, r
->in
.ttl
);
5115 _mem_save_ttl_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5116 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.ttl
, LIBNDR_FLAG_REF_ALLOC
);
5117 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.ttl
));
5118 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ttl_0
, LIBNDR_FLAG_REF_ALLOC
);
5119 NDR_PULL_ALLOC(ndr
, r
->out
.server_fullname
);
5120 *r
->out
.server_fullname
= *r
->in
.server_fullname
;
5121 NDR_PULL_ALLOC(ndr
, r
->out
.is_root
);
5122 *r
->out
.is_root
= *r
->in
.is_root
;
5123 NDR_PULL_ALLOC(ndr
, r
->out
.ttl
);
5124 *r
->out
.ttl
= *r
->in
.ttl
;
5126 if (flags
& NDR_OUT
) {
5127 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5128 NDR_PULL_ALLOC(ndr
, r
->out
.server_fullname
);
5130 _mem_save_server_fullname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5131 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.server_fullname
, LIBNDR_FLAG_REF_ALLOC
);
5132 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_fullname
));
5133 if (_ptr_server_fullname
) {
5134 NDR_PULL_ALLOC(ndr
, *r
->out
.server_fullname
);
5136 *r
->out
.server_fullname
= NULL
;
5138 if (*r
->out
.server_fullname
) {
5139 _mem_save_server_fullname_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5140 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.server_fullname
, 0);
5141 NDR_CHECK(ndr_pull_array_size(ndr
, r
->out
.server_fullname
));
5142 NDR_CHECK(ndr_pull_array_length(ndr
, r
->out
.server_fullname
));
5143 if (ndr_get_array_length(ndr
, r
->out
.server_fullname
) > ndr_get_array_size(ndr
, r
->out
.server_fullname
)) {
5144 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, r
->out
.server_fullname
), ndr_get_array_length(ndr
, r
->out
.server_fullname
));
5146 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, r
->out
.server_fullname
), sizeof(uint16_t)));
5147 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, r
->out
.server_fullname
, ndr_get_array_length(ndr
, r
->out
.server_fullname
), sizeof(uint16_t), CH_UTF16
));
5148 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_fullname_1
, 0);
5150 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_fullname_0
, LIBNDR_FLAG_REF_ALLOC
);
5151 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5152 NDR_PULL_ALLOC(ndr
, r
->out
.is_root
);
5154 _mem_save_is_root_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5155 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.is_root
, LIBNDR_FLAG_REF_ALLOC
);
5156 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, r
->out
.is_root
));
5157 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_is_root_0
, LIBNDR_FLAG_REF_ALLOC
);
5158 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5159 NDR_PULL_ALLOC(ndr
, r
->out
.ttl
);
5161 _mem_save_ttl_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5162 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ttl
, LIBNDR_FLAG_REF_ALLOC
);
5163 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.ttl
));
5164 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ttl_0
, LIBNDR_FLAG_REF_ALLOC
);
5165 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5167 return NDR_ERR_SUCCESS
;
5170 _PUBLIC_
void ndr_print_dfs_GetDcAddress(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_GetDcAddress
*r
)
5172 ndr_print_struct(ndr
, name
, "dfs_GetDcAddress");
5174 if (flags
& NDR_SET_VALUES
) {
5175 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5177 if (flags
& NDR_IN
) {
5178 ndr_print_struct(ndr
, "in", "dfs_GetDcAddress");
5180 ndr_print_string(ndr
, "servername", r
->in
.servername
);
5181 ndr_print_ptr(ndr
, "server_fullname", r
->in
.server_fullname
);
5183 ndr_print_ptr(ndr
, "server_fullname", *r
->in
.server_fullname
);
5185 if (*r
->in
.server_fullname
) {
5186 ndr_print_string(ndr
, "server_fullname", *r
->in
.server_fullname
);
5190 ndr_print_ptr(ndr
, "is_root", r
->in
.is_root
);
5192 ndr_print_uint8(ndr
, "is_root", *r
->in
.is_root
);
5194 ndr_print_ptr(ndr
, "ttl", r
->in
.ttl
);
5196 ndr_print_uint32(ndr
, "ttl", *r
->in
.ttl
);
5200 if (flags
& NDR_OUT
) {
5201 ndr_print_struct(ndr
, "out", "dfs_GetDcAddress");
5203 ndr_print_ptr(ndr
, "server_fullname", r
->out
.server_fullname
);
5205 ndr_print_ptr(ndr
, "server_fullname", *r
->out
.server_fullname
);
5207 if (*r
->out
.server_fullname
) {
5208 ndr_print_string(ndr
, "server_fullname", *r
->out
.server_fullname
);
5212 ndr_print_ptr(ndr
, "is_root", r
->out
.is_root
);
5214 ndr_print_uint8(ndr
, "is_root", *r
->out
.is_root
);
5216 ndr_print_ptr(ndr
, "ttl", r
->out
.ttl
);
5218 ndr_print_uint32(ndr
, "ttl", *r
->out
.ttl
);
5220 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5226 static enum ndr_err_code
ndr_push_dfs_SetDcAddress(struct ndr_push
*ndr
, int flags
, const struct dfs_SetDcAddress
*r
)
5228 if (flags
& NDR_IN
) {
5229 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
5230 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5231 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
5232 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5233 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_fullname
, CH_UTF16
)));
5234 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5235 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_fullname
, CH_UTF16
)));
5236 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server_fullname
, ndr_charset_length(r
->in
.server_fullname
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5237 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
5238 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.ttl
));
5240 if (flags
& NDR_OUT
) {
5241 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5243 return NDR_ERR_SUCCESS
;
5246 static enum ndr_err_code
ndr_pull_dfs_SetDcAddress(struct ndr_pull
*ndr
, int flags
, struct dfs_SetDcAddress
*r
)
5248 if (flags
& NDR_IN
) {
5249 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
5250 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
5251 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
5252 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
.servername
), ndr_get_array_length(ndr
, &r
->in
.servername
));
5254 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
5255 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
5256 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_fullname
));
5257 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_fullname
));
5258 if (ndr_get_array_length(ndr
, &r
->in
.server_fullname
) > ndr_get_array_size(ndr
, &r
->in
.server_fullname
)) {
5259 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_fullname
), ndr_get_array_length(ndr
, &r
->in
.server_fullname
));
5261 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_fullname
), sizeof(uint16_t)));
5262 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server_fullname
, ndr_get_array_length(ndr
, &r
->in
.server_fullname
), sizeof(uint16_t), CH_UTF16
));
5263 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
5264 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.ttl
));
5266 if (flags
& NDR_OUT
) {
5267 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5269 return NDR_ERR_SUCCESS
;
5272 _PUBLIC_
void ndr_print_dfs_SetDcAddress(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_SetDcAddress
*r
)
5274 ndr_print_struct(ndr
, name
, "dfs_SetDcAddress");
5276 if (flags
& NDR_SET_VALUES
) {
5277 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5279 if (flags
& NDR_IN
) {
5280 ndr_print_struct(ndr
, "in", "dfs_SetDcAddress");
5282 ndr_print_string(ndr
, "servername", r
->in
.servername
);
5283 ndr_print_string(ndr
, "server_fullname", r
->in
.server_fullname
);
5284 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
5285 ndr_print_uint32(ndr
, "ttl", r
->in
.ttl
);
5288 if (flags
& NDR_OUT
) {
5289 ndr_print_struct(ndr
, "out", "dfs_SetDcAddress");
5291 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5297 static enum ndr_err_code
ndr_push_dfs_FlushFtTable(struct ndr_push
*ndr
, int flags
, const struct dfs_FlushFtTable
*r
)
5299 if (flags
& NDR_IN
) {
5300 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
5301 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5302 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
5303 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5304 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
5305 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5306 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
5307 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.rootshare
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5309 if (flags
& NDR_OUT
) {
5310 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5312 return NDR_ERR_SUCCESS
;
5315 static enum ndr_err_code
ndr_pull_dfs_FlushFtTable(struct ndr_pull
*ndr
, int flags
, struct dfs_FlushFtTable
*r
)
5317 if (flags
& NDR_IN
) {
5318 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
5319 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
5320 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
5321 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
.servername
), ndr_get_array_length(ndr
, &r
->in
.servername
));
5323 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
5324 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
5325 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rootshare
));
5326 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rootshare
));
5327 if (ndr_get_array_length(ndr
, &r
->in
.rootshare
) > ndr_get_array_size(ndr
, &r
->in
.rootshare
)) {
5328 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
.rootshare
), ndr_get_array_length(ndr
, &r
->in
.rootshare
));
5330 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t)));
5331 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.rootshare
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t), CH_UTF16
));
5333 if (flags
& NDR_OUT
) {
5334 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5336 return NDR_ERR_SUCCESS
;
5339 _PUBLIC_
void ndr_print_dfs_FlushFtTable(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_FlushFtTable
*r
)
5341 ndr_print_struct(ndr
, name
, "dfs_FlushFtTable");
5343 if (flags
& NDR_SET_VALUES
) {
5344 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5346 if (flags
& NDR_IN
) {
5347 ndr_print_struct(ndr
, "in", "dfs_FlushFtTable");
5349 ndr_print_string(ndr
, "servername", r
->in
.servername
);
5350 ndr_print_string(ndr
, "rootshare", r
->in
.rootshare
);
5353 if (flags
& NDR_OUT
) {
5354 ndr_print_struct(ndr
, "out", "dfs_FlushFtTable");
5356 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5362 static enum ndr_err_code
ndr_push_dfs_Add2(struct ndr_push
*ndr
, int flags
, const struct dfs_Add2
*r
)
5364 if (flags
& NDR_IN
) {
5366 if (flags
& NDR_OUT
) {
5367 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5369 return NDR_ERR_SUCCESS
;
5372 static enum ndr_err_code
ndr_pull_dfs_Add2(struct ndr_pull
*ndr
, int flags
, struct dfs_Add2
*r
)
5374 if (flags
& NDR_IN
) {
5376 if (flags
& NDR_OUT
) {
5377 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5379 return NDR_ERR_SUCCESS
;
5382 _PUBLIC_
void ndr_print_dfs_Add2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Add2
*r
)
5384 ndr_print_struct(ndr
, name
, "dfs_Add2");
5386 if (flags
& NDR_SET_VALUES
) {
5387 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5389 if (flags
& NDR_IN
) {
5390 ndr_print_struct(ndr
, "in", "dfs_Add2");
5394 if (flags
& NDR_OUT
) {
5395 ndr_print_struct(ndr
, "out", "dfs_Add2");
5397 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5403 static enum ndr_err_code
ndr_push_dfs_Remove2(struct ndr_push
*ndr
, int flags
, const struct dfs_Remove2
*r
)
5405 if (flags
& NDR_IN
) {
5407 if (flags
& NDR_OUT
) {
5408 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5410 return NDR_ERR_SUCCESS
;
5413 static enum ndr_err_code
ndr_pull_dfs_Remove2(struct ndr_pull
*ndr
, int flags
, struct dfs_Remove2
*r
)
5415 if (flags
& NDR_IN
) {
5417 if (flags
& NDR_OUT
) {
5418 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5420 return NDR_ERR_SUCCESS
;
5423 _PUBLIC_
void ndr_print_dfs_Remove2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Remove2
*r
)
5425 ndr_print_struct(ndr
, name
, "dfs_Remove2");
5427 if (flags
& NDR_SET_VALUES
) {
5428 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5430 if (flags
& NDR_IN
) {
5431 ndr_print_struct(ndr
, "in", "dfs_Remove2");
5435 if (flags
& NDR_OUT
) {
5436 ndr_print_struct(ndr
, "out", "dfs_Remove2");
5438 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5444 _PUBLIC_
enum ndr_err_code
ndr_push_dfs_EnumEx(struct ndr_push
*ndr
, int flags
, const struct dfs_EnumEx
*r
)
5446 if (flags
& NDR_IN
) {
5447 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_name
, CH_UTF16
)));
5448 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5449 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_name
, CH_UTF16
)));
5450 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.dfs_name
, ndr_charset_length(r
->in
.dfs_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5451 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
5452 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.bufsize
));
5453 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.info
));
5455 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
5457 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.total
));
5459 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.total
));
5462 if (flags
& NDR_OUT
) {
5463 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
5465 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
5467 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.total
));
5469 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.total
));
5471 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5473 return NDR_ERR_SUCCESS
;
5476 _PUBLIC_
enum ndr_err_code
ndr_pull_dfs_EnumEx(struct ndr_pull
*ndr
, int flags
, struct dfs_EnumEx
*r
)
5479 uint32_t _ptr_total
;
5480 TALLOC_CTX
*_mem_save_info_0
;
5481 TALLOC_CTX
*_mem_save_total_0
;
5482 if (flags
& NDR_IN
) {
5483 ZERO_STRUCT(r
->out
);
5485 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfs_name
));
5486 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfs_name
));
5487 if (ndr_get_array_length(ndr
, &r
->in
.dfs_name
) > ndr_get_array_size(ndr
, &r
->in
.dfs_name
)) {
5488 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
.dfs_name
), ndr_get_array_length(ndr
, &r
->in
.dfs_name
));
5490 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfs_name
), sizeof(uint16_t)));
5491 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.dfs_name
, ndr_get_array_length(ndr
, &r
->in
.dfs_name
), sizeof(uint16_t), CH_UTF16
));
5492 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
5493 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.bufsize
));
5494 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
5496 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
5501 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5502 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, 0);
5503 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
5504 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
5506 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_total
));
5508 NDR_PULL_ALLOC(ndr
, r
->in
.total
);
5513 _mem_save_total_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5514 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.total
, 0);
5515 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.total
));
5516 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_0
, 0);
5519 if (flags
& NDR_OUT
) {
5520 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
5522 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
5527 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5528 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
5529 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
5530 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
5532 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_total
));
5534 NDR_PULL_ALLOC(ndr
, r
->out
.total
);
5536 r
->out
.total
= NULL
;
5539 _mem_save_total_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5540 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.total
, 0);
5541 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.total
));
5542 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_0
, 0);
5544 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5546 return NDR_ERR_SUCCESS
;
5549 _PUBLIC_
void ndr_print_dfs_EnumEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_EnumEx
*r
)
5551 ndr_print_struct(ndr
, name
, "dfs_EnumEx");
5553 if (flags
& NDR_SET_VALUES
) {
5554 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5556 if (flags
& NDR_IN
) {
5557 ndr_print_struct(ndr
, "in", "dfs_EnumEx");
5559 ndr_print_string(ndr
, "dfs_name", r
->in
.dfs_name
);
5560 ndr_print_uint32(ndr
, "level", r
->in
.level
);
5561 ndr_print_uint32(ndr
, "bufsize", r
->in
.bufsize
);
5562 ndr_print_ptr(ndr
, "info", r
->in
.info
);
5565 ndr_print_dfs_EnumStruct(ndr
, "info", r
->in
.info
);
5568 ndr_print_ptr(ndr
, "total", r
->in
.total
);
5571 ndr_print_uint32(ndr
, "total", *r
->in
.total
);
5576 if (flags
& NDR_OUT
) {
5577 ndr_print_struct(ndr
, "out", "dfs_EnumEx");
5579 ndr_print_ptr(ndr
, "info", r
->out
.info
);
5582 ndr_print_dfs_EnumStruct(ndr
, "info", r
->out
.info
);
5585 ndr_print_ptr(ndr
, "total", r
->out
.total
);
5588 ndr_print_uint32(ndr
, "total", *r
->out
.total
);
5591 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5597 static enum ndr_err_code
ndr_push_dfs_SetInfo2(struct ndr_push
*ndr
, int flags
, const struct dfs_SetInfo2
*r
)
5599 if (flags
& NDR_IN
) {
5601 if (flags
& NDR_OUT
) {
5602 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5604 return NDR_ERR_SUCCESS
;
5607 static enum ndr_err_code
ndr_pull_dfs_SetInfo2(struct ndr_pull
*ndr
, int flags
, struct dfs_SetInfo2
*r
)
5609 if (flags
& NDR_IN
) {
5611 if (flags
& NDR_OUT
) {
5612 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5614 return NDR_ERR_SUCCESS
;
5617 _PUBLIC_
void ndr_print_dfs_SetInfo2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_SetInfo2
*r
)
5619 ndr_print_struct(ndr
, name
, "dfs_SetInfo2");
5621 if (flags
& NDR_SET_VALUES
) {
5622 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5624 if (flags
& NDR_IN
) {
5625 ndr_print_struct(ndr
, "in", "dfs_SetInfo2");
5629 if (flags
& NDR_OUT
) {
5630 ndr_print_struct(ndr
, "out", "dfs_SetInfo2");
5632 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5638 static const struct ndr_interface_call netdfs_calls
[] = {
5640 "dfs_GetManagerVersion",
5641 sizeof(struct dfs_GetManagerVersion
),
5642 (ndr_push_flags_fn_t
) ndr_push_dfs_GetManagerVersion
,
5643 (ndr_pull_flags_fn_t
) ndr_pull_dfs_GetManagerVersion
,
5644 (ndr_print_function_t
) ndr_print_dfs_GetManagerVersion
,
5649 sizeof(struct dfs_Add
),
5650 (ndr_push_flags_fn_t
) ndr_push_dfs_Add
,
5651 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Add
,
5652 (ndr_print_function_t
) ndr_print_dfs_Add
,
5657 sizeof(struct dfs_Remove
),
5658 (ndr_push_flags_fn_t
) ndr_push_dfs_Remove
,
5659 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Remove
,
5660 (ndr_print_function_t
) ndr_print_dfs_Remove
,
5665 sizeof(struct dfs_SetInfo
),
5666 (ndr_push_flags_fn_t
) ndr_push_dfs_SetInfo
,
5667 (ndr_pull_flags_fn_t
) ndr_pull_dfs_SetInfo
,
5668 (ndr_print_function_t
) ndr_print_dfs_SetInfo
,
5673 sizeof(struct dfs_GetInfo
),
5674 (ndr_push_flags_fn_t
) ndr_push_dfs_GetInfo
,
5675 (ndr_pull_flags_fn_t
) ndr_pull_dfs_GetInfo
,
5676 (ndr_print_function_t
) ndr_print_dfs_GetInfo
,
5681 sizeof(struct dfs_Enum
),
5682 (ndr_push_flags_fn_t
) ndr_push_dfs_Enum
,
5683 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Enum
,
5684 (ndr_print_function_t
) ndr_print_dfs_Enum
,
5689 sizeof(struct dfs_Rename
),
5690 (ndr_push_flags_fn_t
) ndr_push_dfs_Rename
,
5691 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Rename
,
5692 (ndr_print_function_t
) ndr_print_dfs_Rename
,
5697 sizeof(struct dfs_Move
),
5698 (ndr_push_flags_fn_t
) ndr_push_dfs_Move
,
5699 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Move
,
5700 (ndr_print_function_t
) ndr_print_dfs_Move
,
5704 "dfs_ManagerGetConfigInfo",
5705 sizeof(struct dfs_ManagerGetConfigInfo
),
5706 (ndr_push_flags_fn_t
) ndr_push_dfs_ManagerGetConfigInfo
,
5707 (ndr_pull_flags_fn_t
) ndr_pull_dfs_ManagerGetConfigInfo
,
5708 (ndr_print_function_t
) ndr_print_dfs_ManagerGetConfigInfo
,
5712 "dfs_ManagerSendSiteInfo",
5713 sizeof(struct dfs_ManagerSendSiteInfo
),
5714 (ndr_push_flags_fn_t
) ndr_push_dfs_ManagerSendSiteInfo
,
5715 (ndr_pull_flags_fn_t
) ndr_pull_dfs_ManagerSendSiteInfo
,
5716 (ndr_print_function_t
) ndr_print_dfs_ManagerSendSiteInfo
,
5721 sizeof(struct dfs_AddFtRoot
),
5722 (ndr_push_flags_fn_t
) ndr_push_dfs_AddFtRoot
,
5723 (ndr_pull_flags_fn_t
) ndr_pull_dfs_AddFtRoot
,
5724 (ndr_print_function_t
) ndr_print_dfs_AddFtRoot
,
5729 sizeof(struct dfs_RemoveFtRoot
),
5730 (ndr_push_flags_fn_t
) ndr_push_dfs_RemoveFtRoot
,
5731 (ndr_pull_flags_fn_t
) ndr_pull_dfs_RemoveFtRoot
,
5732 (ndr_print_function_t
) ndr_print_dfs_RemoveFtRoot
,
5737 sizeof(struct dfs_AddStdRoot
),
5738 (ndr_push_flags_fn_t
) ndr_push_dfs_AddStdRoot
,
5739 (ndr_pull_flags_fn_t
) ndr_pull_dfs_AddStdRoot
,
5740 (ndr_print_function_t
) ndr_print_dfs_AddStdRoot
,
5744 "dfs_RemoveStdRoot",
5745 sizeof(struct dfs_RemoveStdRoot
),
5746 (ndr_push_flags_fn_t
) ndr_push_dfs_RemoveStdRoot
,
5747 (ndr_pull_flags_fn_t
) ndr_pull_dfs_RemoveStdRoot
,
5748 (ndr_print_function_t
) ndr_print_dfs_RemoveStdRoot
,
5752 "dfs_ManagerInitialize",
5753 sizeof(struct dfs_ManagerInitialize
),
5754 (ndr_push_flags_fn_t
) ndr_push_dfs_ManagerInitialize
,
5755 (ndr_pull_flags_fn_t
) ndr_pull_dfs_ManagerInitialize
,
5756 (ndr_print_function_t
) ndr_print_dfs_ManagerInitialize
,
5760 "dfs_AddStdRootForced",
5761 sizeof(struct dfs_AddStdRootForced
),
5762 (ndr_push_flags_fn_t
) ndr_push_dfs_AddStdRootForced
,
5763 (ndr_pull_flags_fn_t
) ndr_pull_dfs_AddStdRootForced
,
5764 (ndr_print_function_t
) ndr_print_dfs_AddStdRootForced
,
5769 sizeof(struct dfs_GetDcAddress
),
5770 (ndr_push_flags_fn_t
) ndr_push_dfs_GetDcAddress
,
5771 (ndr_pull_flags_fn_t
) ndr_pull_dfs_GetDcAddress
,
5772 (ndr_print_function_t
) ndr_print_dfs_GetDcAddress
,
5777 sizeof(struct dfs_SetDcAddress
),
5778 (ndr_push_flags_fn_t
) ndr_push_dfs_SetDcAddress
,
5779 (ndr_pull_flags_fn_t
) ndr_pull_dfs_SetDcAddress
,
5780 (ndr_print_function_t
) ndr_print_dfs_SetDcAddress
,
5785 sizeof(struct dfs_FlushFtTable
),
5786 (ndr_push_flags_fn_t
) ndr_push_dfs_FlushFtTable
,
5787 (ndr_pull_flags_fn_t
) ndr_pull_dfs_FlushFtTable
,
5788 (ndr_print_function_t
) ndr_print_dfs_FlushFtTable
,
5793 sizeof(struct dfs_Add2
),
5794 (ndr_push_flags_fn_t
) ndr_push_dfs_Add2
,
5795 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Add2
,
5796 (ndr_print_function_t
) ndr_print_dfs_Add2
,
5801 sizeof(struct dfs_Remove2
),
5802 (ndr_push_flags_fn_t
) ndr_push_dfs_Remove2
,
5803 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Remove2
,
5804 (ndr_print_function_t
) ndr_print_dfs_Remove2
,
5809 sizeof(struct dfs_EnumEx
),
5810 (ndr_push_flags_fn_t
) ndr_push_dfs_EnumEx
,
5811 (ndr_pull_flags_fn_t
) ndr_pull_dfs_EnumEx
,
5812 (ndr_print_function_t
) ndr_print_dfs_EnumEx
,
5817 sizeof(struct dfs_SetInfo2
),
5818 (ndr_push_flags_fn_t
) ndr_push_dfs_SetInfo2
,
5819 (ndr_pull_flags_fn_t
) ndr_pull_dfs_SetInfo2
,
5820 (ndr_print_function_t
) ndr_print_dfs_SetInfo2
,
5823 { NULL
, 0, NULL
, NULL
, NULL
, false }
5826 static const char * const netdfs_endpoint_strings
[] = {
5827 "ncacn_np:[\\pipe\\netdfs]",
5832 static const struct ndr_interface_string_array netdfs_endpoints
= {
5834 .names
= netdfs_endpoint_strings
5837 static const char * const netdfs_authservice_strings
[] = {
5841 static const struct ndr_interface_string_array netdfs_authservices
= {
5843 .names
= netdfs_authservice_strings
5847 const struct ndr_interface_table ndr_table_netdfs
= {
5850 {0x4fc742e0,0x4a10,0x11cf,{0x82,0x73},{0x00,0xaa,0x00,0x4a,0xe6,0x73}},
5853 .helpstring
= NDR_NETDFS_HELPSTRING
,
5855 .calls
= netdfs_calls
,
5856 .endpoints
= &netdfs_endpoints
,
5857 .authservices
= &netdfs_authservices