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_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_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));
39 if (ndr_flags
& NDR_BUFFERS
) {
41 return NDR_ERR_SUCCESS
;
44 static enum ndr_err_code
ndr_pull_dfs_Info0(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info0
*r
)
46 if (ndr_flags
& NDR_SCALARS
) {
47 NDR_CHECK(ndr_pull_align(ndr
, 1));
49 if (ndr_flags
& NDR_BUFFERS
) {
51 return NDR_ERR_SUCCESS
;
54 _PUBLIC_
void ndr_print_dfs_Info0(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info0
*r
)
56 ndr_print_struct(ndr
, name
, "dfs_Info0");
61 static enum ndr_err_code
ndr_push_dfs_Info1(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info1
*r
)
63 if (ndr_flags
& NDR_SCALARS
) {
64 NDR_CHECK(ndr_push_align(ndr
, 4));
65 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->path
));
67 if (ndr_flags
& NDR_BUFFERS
) {
69 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
70 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
71 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
72 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->path
, ndr_charset_length(r
->path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
75 return NDR_ERR_SUCCESS
;
78 static enum ndr_err_code
ndr_pull_dfs_Info1(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info1
*r
)
81 TALLOC_CTX
*_mem_save_path_0
;
82 if (ndr_flags
& NDR_SCALARS
) {
83 NDR_CHECK(ndr_pull_align(ndr
, 4));
84 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_path
));
86 NDR_PULL_ALLOC(ndr
, r
->path
);
91 if (ndr_flags
& NDR_BUFFERS
) {
93 _mem_save_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
94 NDR_PULL_SET_MEM_CTX(ndr
, r
->path
, 0);
95 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->path
));
96 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->path
));
97 if (ndr_get_array_length(ndr
, &r
->path
) > ndr_get_array_size(ndr
, &r
->path
)) {
98 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
));
100 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t)));
101 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->path
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t), CH_UTF16
));
102 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_path_0
, 0);
105 return NDR_ERR_SUCCESS
;
108 _PUBLIC_
void ndr_print_dfs_Info1(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info1
*r
)
110 ndr_print_struct(ndr
, name
, "dfs_Info1");
112 ndr_print_ptr(ndr
, "path", r
->path
);
115 ndr_print_string(ndr
, "path", r
->path
);
121 _PUBLIC_
enum ndr_err_code
ndr_push_dfs_VolumeState(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
123 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
124 return NDR_ERR_SUCCESS
;
127 _PUBLIC_
enum ndr_err_code
ndr_pull_dfs_VolumeState(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
130 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
132 return NDR_ERR_SUCCESS
;
135 _PUBLIC_
void ndr_print_dfs_VolumeState(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
137 ndr_print_uint32(ndr
, name
, r
);
139 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_VOLUME_STATE_OK", DFS_VOLUME_STATE_OK
, r
);
140 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_VOLUME_STATE_INCONSISTENT", DFS_VOLUME_STATE_INCONSISTENT
, r
);
141 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_VOLUME_STATE_OFFLINE", DFS_VOLUME_STATE_OFFLINE
, r
);
142 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_VOLUME_STATE_ONLINE", DFS_VOLUME_STATE_ONLINE
, r
);
143 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_VOLUME_STATE_STANDALONE", DFS_VOLUME_STATE_STANDALONE
, r
);
144 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_VOLUME_STATE_AD_BLOB", DFS_VOLUME_STATE_AD_BLOB
, r
);
148 static enum ndr_err_code
ndr_push_dfs_Info2(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info2
*r
)
150 if (ndr_flags
& NDR_SCALARS
) {
151 NDR_CHECK(ndr_push_align(ndr
, 4));
152 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->path
));
153 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
154 NDR_CHECK(ndr_push_dfs_VolumeState(ndr
, NDR_SCALARS
, r
->state
));
155 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_stores
));
157 if (ndr_flags
& NDR_BUFFERS
) {
159 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
160 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
161 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
162 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->path
, ndr_charset_length(r
->path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
165 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
166 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
167 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
168 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
171 return NDR_ERR_SUCCESS
;
174 static enum ndr_err_code
ndr_pull_dfs_Info2(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info2
*r
)
177 TALLOC_CTX
*_mem_save_path_0
;
178 uint32_t _ptr_comment
;
179 TALLOC_CTX
*_mem_save_comment_0
;
180 if (ndr_flags
& NDR_SCALARS
) {
181 NDR_CHECK(ndr_pull_align(ndr
, 4));
182 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_path
));
184 NDR_PULL_ALLOC(ndr
, r
->path
);
188 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
190 NDR_PULL_ALLOC(ndr
, r
->comment
);
194 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr
, NDR_SCALARS
, &r
->state
));
195 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_stores
));
197 if (ndr_flags
& NDR_BUFFERS
) {
199 _mem_save_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
200 NDR_PULL_SET_MEM_CTX(ndr
, r
->path
, 0);
201 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->path
));
202 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->path
));
203 if (ndr_get_array_length(ndr
, &r
->path
) > ndr_get_array_size(ndr
, &r
->path
)) {
204 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
));
206 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t)));
207 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->path
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t), CH_UTF16
));
208 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_path_0
, 0);
211 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
212 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
213 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
214 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
215 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
216 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
));
218 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
219 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
220 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
223 return NDR_ERR_SUCCESS
;
226 _PUBLIC_
void ndr_print_dfs_Info2(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info2
*r
)
228 ndr_print_struct(ndr
, name
, "dfs_Info2");
230 ndr_print_ptr(ndr
, "path", r
->path
);
233 ndr_print_string(ndr
, "path", r
->path
);
236 ndr_print_ptr(ndr
, "comment", r
->comment
);
239 ndr_print_string(ndr
, "comment", r
->comment
);
242 ndr_print_dfs_VolumeState(ndr
, "state", r
->state
);
243 ndr_print_uint32(ndr
, "num_stores", r
->num_stores
);
247 _PUBLIC_
enum ndr_err_code
ndr_push_dfs_StorageState(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
249 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
250 return NDR_ERR_SUCCESS
;
253 _PUBLIC_
enum ndr_err_code
ndr_pull_dfs_StorageState(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
256 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
258 return NDR_ERR_SUCCESS
;
261 _PUBLIC_
void ndr_print_dfs_StorageState(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
263 ndr_print_uint32(ndr
, name
, r
);
265 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_STORAGE_STATE_OFFLINE", DFS_STORAGE_STATE_OFFLINE
, r
);
266 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_STORAGE_STATE_ONLINE", DFS_STORAGE_STATE_ONLINE
, r
);
267 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_STORAGE_STATE_ACTIVE", DFS_STORAGE_STATE_ACTIVE
, r
);
271 static enum ndr_err_code
ndr_push_dfs_StorageInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_StorageInfo
*r
)
273 if (ndr_flags
& NDR_SCALARS
) {
274 NDR_CHECK(ndr_push_align(ndr
, 4));
275 NDR_CHECK(ndr_push_dfs_StorageState(ndr
, NDR_SCALARS
, r
->state
));
276 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server
));
277 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->share
));
279 if (ndr_flags
& NDR_BUFFERS
) {
281 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server
, CH_UTF16
)));
282 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
283 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server
, CH_UTF16
)));
284 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server
, ndr_charset_length(r
->server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
287 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->share
, CH_UTF16
)));
288 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
289 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->share
, CH_UTF16
)));
290 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->share
, ndr_charset_length(r
->share
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
293 return NDR_ERR_SUCCESS
;
296 static enum ndr_err_code
ndr_pull_dfs_StorageInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_StorageInfo
*r
)
298 uint32_t _ptr_server
;
299 TALLOC_CTX
*_mem_save_server_0
;
301 TALLOC_CTX
*_mem_save_share_0
;
302 if (ndr_flags
& NDR_SCALARS
) {
303 NDR_CHECK(ndr_pull_align(ndr
, 4));
304 NDR_CHECK(ndr_pull_dfs_StorageState(ndr
, NDR_SCALARS
, &r
->state
));
305 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
307 NDR_PULL_ALLOC(ndr
, r
->server
);
311 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_share
));
313 NDR_PULL_ALLOC(ndr
, r
->share
);
318 if (ndr_flags
& NDR_BUFFERS
) {
320 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
321 NDR_PULL_SET_MEM_CTX(ndr
, r
->server
, 0);
322 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server
));
323 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server
));
324 if (ndr_get_array_length(ndr
, &r
->server
) > ndr_get_array_size(ndr
, &r
->server
)) {
325 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
));
327 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server
), sizeof(uint16_t)));
328 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server
, ndr_get_array_length(ndr
, &r
->server
), sizeof(uint16_t), CH_UTF16
));
329 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
332 _mem_save_share_0
= NDR_PULL_GET_MEM_CTX(ndr
);
333 NDR_PULL_SET_MEM_CTX(ndr
, r
->share
, 0);
334 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->share
));
335 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->share
));
336 if (ndr_get_array_length(ndr
, &r
->share
) > ndr_get_array_size(ndr
, &r
->share
)) {
337 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
));
339 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->share
), sizeof(uint16_t)));
340 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->share
, ndr_get_array_length(ndr
, &r
->share
), sizeof(uint16_t), CH_UTF16
));
341 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_share_0
, 0);
344 return NDR_ERR_SUCCESS
;
347 _PUBLIC_
void ndr_print_dfs_StorageInfo(struct ndr_print
*ndr
, const char *name
, const struct dfs_StorageInfo
*r
)
349 ndr_print_struct(ndr
, name
, "dfs_StorageInfo");
351 ndr_print_dfs_StorageState(ndr
, "state", r
->state
);
352 ndr_print_ptr(ndr
, "server", r
->server
);
355 ndr_print_string(ndr
, "server", r
->server
);
358 ndr_print_ptr(ndr
, "share", r
->share
);
361 ndr_print_string(ndr
, "share", r
->share
);
367 static enum ndr_err_code
ndr_push_dfs_Info3(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info3
*r
)
369 uint32_t cntr_stores_1
;
370 if (ndr_flags
& NDR_SCALARS
) {
371 NDR_CHECK(ndr_push_align(ndr
, 4));
372 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->path
));
373 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
374 NDR_CHECK(ndr_push_dfs_VolumeState(ndr
, NDR_SCALARS
, r
->state
));
375 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_stores
));
376 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->stores
));
378 if (ndr_flags
& NDR_BUFFERS
) {
380 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
381 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
382 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
383 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->path
, ndr_charset_length(r
->path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
386 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
387 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
388 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
389 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
392 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_stores
));
393 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
394 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr
, NDR_SCALARS
, &r
->stores
[cntr_stores_1
]));
396 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
397 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr
, NDR_BUFFERS
, &r
->stores
[cntr_stores_1
]));
401 return NDR_ERR_SUCCESS
;
404 static enum ndr_err_code
ndr_pull_dfs_Info3(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info3
*r
)
407 TALLOC_CTX
*_mem_save_path_0
;
408 uint32_t _ptr_comment
;
409 TALLOC_CTX
*_mem_save_comment_0
;
410 uint32_t _ptr_stores
;
411 uint32_t cntr_stores_1
;
412 TALLOC_CTX
*_mem_save_stores_0
;
413 TALLOC_CTX
*_mem_save_stores_1
;
414 if (ndr_flags
& NDR_SCALARS
) {
415 NDR_CHECK(ndr_pull_align(ndr
, 4));
416 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_path
));
418 NDR_PULL_ALLOC(ndr
, r
->path
);
422 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
424 NDR_PULL_ALLOC(ndr
, r
->comment
);
428 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr
, NDR_SCALARS
, &r
->state
));
429 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_stores
));
430 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_stores
));
432 NDR_PULL_ALLOC(ndr
, r
->stores
);
437 if (ndr_flags
& NDR_BUFFERS
) {
439 _mem_save_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
440 NDR_PULL_SET_MEM_CTX(ndr
, r
->path
, 0);
441 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->path
));
442 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->path
));
443 if (ndr_get_array_length(ndr
, &r
->path
) > ndr_get_array_size(ndr
, &r
->path
)) {
444 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
));
446 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t)));
447 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->path
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t), CH_UTF16
));
448 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_path_0
, 0);
451 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
452 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
453 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
454 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
455 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
456 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
));
458 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
459 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
460 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
463 _mem_save_stores_0
= NDR_PULL_GET_MEM_CTX(ndr
);
464 NDR_PULL_SET_MEM_CTX(ndr
, r
->stores
, 0);
465 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->stores
));
466 NDR_PULL_ALLOC_N(ndr
, r
->stores
, ndr_get_array_size(ndr
, &r
->stores
));
467 _mem_save_stores_1
= NDR_PULL_GET_MEM_CTX(ndr
);
468 NDR_PULL_SET_MEM_CTX(ndr
, r
->stores
, 0);
469 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
470 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr
, NDR_SCALARS
, &r
->stores
[cntr_stores_1
]));
472 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
473 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr
, NDR_BUFFERS
, &r
->stores
[cntr_stores_1
]));
475 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_stores_1
, 0);
476 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_stores_0
, 0);
479 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->stores
, r
->num_stores
));
482 return NDR_ERR_SUCCESS
;
485 _PUBLIC_
void ndr_print_dfs_Info3(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info3
*r
)
487 uint32_t cntr_stores_1
;
488 ndr_print_struct(ndr
, name
, "dfs_Info3");
490 ndr_print_ptr(ndr
, "path", r
->path
);
493 ndr_print_string(ndr
, "path", r
->path
);
496 ndr_print_ptr(ndr
, "comment", r
->comment
);
499 ndr_print_string(ndr
, "comment", r
->comment
);
502 ndr_print_dfs_VolumeState(ndr
, "state", r
->state
);
503 ndr_print_uint32(ndr
, "num_stores", r
->num_stores
);
504 ndr_print_ptr(ndr
, "stores", r
->stores
);
507 ndr
->print(ndr
, "%s: ARRAY(%d)", "stores", (int)r
->num_stores
);
509 for (cntr_stores_1
=0;cntr_stores_1
<r
->num_stores
;cntr_stores_1
++) {
511 if (asprintf(&idx_1
, "[%d]", cntr_stores_1
) != -1) {
512 ndr_print_dfs_StorageInfo(ndr
, "stores", &r
->stores
[cntr_stores_1
]);
522 static enum ndr_err_code
ndr_push_dfs_Info4(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info4
*r
)
524 uint32_t cntr_stores_1
;
525 if (ndr_flags
& NDR_SCALARS
) {
526 NDR_CHECK(ndr_push_align(ndr
, 4));
527 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->path
));
528 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
529 NDR_CHECK(ndr_push_dfs_VolumeState(ndr
, NDR_SCALARS
, r
->state
));
530 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->timeout
));
531 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
532 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_stores
));
533 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->stores
));
535 if (ndr_flags
& NDR_BUFFERS
) {
537 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
538 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
539 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
540 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->path
, ndr_charset_length(r
->path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
543 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
544 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
545 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
546 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
549 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_stores
));
550 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
551 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr
, NDR_SCALARS
, &r
->stores
[cntr_stores_1
]));
553 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
554 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr
, NDR_BUFFERS
, &r
->stores
[cntr_stores_1
]));
558 return NDR_ERR_SUCCESS
;
561 static enum ndr_err_code
ndr_pull_dfs_Info4(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info4
*r
)
564 TALLOC_CTX
*_mem_save_path_0
;
565 uint32_t _ptr_comment
;
566 TALLOC_CTX
*_mem_save_comment_0
;
567 uint32_t _ptr_stores
;
568 uint32_t cntr_stores_1
;
569 TALLOC_CTX
*_mem_save_stores_0
;
570 TALLOC_CTX
*_mem_save_stores_1
;
571 if (ndr_flags
& NDR_SCALARS
) {
572 NDR_CHECK(ndr_pull_align(ndr
, 4));
573 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_path
));
575 NDR_PULL_ALLOC(ndr
, r
->path
);
579 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
581 NDR_PULL_ALLOC(ndr
, r
->comment
);
585 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr
, NDR_SCALARS
, &r
->state
));
586 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->timeout
));
587 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
588 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_stores
));
589 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_stores
));
591 NDR_PULL_ALLOC(ndr
, r
->stores
);
596 if (ndr_flags
& NDR_BUFFERS
) {
598 _mem_save_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
599 NDR_PULL_SET_MEM_CTX(ndr
, r
->path
, 0);
600 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->path
));
601 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->path
));
602 if (ndr_get_array_length(ndr
, &r
->path
) > ndr_get_array_size(ndr
, &r
->path
)) {
603 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
));
605 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t)));
606 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->path
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t), CH_UTF16
));
607 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_path_0
, 0);
610 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
611 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
612 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
613 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
614 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
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
->comment
), ndr_get_array_length(ndr
, &r
->comment
));
617 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
618 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
619 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
622 _mem_save_stores_0
= NDR_PULL_GET_MEM_CTX(ndr
);
623 NDR_PULL_SET_MEM_CTX(ndr
, r
->stores
, 0);
624 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->stores
));
625 NDR_PULL_ALLOC_N(ndr
, r
->stores
, ndr_get_array_size(ndr
, &r
->stores
));
626 _mem_save_stores_1
= NDR_PULL_GET_MEM_CTX(ndr
);
627 NDR_PULL_SET_MEM_CTX(ndr
, r
->stores
, 0);
628 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
629 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr
, NDR_SCALARS
, &r
->stores
[cntr_stores_1
]));
631 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
632 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr
, NDR_BUFFERS
, &r
->stores
[cntr_stores_1
]));
634 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_stores_1
, 0);
635 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_stores_0
, 0);
638 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->stores
, r
->num_stores
));
641 return NDR_ERR_SUCCESS
;
644 _PUBLIC_
void ndr_print_dfs_Info4(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info4
*r
)
646 uint32_t cntr_stores_1
;
647 ndr_print_struct(ndr
, name
, "dfs_Info4");
649 ndr_print_ptr(ndr
, "path", r
->path
);
652 ndr_print_string(ndr
, "path", r
->path
);
655 ndr_print_ptr(ndr
, "comment", r
->comment
);
658 ndr_print_string(ndr
, "comment", r
->comment
);
661 ndr_print_dfs_VolumeState(ndr
, "state", r
->state
);
662 ndr_print_uint32(ndr
, "timeout", r
->timeout
);
663 ndr_print_GUID(ndr
, "guid", &r
->guid
);
664 ndr_print_uint32(ndr
, "num_stores", r
->num_stores
);
665 ndr_print_ptr(ndr
, "stores", r
->stores
);
668 ndr
->print(ndr
, "%s: ARRAY(%d)", "stores", (int)r
->num_stores
);
670 for (cntr_stores_1
=0;cntr_stores_1
<r
->num_stores
;cntr_stores_1
++) {
672 if (asprintf(&idx_1
, "[%d]", cntr_stores_1
) != -1) {
673 ndr_print_dfs_StorageInfo(ndr
, "stores", &r
->stores
[cntr_stores_1
]);
683 _PUBLIC_
enum ndr_err_code
ndr_push_dfs_PropertyFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
685 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
686 return NDR_ERR_SUCCESS
;
689 _PUBLIC_
enum ndr_err_code
ndr_pull_dfs_PropertyFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
692 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
694 return NDR_ERR_SUCCESS
;
697 _PUBLIC_
void ndr_print_dfs_PropertyFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
699 ndr_print_uint32(ndr
, name
, r
);
701 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_PROPERTY_FLAG_INSITE_REFERRALS", DFS_PROPERTY_FLAG_INSITE_REFERRALS
, r
);
702 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_PROPERTY_FLAG_ROOT_SCALABILITY", DFS_PROPERTY_FLAG_ROOT_SCALABILITY
, r
);
703 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_PROPERTY_FLAG_SITE_COSTING", DFS_PROPERTY_FLAG_SITE_COSTING
, r
);
704 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_PROPERTY_FLAG_TARGET_FAILBACK", DFS_PROPERTY_FLAG_TARGET_FAILBACK
, r
);
705 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_PROPERTY_FLAG_CLUSTER_ENABLED", DFS_PROPERTY_FLAG_CLUSTER_ENABLED
, r
);
709 static enum ndr_err_code
ndr_push_dfs_Info5(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info5
*r
)
711 if (ndr_flags
& NDR_SCALARS
) {
712 NDR_CHECK(ndr_push_align(ndr
, 4));
713 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->path
));
714 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
715 NDR_CHECK(ndr_push_dfs_VolumeState(ndr
, NDR_SCALARS
, r
->state
));
716 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->timeout
));
717 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
718 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr
, NDR_SCALARS
, r
->flags
));
719 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pktsize
));
720 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_stores
));
722 if (ndr_flags
& NDR_BUFFERS
) {
724 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
725 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
726 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
727 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->path
, ndr_charset_length(r
->path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
730 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
731 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
732 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
733 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
736 return NDR_ERR_SUCCESS
;
739 static enum ndr_err_code
ndr_pull_dfs_Info5(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info5
*r
)
742 TALLOC_CTX
*_mem_save_path_0
;
743 uint32_t _ptr_comment
;
744 TALLOC_CTX
*_mem_save_comment_0
;
745 if (ndr_flags
& NDR_SCALARS
) {
746 NDR_CHECK(ndr_pull_align(ndr
, 4));
747 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_path
));
749 NDR_PULL_ALLOC(ndr
, r
->path
);
753 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
755 NDR_PULL_ALLOC(ndr
, r
->comment
);
759 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr
, NDR_SCALARS
, &r
->state
));
760 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->timeout
));
761 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
762 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr
, NDR_SCALARS
, &r
->flags
));
763 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pktsize
));
764 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_stores
));
766 if (ndr_flags
& NDR_BUFFERS
) {
768 _mem_save_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
769 NDR_PULL_SET_MEM_CTX(ndr
, r
->path
, 0);
770 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->path
));
771 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->path
));
772 if (ndr_get_array_length(ndr
, &r
->path
) > ndr_get_array_size(ndr
, &r
->path
)) {
773 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
));
775 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t)));
776 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->path
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t), CH_UTF16
));
777 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_path_0
, 0);
780 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
781 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
782 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
783 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
784 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
785 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
));
787 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
788 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
789 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
792 return NDR_ERR_SUCCESS
;
795 _PUBLIC_
void ndr_print_dfs_Info5(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info5
*r
)
797 ndr_print_struct(ndr
, name
, "dfs_Info5");
799 ndr_print_ptr(ndr
, "path", r
->path
);
802 ndr_print_string(ndr
, "path", r
->path
);
805 ndr_print_ptr(ndr
, "comment", r
->comment
);
808 ndr_print_string(ndr
, "comment", r
->comment
);
811 ndr_print_dfs_VolumeState(ndr
, "state", r
->state
);
812 ndr_print_uint32(ndr
, "timeout", r
->timeout
);
813 ndr_print_GUID(ndr
, "guid", &r
->guid
);
814 ndr_print_dfs_PropertyFlags(ndr
, "flags", r
->flags
);
815 ndr_print_uint32(ndr
, "pktsize", r
->pktsize
);
816 ndr_print_uint32(ndr
, "num_stores", r
->num_stores
);
820 static enum ndr_err_code
ndr_push_dfs_Target_PriorityClass(struct ndr_push
*ndr
, int ndr_flags
, enum dfs_Target_PriorityClass r
)
822 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
823 return NDR_ERR_SUCCESS
;
826 static enum ndr_err_code
ndr_pull_dfs_Target_PriorityClass(struct ndr_pull
*ndr
, int ndr_flags
, enum dfs_Target_PriorityClass
*r
)
829 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
831 return NDR_ERR_SUCCESS
;
834 _PUBLIC_
void ndr_print_dfs_Target_PriorityClass(struct ndr_print
*ndr
, const char *name
, enum dfs_Target_PriorityClass r
)
836 const char *val
= NULL
;
839 case DFS_INVALID_PRIORITY_CLASS
: val
= "DFS_INVALID_PRIORITY_CLASS"; break;
840 case DFS_SITE_COST_NORMAL_PRIORITY_CLASS
: val
= "DFS_SITE_COST_NORMAL_PRIORITY_CLASS"; break;
841 case DFS_GLOBAL_HIGH_PRIORITY_CLASS
: val
= "DFS_GLOBAL_HIGH_PRIORITY_CLASS"; break;
842 case DFS_SITE_COST_HIGH_PRIORITY_CLASS
: val
= "DFS_SITE_COST_HIGH_PRIORITY_CLASS"; break;
843 case DFS_SITE_COST_LOW_PRIORITY_CLASS
: val
= "DFS_SITE_COST_LOW_PRIORITY_CLASS"; break;
844 case DFS_GLOBAL_LOW_PRIORITY_CLASS
: val
= "DFS_GLOBAL_LOW_PRIORITY_CLASS"; break;
846 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
849 static enum ndr_err_code
ndr_push_dfs_Target_Priority(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Target_Priority
*r
)
851 if (ndr_flags
& NDR_SCALARS
) {
852 NDR_CHECK(ndr_push_align(ndr
, 4));
853 NDR_CHECK(ndr_push_dfs_Target_PriorityClass(ndr
, NDR_SCALARS
, r
->target_priority_class
));
854 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->target_priority_rank
));
855 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->reserved
));
857 if (ndr_flags
& NDR_BUFFERS
) {
859 return NDR_ERR_SUCCESS
;
862 static enum ndr_err_code
ndr_pull_dfs_Target_Priority(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Target_Priority
*r
)
864 if (ndr_flags
& NDR_SCALARS
) {
865 NDR_CHECK(ndr_pull_align(ndr
, 4));
866 NDR_CHECK(ndr_pull_dfs_Target_PriorityClass(ndr
, NDR_SCALARS
, &r
->target_priority_class
));
867 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->target_priority_rank
));
868 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->reserved
));
870 if (ndr_flags
& NDR_BUFFERS
) {
872 return NDR_ERR_SUCCESS
;
875 _PUBLIC_
void ndr_print_dfs_Target_Priority(struct ndr_print
*ndr
, const char *name
, const struct dfs_Target_Priority
*r
)
877 ndr_print_struct(ndr
, name
, "dfs_Target_Priority");
879 ndr_print_dfs_Target_PriorityClass(ndr
, "target_priority_class", r
->target_priority_class
);
880 ndr_print_uint16(ndr
, "target_priority_rank", r
->target_priority_rank
);
881 ndr_print_uint16(ndr
, "reserved", r
->reserved
);
885 static enum ndr_err_code
ndr_push_dfs_StorageInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_StorageInfo2
*r
)
887 if (ndr_flags
& NDR_SCALARS
) {
888 NDR_CHECK(ndr_push_align(ndr
, 4));
889 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr
, NDR_SCALARS
, &r
->info
));
890 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr
, NDR_SCALARS
, &r
->target_priority
));
892 if (ndr_flags
& NDR_BUFFERS
) {
893 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr
, NDR_BUFFERS
, &r
->info
));
895 return NDR_ERR_SUCCESS
;
898 static enum ndr_err_code
ndr_pull_dfs_StorageInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_StorageInfo2
*r
)
900 if (ndr_flags
& NDR_SCALARS
) {
901 NDR_CHECK(ndr_pull_align(ndr
, 4));
902 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr
, NDR_SCALARS
, &r
->info
));
903 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr
, NDR_SCALARS
, &r
->target_priority
));
905 if (ndr_flags
& NDR_BUFFERS
) {
906 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr
, NDR_BUFFERS
, &r
->info
));
908 return NDR_ERR_SUCCESS
;
911 _PUBLIC_
void ndr_print_dfs_StorageInfo2(struct ndr_print
*ndr
, const char *name
, const struct dfs_StorageInfo2
*r
)
913 ndr_print_struct(ndr
, name
, "dfs_StorageInfo2");
915 ndr_print_dfs_StorageInfo(ndr
, "info", &r
->info
);
916 ndr_print_dfs_Target_Priority(ndr
, "target_priority", &r
->target_priority
);
920 static enum ndr_err_code
ndr_push_dfs_Info6(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info6
*r
)
922 uint32_t cntr_stores_1
;
923 if (ndr_flags
& NDR_SCALARS
) {
924 NDR_CHECK(ndr_push_align(ndr
, 4));
925 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entry_path
));
926 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
927 NDR_CHECK(ndr_push_dfs_VolumeState(ndr
, NDR_SCALARS
, r
->state
));
928 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->timeout
));
929 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
930 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr
, NDR_SCALARS
, r
->flags
));
931 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pktsize
));
932 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->num_stores
));
933 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->stores
));
935 if (ndr_flags
& NDR_BUFFERS
) {
937 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->entry_path
, CH_UTF16
)));
938 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
939 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->entry_path
, CH_UTF16
)));
940 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->entry_path
, ndr_charset_length(r
->entry_path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
943 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
944 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
945 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
946 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
949 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_stores
));
950 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
951 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr
, NDR_SCALARS
, &r
->stores
[cntr_stores_1
]));
953 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
954 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr
, NDR_BUFFERS
, &r
->stores
[cntr_stores_1
]));
958 return NDR_ERR_SUCCESS
;
961 static enum ndr_err_code
ndr_pull_dfs_Info6(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info6
*r
)
963 uint32_t _ptr_entry_path
;
964 TALLOC_CTX
*_mem_save_entry_path_0
;
965 uint32_t _ptr_comment
;
966 TALLOC_CTX
*_mem_save_comment_0
;
967 uint32_t _ptr_stores
;
968 uint32_t cntr_stores_1
;
969 TALLOC_CTX
*_mem_save_stores_0
;
970 TALLOC_CTX
*_mem_save_stores_1
;
971 if (ndr_flags
& NDR_SCALARS
) {
972 NDR_CHECK(ndr_pull_align(ndr
, 4));
973 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entry_path
));
974 if (_ptr_entry_path
) {
975 NDR_PULL_ALLOC(ndr
, r
->entry_path
);
977 r
->entry_path
= NULL
;
979 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
981 NDR_PULL_ALLOC(ndr
, r
->comment
);
985 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr
, NDR_SCALARS
, &r
->state
));
986 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->timeout
));
987 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
988 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr
, NDR_SCALARS
, &r
->flags
));
989 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pktsize
));
990 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->num_stores
));
991 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_stores
));
993 NDR_PULL_ALLOC(ndr
, r
->stores
);
998 if (ndr_flags
& NDR_BUFFERS
) {
1000 _mem_save_entry_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1001 NDR_PULL_SET_MEM_CTX(ndr
, r
->entry_path
, 0);
1002 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->entry_path
));
1003 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->entry_path
));
1004 if (ndr_get_array_length(ndr
, &r
->entry_path
) > ndr_get_array_size(ndr
, &r
->entry_path
)) {
1005 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
));
1007 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->entry_path
), sizeof(uint16_t)));
1008 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->entry_path
, ndr_get_array_length(ndr
, &r
->entry_path
), sizeof(uint16_t), CH_UTF16
));
1009 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entry_path_0
, 0);
1012 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1013 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
1014 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
1015 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
1016 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
1017 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
));
1019 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
1020 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
1021 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
1024 _mem_save_stores_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1025 NDR_PULL_SET_MEM_CTX(ndr
, r
->stores
, 0);
1026 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->stores
));
1027 NDR_PULL_ALLOC_N(ndr
, r
->stores
, ndr_get_array_size(ndr
, &r
->stores
));
1028 _mem_save_stores_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1029 NDR_PULL_SET_MEM_CTX(ndr
, r
->stores
, 0);
1030 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
1031 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr
, NDR_SCALARS
, &r
->stores
[cntr_stores_1
]));
1033 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
1034 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr
, NDR_BUFFERS
, &r
->stores
[cntr_stores_1
]));
1036 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_stores_1
, 0);
1037 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_stores_0
, 0);
1040 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->stores
, r
->num_stores
));
1043 return NDR_ERR_SUCCESS
;
1046 _PUBLIC_
void ndr_print_dfs_Info6(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info6
*r
)
1048 uint32_t cntr_stores_1
;
1049 ndr_print_struct(ndr
, name
, "dfs_Info6");
1051 ndr_print_ptr(ndr
, "entry_path", r
->entry_path
);
1053 if (r
->entry_path
) {
1054 ndr_print_string(ndr
, "entry_path", r
->entry_path
);
1057 ndr_print_ptr(ndr
, "comment", r
->comment
);
1060 ndr_print_string(ndr
, "comment", r
->comment
);
1063 ndr_print_dfs_VolumeState(ndr
, "state", r
->state
);
1064 ndr_print_uint32(ndr
, "timeout", r
->timeout
);
1065 ndr_print_GUID(ndr
, "guid", &r
->guid
);
1066 ndr_print_dfs_PropertyFlags(ndr
, "flags", r
->flags
);
1067 ndr_print_uint32(ndr
, "pktsize", r
->pktsize
);
1068 ndr_print_uint16(ndr
, "num_stores", r
->num_stores
);
1069 ndr_print_ptr(ndr
, "stores", r
->stores
);
1072 ndr
->print(ndr
, "%s: ARRAY(%d)", "stores", (int)r
->num_stores
);
1074 for (cntr_stores_1
=0;cntr_stores_1
<r
->num_stores
;cntr_stores_1
++) {
1076 if (asprintf(&idx_1
, "[%d]", cntr_stores_1
) != -1) {
1077 ndr_print_dfs_StorageInfo2(ndr
, "stores", &r
->stores
[cntr_stores_1
]);
1087 static enum ndr_err_code
ndr_push_dfs_Info7(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info7
*r
)
1089 if (ndr_flags
& NDR_SCALARS
) {
1090 NDR_CHECK(ndr_push_align(ndr
, 4));
1091 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->generation_guid
));
1093 if (ndr_flags
& NDR_BUFFERS
) {
1095 return NDR_ERR_SUCCESS
;
1098 static enum ndr_err_code
ndr_pull_dfs_Info7(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info7
*r
)
1100 if (ndr_flags
& NDR_SCALARS
) {
1101 NDR_CHECK(ndr_pull_align(ndr
, 4));
1102 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->generation_guid
));
1104 if (ndr_flags
& NDR_BUFFERS
) {
1106 return NDR_ERR_SUCCESS
;
1109 _PUBLIC_
void ndr_print_dfs_Info7(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info7
*r
)
1111 ndr_print_struct(ndr
, name
, "dfs_Info7");
1113 ndr_print_GUID(ndr
, "generation_guid", &r
->generation_guid
);
1117 static enum ndr_err_code
ndr_push_dfs_Info100(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info100
*r
)
1119 if (ndr_flags
& NDR_SCALARS
) {
1120 NDR_CHECK(ndr_push_align(ndr
, 4));
1121 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
1123 if (ndr_flags
& NDR_BUFFERS
) {
1125 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
1126 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1127 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
1128 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1131 return NDR_ERR_SUCCESS
;
1134 static enum ndr_err_code
ndr_pull_dfs_Info100(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info100
*r
)
1136 uint32_t _ptr_comment
;
1137 TALLOC_CTX
*_mem_save_comment_0
;
1138 if (ndr_flags
& NDR_SCALARS
) {
1139 NDR_CHECK(ndr_pull_align(ndr
, 4));
1140 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
1142 NDR_PULL_ALLOC(ndr
, r
->comment
);
1147 if (ndr_flags
& NDR_BUFFERS
) {
1149 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1150 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
1151 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
1152 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
1153 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
1154 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
));
1156 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
1157 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
1158 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
1161 return NDR_ERR_SUCCESS
;
1164 _PUBLIC_
void ndr_print_dfs_Info100(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info100
*r
)
1166 ndr_print_struct(ndr
, name
, "dfs_Info100");
1168 ndr_print_ptr(ndr
, "comment", r
->comment
);
1171 ndr_print_string(ndr
, "comment", r
->comment
);
1177 static enum ndr_err_code
ndr_push_dfs_Info101(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info101
*r
)
1179 if (ndr_flags
& NDR_SCALARS
) {
1180 NDR_CHECK(ndr_push_align(ndr
, 4));
1181 NDR_CHECK(ndr_push_dfs_StorageState(ndr
, NDR_SCALARS
, r
->state
));
1183 if (ndr_flags
& NDR_BUFFERS
) {
1185 return NDR_ERR_SUCCESS
;
1188 static enum ndr_err_code
ndr_pull_dfs_Info101(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info101
*r
)
1190 if (ndr_flags
& NDR_SCALARS
) {
1191 NDR_CHECK(ndr_pull_align(ndr
, 4));
1192 NDR_CHECK(ndr_pull_dfs_StorageState(ndr
, NDR_SCALARS
, &r
->state
));
1194 if (ndr_flags
& NDR_BUFFERS
) {
1196 return NDR_ERR_SUCCESS
;
1199 _PUBLIC_
void ndr_print_dfs_Info101(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info101
*r
)
1201 ndr_print_struct(ndr
, name
, "dfs_Info101");
1203 ndr_print_dfs_StorageState(ndr
, "state", r
->state
);
1207 static enum ndr_err_code
ndr_push_dfs_Info102(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info102
*r
)
1209 if (ndr_flags
& NDR_SCALARS
) {
1210 NDR_CHECK(ndr_push_align(ndr
, 4));
1211 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->timeout
));
1213 if (ndr_flags
& NDR_BUFFERS
) {
1215 return NDR_ERR_SUCCESS
;
1218 static enum ndr_err_code
ndr_pull_dfs_Info102(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info102
*r
)
1220 if (ndr_flags
& NDR_SCALARS
) {
1221 NDR_CHECK(ndr_pull_align(ndr
, 4));
1222 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->timeout
));
1224 if (ndr_flags
& NDR_BUFFERS
) {
1226 return NDR_ERR_SUCCESS
;
1229 _PUBLIC_
void ndr_print_dfs_Info102(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info102
*r
)
1231 ndr_print_struct(ndr
, name
, "dfs_Info102");
1233 ndr_print_uint32(ndr
, "timeout", r
->timeout
);
1237 static enum ndr_err_code
ndr_push_dfs_Info103(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info103
*r
)
1239 if (ndr_flags
& NDR_SCALARS
) {
1240 NDR_CHECK(ndr_push_align(ndr
, 4));
1241 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr
, NDR_SCALARS
, r
->flags
));
1243 if (ndr_flags
& NDR_BUFFERS
) {
1245 return NDR_ERR_SUCCESS
;
1248 static enum ndr_err_code
ndr_pull_dfs_Info103(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info103
*r
)
1250 if (ndr_flags
& NDR_SCALARS
) {
1251 NDR_CHECK(ndr_pull_align(ndr
, 4));
1252 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr
, NDR_SCALARS
, &r
->flags
));
1254 if (ndr_flags
& NDR_BUFFERS
) {
1256 return NDR_ERR_SUCCESS
;
1259 _PUBLIC_
void ndr_print_dfs_Info103(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info103
*r
)
1261 ndr_print_struct(ndr
, name
, "dfs_Info103");
1263 ndr_print_dfs_PropertyFlags(ndr
, "flags", r
->flags
);
1267 static enum ndr_err_code
ndr_push_dfs_Info104(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info104
*r
)
1269 if (ndr_flags
& NDR_SCALARS
) {
1270 NDR_CHECK(ndr_push_align(ndr
, 4));
1271 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr
, NDR_SCALARS
, &r
->priority
));
1273 if (ndr_flags
& NDR_BUFFERS
) {
1275 return NDR_ERR_SUCCESS
;
1278 static enum ndr_err_code
ndr_pull_dfs_Info104(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info104
*r
)
1280 if (ndr_flags
& NDR_SCALARS
) {
1281 NDR_CHECK(ndr_pull_align(ndr
, 4));
1282 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr
, NDR_SCALARS
, &r
->priority
));
1284 if (ndr_flags
& NDR_BUFFERS
) {
1286 return NDR_ERR_SUCCESS
;
1289 _PUBLIC_
void ndr_print_dfs_Info104(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info104
*r
)
1291 ndr_print_struct(ndr
, name
, "dfs_Info104");
1293 ndr_print_dfs_Target_Priority(ndr
, "priority", &r
->priority
);
1297 static enum ndr_err_code
ndr_push_dfs_Info105(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info105
*r
)
1299 if (ndr_flags
& NDR_SCALARS
) {
1300 NDR_CHECK(ndr_push_align(ndr
, 4));
1301 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
1302 NDR_CHECK(ndr_push_dfs_VolumeState(ndr
, NDR_SCALARS
, r
->state
));
1303 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->timeout
));
1304 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->property_flag_mask
));
1305 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->property_flags
));
1307 if (ndr_flags
& NDR_BUFFERS
) {
1309 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
1310 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1311 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
1312 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1315 return NDR_ERR_SUCCESS
;
1318 static enum ndr_err_code
ndr_pull_dfs_Info105(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info105
*r
)
1320 uint32_t _ptr_comment
;
1321 TALLOC_CTX
*_mem_save_comment_0
;
1322 if (ndr_flags
& NDR_SCALARS
) {
1323 NDR_CHECK(ndr_pull_align(ndr
, 4));
1324 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
1326 NDR_PULL_ALLOC(ndr
, r
->comment
);
1330 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr
, NDR_SCALARS
, &r
->state
));
1331 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->timeout
));
1332 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->property_flag_mask
));
1333 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->property_flags
));
1335 if (ndr_flags
& NDR_BUFFERS
) {
1337 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1338 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
1339 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
1340 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
1341 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
1342 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
));
1344 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
1345 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
1346 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
1349 return NDR_ERR_SUCCESS
;
1352 _PUBLIC_
void ndr_print_dfs_Info105(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info105
*r
)
1354 ndr_print_struct(ndr
, name
, "dfs_Info105");
1356 ndr_print_ptr(ndr
, "comment", r
->comment
);
1359 ndr_print_string(ndr
, "comment", r
->comment
);
1362 ndr_print_dfs_VolumeState(ndr
, "state", r
->state
);
1363 ndr_print_uint32(ndr
, "timeout", r
->timeout
);
1364 ndr_print_uint32(ndr
, "property_flag_mask", r
->property_flag_mask
);
1365 ndr_print_uint32(ndr
, "property_flags", r
->property_flags
);
1369 static enum ndr_err_code
ndr_push_dfs_Info106(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info106
*r
)
1371 if (ndr_flags
& NDR_SCALARS
) {
1372 NDR_CHECK(ndr_push_align(ndr
, 4));
1373 NDR_CHECK(ndr_push_dfs_StorageState(ndr
, NDR_SCALARS
, r
->state
));
1374 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr
, NDR_SCALARS
, &r
->priority
));
1376 if (ndr_flags
& NDR_BUFFERS
) {
1378 return NDR_ERR_SUCCESS
;
1381 static enum ndr_err_code
ndr_pull_dfs_Info106(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info106
*r
)
1383 if (ndr_flags
& NDR_SCALARS
) {
1384 NDR_CHECK(ndr_pull_align(ndr
, 4));
1385 NDR_CHECK(ndr_pull_dfs_StorageState(ndr
, NDR_SCALARS
, &r
->state
));
1386 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr
, NDR_SCALARS
, &r
->priority
));
1388 if (ndr_flags
& NDR_BUFFERS
) {
1390 return NDR_ERR_SUCCESS
;
1393 _PUBLIC_
void ndr_print_dfs_Info106(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info106
*r
)
1395 ndr_print_struct(ndr
, name
, "dfs_Info106");
1397 ndr_print_dfs_StorageState(ndr
, "state", r
->state
);
1398 ndr_print_dfs_Target_Priority(ndr
, "priority", &r
->priority
);
1402 static enum ndr_err_code
ndr_push_dfs_Info200(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info200
*r
)
1404 if (ndr_flags
& NDR_SCALARS
) {
1405 NDR_CHECK(ndr_push_align(ndr
, 4));
1406 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dom_root
));
1408 if (ndr_flags
& NDR_BUFFERS
) {
1410 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dom_root
, CH_UTF16
)));
1411 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1412 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dom_root
, CH_UTF16
)));
1413 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dom_root
, ndr_charset_length(r
->dom_root
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1416 return NDR_ERR_SUCCESS
;
1419 static enum ndr_err_code
ndr_pull_dfs_Info200(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info200
*r
)
1421 uint32_t _ptr_dom_root
;
1422 TALLOC_CTX
*_mem_save_dom_root_0
;
1423 if (ndr_flags
& NDR_SCALARS
) {
1424 NDR_CHECK(ndr_pull_align(ndr
, 4));
1425 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dom_root
));
1426 if (_ptr_dom_root
) {
1427 NDR_PULL_ALLOC(ndr
, r
->dom_root
);
1432 if (ndr_flags
& NDR_BUFFERS
) {
1434 _mem_save_dom_root_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1435 NDR_PULL_SET_MEM_CTX(ndr
, r
->dom_root
, 0);
1436 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dom_root
));
1437 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dom_root
));
1438 if (ndr_get_array_length(ndr
, &r
->dom_root
) > ndr_get_array_size(ndr
, &r
->dom_root
)) {
1439 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
));
1441 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dom_root
), sizeof(uint16_t)));
1442 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dom_root
, ndr_get_array_length(ndr
, &r
->dom_root
), sizeof(uint16_t), CH_UTF16
));
1443 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dom_root_0
, 0);
1446 return NDR_ERR_SUCCESS
;
1449 _PUBLIC_
void ndr_print_dfs_Info200(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info200
*r
)
1451 ndr_print_struct(ndr
, name
, "dfs_Info200");
1453 ndr_print_ptr(ndr
, "dom_root", r
->dom_root
);
1456 ndr_print_string(ndr
, "dom_root", r
->dom_root
);
1462 static enum ndr_err_code
ndr_push_dfs_VolumeFlavor(struct ndr_push
*ndr
, int ndr_flags
, enum dfs_VolumeFlavor r
)
1464 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
1465 return NDR_ERR_SUCCESS
;
1468 static enum ndr_err_code
ndr_pull_dfs_VolumeFlavor(struct ndr_pull
*ndr
, int ndr_flags
, enum dfs_VolumeFlavor
*r
)
1471 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
1473 return NDR_ERR_SUCCESS
;
1476 _PUBLIC_
void ndr_print_dfs_VolumeFlavor(struct ndr_print
*ndr
, const char *name
, enum dfs_VolumeFlavor r
)
1478 const char *val
= NULL
;
1481 case DFS_VOLUME_FLAVOR_STANDALONE
: val
= "DFS_VOLUME_FLAVOR_STANDALONE"; break;
1482 case DFS_VOLUME_FLAVOR_AD_BLOB
: val
= "DFS_VOLUME_FLAVOR_AD_BLOB"; break;
1484 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1487 static enum ndr_err_code
ndr_push_dfs_Info300(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info300
*r
)
1489 if (ndr_flags
& NDR_SCALARS
) {
1490 NDR_CHECK(ndr_push_align(ndr
, 4));
1491 NDR_CHECK(ndr_push_dfs_VolumeFlavor(ndr
, NDR_SCALARS
, r
->flavor
));
1492 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dom_root
));
1494 if (ndr_flags
& NDR_BUFFERS
) {
1496 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dom_root
, CH_UTF16
)));
1497 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1498 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dom_root
, CH_UTF16
)));
1499 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dom_root
, ndr_charset_length(r
->dom_root
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1502 return NDR_ERR_SUCCESS
;
1505 static enum ndr_err_code
ndr_pull_dfs_Info300(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info300
*r
)
1507 uint32_t _ptr_dom_root
;
1508 TALLOC_CTX
*_mem_save_dom_root_0
;
1509 if (ndr_flags
& NDR_SCALARS
) {
1510 NDR_CHECK(ndr_pull_align(ndr
, 4));
1511 NDR_CHECK(ndr_pull_dfs_VolumeFlavor(ndr
, NDR_SCALARS
, &r
->flavor
));
1512 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dom_root
));
1513 if (_ptr_dom_root
) {
1514 NDR_PULL_ALLOC(ndr
, r
->dom_root
);
1519 if (ndr_flags
& NDR_BUFFERS
) {
1521 _mem_save_dom_root_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1522 NDR_PULL_SET_MEM_CTX(ndr
, r
->dom_root
, 0);
1523 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dom_root
));
1524 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dom_root
));
1525 if (ndr_get_array_length(ndr
, &r
->dom_root
) > ndr_get_array_size(ndr
, &r
->dom_root
)) {
1526 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
));
1528 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dom_root
), sizeof(uint16_t)));
1529 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dom_root
, ndr_get_array_length(ndr
, &r
->dom_root
), sizeof(uint16_t), CH_UTF16
));
1530 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dom_root_0
, 0);
1533 return NDR_ERR_SUCCESS
;
1536 _PUBLIC_
void ndr_print_dfs_Info300(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info300
*r
)
1538 ndr_print_struct(ndr
, name
, "dfs_Info300");
1540 ndr_print_dfs_VolumeFlavor(ndr
, "flavor", r
->flavor
);
1541 ndr_print_ptr(ndr
, "dom_root", r
->dom_root
);
1544 ndr_print_string(ndr
, "dom_root", r
->dom_root
);
1550 static enum ndr_err_code
ndr_push_dfs_Info(struct ndr_push
*ndr
, int ndr_flags
, const union dfs_Info
*r
)
1552 if (ndr_flags
& NDR_SCALARS
) {
1553 int level
= ndr_push_get_switch_value(ndr
, r
);
1554 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
1557 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info0
));
1561 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
1565 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info2
));
1569 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info3
));
1573 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info4
));
1577 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info5
));
1581 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info6
));
1585 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info7
));
1589 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info100
));
1593 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info101
));
1597 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info102
));
1601 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info103
));
1605 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info104
));
1609 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info105
));
1613 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info106
));
1617 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1620 if (ndr_flags
& NDR_BUFFERS
) {
1621 int level
= ndr_push_get_switch_value(ndr
, r
);
1625 NDR_CHECK(ndr_push_dfs_Info0(ndr
, NDR_SCALARS
, r
->info0
));
1631 NDR_CHECK(ndr_push_dfs_Info1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
1637 NDR_CHECK(ndr_push_dfs_Info2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
1643 NDR_CHECK(ndr_push_dfs_Info3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info3
));
1649 NDR_CHECK(ndr_push_dfs_Info4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
1655 NDR_CHECK(ndr_push_dfs_Info5(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info5
));
1661 NDR_CHECK(ndr_push_dfs_Info6(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info6
));
1667 NDR_CHECK(ndr_push_dfs_Info7(ndr
, NDR_SCALARS
, r
->info7
));
1673 NDR_CHECK(ndr_push_dfs_Info100(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info100
));
1679 NDR_CHECK(ndr_push_dfs_Info101(ndr
, NDR_SCALARS
, r
->info101
));
1685 NDR_CHECK(ndr_push_dfs_Info102(ndr
, NDR_SCALARS
, r
->info102
));
1691 NDR_CHECK(ndr_push_dfs_Info103(ndr
, NDR_SCALARS
, r
->info103
));
1697 NDR_CHECK(ndr_push_dfs_Info104(ndr
, NDR_SCALARS
, r
->info104
));
1703 NDR_CHECK(ndr_push_dfs_Info105(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info105
));
1709 NDR_CHECK(ndr_push_dfs_Info106(ndr
, NDR_SCALARS
, r
->info106
));
1714 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1717 return NDR_ERR_SUCCESS
;
1720 static enum ndr_err_code
ndr_pull_dfs_Info(struct ndr_pull
*ndr
, int ndr_flags
, union dfs_Info
*r
)
1724 TALLOC_CTX
*_mem_save_info0_0
;
1725 TALLOC_CTX
*_mem_save_info1_0
;
1726 TALLOC_CTX
*_mem_save_info2_0
;
1727 TALLOC_CTX
*_mem_save_info3_0
;
1728 TALLOC_CTX
*_mem_save_info4_0
;
1729 TALLOC_CTX
*_mem_save_info5_0
;
1730 TALLOC_CTX
*_mem_save_info6_0
;
1731 TALLOC_CTX
*_mem_save_info7_0
;
1732 TALLOC_CTX
*_mem_save_info100_0
;
1733 TALLOC_CTX
*_mem_save_info101_0
;
1734 TALLOC_CTX
*_mem_save_info102_0
;
1735 TALLOC_CTX
*_mem_save_info103_0
;
1736 TALLOC_CTX
*_mem_save_info104_0
;
1737 TALLOC_CTX
*_mem_save_info105_0
;
1738 TALLOC_CTX
*_mem_save_info106_0
;
1739 level
= ndr_pull_get_switch_value(ndr
, r
);
1740 if (ndr_flags
& NDR_SCALARS
) {
1741 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
1742 if (_level
!= level
) {
1743 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
1747 uint32_t _ptr_info0
;
1748 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info0
));
1750 NDR_PULL_ALLOC(ndr
, r
->info0
);
1757 uint32_t _ptr_info1
;
1758 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
1760 NDR_PULL_ALLOC(ndr
, r
->info1
);
1767 uint32_t _ptr_info2
;
1768 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info2
));
1770 NDR_PULL_ALLOC(ndr
, r
->info2
);
1777 uint32_t _ptr_info3
;
1778 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info3
));
1780 NDR_PULL_ALLOC(ndr
, r
->info3
);
1787 uint32_t _ptr_info4
;
1788 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info4
));
1790 NDR_PULL_ALLOC(ndr
, r
->info4
);
1797 uint32_t _ptr_info5
;
1798 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info5
));
1800 NDR_PULL_ALLOC(ndr
, r
->info5
);
1807 uint32_t _ptr_info6
;
1808 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info6
));
1810 NDR_PULL_ALLOC(ndr
, r
->info6
);
1817 uint32_t _ptr_info7
;
1818 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info7
));
1820 NDR_PULL_ALLOC(ndr
, r
->info7
);
1827 uint32_t _ptr_info100
;
1828 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info100
));
1830 NDR_PULL_ALLOC(ndr
, r
->info100
);
1837 uint32_t _ptr_info101
;
1838 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info101
));
1840 NDR_PULL_ALLOC(ndr
, r
->info101
);
1847 uint32_t _ptr_info102
;
1848 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info102
));
1850 NDR_PULL_ALLOC(ndr
, r
->info102
);
1857 uint32_t _ptr_info103
;
1858 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info103
));
1860 NDR_PULL_ALLOC(ndr
, r
->info103
);
1867 uint32_t _ptr_info104
;
1868 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info104
));
1870 NDR_PULL_ALLOC(ndr
, r
->info104
);
1877 uint32_t _ptr_info105
;
1878 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info105
));
1880 NDR_PULL_ALLOC(ndr
, r
->info105
);
1887 uint32_t _ptr_info106
;
1888 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info106
));
1890 NDR_PULL_ALLOC(ndr
, r
->info106
);
1897 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1900 if (ndr_flags
& NDR_BUFFERS
) {
1904 _mem_save_info0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1905 NDR_PULL_SET_MEM_CTX(ndr
, r
->info0
, 0);
1906 NDR_CHECK(ndr_pull_dfs_Info0(ndr
, NDR_SCALARS
, r
->info0
));
1907 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info0_0
, 0);
1913 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1914 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
1915 NDR_CHECK(ndr_pull_dfs_Info1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
1916 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
1922 _mem_save_info2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1923 NDR_PULL_SET_MEM_CTX(ndr
, r
->info2
, 0);
1924 NDR_CHECK(ndr_pull_dfs_Info2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
1925 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info2_0
, 0);
1931 _mem_save_info3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1932 NDR_PULL_SET_MEM_CTX(ndr
, r
->info3
, 0);
1933 NDR_CHECK(ndr_pull_dfs_Info3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info3
));
1934 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info3_0
, 0);
1940 _mem_save_info4_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1941 NDR_PULL_SET_MEM_CTX(ndr
, r
->info4
, 0);
1942 NDR_CHECK(ndr_pull_dfs_Info4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
1943 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info4_0
, 0);
1949 _mem_save_info5_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1950 NDR_PULL_SET_MEM_CTX(ndr
, r
->info5
, 0);
1951 NDR_CHECK(ndr_pull_dfs_Info5(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info5
));
1952 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info5_0
, 0);
1958 _mem_save_info6_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1959 NDR_PULL_SET_MEM_CTX(ndr
, r
->info6
, 0);
1960 NDR_CHECK(ndr_pull_dfs_Info6(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info6
));
1961 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info6_0
, 0);
1967 _mem_save_info7_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1968 NDR_PULL_SET_MEM_CTX(ndr
, r
->info7
, 0);
1969 NDR_CHECK(ndr_pull_dfs_Info7(ndr
, NDR_SCALARS
, r
->info7
));
1970 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info7_0
, 0);
1976 _mem_save_info100_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1977 NDR_PULL_SET_MEM_CTX(ndr
, r
->info100
, 0);
1978 NDR_CHECK(ndr_pull_dfs_Info100(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info100
));
1979 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info100_0
, 0);
1985 _mem_save_info101_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1986 NDR_PULL_SET_MEM_CTX(ndr
, r
->info101
, 0);
1987 NDR_CHECK(ndr_pull_dfs_Info101(ndr
, NDR_SCALARS
, r
->info101
));
1988 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info101_0
, 0);
1994 _mem_save_info102_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1995 NDR_PULL_SET_MEM_CTX(ndr
, r
->info102
, 0);
1996 NDR_CHECK(ndr_pull_dfs_Info102(ndr
, NDR_SCALARS
, r
->info102
));
1997 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info102_0
, 0);
2003 _mem_save_info103_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2004 NDR_PULL_SET_MEM_CTX(ndr
, r
->info103
, 0);
2005 NDR_CHECK(ndr_pull_dfs_Info103(ndr
, NDR_SCALARS
, r
->info103
));
2006 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info103_0
, 0);
2012 _mem_save_info104_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2013 NDR_PULL_SET_MEM_CTX(ndr
, r
->info104
, 0);
2014 NDR_CHECK(ndr_pull_dfs_Info104(ndr
, NDR_SCALARS
, r
->info104
));
2015 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info104_0
, 0);
2021 _mem_save_info105_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2022 NDR_PULL_SET_MEM_CTX(ndr
, r
->info105
, 0);
2023 NDR_CHECK(ndr_pull_dfs_Info105(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info105
));
2024 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info105_0
, 0);
2030 _mem_save_info106_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2031 NDR_PULL_SET_MEM_CTX(ndr
, r
->info106
, 0);
2032 NDR_CHECK(ndr_pull_dfs_Info106(ndr
, NDR_SCALARS
, r
->info106
));
2033 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info106_0
, 0);
2038 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
2041 return NDR_ERR_SUCCESS
;
2044 _PUBLIC_
void ndr_print_dfs_Info(struct ndr_print
*ndr
, const char *name
, const union dfs_Info
*r
)
2047 level
= ndr_print_get_switch_value(ndr
, r
);
2048 ndr_print_union(ndr
, name
, level
, "dfs_Info");
2051 ndr_print_ptr(ndr
, "info0", r
->info0
);
2054 ndr_print_dfs_Info0(ndr
, "info0", r
->info0
);
2060 ndr_print_ptr(ndr
, "info1", r
->info1
);
2063 ndr_print_dfs_Info1(ndr
, "info1", r
->info1
);
2069 ndr_print_ptr(ndr
, "info2", r
->info2
);
2072 ndr_print_dfs_Info2(ndr
, "info2", r
->info2
);
2078 ndr_print_ptr(ndr
, "info3", r
->info3
);
2081 ndr_print_dfs_Info3(ndr
, "info3", r
->info3
);
2087 ndr_print_ptr(ndr
, "info4", r
->info4
);
2090 ndr_print_dfs_Info4(ndr
, "info4", r
->info4
);
2096 ndr_print_ptr(ndr
, "info5", r
->info5
);
2099 ndr_print_dfs_Info5(ndr
, "info5", r
->info5
);
2105 ndr_print_ptr(ndr
, "info6", r
->info6
);
2108 ndr_print_dfs_Info6(ndr
, "info6", r
->info6
);
2114 ndr_print_ptr(ndr
, "info7", r
->info7
);
2117 ndr_print_dfs_Info7(ndr
, "info7", r
->info7
);
2123 ndr_print_ptr(ndr
, "info100", r
->info100
);
2126 ndr_print_dfs_Info100(ndr
, "info100", r
->info100
);
2132 ndr_print_ptr(ndr
, "info101", r
->info101
);
2135 ndr_print_dfs_Info101(ndr
, "info101", r
->info101
);
2141 ndr_print_ptr(ndr
, "info102", r
->info102
);
2144 ndr_print_dfs_Info102(ndr
, "info102", r
->info102
);
2150 ndr_print_ptr(ndr
, "info103", r
->info103
);
2153 ndr_print_dfs_Info103(ndr
, "info103", r
->info103
);
2159 ndr_print_ptr(ndr
, "info104", r
->info104
);
2162 ndr_print_dfs_Info104(ndr
, "info104", r
->info104
);
2168 ndr_print_ptr(ndr
, "info105", r
->info105
);
2171 ndr_print_dfs_Info105(ndr
, "info105", r
->info105
);
2177 ndr_print_ptr(ndr
, "info106", r
->info106
);
2180 ndr_print_dfs_Info106(ndr
, "info106", r
->info106
);
2186 ndr_print_bad_level(ndr
, name
, level
);
2190 static enum ndr_err_code
ndr_push_dfs_EnumArray1(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray1
*r
)
2193 if (ndr_flags
& NDR_SCALARS
) {
2194 NDR_CHECK(ndr_push_align(ndr
, 4));
2195 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2196 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2198 if (ndr_flags
& NDR_BUFFERS
) {
2200 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2201 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2202 NDR_CHECK(ndr_push_dfs_Info1(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2204 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2205 NDR_CHECK(ndr_push_dfs_Info1(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2209 return NDR_ERR_SUCCESS
;
2212 static enum ndr_err_code
ndr_pull_dfs_EnumArray1(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray1
*r
)
2216 TALLOC_CTX
*_mem_save_s_0
;
2217 TALLOC_CTX
*_mem_save_s_1
;
2218 if (ndr_flags
& NDR_SCALARS
) {
2219 NDR_CHECK(ndr_pull_align(ndr
, 4));
2220 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2221 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2223 NDR_PULL_ALLOC(ndr
, r
->s
);
2228 if (ndr_flags
& NDR_BUFFERS
) {
2230 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2231 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2232 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2233 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2234 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2235 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2236 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2237 NDR_CHECK(ndr_pull_dfs_Info1(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2239 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2240 NDR_CHECK(ndr_pull_dfs_Info1(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2242 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2243 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2246 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2249 return NDR_ERR_SUCCESS
;
2252 _PUBLIC_
void ndr_print_dfs_EnumArray1(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray1
*r
)
2255 ndr_print_struct(ndr
, name
, "dfs_EnumArray1");
2257 ndr_print_uint32(ndr
, "count", r
->count
);
2258 ndr_print_ptr(ndr
, "s", r
->s
);
2261 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", (int)r
->count
);
2263 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2265 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2266 ndr_print_dfs_Info1(ndr
, "s", &r
->s
[cntr_s_1
]);
2276 static enum ndr_err_code
ndr_push_dfs_EnumArray2(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray2
*r
)
2279 if (ndr_flags
& NDR_SCALARS
) {
2280 NDR_CHECK(ndr_push_align(ndr
, 4));
2281 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2282 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2284 if (ndr_flags
& NDR_BUFFERS
) {
2286 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2287 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2288 NDR_CHECK(ndr_push_dfs_Info2(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2290 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2291 NDR_CHECK(ndr_push_dfs_Info2(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2295 return NDR_ERR_SUCCESS
;
2298 static enum ndr_err_code
ndr_pull_dfs_EnumArray2(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray2
*r
)
2302 TALLOC_CTX
*_mem_save_s_0
;
2303 TALLOC_CTX
*_mem_save_s_1
;
2304 if (ndr_flags
& NDR_SCALARS
) {
2305 NDR_CHECK(ndr_pull_align(ndr
, 4));
2306 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2307 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2309 NDR_PULL_ALLOC(ndr
, r
->s
);
2314 if (ndr_flags
& NDR_BUFFERS
) {
2316 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2317 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2318 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2319 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2320 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2321 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2322 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2323 NDR_CHECK(ndr_pull_dfs_Info2(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2325 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2326 NDR_CHECK(ndr_pull_dfs_Info2(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2328 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2329 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2332 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2335 return NDR_ERR_SUCCESS
;
2338 _PUBLIC_
void ndr_print_dfs_EnumArray2(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray2
*r
)
2341 ndr_print_struct(ndr
, name
, "dfs_EnumArray2");
2343 ndr_print_uint32(ndr
, "count", r
->count
);
2344 ndr_print_ptr(ndr
, "s", r
->s
);
2347 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", (int)r
->count
);
2349 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2351 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2352 ndr_print_dfs_Info2(ndr
, "s", &r
->s
[cntr_s_1
]);
2362 static enum ndr_err_code
ndr_push_dfs_EnumArray3(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray3
*r
)
2365 if (ndr_flags
& NDR_SCALARS
) {
2366 NDR_CHECK(ndr_push_align(ndr
, 4));
2367 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2368 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2370 if (ndr_flags
& NDR_BUFFERS
) {
2372 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2373 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2374 NDR_CHECK(ndr_push_dfs_Info3(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2376 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2377 NDR_CHECK(ndr_push_dfs_Info3(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2381 return NDR_ERR_SUCCESS
;
2384 static enum ndr_err_code
ndr_pull_dfs_EnumArray3(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray3
*r
)
2388 TALLOC_CTX
*_mem_save_s_0
;
2389 TALLOC_CTX
*_mem_save_s_1
;
2390 if (ndr_flags
& NDR_SCALARS
) {
2391 NDR_CHECK(ndr_pull_align(ndr
, 4));
2392 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2393 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2395 NDR_PULL_ALLOC(ndr
, r
->s
);
2400 if (ndr_flags
& NDR_BUFFERS
) {
2402 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2403 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2404 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2405 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2406 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2407 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2408 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2409 NDR_CHECK(ndr_pull_dfs_Info3(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2411 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2412 NDR_CHECK(ndr_pull_dfs_Info3(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2414 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2415 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2418 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2421 return NDR_ERR_SUCCESS
;
2424 _PUBLIC_
void ndr_print_dfs_EnumArray3(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray3
*r
)
2427 ndr_print_struct(ndr
, name
, "dfs_EnumArray3");
2429 ndr_print_uint32(ndr
, "count", r
->count
);
2430 ndr_print_ptr(ndr
, "s", r
->s
);
2433 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", (int)r
->count
);
2435 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2437 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2438 ndr_print_dfs_Info3(ndr
, "s", &r
->s
[cntr_s_1
]);
2448 static enum ndr_err_code
ndr_push_dfs_EnumArray4(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray4
*r
)
2451 if (ndr_flags
& NDR_SCALARS
) {
2452 NDR_CHECK(ndr_push_align(ndr
, 4));
2453 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2454 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2456 if (ndr_flags
& NDR_BUFFERS
) {
2458 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2459 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2460 NDR_CHECK(ndr_push_dfs_Info4(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2462 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2463 NDR_CHECK(ndr_push_dfs_Info4(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2467 return NDR_ERR_SUCCESS
;
2470 static enum ndr_err_code
ndr_pull_dfs_EnumArray4(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray4
*r
)
2474 TALLOC_CTX
*_mem_save_s_0
;
2475 TALLOC_CTX
*_mem_save_s_1
;
2476 if (ndr_flags
& NDR_SCALARS
) {
2477 NDR_CHECK(ndr_pull_align(ndr
, 4));
2478 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2479 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2481 NDR_PULL_ALLOC(ndr
, r
->s
);
2486 if (ndr_flags
& NDR_BUFFERS
) {
2488 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2489 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2490 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2491 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2492 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2493 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2494 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2495 NDR_CHECK(ndr_pull_dfs_Info4(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2497 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2498 NDR_CHECK(ndr_pull_dfs_Info4(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2500 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2501 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2504 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2507 return NDR_ERR_SUCCESS
;
2510 _PUBLIC_
void ndr_print_dfs_EnumArray4(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray4
*r
)
2513 ndr_print_struct(ndr
, name
, "dfs_EnumArray4");
2515 ndr_print_uint32(ndr
, "count", r
->count
);
2516 ndr_print_ptr(ndr
, "s", r
->s
);
2519 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", (int)r
->count
);
2521 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2523 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2524 ndr_print_dfs_Info4(ndr
, "s", &r
->s
[cntr_s_1
]);
2534 static enum ndr_err_code
ndr_push_dfs_EnumArray5(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray5
*r
)
2537 if (ndr_flags
& NDR_SCALARS
) {
2538 NDR_CHECK(ndr_push_align(ndr
, 4));
2539 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2540 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2542 if (ndr_flags
& NDR_BUFFERS
) {
2544 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2545 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2546 NDR_CHECK(ndr_push_dfs_Info5(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2548 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2549 NDR_CHECK(ndr_push_dfs_Info5(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2553 return NDR_ERR_SUCCESS
;
2556 static enum ndr_err_code
ndr_pull_dfs_EnumArray5(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray5
*r
)
2560 TALLOC_CTX
*_mem_save_s_0
;
2561 TALLOC_CTX
*_mem_save_s_1
;
2562 if (ndr_flags
& NDR_SCALARS
) {
2563 NDR_CHECK(ndr_pull_align(ndr
, 4));
2564 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2565 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2567 NDR_PULL_ALLOC(ndr
, r
->s
);
2572 if (ndr_flags
& NDR_BUFFERS
) {
2574 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2575 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2576 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2577 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2578 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2579 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2580 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2581 NDR_CHECK(ndr_pull_dfs_Info5(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2583 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2584 NDR_CHECK(ndr_pull_dfs_Info5(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2586 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2587 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2590 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2593 return NDR_ERR_SUCCESS
;
2596 _PUBLIC_
void ndr_print_dfs_EnumArray5(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray5
*r
)
2599 ndr_print_struct(ndr
, name
, "dfs_EnumArray5");
2601 ndr_print_uint32(ndr
, "count", r
->count
);
2602 ndr_print_ptr(ndr
, "s", r
->s
);
2605 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", (int)r
->count
);
2607 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2609 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2610 ndr_print_dfs_Info5(ndr
, "s", &r
->s
[cntr_s_1
]);
2620 static enum ndr_err_code
ndr_push_dfs_EnumArray6(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray6
*r
)
2623 if (ndr_flags
& NDR_SCALARS
) {
2624 NDR_CHECK(ndr_push_align(ndr
, 4));
2625 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2626 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2628 if (ndr_flags
& NDR_BUFFERS
) {
2630 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2631 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2632 NDR_CHECK(ndr_push_dfs_Info6(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2634 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2635 NDR_CHECK(ndr_push_dfs_Info6(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2639 return NDR_ERR_SUCCESS
;
2642 static enum ndr_err_code
ndr_pull_dfs_EnumArray6(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray6
*r
)
2646 TALLOC_CTX
*_mem_save_s_0
;
2647 TALLOC_CTX
*_mem_save_s_1
;
2648 if (ndr_flags
& NDR_SCALARS
) {
2649 NDR_CHECK(ndr_pull_align(ndr
, 4));
2650 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2651 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2653 NDR_PULL_ALLOC(ndr
, r
->s
);
2658 if (ndr_flags
& NDR_BUFFERS
) {
2660 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2661 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2662 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2663 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2664 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2665 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2666 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2667 NDR_CHECK(ndr_pull_dfs_Info6(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2669 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2670 NDR_CHECK(ndr_pull_dfs_Info6(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2672 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2673 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2676 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2679 return NDR_ERR_SUCCESS
;
2682 _PUBLIC_
void ndr_print_dfs_EnumArray6(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray6
*r
)
2685 ndr_print_struct(ndr
, name
, "dfs_EnumArray6");
2687 ndr_print_uint32(ndr
, "count", r
->count
);
2688 ndr_print_ptr(ndr
, "s", r
->s
);
2691 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", (int)r
->count
);
2693 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2695 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2696 ndr_print_dfs_Info6(ndr
, "s", &r
->s
[cntr_s_1
]);
2706 static enum ndr_err_code
ndr_push_dfs_EnumArray200(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray200
*r
)
2709 if (ndr_flags
& NDR_SCALARS
) {
2710 NDR_CHECK(ndr_push_align(ndr
, 4));
2711 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2712 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2714 if (ndr_flags
& NDR_BUFFERS
) {
2716 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2717 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2718 NDR_CHECK(ndr_push_dfs_Info200(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2720 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2721 NDR_CHECK(ndr_push_dfs_Info200(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2725 return NDR_ERR_SUCCESS
;
2728 static enum ndr_err_code
ndr_pull_dfs_EnumArray200(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray200
*r
)
2732 TALLOC_CTX
*_mem_save_s_0
;
2733 TALLOC_CTX
*_mem_save_s_1
;
2734 if (ndr_flags
& NDR_SCALARS
) {
2735 NDR_CHECK(ndr_pull_align(ndr
, 4));
2736 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2737 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2739 NDR_PULL_ALLOC(ndr
, r
->s
);
2744 if (ndr_flags
& NDR_BUFFERS
) {
2746 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2747 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2748 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2749 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2750 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2751 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2752 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2753 NDR_CHECK(ndr_pull_dfs_Info200(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2755 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2756 NDR_CHECK(ndr_pull_dfs_Info200(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2758 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2759 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2762 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2765 return NDR_ERR_SUCCESS
;
2768 _PUBLIC_
void ndr_print_dfs_EnumArray200(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray200
*r
)
2771 ndr_print_struct(ndr
, name
, "dfs_EnumArray200");
2773 ndr_print_uint32(ndr
, "count", r
->count
);
2774 ndr_print_ptr(ndr
, "s", r
->s
);
2777 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", (int)r
->count
);
2779 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2781 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2782 ndr_print_dfs_Info200(ndr
, "s", &r
->s
[cntr_s_1
]);
2792 static enum ndr_err_code
ndr_push_dfs_EnumArray300(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray300
*r
)
2795 if (ndr_flags
& NDR_SCALARS
) {
2796 NDR_CHECK(ndr_push_align(ndr
, 4));
2797 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2798 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2800 if (ndr_flags
& NDR_BUFFERS
) {
2802 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2803 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2804 NDR_CHECK(ndr_push_dfs_Info300(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2806 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2807 NDR_CHECK(ndr_push_dfs_Info300(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2811 return NDR_ERR_SUCCESS
;
2814 static enum ndr_err_code
ndr_pull_dfs_EnumArray300(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray300
*r
)
2818 TALLOC_CTX
*_mem_save_s_0
;
2819 TALLOC_CTX
*_mem_save_s_1
;
2820 if (ndr_flags
& NDR_SCALARS
) {
2821 NDR_CHECK(ndr_pull_align(ndr
, 4));
2822 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2823 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2825 NDR_PULL_ALLOC(ndr
, r
->s
);
2830 if (ndr_flags
& NDR_BUFFERS
) {
2832 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2833 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2834 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2835 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2836 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2837 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2838 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2839 NDR_CHECK(ndr_pull_dfs_Info300(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2841 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2842 NDR_CHECK(ndr_pull_dfs_Info300(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2844 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2845 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2848 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2851 return NDR_ERR_SUCCESS
;
2854 _PUBLIC_
void ndr_print_dfs_EnumArray300(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray300
*r
)
2857 ndr_print_struct(ndr
, name
, "dfs_EnumArray300");
2859 ndr_print_uint32(ndr
, "count", r
->count
);
2860 ndr_print_ptr(ndr
, "s", r
->s
);
2863 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", (int)r
->count
);
2865 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2867 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2868 ndr_print_dfs_Info300(ndr
, "s", &r
->s
[cntr_s_1
]);
2878 static enum ndr_err_code
ndr_push_dfs_EnumInfo(struct ndr_push
*ndr
, int ndr_flags
, const union dfs_EnumInfo
*r
)
2880 if (ndr_flags
& NDR_SCALARS
) {
2881 int level
= ndr_push_get_switch_value(ndr
, r
);
2882 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
2885 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
2889 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info2
));
2893 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info3
));
2897 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info4
));
2901 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info5
));
2905 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info6
));
2909 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info200
));
2913 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info300
));
2917 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
2920 if (ndr_flags
& NDR_BUFFERS
) {
2921 int level
= ndr_push_get_switch_value(ndr
, r
);
2925 NDR_CHECK(ndr_push_dfs_EnumArray1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
2931 NDR_CHECK(ndr_push_dfs_EnumArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
2937 NDR_CHECK(ndr_push_dfs_EnumArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info3
));
2943 NDR_CHECK(ndr_push_dfs_EnumArray4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
2949 NDR_CHECK(ndr_push_dfs_EnumArray5(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info5
));
2955 NDR_CHECK(ndr_push_dfs_EnumArray6(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info6
));
2961 NDR_CHECK(ndr_push_dfs_EnumArray200(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info200
));
2967 NDR_CHECK(ndr_push_dfs_EnumArray300(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info300
));
2972 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
2975 return NDR_ERR_SUCCESS
;
2978 static enum ndr_err_code
ndr_pull_dfs_EnumInfo(struct ndr_pull
*ndr
, int ndr_flags
, union dfs_EnumInfo
*r
)
2982 TALLOC_CTX
*_mem_save_info1_0
;
2983 TALLOC_CTX
*_mem_save_info2_0
;
2984 TALLOC_CTX
*_mem_save_info3_0
;
2985 TALLOC_CTX
*_mem_save_info4_0
;
2986 TALLOC_CTX
*_mem_save_info5_0
;
2987 TALLOC_CTX
*_mem_save_info6_0
;
2988 TALLOC_CTX
*_mem_save_info200_0
;
2989 TALLOC_CTX
*_mem_save_info300_0
;
2990 level
= ndr_pull_get_switch_value(ndr
, r
);
2991 if (ndr_flags
& NDR_SCALARS
) {
2992 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
2993 if (_level
!= level
) {
2994 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
2998 uint32_t _ptr_info1
;
2999 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
3001 NDR_PULL_ALLOC(ndr
, r
->info1
);
3008 uint32_t _ptr_info2
;
3009 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info2
));
3011 NDR_PULL_ALLOC(ndr
, r
->info2
);
3018 uint32_t _ptr_info3
;
3019 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info3
));
3021 NDR_PULL_ALLOC(ndr
, r
->info3
);
3028 uint32_t _ptr_info4
;
3029 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info4
));
3031 NDR_PULL_ALLOC(ndr
, r
->info4
);
3038 uint32_t _ptr_info5
;
3039 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info5
));
3041 NDR_PULL_ALLOC(ndr
, r
->info5
);
3048 uint32_t _ptr_info6
;
3049 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info6
));
3051 NDR_PULL_ALLOC(ndr
, r
->info6
);
3058 uint32_t _ptr_info200
;
3059 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info200
));
3061 NDR_PULL_ALLOC(ndr
, r
->info200
);
3068 uint32_t _ptr_info300
;
3069 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info300
));
3071 NDR_PULL_ALLOC(ndr
, r
->info300
);
3078 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3081 if (ndr_flags
& NDR_BUFFERS
) {
3085 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3086 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
3087 NDR_CHECK(ndr_pull_dfs_EnumArray1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
3088 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
3094 _mem_save_info2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3095 NDR_PULL_SET_MEM_CTX(ndr
, r
->info2
, 0);
3096 NDR_CHECK(ndr_pull_dfs_EnumArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
3097 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info2_0
, 0);
3103 _mem_save_info3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3104 NDR_PULL_SET_MEM_CTX(ndr
, r
->info3
, 0);
3105 NDR_CHECK(ndr_pull_dfs_EnumArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info3
));
3106 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info3_0
, 0);
3112 _mem_save_info4_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3113 NDR_PULL_SET_MEM_CTX(ndr
, r
->info4
, 0);
3114 NDR_CHECK(ndr_pull_dfs_EnumArray4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
3115 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info4_0
, 0);
3121 _mem_save_info5_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3122 NDR_PULL_SET_MEM_CTX(ndr
, r
->info5
, 0);
3123 NDR_CHECK(ndr_pull_dfs_EnumArray5(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info5
));
3124 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info5_0
, 0);
3130 _mem_save_info6_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3131 NDR_PULL_SET_MEM_CTX(ndr
, r
->info6
, 0);
3132 NDR_CHECK(ndr_pull_dfs_EnumArray6(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info6
));
3133 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info6_0
, 0);
3139 _mem_save_info200_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3140 NDR_PULL_SET_MEM_CTX(ndr
, r
->info200
, 0);
3141 NDR_CHECK(ndr_pull_dfs_EnumArray200(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info200
));
3142 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info200_0
, 0);
3148 _mem_save_info300_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3149 NDR_PULL_SET_MEM_CTX(ndr
, r
->info300
, 0);
3150 NDR_CHECK(ndr_pull_dfs_EnumArray300(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info300
));
3151 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info300_0
, 0);
3156 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3159 return NDR_ERR_SUCCESS
;
3162 _PUBLIC_
void ndr_print_dfs_EnumInfo(struct ndr_print
*ndr
, const char *name
, const union dfs_EnumInfo
*r
)
3165 level
= ndr_print_get_switch_value(ndr
, r
);
3166 ndr_print_union(ndr
, name
, level
, "dfs_EnumInfo");
3169 ndr_print_ptr(ndr
, "info1", r
->info1
);
3172 ndr_print_dfs_EnumArray1(ndr
, "info1", r
->info1
);
3178 ndr_print_ptr(ndr
, "info2", r
->info2
);
3181 ndr_print_dfs_EnumArray2(ndr
, "info2", r
->info2
);
3187 ndr_print_ptr(ndr
, "info3", r
->info3
);
3190 ndr_print_dfs_EnumArray3(ndr
, "info3", r
->info3
);
3196 ndr_print_ptr(ndr
, "info4", r
->info4
);
3199 ndr_print_dfs_EnumArray4(ndr
, "info4", r
->info4
);
3205 ndr_print_ptr(ndr
, "info5", r
->info5
);
3208 ndr_print_dfs_EnumArray5(ndr
, "info5", r
->info5
);
3214 ndr_print_ptr(ndr
, "info6", r
->info6
);
3217 ndr_print_dfs_EnumArray6(ndr
, "info6", r
->info6
);
3223 ndr_print_ptr(ndr
, "info200", r
->info200
);
3226 ndr_print_dfs_EnumArray200(ndr
, "info200", r
->info200
);
3232 ndr_print_ptr(ndr
, "info300", r
->info300
);
3235 ndr_print_dfs_EnumArray300(ndr
, "info300", r
->info300
);
3241 ndr_print_bad_level(ndr
, name
, level
);
3245 static enum ndr_err_code
ndr_push_dfs_EnumStruct(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumStruct
*r
)
3247 if (ndr_flags
& NDR_SCALARS
) {
3248 NDR_CHECK(ndr_push_align(ndr
, 4));
3249 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->level
));
3250 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->e
, r
->level
));
3251 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr
, NDR_SCALARS
, &r
->e
));
3253 if (ndr_flags
& NDR_BUFFERS
) {
3254 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr
, NDR_BUFFERS
, &r
->e
));
3256 return NDR_ERR_SUCCESS
;
3259 static enum ndr_err_code
ndr_pull_dfs_EnumStruct(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumStruct
*r
)
3261 if (ndr_flags
& NDR_SCALARS
) {
3262 NDR_CHECK(ndr_pull_align(ndr
, 4));
3263 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->level
));
3264 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->e
, r
->level
));
3265 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr
, NDR_SCALARS
, &r
->e
));
3267 if (ndr_flags
& NDR_BUFFERS
) {
3268 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr
, NDR_BUFFERS
, &r
->e
));
3270 return NDR_ERR_SUCCESS
;
3273 _PUBLIC_
void ndr_print_dfs_EnumStruct(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumStruct
*r
)
3275 ndr_print_struct(ndr
, name
, "dfs_EnumStruct");
3277 ndr_print_uint32(ndr
, "level", r
->level
);
3278 ndr_print_set_switch_value(ndr
, &r
->e
, r
->level
);
3279 ndr_print_dfs_EnumInfo(ndr
, "e", &r
->e
);
3283 static enum ndr_err_code
ndr_push_dfs_UnknownStruct(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_UnknownStruct
*r
)
3285 if (ndr_flags
& NDR_SCALARS
) {
3286 NDR_CHECK(ndr_push_align(ndr
, 4));
3287 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown1
));
3288 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->unknown2
));
3290 if (ndr_flags
& NDR_BUFFERS
) {
3292 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->unknown2
, CH_UTF16
)));
3293 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3294 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->unknown2
, CH_UTF16
)));
3295 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->unknown2
, ndr_charset_length(r
->unknown2
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3298 return NDR_ERR_SUCCESS
;
3301 static enum ndr_err_code
ndr_pull_dfs_UnknownStruct(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_UnknownStruct
*r
)
3303 uint32_t _ptr_unknown2
;
3304 TALLOC_CTX
*_mem_save_unknown2_0
;
3305 if (ndr_flags
& NDR_SCALARS
) {
3306 NDR_CHECK(ndr_pull_align(ndr
, 4));
3307 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
3308 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown2
));
3309 if (_ptr_unknown2
) {
3310 NDR_PULL_ALLOC(ndr
, r
->unknown2
);
3315 if (ndr_flags
& NDR_BUFFERS
) {
3317 _mem_save_unknown2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3318 NDR_PULL_SET_MEM_CTX(ndr
, r
->unknown2
, 0);
3319 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->unknown2
));
3320 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->unknown2
));
3321 if (ndr_get_array_length(ndr
, &r
->unknown2
) > ndr_get_array_size(ndr
, &r
->unknown2
)) {
3322 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
));
3324 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->unknown2
), sizeof(uint16_t)));
3325 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->unknown2
, ndr_get_array_length(ndr
, &r
->unknown2
), sizeof(uint16_t), CH_UTF16
));
3326 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown2_0
, 0);
3329 return NDR_ERR_SUCCESS
;
3332 _PUBLIC_
void ndr_print_dfs_UnknownStruct(struct ndr_print
*ndr
, const char *name
, const struct dfs_UnknownStruct
*r
)
3334 ndr_print_struct(ndr
, name
, "dfs_UnknownStruct");
3336 ndr_print_uint32(ndr
, "unknown1", r
->unknown1
);
3337 ndr_print_ptr(ndr
, "unknown2", r
->unknown2
);
3340 ndr_print_string(ndr
, "unknown2", r
->unknown2
);
3346 _PUBLIC_
enum ndr_err_code
ndr_push_dfs_GetManagerVersion(struct ndr_push
*ndr
, int flags
, const struct dfs_GetManagerVersion
*r
)
3348 if (flags
& NDR_IN
) {
3350 if (flags
& NDR_OUT
) {
3351 if (r
->out
.version
== NULL
) {
3352 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3354 NDR_CHECK(ndr_push_dfs_ManagerVersion(ndr
, NDR_SCALARS
, *r
->out
.version
));
3356 return NDR_ERR_SUCCESS
;
3359 _PUBLIC_
enum ndr_err_code
ndr_pull_dfs_GetManagerVersion(struct ndr_pull
*ndr
, int flags
, struct dfs_GetManagerVersion
*r
)
3361 TALLOC_CTX
*_mem_save_version_0
;
3362 if (flags
& NDR_IN
) {
3363 ZERO_STRUCT(r
->out
);
3365 NDR_PULL_ALLOC(ndr
, r
->out
.version
);
3366 ZERO_STRUCTP(r
->out
.version
);
3368 if (flags
& NDR_OUT
) {
3369 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3370 NDR_PULL_ALLOC(ndr
, r
->out
.version
);
3372 _mem_save_version_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3373 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.version
, LIBNDR_FLAG_REF_ALLOC
);
3374 NDR_CHECK(ndr_pull_dfs_ManagerVersion(ndr
, NDR_SCALARS
, r
->out
.version
));
3375 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_version_0
, LIBNDR_FLAG_REF_ALLOC
);
3377 return NDR_ERR_SUCCESS
;
3380 _PUBLIC_
void ndr_print_dfs_GetManagerVersion(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_GetManagerVersion
*r
)
3382 ndr_print_struct(ndr
, name
, "dfs_GetManagerVersion");
3384 if (flags
& NDR_SET_VALUES
) {
3385 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3387 if (flags
& NDR_IN
) {
3388 ndr_print_struct(ndr
, "in", "dfs_GetManagerVersion");
3392 if (flags
& NDR_OUT
) {
3393 ndr_print_struct(ndr
, "out", "dfs_GetManagerVersion");
3395 ndr_print_ptr(ndr
, "version", r
->out
.version
);
3397 ndr_print_dfs_ManagerVersion(ndr
, "version", *r
->out
.version
);
3404 static enum ndr_err_code
ndr_push_dfs_Add(struct ndr_push
*ndr
, int flags
, const struct dfs_Add
*r
)
3406 if (flags
& NDR_IN
) {
3407 if (r
->in
.path
== NULL
) {
3408 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3410 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.path
, CH_UTF16
)));
3411 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3412 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.path
, CH_UTF16
)));
3413 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.path
, ndr_charset_length(r
->in
.path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3414 if (r
->in
.server
== NULL
) {
3415 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3417 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
3418 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3419 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
3420 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3421 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.share
));
3423 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.share
, CH_UTF16
)));
3424 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3425 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.share
, CH_UTF16
)));
3426 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.share
, ndr_charset_length(r
->in
.share
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3428 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.comment
));
3429 if (r
->in
.comment
) {
3430 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
3431 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3432 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
3433 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.comment
, ndr_charset_length(r
->in
.comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3435 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
3437 if (flags
& NDR_OUT
) {
3438 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3440 return NDR_ERR_SUCCESS
;
3443 static enum ndr_err_code
ndr_pull_dfs_Add(struct ndr_pull
*ndr
, int flags
, struct dfs_Add
*r
)
3445 uint32_t _ptr_share
;
3446 uint32_t _ptr_comment
;
3447 TALLOC_CTX
*_mem_save_share_0
;
3448 TALLOC_CTX
*_mem_save_comment_0
;
3449 if (flags
& NDR_IN
) {
3450 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.path
));
3451 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.path
));
3452 if (ndr_get_array_length(ndr
, &r
->in
.path
) > ndr_get_array_size(ndr
, &r
->in
.path
)) {
3453 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
));
3455 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.path
), sizeof(uint16_t)));
3456 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.path
, ndr_get_array_length(ndr
, &r
->in
.path
), sizeof(uint16_t), CH_UTF16
));
3457 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
3458 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
3459 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
3460 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
));
3462 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
3463 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
3464 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_share
));
3466 NDR_PULL_ALLOC(ndr
, r
->in
.share
);
3471 _mem_save_share_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3472 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.share
, 0);
3473 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.share
));
3474 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.share
));
3475 if (ndr_get_array_length(ndr
, &r
->in
.share
) > ndr_get_array_size(ndr
, &r
->in
.share
)) {
3476 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
));
3478 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.share
), sizeof(uint16_t)));
3479 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.share
, ndr_get_array_length(ndr
, &r
->in
.share
), sizeof(uint16_t), CH_UTF16
));
3480 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_share_0
, 0);
3482 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
3484 NDR_PULL_ALLOC(ndr
, r
->in
.comment
);
3486 r
->in
.comment
= NULL
;
3488 if (r
->in
.comment
) {
3489 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3490 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.comment
, 0);
3491 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.comment
));
3492 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.comment
));
3493 if (ndr_get_array_length(ndr
, &r
->in
.comment
) > ndr_get_array_size(ndr
, &r
->in
.comment
)) {
3494 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
));
3496 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t)));
3497 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.comment
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t), CH_UTF16
));
3498 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
3500 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
3502 if (flags
& NDR_OUT
) {
3503 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3505 return NDR_ERR_SUCCESS
;
3508 _PUBLIC_
void ndr_print_dfs_Add(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Add
*r
)
3510 ndr_print_struct(ndr
, name
, "dfs_Add");
3512 if (flags
& NDR_SET_VALUES
) {
3513 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3515 if (flags
& NDR_IN
) {
3516 ndr_print_struct(ndr
, "in", "dfs_Add");
3518 ndr_print_ptr(ndr
, "path", r
->in
.path
);
3520 ndr_print_string(ndr
, "path", r
->in
.path
);
3522 ndr_print_ptr(ndr
, "server", r
->in
.server
);
3524 ndr_print_string(ndr
, "server", r
->in
.server
);
3526 ndr_print_ptr(ndr
, "share", r
->in
.share
);
3529 ndr_print_string(ndr
, "share", r
->in
.share
);
3532 ndr_print_ptr(ndr
, "comment", r
->in
.comment
);
3534 if (r
->in
.comment
) {
3535 ndr_print_string(ndr
, "comment", r
->in
.comment
);
3538 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
3541 if (flags
& NDR_OUT
) {
3542 ndr_print_struct(ndr
, "out", "dfs_Add");
3544 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3550 static enum ndr_err_code
ndr_push_dfs_Remove(struct ndr_push
*ndr
, int flags
, const struct dfs_Remove
*r
)
3552 if (flags
& NDR_IN
) {
3553 if (r
->in
.dfs_entry_path
== NULL
) {
3554 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3556 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
)));
3557 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3558 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
)));
3559 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
));
3560 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
3561 if (r
->in
.servername
) {
3562 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
3563 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3564 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
3565 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3567 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.sharename
));
3568 if (r
->in
.sharename
) {
3569 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
)));
3570 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3571 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
)));
3572 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.sharename
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3575 if (flags
& NDR_OUT
) {
3576 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3578 return NDR_ERR_SUCCESS
;
3581 static enum ndr_err_code
ndr_pull_dfs_Remove(struct ndr_pull
*ndr
, int flags
, struct dfs_Remove
*r
)
3583 uint32_t _ptr_servername
;
3584 uint32_t _ptr_sharename
;
3585 TALLOC_CTX
*_mem_save_servername_0
;
3586 TALLOC_CTX
*_mem_save_sharename_0
;
3587 if (flags
& NDR_IN
) {
3588 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfs_entry_path
));
3589 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfs_entry_path
));
3590 if (ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
) > ndr_get_array_size(ndr
, &r
->in
.dfs_entry_path
)) {
3591 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
));
3593 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
), sizeof(uint16_t)));
3594 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
));
3595 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
3596 if (_ptr_servername
) {
3597 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
3599 r
->in
.servername
= NULL
;
3601 if (r
->in
.servername
) {
3602 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3603 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
3604 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
3605 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
3606 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
3607 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
));
3609 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
3610 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
3611 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
3613 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sharename
));
3614 if (_ptr_sharename
) {
3615 NDR_PULL_ALLOC(ndr
, r
->in
.sharename
);
3617 r
->in
.sharename
= NULL
;
3619 if (r
->in
.sharename
) {
3620 _mem_save_sharename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3621 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sharename
, 0);
3622 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.sharename
));
3623 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.sharename
));
3624 if (ndr_get_array_length(ndr
, &r
->in
.sharename
) > ndr_get_array_size(ndr
, &r
->in
.sharename
)) {
3625 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
));
3627 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.sharename
), sizeof(uint16_t)));
3628 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.sharename
, ndr_get_array_length(ndr
, &r
->in
.sharename
), sizeof(uint16_t), CH_UTF16
));
3629 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sharename_0
, 0);
3632 if (flags
& NDR_OUT
) {
3633 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3635 return NDR_ERR_SUCCESS
;
3638 _PUBLIC_
void ndr_print_dfs_Remove(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Remove
*r
)
3640 ndr_print_struct(ndr
, name
, "dfs_Remove");
3642 if (flags
& NDR_SET_VALUES
) {
3643 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3645 if (flags
& NDR_IN
) {
3646 ndr_print_struct(ndr
, "in", "dfs_Remove");
3648 ndr_print_ptr(ndr
, "dfs_entry_path", r
->in
.dfs_entry_path
);
3650 ndr_print_string(ndr
, "dfs_entry_path", r
->in
.dfs_entry_path
);
3652 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
3654 if (r
->in
.servername
) {
3655 ndr_print_string(ndr
, "servername", r
->in
.servername
);
3658 ndr_print_ptr(ndr
, "sharename", r
->in
.sharename
);
3660 if (r
->in
.sharename
) {
3661 ndr_print_string(ndr
, "sharename", r
->in
.sharename
);
3666 if (flags
& NDR_OUT
) {
3667 ndr_print_struct(ndr
, "out", "dfs_Remove");
3669 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3675 static enum ndr_err_code
ndr_push_dfs_SetInfo(struct ndr_push
*ndr
, int flags
, const struct dfs_SetInfo
*r
)
3677 if (flags
& NDR_IN
) {
3678 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
)));
3679 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3680 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
)));
3681 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
));
3682 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
3683 if (r
->in
.servername
) {
3684 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
3685 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3686 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
3687 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3689 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.sharename
));
3690 if (r
->in
.sharename
) {
3691 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
)));
3692 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3693 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
)));
3694 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.sharename
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3696 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
3697 if (r
->in
.info
== NULL
) {
3698 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3700 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
3701 NDR_CHECK(ndr_push_dfs_Info(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
3703 if (flags
& NDR_OUT
) {
3704 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3706 return NDR_ERR_SUCCESS
;
3709 static enum ndr_err_code
ndr_pull_dfs_SetInfo(struct ndr_pull
*ndr
, int flags
, struct dfs_SetInfo
*r
)
3711 uint32_t _ptr_servername
;
3712 uint32_t _ptr_sharename
;
3713 TALLOC_CTX
*_mem_save_servername_0
;
3714 TALLOC_CTX
*_mem_save_sharename_0
;
3715 TALLOC_CTX
*_mem_save_info_0
;
3716 if (flags
& NDR_IN
) {
3717 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfs_entry_path
));
3718 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfs_entry_path
));
3719 if (ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
) > ndr_get_array_size(ndr
, &r
->in
.dfs_entry_path
)) {
3720 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
));
3722 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
), sizeof(uint16_t)));
3723 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
));
3724 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
3725 if (_ptr_servername
) {
3726 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
3728 r
->in
.servername
= NULL
;
3730 if (r
->in
.servername
) {
3731 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3732 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
3733 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
3734 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
3735 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
3736 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
));
3738 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
3739 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
3740 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
3742 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sharename
));
3743 if (_ptr_sharename
) {
3744 NDR_PULL_ALLOC(ndr
, r
->in
.sharename
);
3746 r
->in
.sharename
= NULL
;
3748 if (r
->in
.sharename
) {
3749 _mem_save_sharename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3750 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sharename
, 0);
3751 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.sharename
));
3752 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.sharename
));
3753 if (ndr_get_array_length(ndr
, &r
->in
.sharename
) > ndr_get_array_size(ndr
, &r
->in
.sharename
)) {
3754 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
));
3756 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.sharename
), sizeof(uint16_t)));
3757 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.sharename
, ndr_get_array_length(ndr
, &r
->in
.sharename
), sizeof(uint16_t), CH_UTF16
));
3758 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sharename_0
, 0);
3760 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
3761 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3762 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
3764 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3765 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
3766 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
3767 NDR_CHECK(ndr_pull_dfs_Info(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
3768 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
3770 if (flags
& NDR_OUT
) {
3771 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3773 return NDR_ERR_SUCCESS
;
3776 _PUBLIC_
void ndr_print_dfs_SetInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_SetInfo
*r
)
3778 ndr_print_struct(ndr
, name
, "dfs_SetInfo");
3780 if (flags
& NDR_SET_VALUES
) {
3781 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3783 if (flags
& NDR_IN
) {
3784 ndr_print_struct(ndr
, "in", "dfs_SetInfo");
3786 ndr_print_string(ndr
, "dfs_entry_path", r
->in
.dfs_entry_path
);
3787 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
3789 if (r
->in
.servername
) {
3790 ndr_print_string(ndr
, "servername", r
->in
.servername
);
3793 ndr_print_ptr(ndr
, "sharename", r
->in
.sharename
);
3795 if (r
->in
.sharename
) {
3796 ndr_print_string(ndr
, "sharename", r
->in
.sharename
);
3799 ndr_print_uint32(ndr
, "level", r
->in
.level
);
3800 ndr_print_ptr(ndr
, "info", r
->in
.info
);
3802 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
3803 ndr_print_dfs_Info(ndr
, "info", r
->in
.info
);
3807 if (flags
& NDR_OUT
) {
3808 ndr_print_struct(ndr
, "out", "dfs_SetInfo");
3810 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3816 static enum ndr_err_code
ndr_push_dfs_GetInfo(struct ndr_push
*ndr
, int flags
, const struct dfs_GetInfo
*r
)
3818 if (flags
& NDR_IN
) {
3819 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
)));
3820 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3821 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
)));
3822 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
));
3823 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
3824 if (r
->in
.servername
) {
3825 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
3826 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3827 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
3828 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3830 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.sharename
));
3831 if (r
->in
.sharename
) {
3832 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
)));
3833 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3834 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
)));
3835 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.sharename
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3837 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
3839 if (flags
& NDR_OUT
) {
3840 if (r
->out
.info
== NULL
) {
3841 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3843 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
3844 NDR_CHECK(ndr_push_dfs_Info(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
3845 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3847 return NDR_ERR_SUCCESS
;
3850 static enum ndr_err_code
ndr_pull_dfs_GetInfo(struct ndr_pull
*ndr
, int flags
, struct dfs_GetInfo
*r
)
3852 uint32_t _ptr_servername
;
3853 uint32_t _ptr_sharename
;
3854 TALLOC_CTX
*_mem_save_servername_0
;
3855 TALLOC_CTX
*_mem_save_sharename_0
;
3856 TALLOC_CTX
*_mem_save_info_0
;
3857 if (flags
& NDR_IN
) {
3858 ZERO_STRUCT(r
->out
);
3860 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfs_entry_path
));
3861 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfs_entry_path
));
3862 if (ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
) > ndr_get_array_size(ndr
, &r
->in
.dfs_entry_path
)) {
3863 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
));
3865 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
), sizeof(uint16_t)));
3866 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
));
3867 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
3868 if (_ptr_servername
) {
3869 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
3871 r
->in
.servername
= NULL
;
3873 if (r
->in
.servername
) {
3874 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3875 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
3876 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
3877 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
3878 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
3879 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
));
3881 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
3882 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
3883 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
3885 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sharename
));
3886 if (_ptr_sharename
) {
3887 NDR_PULL_ALLOC(ndr
, r
->in
.sharename
);
3889 r
->in
.sharename
= NULL
;
3891 if (r
->in
.sharename
) {
3892 _mem_save_sharename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3893 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sharename
, 0);
3894 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.sharename
));
3895 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.sharename
));
3896 if (ndr_get_array_length(ndr
, &r
->in
.sharename
) > ndr_get_array_size(ndr
, &r
->in
.sharename
)) {
3897 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
));
3899 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.sharename
), sizeof(uint16_t)));
3900 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.sharename
, ndr_get_array_length(ndr
, &r
->in
.sharename
), sizeof(uint16_t), CH_UTF16
));
3901 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sharename_0
, 0);
3903 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
3904 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
3905 ZERO_STRUCTP(r
->out
.info
);
3907 if (flags
& NDR_OUT
) {
3908 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3909 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
3911 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3912 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
3913 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
3914 NDR_CHECK(ndr_pull_dfs_Info(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
3915 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
3916 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3918 return NDR_ERR_SUCCESS
;
3921 _PUBLIC_
void ndr_print_dfs_GetInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_GetInfo
*r
)
3923 ndr_print_struct(ndr
, name
, "dfs_GetInfo");
3925 if (flags
& NDR_SET_VALUES
) {
3926 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3928 if (flags
& NDR_IN
) {
3929 ndr_print_struct(ndr
, "in", "dfs_GetInfo");
3931 ndr_print_string(ndr
, "dfs_entry_path", r
->in
.dfs_entry_path
);
3932 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
3934 if (r
->in
.servername
) {
3935 ndr_print_string(ndr
, "servername", r
->in
.servername
);
3938 ndr_print_ptr(ndr
, "sharename", r
->in
.sharename
);
3940 if (r
->in
.sharename
) {
3941 ndr_print_string(ndr
, "sharename", r
->in
.sharename
);
3944 ndr_print_uint32(ndr
, "level", r
->in
.level
);
3947 if (flags
& NDR_OUT
) {
3948 ndr_print_struct(ndr
, "out", "dfs_GetInfo");
3950 ndr_print_ptr(ndr
, "info", r
->out
.info
);
3952 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
3953 ndr_print_dfs_Info(ndr
, "info", r
->out
.info
);
3955 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3961 static enum ndr_err_code
ndr_push_dfs_Enum(struct ndr_push
*ndr
, int flags
, const struct dfs_Enum
*r
)
3963 if (flags
& NDR_IN
) {
3964 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
3965 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.bufsize
));
3966 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.info
));
3968 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
3970 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.total
));
3972 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.total
));
3975 if (flags
& NDR_OUT
) {
3976 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
3978 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
3980 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.total
));
3982 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.total
));
3984 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3986 return NDR_ERR_SUCCESS
;
3989 static enum ndr_err_code
ndr_pull_dfs_Enum(struct ndr_pull
*ndr
, int flags
, struct dfs_Enum
*r
)
3992 uint32_t _ptr_total
;
3993 TALLOC_CTX
*_mem_save_info_0
;
3994 TALLOC_CTX
*_mem_save_total_0
;
3995 if (flags
& NDR_IN
) {
3996 ZERO_STRUCT(r
->out
);
3998 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
3999 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.bufsize
));
4000 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
4002 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
4007 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4008 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, 0);
4009 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
4010 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
4012 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_total
));
4014 NDR_PULL_ALLOC(ndr
, r
->in
.total
);
4019 _mem_save_total_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4020 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.total
, 0);
4021 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.total
));
4022 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_0
, 0);
4025 if (flags
& NDR_OUT
) {
4026 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
4028 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
4033 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4034 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
4035 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
4036 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
4038 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_total
));
4040 NDR_PULL_ALLOC(ndr
, r
->out
.total
);
4042 r
->out
.total
= NULL
;
4045 _mem_save_total_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4046 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.total
, 0);
4047 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.total
));
4048 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_0
, 0);
4050 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4052 return NDR_ERR_SUCCESS
;
4055 _PUBLIC_
void ndr_print_dfs_Enum(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Enum
*r
)
4057 ndr_print_struct(ndr
, name
, "dfs_Enum");
4059 if (flags
& NDR_SET_VALUES
) {
4060 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4062 if (flags
& NDR_IN
) {
4063 ndr_print_struct(ndr
, "in", "dfs_Enum");
4065 ndr_print_uint32(ndr
, "level", r
->in
.level
);
4066 ndr_print_uint32(ndr
, "bufsize", r
->in
.bufsize
);
4067 ndr_print_ptr(ndr
, "info", r
->in
.info
);
4070 ndr_print_dfs_EnumStruct(ndr
, "info", r
->in
.info
);
4073 ndr_print_ptr(ndr
, "total", r
->in
.total
);
4076 ndr_print_uint32(ndr
, "total", *r
->in
.total
);
4081 if (flags
& NDR_OUT
) {
4082 ndr_print_struct(ndr
, "out", "dfs_Enum");
4084 ndr_print_ptr(ndr
, "info", r
->out
.info
);
4087 ndr_print_dfs_EnumStruct(ndr
, "info", r
->out
.info
);
4090 ndr_print_ptr(ndr
, "total", r
->out
.total
);
4093 ndr_print_uint32(ndr
, "total", *r
->out
.total
);
4096 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4102 static enum ndr_err_code
ndr_push_dfs_Rename(struct ndr_push
*ndr
, int flags
, const struct dfs_Rename
*r
)
4104 if (flags
& NDR_IN
) {
4106 if (flags
& NDR_OUT
) {
4107 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4109 return NDR_ERR_SUCCESS
;
4112 static enum ndr_err_code
ndr_pull_dfs_Rename(struct ndr_pull
*ndr
, int flags
, struct dfs_Rename
*r
)
4114 if (flags
& NDR_IN
) {
4116 if (flags
& NDR_OUT
) {
4117 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4119 return NDR_ERR_SUCCESS
;
4122 _PUBLIC_
void ndr_print_dfs_Rename(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Rename
*r
)
4124 ndr_print_struct(ndr
, name
, "dfs_Rename");
4126 if (flags
& NDR_SET_VALUES
) {
4127 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4129 if (flags
& NDR_IN
) {
4130 ndr_print_struct(ndr
, "in", "dfs_Rename");
4134 if (flags
& NDR_OUT
) {
4135 ndr_print_struct(ndr
, "out", "dfs_Rename");
4137 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4143 static enum ndr_err_code
ndr_push_dfs_Move(struct ndr_push
*ndr
, int flags
, const struct dfs_Move
*r
)
4145 if (flags
& NDR_IN
) {
4147 if (flags
& NDR_OUT
) {
4148 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4150 return NDR_ERR_SUCCESS
;
4153 static enum ndr_err_code
ndr_pull_dfs_Move(struct ndr_pull
*ndr
, int flags
, struct dfs_Move
*r
)
4155 if (flags
& NDR_IN
) {
4157 if (flags
& NDR_OUT
) {
4158 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4160 return NDR_ERR_SUCCESS
;
4163 _PUBLIC_
void ndr_print_dfs_Move(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Move
*r
)
4165 ndr_print_struct(ndr
, name
, "dfs_Move");
4167 if (flags
& NDR_SET_VALUES
) {
4168 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4170 if (flags
& NDR_IN
) {
4171 ndr_print_struct(ndr
, "in", "dfs_Move");
4175 if (flags
& NDR_OUT
) {
4176 ndr_print_struct(ndr
, "out", "dfs_Move");
4178 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4184 static enum ndr_err_code
ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push
*ndr
, int flags
, const struct dfs_ManagerGetConfigInfo
*r
)
4186 if (flags
& NDR_IN
) {
4188 if (flags
& NDR_OUT
) {
4189 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4191 return NDR_ERR_SUCCESS
;
4194 static enum ndr_err_code
ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull
*ndr
, int flags
, struct dfs_ManagerGetConfigInfo
*r
)
4196 if (flags
& NDR_IN
) {
4198 if (flags
& NDR_OUT
) {
4199 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4201 return NDR_ERR_SUCCESS
;
4204 _PUBLIC_
void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_ManagerGetConfigInfo
*r
)
4206 ndr_print_struct(ndr
, name
, "dfs_ManagerGetConfigInfo");
4208 if (flags
& NDR_SET_VALUES
) {
4209 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4211 if (flags
& NDR_IN
) {
4212 ndr_print_struct(ndr
, "in", "dfs_ManagerGetConfigInfo");
4216 if (flags
& NDR_OUT
) {
4217 ndr_print_struct(ndr
, "out", "dfs_ManagerGetConfigInfo");
4219 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4225 static enum ndr_err_code
ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push
*ndr
, int flags
, const struct dfs_ManagerSendSiteInfo
*r
)
4227 if (flags
& NDR_IN
) {
4229 if (flags
& NDR_OUT
) {
4230 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4232 return NDR_ERR_SUCCESS
;
4235 static enum ndr_err_code
ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull
*ndr
, int flags
, struct dfs_ManagerSendSiteInfo
*r
)
4237 if (flags
& NDR_IN
) {
4239 if (flags
& NDR_OUT
) {
4240 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4242 return NDR_ERR_SUCCESS
;
4245 _PUBLIC_
void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_ManagerSendSiteInfo
*r
)
4247 ndr_print_struct(ndr
, name
, "dfs_ManagerSendSiteInfo");
4249 if (flags
& NDR_SET_VALUES
) {
4250 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4252 if (flags
& NDR_IN
) {
4253 ndr_print_struct(ndr
, "in", "dfs_ManagerSendSiteInfo");
4257 if (flags
& NDR_OUT
) {
4258 ndr_print_struct(ndr
, "out", "dfs_ManagerSendSiteInfo");
4260 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4266 static enum ndr_err_code
ndr_push_dfs_AddFtRoot(struct ndr_push
*ndr
, int flags
, const struct dfs_AddFtRoot
*r
)
4268 if (flags
& NDR_IN
) {
4269 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4270 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4271 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4272 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4273 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dns_servername
, CH_UTF16
)));
4274 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4275 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dns_servername
, CH_UTF16
)));
4276 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
));
4277 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfsname
, CH_UTF16
)));
4278 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4279 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfsname
, CH_UTF16
)));
4280 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.dfsname
, ndr_charset_length(r
->in
.dfsname
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4281 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4282 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4283 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4284 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.rootshare
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4285 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
4286 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4287 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
4288 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.comment
, ndr_charset_length(r
->in
.comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4289 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_config_dn
, CH_UTF16
)));
4290 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4291 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_config_dn
, CH_UTF16
)));
4292 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
));
4293 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.unknown1
));
4294 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
4295 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.unknown2
));
4296 if (r
->in
.unknown2
) {
4297 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.unknown2
));
4298 if (*r
->in
.unknown2
) {
4299 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.unknown2
));
4303 if (flags
& NDR_OUT
) {
4304 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.unknown2
));
4305 if (r
->out
.unknown2
) {
4306 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.unknown2
));
4307 if (*r
->out
.unknown2
) {
4308 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.unknown2
));
4311 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4313 return NDR_ERR_SUCCESS
;
4316 static enum ndr_err_code
ndr_pull_dfs_AddFtRoot(struct ndr_pull
*ndr
, int flags
, struct dfs_AddFtRoot
*r
)
4318 uint32_t _ptr_unknown2
;
4319 TALLOC_CTX
*_mem_save_unknown2_0
;
4320 TALLOC_CTX
*_mem_save_unknown2_1
;
4321 if (flags
& NDR_IN
) {
4322 ZERO_STRUCT(r
->out
);
4324 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
4325 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
4326 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
4327 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
));
4329 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
4330 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
4331 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dns_servername
));
4332 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dns_servername
));
4333 if (ndr_get_array_length(ndr
, &r
->in
.dns_servername
) > ndr_get_array_size(ndr
, &r
->in
.dns_servername
)) {
4334 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
));
4336 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dns_servername
), sizeof(uint16_t)));
4337 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
));
4338 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfsname
));
4339 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfsname
));
4340 if (ndr_get_array_length(ndr
, &r
->in
.dfsname
) > ndr_get_array_size(ndr
, &r
->in
.dfsname
)) {
4341 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
));
4343 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfsname
), sizeof(uint16_t)));
4344 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.dfsname
, ndr_get_array_length(ndr
, &r
->in
.dfsname
), sizeof(uint16_t), CH_UTF16
));
4345 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rootshare
));
4346 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rootshare
));
4347 if (ndr_get_array_length(ndr
, &r
->in
.rootshare
) > ndr_get_array_size(ndr
, &r
->in
.rootshare
)) {
4348 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
));
4350 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t)));
4351 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.rootshare
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t), CH_UTF16
));
4352 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.comment
));
4353 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.comment
));
4354 if (ndr_get_array_length(ndr
, &r
->in
.comment
) > ndr_get_array_size(ndr
, &r
->in
.comment
)) {
4355 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
));
4357 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t)));
4358 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.comment
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t), CH_UTF16
));
4359 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfs_config_dn
));
4360 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfs_config_dn
));
4361 if (ndr_get_array_length(ndr
, &r
->in
.dfs_config_dn
) > ndr_get_array_size(ndr
, &r
->in
.dfs_config_dn
)) {
4362 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
));
4364 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfs_config_dn
), sizeof(uint16_t)));
4365 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
));
4366 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.unknown1
));
4367 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
4368 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown2
));
4369 if (_ptr_unknown2
) {
4370 NDR_PULL_ALLOC(ndr
, r
->in
.unknown2
);
4372 r
->in
.unknown2
= NULL
;
4374 if (r
->in
.unknown2
) {
4375 _mem_save_unknown2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4376 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.unknown2
, 0);
4377 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown2
));
4378 if (_ptr_unknown2
) {
4379 NDR_PULL_ALLOC(ndr
, *r
->in
.unknown2
);
4381 *r
->in
.unknown2
= NULL
;
4383 if (*r
->in
.unknown2
) {
4384 _mem_save_unknown2_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4385 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.unknown2
, 0);
4386 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.unknown2
));
4387 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown2_1
, 0);
4389 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown2_0
, 0);
4392 if (flags
& NDR_OUT
) {
4393 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown2
));
4394 if (_ptr_unknown2
) {
4395 NDR_PULL_ALLOC(ndr
, r
->out
.unknown2
);
4397 r
->out
.unknown2
= NULL
;
4399 if (r
->out
.unknown2
) {
4400 _mem_save_unknown2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4401 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.unknown2
, 0);
4402 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown2
));
4403 if (_ptr_unknown2
) {
4404 NDR_PULL_ALLOC(ndr
, *r
->out
.unknown2
);
4406 *r
->out
.unknown2
= NULL
;
4408 if (*r
->out
.unknown2
) {
4409 _mem_save_unknown2_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4410 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.unknown2
, 0);
4411 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.unknown2
));
4412 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown2_1
, 0);
4414 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown2_0
, 0);
4416 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4418 return NDR_ERR_SUCCESS
;
4421 _PUBLIC_
void ndr_print_dfs_AddFtRoot(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_AddFtRoot
*r
)
4423 ndr_print_struct(ndr
, name
, "dfs_AddFtRoot");
4425 if (flags
& NDR_SET_VALUES
) {
4426 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4428 if (flags
& NDR_IN
) {
4429 ndr_print_struct(ndr
, "in", "dfs_AddFtRoot");
4431 ndr_print_string(ndr
, "servername", r
->in
.servername
);
4432 ndr_print_string(ndr
, "dns_servername", r
->in
.dns_servername
);
4433 ndr_print_string(ndr
, "dfsname", r
->in
.dfsname
);
4434 ndr_print_string(ndr
, "rootshare", r
->in
.rootshare
);
4435 ndr_print_string(ndr
, "comment", r
->in
.comment
);
4436 ndr_print_string(ndr
, "dfs_config_dn", r
->in
.dfs_config_dn
);
4437 ndr_print_uint8(ndr
, "unknown1", r
->in
.unknown1
);
4438 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
4439 ndr_print_ptr(ndr
, "unknown2", r
->in
.unknown2
);
4441 if (r
->in
.unknown2
) {
4442 ndr_print_ptr(ndr
, "unknown2", *r
->in
.unknown2
);
4444 if (*r
->in
.unknown2
) {
4445 ndr_print_dfs_UnknownStruct(ndr
, "unknown2", *r
->in
.unknown2
);
4452 if (flags
& NDR_OUT
) {
4453 ndr_print_struct(ndr
, "out", "dfs_AddFtRoot");
4455 ndr_print_ptr(ndr
, "unknown2", r
->out
.unknown2
);
4457 if (r
->out
.unknown2
) {
4458 ndr_print_ptr(ndr
, "unknown2", *r
->out
.unknown2
);
4460 if (*r
->out
.unknown2
) {
4461 ndr_print_dfs_UnknownStruct(ndr
, "unknown2", *r
->out
.unknown2
);
4466 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4472 static enum ndr_err_code
ndr_push_dfs_RemoveFtRoot(struct ndr_push
*ndr
, int flags
, const struct dfs_RemoveFtRoot
*r
)
4474 if (flags
& NDR_IN
) {
4475 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4476 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4477 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4478 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4479 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dns_servername
, CH_UTF16
)));
4480 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4481 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dns_servername
, CH_UTF16
)));
4482 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
));
4483 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfsname
, CH_UTF16
)));
4484 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4485 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfsname
, CH_UTF16
)));
4486 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.dfsname
, ndr_charset_length(r
->in
.dfsname
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4487 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4488 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4489 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4490 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.rootshare
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4491 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
4492 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.unknown
));
4493 if (r
->in
.unknown
) {
4494 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.unknown
));
4495 if (*r
->in
.unknown
) {
4496 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.unknown
));
4500 if (flags
& NDR_OUT
) {
4501 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.unknown
));
4502 if (r
->out
.unknown
) {
4503 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.unknown
));
4504 if (*r
->out
.unknown
) {
4505 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.unknown
));
4508 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4510 return NDR_ERR_SUCCESS
;
4513 static enum ndr_err_code
ndr_pull_dfs_RemoveFtRoot(struct ndr_pull
*ndr
, int flags
, struct dfs_RemoveFtRoot
*r
)
4515 uint32_t _ptr_unknown
;
4516 TALLOC_CTX
*_mem_save_unknown_0
;
4517 TALLOC_CTX
*_mem_save_unknown_1
;
4518 if (flags
& NDR_IN
) {
4519 ZERO_STRUCT(r
->out
);
4521 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
4522 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
4523 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
4524 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
));
4526 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
4527 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
4528 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dns_servername
));
4529 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dns_servername
));
4530 if (ndr_get_array_length(ndr
, &r
->in
.dns_servername
) > ndr_get_array_size(ndr
, &r
->in
.dns_servername
)) {
4531 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
));
4533 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dns_servername
), sizeof(uint16_t)));
4534 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
));
4535 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfsname
));
4536 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfsname
));
4537 if (ndr_get_array_length(ndr
, &r
->in
.dfsname
) > ndr_get_array_size(ndr
, &r
->in
.dfsname
)) {
4538 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
));
4540 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfsname
), sizeof(uint16_t)));
4541 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.dfsname
, ndr_get_array_length(ndr
, &r
->in
.dfsname
), sizeof(uint16_t), CH_UTF16
));
4542 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rootshare
));
4543 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rootshare
));
4544 if (ndr_get_array_length(ndr
, &r
->in
.rootshare
) > ndr_get_array_size(ndr
, &r
->in
.rootshare
)) {
4545 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
));
4547 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t)));
4548 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.rootshare
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t), CH_UTF16
));
4549 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
4550 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown
));
4552 NDR_PULL_ALLOC(ndr
, r
->in
.unknown
);
4554 r
->in
.unknown
= NULL
;
4556 if (r
->in
.unknown
) {
4557 _mem_save_unknown_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4558 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.unknown
, 0);
4559 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown
));
4561 NDR_PULL_ALLOC(ndr
, *r
->in
.unknown
);
4563 *r
->in
.unknown
= NULL
;
4565 if (*r
->in
.unknown
) {
4566 _mem_save_unknown_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4567 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.unknown
, 0);
4568 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.unknown
));
4569 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown_1
, 0);
4571 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown_0
, 0);
4574 if (flags
& NDR_OUT
) {
4575 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown
));
4577 NDR_PULL_ALLOC(ndr
, r
->out
.unknown
);
4579 r
->out
.unknown
= NULL
;
4581 if (r
->out
.unknown
) {
4582 _mem_save_unknown_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4583 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.unknown
, 0);
4584 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown
));
4586 NDR_PULL_ALLOC(ndr
, *r
->out
.unknown
);
4588 *r
->out
.unknown
= NULL
;
4590 if (*r
->out
.unknown
) {
4591 _mem_save_unknown_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4592 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.unknown
, 0);
4593 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.unknown
));
4594 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown_1
, 0);
4596 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown_0
, 0);
4598 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4600 return NDR_ERR_SUCCESS
;
4603 _PUBLIC_
void ndr_print_dfs_RemoveFtRoot(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_RemoveFtRoot
*r
)
4605 ndr_print_struct(ndr
, name
, "dfs_RemoveFtRoot");
4607 if (flags
& NDR_SET_VALUES
) {
4608 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4610 if (flags
& NDR_IN
) {
4611 ndr_print_struct(ndr
, "in", "dfs_RemoveFtRoot");
4613 ndr_print_string(ndr
, "servername", r
->in
.servername
);
4614 ndr_print_string(ndr
, "dns_servername", r
->in
.dns_servername
);
4615 ndr_print_string(ndr
, "dfsname", r
->in
.dfsname
);
4616 ndr_print_string(ndr
, "rootshare", r
->in
.rootshare
);
4617 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
4618 ndr_print_ptr(ndr
, "unknown", r
->in
.unknown
);
4620 if (r
->in
.unknown
) {
4621 ndr_print_ptr(ndr
, "unknown", *r
->in
.unknown
);
4623 if (*r
->in
.unknown
) {
4624 ndr_print_dfs_UnknownStruct(ndr
, "unknown", *r
->in
.unknown
);
4631 if (flags
& NDR_OUT
) {
4632 ndr_print_struct(ndr
, "out", "dfs_RemoveFtRoot");
4634 ndr_print_ptr(ndr
, "unknown", r
->out
.unknown
);
4636 if (r
->out
.unknown
) {
4637 ndr_print_ptr(ndr
, "unknown", *r
->out
.unknown
);
4639 if (*r
->out
.unknown
) {
4640 ndr_print_dfs_UnknownStruct(ndr
, "unknown", *r
->out
.unknown
);
4645 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4651 static enum ndr_err_code
ndr_push_dfs_AddStdRoot(struct ndr_push
*ndr
, int flags
, const struct dfs_AddStdRoot
*r
)
4653 if (flags
& NDR_IN
) {
4654 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4655 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4656 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4657 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4658 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4659 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4660 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4661 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.rootshare
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4662 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
4663 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4664 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
4665 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.comment
, ndr_charset_length(r
->in
.comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4666 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
4668 if (flags
& NDR_OUT
) {
4669 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4671 return NDR_ERR_SUCCESS
;
4674 static enum ndr_err_code
ndr_pull_dfs_AddStdRoot(struct ndr_pull
*ndr
, int flags
, struct dfs_AddStdRoot
*r
)
4676 if (flags
& NDR_IN
) {
4677 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
4678 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
4679 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
4680 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
));
4682 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
4683 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
4684 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rootshare
));
4685 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rootshare
));
4686 if (ndr_get_array_length(ndr
, &r
->in
.rootshare
) > ndr_get_array_size(ndr
, &r
->in
.rootshare
)) {
4687 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
));
4689 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t)));
4690 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.rootshare
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t), CH_UTF16
));
4691 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.comment
));
4692 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.comment
));
4693 if (ndr_get_array_length(ndr
, &r
->in
.comment
) > ndr_get_array_size(ndr
, &r
->in
.comment
)) {
4694 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
));
4696 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t)));
4697 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.comment
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t), CH_UTF16
));
4698 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
4700 if (flags
& NDR_OUT
) {
4701 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4703 return NDR_ERR_SUCCESS
;
4706 _PUBLIC_
void ndr_print_dfs_AddStdRoot(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_AddStdRoot
*r
)
4708 ndr_print_struct(ndr
, name
, "dfs_AddStdRoot");
4710 if (flags
& NDR_SET_VALUES
) {
4711 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4713 if (flags
& NDR_IN
) {
4714 ndr_print_struct(ndr
, "in", "dfs_AddStdRoot");
4716 ndr_print_string(ndr
, "servername", r
->in
.servername
);
4717 ndr_print_string(ndr
, "rootshare", r
->in
.rootshare
);
4718 ndr_print_string(ndr
, "comment", r
->in
.comment
);
4719 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
4722 if (flags
& NDR_OUT
) {
4723 ndr_print_struct(ndr
, "out", "dfs_AddStdRoot");
4725 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4731 static enum ndr_err_code
ndr_push_dfs_RemoveStdRoot(struct ndr_push
*ndr
, int flags
, const struct dfs_RemoveStdRoot
*r
)
4733 if (flags
& NDR_IN
) {
4734 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4735 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4736 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4737 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4738 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4739 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4740 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4741 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.rootshare
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4742 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
4744 if (flags
& NDR_OUT
) {
4745 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4747 return NDR_ERR_SUCCESS
;
4750 static enum ndr_err_code
ndr_pull_dfs_RemoveStdRoot(struct ndr_pull
*ndr
, int flags
, struct dfs_RemoveStdRoot
*r
)
4752 if (flags
& NDR_IN
) {
4753 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
4754 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
4755 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
4756 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
));
4758 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
4759 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
4760 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rootshare
));
4761 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rootshare
));
4762 if (ndr_get_array_length(ndr
, &r
->in
.rootshare
) > ndr_get_array_size(ndr
, &r
->in
.rootshare
)) {
4763 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
));
4765 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t)));
4766 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.rootshare
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t), CH_UTF16
));
4767 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
4769 if (flags
& NDR_OUT
) {
4770 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4772 return NDR_ERR_SUCCESS
;
4775 _PUBLIC_
void ndr_print_dfs_RemoveStdRoot(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_RemoveStdRoot
*r
)
4777 ndr_print_struct(ndr
, name
, "dfs_RemoveStdRoot");
4779 if (flags
& NDR_SET_VALUES
) {
4780 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4782 if (flags
& NDR_IN
) {
4783 ndr_print_struct(ndr
, "in", "dfs_RemoveStdRoot");
4785 ndr_print_string(ndr
, "servername", r
->in
.servername
);
4786 ndr_print_string(ndr
, "rootshare", r
->in
.rootshare
);
4787 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
4790 if (flags
& NDR_OUT
) {
4791 ndr_print_struct(ndr
, "out", "dfs_RemoveStdRoot");
4793 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4799 static enum ndr_err_code
ndr_push_dfs_ManagerInitialize(struct ndr_push
*ndr
, int flags
, const struct dfs_ManagerInitialize
*r
)
4801 if (flags
& NDR_IN
) {
4802 if (r
->in
.servername
== NULL
) {
4803 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4805 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4806 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4807 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4808 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4809 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
4811 if (flags
& NDR_OUT
) {
4812 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4814 return NDR_ERR_SUCCESS
;
4817 static enum ndr_err_code
ndr_pull_dfs_ManagerInitialize(struct ndr_pull
*ndr
, int flags
, struct dfs_ManagerInitialize
*r
)
4819 if (flags
& NDR_IN
) {
4820 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
4821 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
4822 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
4823 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
));
4825 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
4826 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
4827 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
4829 if (flags
& NDR_OUT
) {
4830 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4832 return NDR_ERR_SUCCESS
;
4835 _PUBLIC_
void ndr_print_dfs_ManagerInitialize(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_ManagerInitialize
*r
)
4837 ndr_print_struct(ndr
, name
, "dfs_ManagerInitialize");
4839 if (flags
& NDR_SET_VALUES
) {
4840 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4842 if (flags
& NDR_IN
) {
4843 ndr_print_struct(ndr
, "in", "dfs_ManagerInitialize");
4845 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
4847 ndr_print_string(ndr
, "servername", r
->in
.servername
);
4849 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
4852 if (flags
& NDR_OUT
) {
4853 ndr_print_struct(ndr
, "out", "dfs_ManagerInitialize");
4855 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4861 static enum ndr_err_code
ndr_push_dfs_AddStdRootForced(struct ndr_push
*ndr
, int flags
, const struct dfs_AddStdRootForced
*r
)
4863 if (flags
& NDR_IN
) {
4864 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4865 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4866 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4867 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4868 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4869 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4870 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4871 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.rootshare
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4872 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
4873 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4874 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
4875 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.comment
, ndr_charset_length(r
->in
.comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4876 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.store
, CH_UTF16
)));
4877 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4878 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.store
, CH_UTF16
)));
4879 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.store
, ndr_charset_length(r
->in
.store
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4881 if (flags
& NDR_OUT
) {
4882 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4884 return NDR_ERR_SUCCESS
;
4887 static enum ndr_err_code
ndr_pull_dfs_AddStdRootForced(struct ndr_pull
*ndr
, int flags
, struct dfs_AddStdRootForced
*r
)
4889 if (flags
& NDR_IN
) {
4890 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
4891 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
4892 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
4893 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
));
4895 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
4896 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
4897 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rootshare
));
4898 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rootshare
));
4899 if (ndr_get_array_length(ndr
, &r
->in
.rootshare
) > ndr_get_array_size(ndr
, &r
->in
.rootshare
)) {
4900 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
));
4902 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t)));
4903 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.rootshare
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t), CH_UTF16
));
4904 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.comment
));
4905 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.comment
));
4906 if (ndr_get_array_length(ndr
, &r
->in
.comment
) > ndr_get_array_size(ndr
, &r
->in
.comment
)) {
4907 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
));
4909 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t)));
4910 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.comment
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t), CH_UTF16
));
4911 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.store
));
4912 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.store
));
4913 if (ndr_get_array_length(ndr
, &r
->in
.store
) > ndr_get_array_size(ndr
, &r
->in
.store
)) {
4914 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
));
4916 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.store
), sizeof(uint16_t)));
4917 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.store
, ndr_get_array_length(ndr
, &r
->in
.store
), sizeof(uint16_t), CH_UTF16
));
4919 if (flags
& NDR_OUT
) {
4920 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4922 return NDR_ERR_SUCCESS
;
4925 _PUBLIC_
void ndr_print_dfs_AddStdRootForced(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_AddStdRootForced
*r
)
4927 ndr_print_struct(ndr
, name
, "dfs_AddStdRootForced");
4929 if (flags
& NDR_SET_VALUES
) {
4930 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4932 if (flags
& NDR_IN
) {
4933 ndr_print_struct(ndr
, "in", "dfs_AddStdRootForced");
4935 ndr_print_string(ndr
, "servername", r
->in
.servername
);
4936 ndr_print_string(ndr
, "rootshare", r
->in
.rootshare
);
4937 ndr_print_string(ndr
, "comment", r
->in
.comment
);
4938 ndr_print_string(ndr
, "store", r
->in
.store
);
4941 if (flags
& NDR_OUT
) {
4942 ndr_print_struct(ndr
, "out", "dfs_AddStdRootForced");
4944 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4950 static enum ndr_err_code
ndr_push_dfs_GetDcAddress(struct ndr_push
*ndr
, int flags
, const struct dfs_GetDcAddress
*r
)
4952 if (flags
& NDR_IN
) {
4953 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4954 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4955 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4956 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4957 if (r
->in
.server_fullname
== NULL
) {
4958 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4960 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.server_fullname
));
4961 if (*r
->in
.server_fullname
) {
4962 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->in
.server_fullname
, CH_UTF16
)));
4963 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4964 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->in
.server_fullname
, CH_UTF16
)));
4965 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
));
4967 if (r
->in
.is_root
== NULL
) {
4968 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4970 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, *r
->in
.is_root
));
4971 if (r
->in
.ttl
== NULL
) {
4972 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4974 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.ttl
));
4976 if (flags
& NDR_OUT
) {
4977 if (r
->out
.server_fullname
== NULL
) {
4978 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4980 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.server_fullname
));
4981 if (*r
->out
.server_fullname
) {
4982 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.server_fullname
, CH_UTF16
)));
4983 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4984 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.server_fullname
, CH_UTF16
)));
4985 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
));
4987 if (r
->out
.is_root
== NULL
) {
4988 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4990 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, *r
->out
.is_root
));
4991 if (r
->out
.ttl
== NULL
) {
4992 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4994 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.ttl
));
4995 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4997 return NDR_ERR_SUCCESS
;
5000 static enum ndr_err_code
ndr_pull_dfs_GetDcAddress(struct ndr_pull
*ndr
, int flags
, struct dfs_GetDcAddress
*r
)
5002 uint32_t _ptr_server_fullname
;
5003 TALLOC_CTX
*_mem_save_server_fullname_0
;
5004 TALLOC_CTX
*_mem_save_server_fullname_1
;
5005 TALLOC_CTX
*_mem_save_is_root_0
;
5006 TALLOC_CTX
*_mem_save_ttl_0
;
5007 if (flags
& NDR_IN
) {
5008 ZERO_STRUCT(r
->out
);
5010 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
5011 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
5012 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
5013 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
));
5015 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
5016 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
5017 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5018 NDR_PULL_ALLOC(ndr
, r
->in
.server_fullname
);
5020 _mem_save_server_fullname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5021 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_fullname
, LIBNDR_FLAG_REF_ALLOC
);
5022 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_fullname
));
5023 if (_ptr_server_fullname
) {
5024 NDR_PULL_ALLOC(ndr
, *r
->in
.server_fullname
);
5026 *r
->in
.server_fullname
= NULL
;
5028 if (*r
->in
.server_fullname
) {
5029 _mem_save_server_fullname_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5030 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.server_fullname
, 0);
5031 NDR_CHECK(ndr_pull_array_size(ndr
, r
->in
.server_fullname
));
5032 NDR_CHECK(ndr_pull_array_length(ndr
, r
->in
.server_fullname
));
5033 if (ndr_get_array_length(ndr
, r
->in
.server_fullname
) > ndr_get_array_size(ndr
, r
->in
.server_fullname
)) {
5034 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
));
5036 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, r
->in
.server_fullname
), sizeof(uint16_t)));
5037 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
));
5038 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_fullname_1
, 0);
5040 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_fullname_0
, LIBNDR_FLAG_REF_ALLOC
);
5041 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5042 NDR_PULL_ALLOC(ndr
, r
->in
.is_root
);
5044 _mem_save_is_root_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5045 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.is_root
, LIBNDR_FLAG_REF_ALLOC
);
5046 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, r
->in
.is_root
));
5047 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_is_root_0
, LIBNDR_FLAG_REF_ALLOC
);
5048 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5049 NDR_PULL_ALLOC(ndr
, r
->in
.ttl
);
5051 _mem_save_ttl_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5052 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.ttl
, LIBNDR_FLAG_REF_ALLOC
);
5053 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.ttl
));
5054 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ttl_0
, LIBNDR_FLAG_REF_ALLOC
);
5055 NDR_PULL_ALLOC(ndr
, r
->out
.server_fullname
);
5056 *r
->out
.server_fullname
= *r
->in
.server_fullname
;
5057 NDR_PULL_ALLOC(ndr
, r
->out
.is_root
);
5058 *r
->out
.is_root
= *r
->in
.is_root
;
5059 NDR_PULL_ALLOC(ndr
, r
->out
.ttl
);
5060 *r
->out
.ttl
= *r
->in
.ttl
;
5062 if (flags
& NDR_OUT
) {
5063 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5064 NDR_PULL_ALLOC(ndr
, r
->out
.server_fullname
);
5066 _mem_save_server_fullname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5067 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.server_fullname
, LIBNDR_FLAG_REF_ALLOC
);
5068 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_fullname
));
5069 if (_ptr_server_fullname
) {
5070 NDR_PULL_ALLOC(ndr
, *r
->out
.server_fullname
);
5072 *r
->out
.server_fullname
= NULL
;
5074 if (*r
->out
.server_fullname
) {
5075 _mem_save_server_fullname_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5076 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.server_fullname
, 0);
5077 NDR_CHECK(ndr_pull_array_size(ndr
, r
->out
.server_fullname
));
5078 NDR_CHECK(ndr_pull_array_length(ndr
, r
->out
.server_fullname
));
5079 if (ndr_get_array_length(ndr
, r
->out
.server_fullname
) > ndr_get_array_size(ndr
, r
->out
.server_fullname
)) {
5080 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
));
5082 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, r
->out
.server_fullname
), sizeof(uint16_t)));
5083 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
));
5084 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_fullname_1
, 0);
5086 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_fullname_0
, LIBNDR_FLAG_REF_ALLOC
);
5087 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5088 NDR_PULL_ALLOC(ndr
, r
->out
.is_root
);
5090 _mem_save_is_root_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5091 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.is_root
, LIBNDR_FLAG_REF_ALLOC
);
5092 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, r
->out
.is_root
));
5093 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_is_root_0
, LIBNDR_FLAG_REF_ALLOC
);
5094 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5095 NDR_PULL_ALLOC(ndr
, r
->out
.ttl
);
5097 _mem_save_ttl_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5098 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ttl
, LIBNDR_FLAG_REF_ALLOC
);
5099 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.ttl
));
5100 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ttl_0
, LIBNDR_FLAG_REF_ALLOC
);
5101 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5103 return NDR_ERR_SUCCESS
;
5106 _PUBLIC_
void ndr_print_dfs_GetDcAddress(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_GetDcAddress
*r
)
5108 ndr_print_struct(ndr
, name
, "dfs_GetDcAddress");
5110 if (flags
& NDR_SET_VALUES
) {
5111 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5113 if (flags
& NDR_IN
) {
5114 ndr_print_struct(ndr
, "in", "dfs_GetDcAddress");
5116 ndr_print_string(ndr
, "servername", r
->in
.servername
);
5117 ndr_print_ptr(ndr
, "server_fullname", r
->in
.server_fullname
);
5119 ndr_print_ptr(ndr
, "server_fullname", *r
->in
.server_fullname
);
5121 if (*r
->in
.server_fullname
) {
5122 ndr_print_string(ndr
, "server_fullname", *r
->in
.server_fullname
);
5126 ndr_print_ptr(ndr
, "is_root", r
->in
.is_root
);
5128 ndr_print_uint8(ndr
, "is_root", *r
->in
.is_root
);
5130 ndr_print_ptr(ndr
, "ttl", r
->in
.ttl
);
5132 ndr_print_uint32(ndr
, "ttl", *r
->in
.ttl
);
5136 if (flags
& NDR_OUT
) {
5137 ndr_print_struct(ndr
, "out", "dfs_GetDcAddress");
5139 ndr_print_ptr(ndr
, "server_fullname", r
->out
.server_fullname
);
5141 ndr_print_ptr(ndr
, "server_fullname", *r
->out
.server_fullname
);
5143 if (*r
->out
.server_fullname
) {
5144 ndr_print_string(ndr
, "server_fullname", *r
->out
.server_fullname
);
5148 ndr_print_ptr(ndr
, "is_root", r
->out
.is_root
);
5150 ndr_print_uint8(ndr
, "is_root", *r
->out
.is_root
);
5152 ndr_print_ptr(ndr
, "ttl", r
->out
.ttl
);
5154 ndr_print_uint32(ndr
, "ttl", *r
->out
.ttl
);
5156 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5162 static enum ndr_err_code
ndr_push_dfs_SetDcAddress(struct ndr_push
*ndr
, int flags
, const struct dfs_SetDcAddress
*r
)
5164 if (flags
& NDR_IN
) {
5165 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
5166 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5167 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
5168 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5169 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_fullname
, CH_UTF16
)));
5170 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5171 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_fullname
, CH_UTF16
)));
5172 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
));
5173 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
5174 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.ttl
));
5176 if (flags
& NDR_OUT
) {
5177 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5179 return NDR_ERR_SUCCESS
;
5182 static enum ndr_err_code
ndr_pull_dfs_SetDcAddress(struct ndr_pull
*ndr
, int flags
, struct dfs_SetDcAddress
*r
)
5184 if (flags
& NDR_IN
) {
5185 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
5186 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
5187 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
5188 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
));
5190 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
5191 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
5192 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_fullname
));
5193 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_fullname
));
5194 if (ndr_get_array_length(ndr
, &r
->in
.server_fullname
) > ndr_get_array_size(ndr
, &r
->in
.server_fullname
)) {
5195 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
));
5197 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_fullname
), sizeof(uint16_t)));
5198 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
));
5199 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
5200 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.ttl
));
5202 if (flags
& NDR_OUT
) {
5203 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5205 return NDR_ERR_SUCCESS
;
5208 _PUBLIC_
void ndr_print_dfs_SetDcAddress(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_SetDcAddress
*r
)
5210 ndr_print_struct(ndr
, name
, "dfs_SetDcAddress");
5212 if (flags
& NDR_SET_VALUES
) {
5213 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5215 if (flags
& NDR_IN
) {
5216 ndr_print_struct(ndr
, "in", "dfs_SetDcAddress");
5218 ndr_print_string(ndr
, "servername", r
->in
.servername
);
5219 ndr_print_string(ndr
, "server_fullname", r
->in
.server_fullname
);
5220 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
5221 ndr_print_uint32(ndr
, "ttl", r
->in
.ttl
);
5224 if (flags
& NDR_OUT
) {
5225 ndr_print_struct(ndr
, "out", "dfs_SetDcAddress");
5227 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5233 static enum ndr_err_code
ndr_push_dfs_FlushFtTable(struct ndr_push
*ndr
, int flags
, const struct dfs_FlushFtTable
*r
)
5235 if (flags
& NDR_IN
) {
5236 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
5237 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5238 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
5239 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5240 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
5241 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5242 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
5243 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.rootshare
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5245 if (flags
& NDR_OUT
) {
5246 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5248 return NDR_ERR_SUCCESS
;
5251 static enum ndr_err_code
ndr_pull_dfs_FlushFtTable(struct ndr_pull
*ndr
, int flags
, struct dfs_FlushFtTable
*r
)
5253 if (flags
& NDR_IN
) {
5254 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
5255 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
5256 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
5257 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
));
5259 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
5260 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
5261 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rootshare
));
5262 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rootshare
));
5263 if (ndr_get_array_length(ndr
, &r
->in
.rootshare
) > ndr_get_array_size(ndr
, &r
->in
.rootshare
)) {
5264 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
));
5266 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t)));
5267 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.rootshare
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t), CH_UTF16
));
5269 if (flags
& NDR_OUT
) {
5270 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5272 return NDR_ERR_SUCCESS
;
5275 _PUBLIC_
void ndr_print_dfs_FlushFtTable(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_FlushFtTable
*r
)
5277 ndr_print_struct(ndr
, name
, "dfs_FlushFtTable");
5279 if (flags
& NDR_SET_VALUES
) {
5280 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5282 if (flags
& NDR_IN
) {
5283 ndr_print_struct(ndr
, "in", "dfs_FlushFtTable");
5285 ndr_print_string(ndr
, "servername", r
->in
.servername
);
5286 ndr_print_string(ndr
, "rootshare", r
->in
.rootshare
);
5289 if (flags
& NDR_OUT
) {
5290 ndr_print_struct(ndr
, "out", "dfs_FlushFtTable");
5292 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5298 static enum ndr_err_code
ndr_push_dfs_Add2(struct ndr_push
*ndr
, int flags
, const struct dfs_Add2
*r
)
5300 if (flags
& NDR_IN
) {
5302 if (flags
& NDR_OUT
) {
5303 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5305 return NDR_ERR_SUCCESS
;
5308 static enum ndr_err_code
ndr_pull_dfs_Add2(struct ndr_pull
*ndr
, int flags
, struct dfs_Add2
*r
)
5310 if (flags
& NDR_IN
) {
5312 if (flags
& NDR_OUT
) {
5313 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5315 return NDR_ERR_SUCCESS
;
5318 _PUBLIC_
void ndr_print_dfs_Add2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Add2
*r
)
5320 ndr_print_struct(ndr
, name
, "dfs_Add2");
5322 if (flags
& NDR_SET_VALUES
) {
5323 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5325 if (flags
& NDR_IN
) {
5326 ndr_print_struct(ndr
, "in", "dfs_Add2");
5330 if (flags
& NDR_OUT
) {
5331 ndr_print_struct(ndr
, "out", "dfs_Add2");
5333 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5339 static enum ndr_err_code
ndr_push_dfs_Remove2(struct ndr_push
*ndr
, int flags
, const struct dfs_Remove2
*r
)
5341 if (flags
& NDR_IN
) {
5343 if (flags
& NDR_OUT
) {
5344 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5346 return NDR_ERR_SUCCESS
;
5349 static enum ndr_err_code
ndr_pull_dfs_Remove2(struct ndr_pull
*ndr
, int flags
, struct dfs_Remove2
*r
)
5351 if (flags
& NDR_IN
) {
5353 if (flags
& NDR_OUT
) {
5354 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5356 return NDR_ERR_SUCCESS
;
5359 _PUBLIC_
void ndr_print_dfs_Remove2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Remove2
*r
)
5361 ndr_print_struct(ndr
, name
, "dfs_Remove2");
5363 if (flags
& NDR_SET_VALUES
) {
5364 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5366 if (flags
& NDR_IN
) {
5367 ndr_print_struct(ndr
, "in", "dfs_Remove2");
5371 if (flags
& NDR_OUT
) {
5372 ndr_print_struct(ndr
, "out", "dfs_Remove2");
5374 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5380 _PUBLIC_
enum ndr_err_code
ndr_push_dfs_EnumEx(struct ndr_push
*ndr
, int flags
, const struct dfs_EnumEx
*r
)
5382 if (flags
& NDR_IN
) {
5383 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_name
, CH_UTF16
)));
5384 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5385 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_name
, CH_UTF16
)));
5386 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
));
5387 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
5388 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.bufsize
));
5389 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.info
));
5391 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
5393 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.total
));
5395 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.total
));
5398 if (flags
& NDR_OUT
) {
5399 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
5401 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
5403 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.total
));
5405 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.total
));
5407 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5409 return NDR_ERR_SUCCESS
;
5412 _PUBLIC_
enum ndr_err_code
ndr_pull_dfs_EnumEx(struct ndr_pull
*ndr
, int flags
, struct dfs_EnumEx
*r
)
5415 uint32_t _ptr_total
;
5416 TALLOC_CTX
*_mem_save_info_0
;
5417 TALLOC_CTX
*_mem_save_total_0
;
5418 if (flags
& NDR_IN
) {
5419 ZERO_STRUCT(r
->out
);
5421 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfs_name
));
5422 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfs_name
));
5423 if (ndr_get_array_length(ndr
, &r
->in
.dfs_name
) > ndr_get_array_size(ndr
, &r
->in
.dfs_name
)) {
5424 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
));
5426 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfs_name
), sizeof(uint16_t)));
5427 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
));
5428 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
5429 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.bufsize
));
5430 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
5432 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
5437 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5438 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, 0);
5439 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
5440 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
5442 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_total
));
5444 NDR_PULL_ALLOC(ndr
, r
->in
.total
);
5449 _mem_save_total_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5450 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.total
, 0);
5451 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.total
));
5452 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_0
, 0);
5455 if (flags
& NDR_OUT
) {
5456 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
5458 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
5463 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5464 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
5465 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
5466 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
5468 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_total
));
5470 NDR_PULL_ALLOC(ndr
, r
->out
.total
);
5472 r
->out
.total
= NULL
;
5475 _mem_save_total_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5476 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.total
, 0);
5477 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.total
));
5478 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_0
, 0);
5480 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5482 return NDR_ERR_SUCCESS
;
5485 _PUBLIC_
void ndr_print_dfs_EnumEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_EnumEx
*r
)
5487 ndr_print_struct(ndr
, name
, "dfs_EnumEx");
5489 if (flags
& NDR_SET_VALUES
) {
5490 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5492 if (flags
& NDR_IN
) {
5493 ndr_print_struct(ndr
, "in", "dfs_EnumEx");
5495 ndr_print_string(ndr
, "dfs_name", r
->in
.dfs_name
);
5496 ndr_print_uint32(ndr
, "level", r
->in
.level
);
5497 ndr_print_uint32(ndr
, "bufsize", r
->in
.bufsize
);
5498 ndr_print_ptr(ndr
, "info", r
->in
.info
);
5501 ndr_print_dfs_EnumStruct(ndr
, "info", r
->in
.info
);
5504 ndr_print_ptr(ndr
, "total", r
->in
.total
);
5507 ndr_print_uint32(ndr
, "total", *r
->in
.total
);
5512 if (flags
& NDR_OUT
) {
5513 ndr_print_struct(ndr
, "out", "dfs_EnumEx");
5515 ndr_print_ptr(ndr
, "info", r
->out
.info
);
5518 ndr_print_dfs_EnumStruct(ndr
, "info", r
->out
.info
);
5521 ndr_print_ptr(ndr
, "total", r
->out
.total
);
5524 ndr_print_uint32(ndr
, "total", *r
->out
.total
);
5527 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5533 static enum ndr_err_code
ndr_push_dfs_SetInfo2(struct ndr_push
*ndr
, int flags
, const struct dfs_SetInfo2
*r
)
5535 if (flags
& NDR_IN
) {
5537 if (flags
& NDR_OUT
) {
5538 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5540 return NDR_ERR_SUCCESS
;
5543 static enum ndr_err_code
ndr_pull_dfs_SetInfo2(struct ndr_pull
*ndr
, int flags
, struct dfs_SetInfo2
*r
)
5545 if (flags
& NDR_IN
) {
5547 if (flags
& NDR_OUT
) {
5548 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5550 return NDR_ERR_SUCCESS
;
5553 _PUBLIC_
void ndr_print_dfs_SetInfo2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_SetInfo2
*r
)
5555 ndr_print_struct(ndr
, name
, "dfs_SetInfo2");
5557 if (flags
& NDR_SET_VALUES
) {
5558 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5560 if (flags
& NDR_IN
) {
5561 ndr_print_struct(ndr
, "in", "dfs_SetInfo2");
5565 if (flags
& NDR_OUT
) {
5566 ndr_print_struct(ndr
, "out", "dfs_SetInfo2");
5568 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5574 static const struct ndr_interface_call netdfs_calls
[] = {
5576 "dfs_GetManagerVersion",
5577 sizeof(struct dfs_GetManagerVersion
),
5578 (ndr_push_flags_fn_t
) ndr_push_dfs_GetManagerVersion
,
5579 (ndr_pull_flags_fn_t
) ndr_pull_dfs_GetManagerVersion
,
5580 (ndr_print_function_t
) ndr_print_dfs_GetManagerVersion
,
5585 sizeof(struct dfs_Add
),
5586 (ndr_push_flags_fn_t
) ndr_push_dfs_Add
,
5587 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Add
,
5588 (ndr_print_function_t
) ndr_print_dfs_Add
,
5593 sizeof(struct dfs_Remove
),
5594 (ndr_push_flags_fn_t
) ndr_push_dfs_Remove
,
5595 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Remove
,
5596 (ndr_print_function_t
) ndr_print_dfs_Remove
,
5601 sizeof(struct dfs_SetInfo
),
5602 (ndr_push_flags_fn_t
) ndr_push_dfs_SetInfo
,
5603 (ndr_pull_flags_fn_t
) ndr_pull_dfs_SetInfo
,
5604 (ndr_print_function_t
) ndr_print_dfs_SetInfo
,
5609 sizeof(struct dfs_GetInfo
),
5610 (ndr_push_flags_fn_t
) ndr_push_dfs_GetInfo
,
5611 (ndr_pull_flags_fn_t
) ndr_pull_dfs_GetInfo
,
5612 (ndr_print_function_t
) ndr_print_dfs_GetInfo
,
5617 sizeof(struct dfs_Enum
),
5618 (ndr_push_flags_fn_t
) ndr_push_dfs_Enum
,
5619 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Enum
,
5620 (ndr_print_function_t
) ndr_print_dfs_Enum
,
5625 sizeof(struct dfs_Rename
),
5626 (ndr_push_flags_fn_t
) ndr_push_dfs_Rename
,
5627 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Rename
,
5628 (ndr_print_function_t
) ndr_print_dfs_Rename
,
5633 sizeof(struct dfs_Move
),
5634 (ndr_push_flags_fn_t
) ndr_push_dfs_Move
,
5635 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Move
,
5636 (ndr_print_function_t
) ndr_print_dfs_Move
,
5640 "dfs_ManagerGetConfigInfo",
5641 sizeof(struct dfs_ManagerGetConfigInfo
),
5642 (ndr_push_flags_fn_t
) ndr_push_dfs_ManagerGetConfigInfo
,
5643 (ndr_pull_flags_fn_t
) ndr_pull_dfs_ManagerGetConfigInfo
,
5644 (ndr_print_function_t
) ndr_print_dfs_ManagerGetConfigInfo
,
5648 "dfs_ManagerSendSiteInfo",
5649 sizeof(struct dfs_ManagerSendSiteInfo
),
5650 (ndr_push_flags_fn_t
) ndr_push_dfs_ManagerSendSiteInfo
,
5651 (ndr_pull_flags_fn_t
) ndr_pull_dfs_ManagerSendSiteInfo
,
5652 (ndr_print_function_t
) ndr_print_dfs_ManagerSendSiteInfo
,
5657 sizeof(struct dfs_AddFtRoot
),
5658 (ndr_push_flags_fn_t
) ndr_push_dfs_AddFtRoot
,
5659 (ndr_pull_flags_fn_t
) ndr_pull_dfs_AddFtRoot
,
5660 (ndr_print_function_t
) ndr_print_dfs_AddFtRoot
,
5665 sizeof(struct dfs_RemoveFtRoot
),
5666 (ndr_push_flags_fn_t
) ndr_push_dfs_RemoveFtRoot
,
5667 (ndr_pull_flags_fn_t
) ndr_pull_dfs_RemoveFtRoot
,
5668 (ndr_print_function_t
) ndr_print_dfs_RemoveFtRoot
,
5673 sizeof(struct dfs_AddStdRoot
),
5674 (ndr_push_flags_fn_t
) ndr_push_dfs_AddStdRoot
,
5675 (ndr_pull_flags_fn_t
) ndr_pull_dfs_AddStdRoot
,
5676 (ndr_print_function_t
) ndr_print_dfs_AddStdRoot
,
5680 "dfs_RemoveStdRoot",
5681 sizeof(struct dfs_RemoveStdRoot
),
5682 (ndr_push_flags_fn_t
) ndr_push_dfs_RemoveStdRoot
,
5683 (ndr_pull_flags_fn_t
) ndr_pull_dfs_RemoveStdRoot
,
5684 (ndr_print_function_t
) ndr_print_dfs_RemoveStdRoot
,
5688 "dfs_ManagerInitialize",
5689 sizeof(struct dfs_ManagerInitialize
),
5690 (ndr_push_flags_fn_t
) ndr_push_dfs_ManagerInitialize
,
5691 (ndr_pull_flags_fn_t
) ndr_pull_dfs_ManagerInitialize
,
5692 (ndr_print_function_t
) ndr_print_dfs_ManagerInitialize
,
5696 "dfs_AddStdRootForced",
5697 sizeof(struct dfs_AddStdRootForced
),
5698 (ndr_push_flags_fn_t
) ndr_push_dfs_AddStdRootForced
,
5699 (ndr_pull_flags_fn_t
) ndr_pull_dfs_AddStdRootForced
,
5700 (ndr_print_function_t
) ndr_print_dfs_AddStdRootForced
,
5705 sizeof(struct dfs_GetDcAddress
),
5706 (ndr_push_flags_fn_t
) ndr_push_dfs_GetDcAddress
,
5707 (ndr_pull_flags_fn_t
) ndr_pull_dfs_GetDcAddress
,
5708 (ndr_print_function_t
) ndr_print_dfs_GetDcAddress
,
5713 sizeof(struct dfs_SetDcAddress
),
5714 (ndr_push_flags_fn_t
) ndr_push_dfs_SetDcAddress
,
5715 (ndr_pull_flags_fn_t
) ndr_pull_dfs_SetDcAddress
,
5716 (ndr_print_function_t
) ndr_print_dfs_SetDcAddress
,
5721 sizeof(struct dfs_FlushFtTable
),
5722 (ndr_push_flags_fn_t
) ndr_push_dfs_FlushFtTable
,
5723 (ndr_pull_flags_fn_t
) ndr_pull_dfs_FlushFtTable
,
5724 (ndr_print_function_t
) ndr_print_dfs_FlushFtTable
,
5729 sizeof(struct dfs_Add2
),
5730 (ndr_push_flags_fn_t
) ndr_push_dfs_Add2
,
5731 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Add2
,
5732 (ndr_print_function_t
) ndr_print_dfs_Add2
,
5737 sizeof(struct dfs_Remove2
),
5738 (ndr_push_flags_fn_t
) ndr_push_dfs_Remove2
,
5739 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Remove2
,
5740 (ndr_print_function_t
) ndr_print_dfs_Remove2
,
5745 sizeof(struct dfs_EnumEx
),
5746 (ndr_push_flags_fn_t
) ndr_push_dfs_EnumEx
,
5747 (ndr_pull_flags_fn_t
) ndr_pull_dfs_EnumEx
,
5748 (ndr_print_function_t
) ndr_print_dfs_EnumEx
,
5753 sizeof(struct dfs_SetInfo2
),
5754 (ndr_push_flags_fn_t
) ndr_push_dfs_SetInfo2
,
5755 (ndr_pull_flags_fn_t
) ndr_pull_dfs_SetInfo2
,
5756 (ndr_print_function_t
) ndr_print_dfs_SetInfo2
,
5759 { NULL
, 0, NULL
, NULL
, NULL
, false }
5762 static const char * const netdfs_endpoint_strings
[] = {
5763 "ncacn_np:[\\pipe\\netdfs]",
5768 static const struct ndr_interface_string_array netdfs_endpoints
= {
5770 .names
= netdfs_endpoint_strings
5773 static const char * const netdfs_authservice_strings
[] = {
5777 static const struct ndr_interface_string_array netdfs_authservices
= {
5779 .names
= netdfs_authservice_strings
5783 const struct ndr_interface_table ndr_table_netdfs
= {
5786 {0x4fc742e0,0x4a10,0x11cf,{0x82,0x73},{0x00,0xaa,0x00,0x4a,0xe6,0x73}},
5789 .helpstring
= NDR_NETDFS_HELPSTRING
,
5791 .calls
= netdfs_calls
,
5792 .endpoints
= &netdfs_endpoints
,
5793 .authservices
= &netdfs_authservices