1 /* parser auto-generated by pidl */
4 #include "librpc/gen_ndr/ndr_dfs.h"
6 static enum ndr_err_code
ndr_push_dfs_ManagerVersion(struct ndr_push
*ndr
, int ndr_flags
, enum dfs_ManagerVersion r
)
8 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
9 return NDR_ERR_SUCCESS
;
12 static enum ndr_err_code
ndr_pull_dfs_ManagerVersion(struct ndr_pull
*ndr
, int ndr_flags
, enum dfs_ManagerVersion
*r
)
15 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
17 return NDR_ERR_SUCCESS
;
20 _PUBLIC_
void ndr_print_dfs_ManagerVersion(struct ndr_print
*ndr
, const char *name
, enum dfs_ManagerVersion r
)
22 const char *val
= NULL
;
25 case DFS_MANAGER_VERSION_NT4
: val
= "DFS_MANAGER_VERSION_NT4"; break;
26 case DFS_MANAGER_VERSION_W2K
: val
= "DFS_MANAGER_VERSION_W2K"; break;
27 case DFS_MANAGER_VERSION_W2K3
: val
= "DFS_MANAGER_VERSION_W2K3"; break;
28 case DFS_MANAGER_VERSION_W2K8
: val
= "DFS_MANAGER_VERSION_W2K8"; break;
30 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
33 static enum ndr_err_code
ndr_push_dfs_Info0(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info0
*r
)
35 if (ndr_flags
& NDR_SCALARS
) {
36 NDR_CHECK(ndr_push_align(ndr
, 1));
38 if (ndr_flags
& NDR_BUFFERS
) {
40 return NDR_ERR_SUCCESS
;
43 static enum ndr_err_code
ndr_pull_dfs_Info0(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info0
*r
)
45 if (ndr_flags
& NDR_SCALARS
) {
46 NDR_CHECK(ndr_pull_align(ndr
, 1));
48 if (ndr_flags
& NDR_BUFFERS
) {
50 return NDR_ERR_SUCCESS
;
53 _PUBLIC_
void ndr_print_dfs_Info0(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info0
*r
)
55 ndr_print_struct(ndr
, name
, "dfs_Info0");
60 static enum ndr_err_code
ndr_push_dfs_Info1(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info1
*r
)
62 if (ndr_flags
& NDR_SCALARS
) {
63 NDR_CHECK(ndr_push_align(ndr
, 4));
64 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->path
));
66 if (ndr_flags
& NDR_BUFFERS
) {
68 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
69 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
70 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
71 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->path
, ndr_charset_length(r
->path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
74 return NDR_ERR_SUCCESS
;
77 static enum ndr_err_code
ndr_pull_dfs_Info1(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info1
*r
)
80 TALLOC_CTX
*_mem_save_path_0
;
81 if (ndr_flags
& NDR_SCALARS
) {
82 NDR_CHECK(ndr_pull_align(ndr
, 4));
83 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_path
));
85 NDR_PULL_ALLOC(ndr
, r
->path
);
90 if (ndr_flags
& NDR_BUFFERS
) {
92 _mem_save_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
93 NDR_PULL_SET_MEM_CTX(ndr
, r
->path
, 0);
94 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->path
));
95 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->path
));
96 if (ndr_get_array_length(ndr
, &r
->path
) > ndr_get_array_size(ndr
, &r
->path
)) {
97 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
));
99 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t)));
100 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->path
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t), CH_UTF16
));
101 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_path_0
, 0);
104 return NDR_ERR_SUCCESS
;
107 _PUBLIC_
void ndr_print_dfs_Info1(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info1
*r
)
109 ndr_print_struct(ndr
, name
, "dfs_Info1");
111 ndr_print_ptr(ndr
, "path", r
->path
);
114 ndr_print_string(ndr
, "path", r
->path
);
120 _PUBLIC_
enum ndr_err_code
ndr_push_dfs_VolumeState(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
122 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
123 return NDR_ERR_SUCCESS
;
126 _PUBLIC_
enum ndr_err_code
ndr_pull_dfs_VolumeState(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
129 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
131 return NDR_ERR_SUCCESS
;
134 _PUBLIC_
void ndr_print_dfs_VolumeState(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
136 ndr_print_uint32(ndr
, name
, r
);
138 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_VOLUME_STATE_OK", DFS_VOLUME_STATE_OK
, r
);
139 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_VOLUME_STATE_INCONSISTENT", DFS_VOLUME_STATE_INCONSISTENT
, r
);
140 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_VOLUME_STATE_OFFLINE", DFS_VOLUME_STATE_OFFLINE
, r
);
141 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_VOLUME_STATE_ONLINE", DFS_VOLUME_STATE_ONLINE
, r
);
142 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_VOLUME_STATE_STANDALONE", DFS_VOLUME_STATE_STANDALONE
, r
);
143 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_VOLUME_STATE_AD_BLOB", DFS_VOLUME_STATE_AD_BLOB
, r
);
147 static enum ndr_err_code
ndr_push_dfs_Info2(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info2
*r
)
149 if (ndr_flags
& NDR_SCALARS
) {
150 NDR_CHECK(ndr_push_align(ndr
, 4));
151 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->path
));
152 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
153 NDR_CHECK(ndr_push_dfs_VolumeState(ndr
, NDR_SCALARS
, r
->state
));
154 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_stores
));
156 if (ndr_flags
& NDR_BUFFERS
) {
158 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
159 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
160 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
161 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->path
, ndr_charset_length(r
->path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
164 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
165 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
166 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
167 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
170 return NDR_ERR_SUCCESS
;
173 static enum ndr_err_code
ndr_pull_dfs_Info2(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info2
*r
)
176 TALLOC_CTX
*_mem_save_path_0
;
177 uint32_t _ptr_comment
;
178 TALLOC_CTX
*_mem_save_comment_0
;
179 if (ndr_flags
& NDR_SCALARS
) {
180 NDR_CHECK(ndr_pull_align(ndr
, 4));
181 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_path
));
183 NDR_PULL_ALLOC(ndr
, r
->path
);
187 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
189 NDR_PULL_ALLOC(ndr
, r
->comment
);
193 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr
, NDR_SCALARS
, &r
->state
));
194 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_stores
));
196 if (ndr_flags
& NDR_BUFFERS
) {
198 _mem_save_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
199 NDR_PULL_SET_MEM_CTX(ndr
, r
->path
, 0);
200 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->path
));
201 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->path
));
202 if (ndr_get_array_length(ndr
, &r
->path
) > ndr_get_array_size(ndr
, &r
->path
)) {
203 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
));
205 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t)));
206 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->path
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t), CH_UTF16
));
207 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_path_0
, 0);
210 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
211 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
212 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
213 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
214 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
215 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
));
217 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
218 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
219 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
222 return NDR_ERR_SUCCESS
;
225 _PUBLIC_
void ndr_print_dfs_Info2(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info2
*r
)
227 ndr_print_struct(ndr
, name
, "dfs_Info2");
229 ndr_print_ptr(ndr
, "path", r
->path
);
232 ndr_print_string(ndr
, "path", r
->path
);
235 ndr_print_ptr(ndr
, "comment", r
->comment
);
238 ndr_print_string(ndr
, "comment", r
->comment
);
241 ndr_print_dfs_VolumeState(ndr
, "state", r
->state
);
242 ndr_print_uint32(ndr
, "num_stores", r
->num_stores
);
246 _PUBLIC_
enum ndr_err_code
ndr_push_dfs_StorageState(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
248 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
249 return NDR_ERR_SUCCESS
;
252 _PUBLIC_
enum ndr_err_code
ndr_pull_dfs_StorageState(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
255 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
257 return NDR_ERR_SUCCESS
;
260 _PUBLIC_
void ndr_print_dfs_StorageState(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
262 ndr_print_uint32(ndr
, name
, r
);
264 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_STORAGE_STATE_OFFLINE", DFS_STORAGE_STATE_OFFLINE
, r
);
265 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_STORAGE_STATE_ONLINE", DFS_STORAGE_STATE_ONLINE
, r
);
266 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_STORAGE_STATE_ACTIVE", DFS_STORAGE_STATE_ACTIVE
, r
);
270 static enum ndr_err_code
ndr_push_dfs_StorageInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_StorageInfo
*r
)
272 if (ndr_flags
& NDR_SCALARS
) {
273 NDR_CHECK(ndr_push_align(ndr
, 4));
274 NDR_CHECK(ndr_push_dfs_StorageState(ndr
, NDR_SCALARS
, r
->state
));
275 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server
));
276 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->share
));
278 if (ndr_flags
& NDR_BUFFERS
) {
280 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server
, CH_UTF16
)));
281 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
282 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server
, CH_UTF16
)));
283 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server
, ndr_charset_length(r
->server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
286 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->share
, CH_UTF16
)));
287 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
288 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->share
, CH_UTF16
)));
289 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->share
, ndr_charset_length(r
->share
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
292 return NDR_ERR_SUCCESS
;
295 static enum ndr_err_code
ndr_pull_dfs_StorageInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_StorageInfo
*r
)
297 uint32_t _ptr_server
;
298 TALLOC_CTX
*_mem_save_server_0
;
300 TALLOC_CTX
*_mem_save_share_0
;
301 if (ndr_flags
& NDR_SCALARS
) {
302 NDR_CHECK(ndr_pull_align(ndr
, 4));
303 NDR_CHECK(ndr_pull_dfs_StorageState(ndr
, NDR_SCALARS
, &r
->state
));
304 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
306 NDR_PULL_ALLOC(ndr
, r
->server
);
310 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_share
));
312 NDR_PULL_ALLOC(ndr
, r
->share
);
317 if (ndr_flags
& NDR_BUFFERS
) {
319 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
320 NDR_PULL_SET_MEM_CTX(ndr
, r
->server
, 0);
321 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server
));
322 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server
));
323 if (ndr_get_array_length(ndr
, &r
->server
) > ndr_get_array_size(ndr
, &r
->server
)) {
324 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
));
326 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server
), sizeof(uint16_t)));
327 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server
, ndr_get_array_length(ndr
, &r
->server
), sizeof(uint16_t), CH_UTF16
));
328 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
331 _mem_save_share_0
= NDR_PULL_GET_MEM_CTX(ndr
);
332 NDR_PULL_SET_MEM_CTX(ndr
, r
->share
, 0);
333 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->share
));
334 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->share
));
335 if (ndr_get_array_length(ndr
, &r
->share
) > ndr_get_array_size(ndr
, &r
->share
)) {
336 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
));
338 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->share
), sizeof(uint16_t)));
339 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->share
, ndr_get_array_length(ndr
, &r
->share
), sizeof(uint16_t), CH_UTF16
));
340 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_share_0
, 0);
343 return NDR_ERR_SUCCESS
;
346 _PUBLIC_
void ndr_print_dfs_StorageInfo(struct ndr_print
*ndr
, const char *name
, const struct dfs_StorageInfo
*r
)
348 ndr_print_struct(ndr
, name
, "dfs_StorageInfo");
350 ndr_print_dfs_StorageState(ndr
, "state", r
->state
);
351 ndr_print_ptr(ndr
, "server", r
->server
);
354 ndr_print_string(ndr
, "server", r
->server
);
357 ndr_print_ptr(ndr
, "share", r
->share
);
360 ndr_print_string(ndr
, "share", r
->share
);
366 static enum ndr_err_code
ndr_push_dfs_Info3(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info3
*r
)
368 uint32_t cntr_stores_1
;
369 if (ndr_flags
& NDR_SCALARS
) {
370 NDR_CHECK(ndr_push_align(ndr
, 4));
371 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->path
));
372 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
373 NDR_CHECK(ndr_push_dfs_VolumeState(ndr
, NDR_SCALARS
, r
->state
));
374 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_stores
));
375 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->stores
));
377 if (ndr_flags
& NDR_BUFFERS
) {
379 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
380 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
381 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
382 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->path
, ndr_charset_length(r
->path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
385 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
386 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
387 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
388 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
391 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_stores
));
392 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
393 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr
, NDR_SCALARS
, &r
->stores
[cntr_stores_1
]));
395 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
396 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr
, NDR_BUFFERS
, &r
->stores
[cntr_stores_1
]));
400 return NDR_ERR_SUCCESS
;
403 static enum ndr_err_code
ndr_pull_dfs_Info3(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info3
*r
)
406 TALLOC_CTX
*_mem_save_path_0
;
407 uint32_t _ptr_comment
;
408 TALLOC_CTX
*_mem_save_comment_0
;
409 uint32_t _ptr_stores
;
410 uint32_t cntr_stores_1
;
411 TALLOC_CTX
*_mem_save_stores_0
;
412 TALLOC_CTX
*_mem_save_stores_1
;
413 if (ndr_flags
& NDR_SCALARS
) {
414 NDR_CHECK(ndr_pull_align(ndr
, 4));
415 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_path
));
417 NDR_PULL_ALLOC(ndr
, r
->path
);
421 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
423 NDR_PULL_ALLOC(ndr
, r
->comment
);
427 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr
, NDR_SCALARS
, &r
->state
));
428 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_stores
));
429 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_stores
));
431 NDR_PULL_ALLOC(ndr
, r
->stores
);
436 if (ndr_flags
& NDR_BUFFERS
) {
438 _mem_save_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
439 NDR_PULL_SET_MEM_CTX(ndr
, r
->path
, 0);
440 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->path
));
441 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->path
));
442 if (ndr_get_array_length(ndr
, &r
->path
) > ndr_get_array_size(ndr
, &r
->path
)) {
443 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
));
445 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t)));
446 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->path
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t), CH_UTF16
));
447 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_path_0
, 0);
450 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
451 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
452 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
453 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
454 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
455 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
));
457 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
458 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
459 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
462 _mem_save_stores_0
= NDR_PULL_GET_MEM_CTX(ndr
);
463 NDR_PULL_SET_MEM_CTX(ndr
, r
->stores
, 0);
464 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->stores
));
465 NDR_PULL_ALLOC_N(ndr
, r
->stores
, ndr_get_array_size(ndr
, &r
->stores
));
466 _mem_save_stores_1
= NDR_PULL_GET_MEM_CTX(ndr
);
467 NDR_PULL_SET_MEM_CTX(ndr
, r
->stores
, 0);
468 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
469 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr
, NDR_SCALARS
, &r
->stores
[cntr_stores_1
]));
471 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
472 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr
, NDR_BUFFERS
, &r
->stores
[cntr_stores_1
]));
474 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_stores_1
, 0);
475 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_stores_0
, 0);
478 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->stores
, r
->num_stores
));
481 return NDR_ERR_SUCCESS
;
484 _PUBLIC_
void ndr_print_dfs_Info3(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info3
*r
)
486 uint32_t cntr_stores_1
;
487 ndr_print_struct(ndr
, name
, "dfs_Info3");
489 ndr_print_ptr(ndr
, "path", r
->path
);
492 ndr_print_string(ndr
, "path", r
->path
);
495 ndr_print_ptr(ndr
, "comment", r
->comment
);
498 ndr_print_string(ndr
, "comment", r
->comment
);
501 ndr_print_dfs_VolumeState(ndr
, "state", r
->state
);
502 ndr_print_uint32(ndr
, "num_stores", r
->num_stores
);
503 ndr_print_ptr(ndr
, "stores", r
->stores
);
506 ndr
->print(ndr
, "%s: ARRAY(%d)", "stores", r
->num_stores
);
508 for (cntr_stores_1
=0;cntr_stores_1
<r
->num_stores
;cntr_stores_1
++) {
510 if (asprintf(&idx_1
, "[%d]", cntr_stores_1
) != -1) {
511 ndr_print_dfs_StorageInfo(ndr
, "stores", &r
->stores
[cntr_stores_1
]);
521 static enum ndr_err_code
ndr_push_dfs_Info4(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info4
*r
)
523 uint32_t cntr_stores_1
;
524 if (ndr_flags
& NDR_SCALARS
) {
525 NDR_CHECK(ndr_push_align(ndr
, 4));
526 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->path
));
527 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
528 NDR_CHECK(ndr_push_dfs_VolumeState(ndr
, NDR_SCALARS
, r
->state
));
529 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->timeout
));
530 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
531 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_stores
));
532 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->stores
));
534 if (ndr_flags
& NDR_BUFFERS
) {
536 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
537 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
538 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
539 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->path
, ndr_charset_length(r
->path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
542 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
543 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
544 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
545 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
547 NDR_CHECK(ndr_push_GUID(ndr
, NDR_BUFFERS
, &r
->guid
));
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);
621 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_BUFFERS
, &r
->guid
));
623 _mem_save_stores_0
= NDR_PULL_GET_MEM_CTX(ndr
);
624 NDR_PULL_SET_MEM_CTX(ndr
, r
->stores
, 0);
625 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->stores
));
626 NDR_PULL_ALLOC_N(ndr
, r
->stores
, ndr_get_array_size(ndr
, &r
->stores
));
627 _mem_save_stores_1
= NDR_PULL_GET_MEM_CTX(ndr
);
628 NDR_PULL_SET_MEM_CTX(ndr
, r
->stores
, 0);
629 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
630 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr
, NDR_SCALARS
, &r
->stores
[cntr_stores_1
]));
632 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
633 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr
, NDR_BUFFERS
, &r
->stores
[cntr_stores_1
]));
635 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_stores_1
, 0);
636 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_stores_0
, 0);
639 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->stores
, r
->num_stores
));
642 return NDR_ERR_SUCCESS
;
645 _PUBLIC_
void ndr_print_dfs_Info4(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info4
*r
)
647 uint32_t cntr_stores_1
;
648 ndr_print_struct(ndr
, name
, "dfs_Info4");
650 ndr_print_ptr(ndr
, "path", r
->path
);
653 ndr_print_string(ndr
, "path", r
->path
);
656 ndr_print_ptr(ndr
, "comment", r
->comment
);
659 ndr_print_string(ndr
, "comment", r
->comment
);
662 ndr_print_dfs_VolumeState(ndr
, "state", r
->state
);
663 ndr_print_uint32(ndr
, "timeout", r
->timeout
);
664 ndr_print_GUID(ndr
, "guid", &r
->guid
);
665 ndr_print_uint32(ndr
, "num_stores", r
->num_stores
);
666 ndr_print_ptr(ndr
, "stores", r
->stores
);
669 ndr
->print(ndr
, "%s: ARRAY(%d)", "stores", r
->num_stores
);
671 for (cntr_stores_1
=0;cntr_stores_1
<r
->num_stores
;cntr_stores_1
++) {
673 if (asprintf(&idx_1
, "[%d]", cntr_stores_1
) != -1) {
674 ndr_print_dfs_StorageInfo(ndr
, "stores", &r
->stores
[cntr_stores_1
]);
684 _PUBLIC_
enum ndr_err_code
ndr_push_dfs_PropertyFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
686 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
687 return NDR_ERR_SUCCESS
;
690 _PUBLIC_
enum ndr_err_code
ndr_pull_dfs_PropertyFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
693 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
695 return NDR_ERR_SUCCESS
;
698 _PUBLIC_
void ndr_print_dfs_PropertyFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
700 ndr_print_uint32(ndr
, name
, r
);
702 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_PROPERTY_FLAG_INSITE_REFERRALS", DFS_PROPERTY_FLAG_INSITE_REFERRALS
, r
);
703 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_PROPERTY_FLAG_ROOT_SCALABILITY", DFS_PROPERTY_FLAG_ROOT_SCALABILITY
, r
);
704 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_PROPERTY_FLAG_SITE_COSTING", DFS_PROPERTY_FLAG_SITE_COSTING
, r
);
705 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_PROPERTY_FLAG_TARGET_FAILBACK", DFS_PROPERTY_FLAG_TARGET_FAILBACK
, r
);
706 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DFS_PROPERTY_FLAG_CLUSTER_ENABLED", DFS_PROPERTY_FLAG_CLUSTER_ENABLED
, r
);
710 static enum ndr_err_code
ndr_push_dfs_Info5(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info5
*r
)
712 if (ndr_flags
& NDR_SCALARS
) {
713 NDR_CHECK(ndr_push_align(ndr
, 4));
714 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->path
));
715 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
716 NDR_CHECK(ndr_push_dfs_VolumeState(ndr
, NDR_SCALARS
, r
->state
));
717 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->timeout
));
718 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
719 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr
, NDR_SCALARS
, r
->flags
));
720 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pktsize
));
721 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_stores
));
723 if (ndr_flags
& NDR_BUFFERS
) {
725 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
726 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
727 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->path
, CH_UTF16
)));
728 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->path
, ndr_charset_length(r
->path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
731 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
732 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
733 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
734 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
736 NDR_CHECK(ndr_push_GUID(ndr
, NDR_BUFFERS
, &r
->guid
));
738 return NDR_ERR_SUCCESS
;
741 static enum ndr_err_code
ndr_pull_dfs_Info5(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info5
*r
)
744 TALLOC_CTX
*_mem_save_path_0
;
745 uint32_t _ptr_comment
;
746 TALLOC_CTX
*_mem_save_comment_0
;
747 if (ndr_flags
& NDR_SCALARS
) {
748 NDR_CHECK(ndr_pull_align(ndr
, 4));
749 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_path
));
751 NDR_PULL_ALLOC(ndr
, r
->path
);
755 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
757 NDR_PULL_ALLOC(ndr
, r
->comment
);
761 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr
, NDR_SCALARS
, &r
->state
));
762 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->timeout
));
763 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
764 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr
, NDR_SCALARS
, &r
->flags
));
765 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pktsize
));
766 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_stores
));
768 if (ndr_flags
& NDR_BUFFERS
) {
770 _mem_save_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
771 NDR_PULL_SET_MEM_CTX(ndr
, r
->path
, 0);
772 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->path
));
773 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->path
));
774 if (ndr_get_array_length(ndr
, &r
->path
) > ndr_get_array_size(ndr
, &r
->path
)) {
775 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
));
777 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t)));
778 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->path
, ndr_get_array_length(ndr
, &r
->path
), sizeof(uint16_t), CH_UTF16
));
779 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_path_0
, 0);
782 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
783 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
784 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
785 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
786 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
787 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->comment
), ndr_get_array_length(ndr
, &r
->comment
));
789 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
790 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
791 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
793 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_BUFFERS
, &r
->guid
));
795 return NDR_ERR_SUCCESS
;
798 _PUBLIC_
void ndr_print_dfs_Info5(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info5
*r
)
800 ndr_print_struct(ndr
, name
, "dfs_Info5");
802 ndr_print_ptr(ndr
, "path", r
->path
);
805 ndr_print_string(ndr
, "path", r
->path
);
808 ndr_print_ptr(ndr
, "comment", r
->comment
);
811 ndr_print_string(ndr
, "comment", r
->comment
);
814 ndr_print_dfs_VolumeState(ndr
, "state", r
->state
);
815 ndr_print_uint32(ndr
, "timeout", r
->timeout
);
816 ndr_print_GUID(ndr
, "guid", &r
->guid
);
817 ndr_print_dfs_PropertyFlags(ndr
, "flags", r
->flags
);
818 ndr_print_uint32(ndr
, "pktsize", r
->pktsize
);
819 ndr_print_uint32(ndr
, "num_stores", r
->num_stores
);
823 static enum ndr_err_code
ndr_push_dfs_Target_PriorityClass(struct ndr_push
*ndr
, int ndr_flags
, enum dfs_Target_PriorityClass r
)
825 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
826 return NDR_ERR_SUCCESS
;
829 static enum ndr_err_code
ndr_pull_dfs_Target_PriorityClass(struct ndr_pull
*ndr
, int ndr_flags
, enum dfs_Target_PriorityClass
*r
)
832 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
834 return NDR_ERR_SUCCESS
;
837 _PUBLIC_
void ndr_print_dfs_Target_PriorityClass(struct ndr_print
*ndr
, const char *name
, enum dfs_Target_PriorityClass r
)
839 const char *val
= NULL
;
842 case DFS_INVALID_PRIORITY_CLASS
: val
= "DFS_INVALID_PRIORITY_CLASS"; break;
843 case DFS_SITE_COST_NORMAL_PRIORITY_CLASS
: val
= "DFS_SITE_COST_NORMAL_PRIORITY_CLASS"; break;
844 case DFS_GLOBAL_HIGH_PRIORITY_CLASS
: val
= "DFS_GLOBAL_HIGH_PRIORITY_CLASS"; break;
845 case DFS_SITE_COST_HIGH_PRIORITY_CLASS
: val
= "DFS_SITE_COST_HIGH_PRIORITY_CLASS"; break;
846 case DFS_SITE_COST_LOW_PRIORITY_CLASS
: val
= "DFS_SITE_COST_LOW_PRIORITY_CLASS"; break;
847 case DFS_GLOBAL_LOW_PRIORITY_CLASS
: val
= "DFS_GLOBAL_LOW_PRIORITY_CLASS"; break;
849 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
852 static enum ndr_err_code
ndr_push_dfs_Target_Priority(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Target_Priority
*r
)
854 if (ndr_flags
& NDR_SCALARS
) {
855 NDR_CHECK(ndr_push_align(ndr
, 4));
856 NDR_CHECK(ndr_push_dfs_Target_PriorityClass(ndr
, NDR_SCALARS
, r
->target_priority_class
));
857 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->target_priority_rank
));
858 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->reserved
));
860 if (ndr_flags
& NDR_BUFFERS
) {
862 return NDR_ERR_SUCCESS
;
865 static enum ndr_err_code
ndr_pull_dfs_Target_Priority(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Target_Priority
*r
)
867 if (ndr_flags
& NDR_SCALARS
) {
868 NDR_CHECK(ndr_pull_align(ndr
, 4));
869 NDR_CHECK(ndr_pull_dfs_Target_PriorityClass(ndr
, NDR_SCALARS
, &r
->target_priority_class
));
870 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->target_priority_rank
));
871 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->reserved
));
873 if (ndr_flags
& NDR_BUFFERS
) {
875 return NDR_ERR_SUCCESS
;
878 _PUBLIC_
void ndr_print_dfs_Target_Priority(struct ndr_print
*ndr
, const char *name
, const struct dfs_Target_Priority
*r
)
880 ndr_print_struct(ndr
, name
, "dfs_Target_Priority");
882 ndr_print_dfs_Target_PriorityClass(ndr
, "target_priority_class", r
->target_priority_class
);
883 ndr_print_uint16(ndr
, "target_priority_rank", r
->target_priority_rank
);
884 ndr_print_uint16(ndr
, "reserved", r
->reserved
);
888 static enum ndr_err_code
ndr_push_dfs_StorageInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_StorageInfo2
*r
)
890 if (ndr_flags
& NDR_SCALARS
) {
891 NDR_CHECK(ndr_push_align(ndr
, 4));
892 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr
, NDR_SCALARS
, &r
->info
));
893 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr
, NDR_SCALARS
, &r
->target_priority
));
895 if (ndr_flags
& NDR_BUFFERS
) {
896 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr
, NDR_BUFFERS
, &r
->info
));
898 return NDR_ERR_SUCCESS
;
901 static enum ndr_err_code
ndr_pull_dfs_StorageInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_StorageInfo2
*r
)
903 if (ndr_flags
& NDR_SCALARS
) {
904 NDR_CHECK(ndr_pull_align(ndr
, 4));
905 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr
, NDR_SCALARS
, &r
->info
));
906 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr
, NDR_SCALARS
, &r
->target_priority
));
908 if (ndr_flags
& NDR_BUFFERS
) {
909 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr
, NDR_BUFFERS
, &r
->info
));
911 return NDR_ERR_SUCCESS
;
914 _PUBLIC_
void ndr_print_dfs_StorageInfo2(struct ndr_print
*ndr
, const char *name
, const struct dfs_StorageInfo2
*r
)
916 ndr_print_struct(ndr
, name
, "dfs_StorageInfo2");
918 ndr_print_dfs_StorageInfo(ndr
, "info", &r
->info
);
919 ndr_print_dfs_Target_Priority(ndr
, "target_priority", &r
->target_priority
);
923 static enum ndr_err_code
ndr_push_dfs_Info6(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info6
*r
)
925 uint32_t cntr_stores_1
;
926 if (ndr_flags
& NDR_SCALARS
) {
927 NDR_CHECK(ndr_push_align(ndr
, 4));
928 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entry_path
));
929 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
930 NDR_CHECK(ndr_push_dfs_VolumeState(ndr
, NDR_SCALARS
, r
->state
));
931 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->timeout
));
932 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
933 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr
, NDR_SCALARS
, r
->flags
));
934 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pktsize
));
935 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->num_stores
));
936 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->stores
));
938 if (ndr_flags
& NDR_BUFFERS
) {
940 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->entry_path
, CH_UTF16
)));
941 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
942 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->entry_path
, CH_UTF16
)));
943 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->entry_path
, ndr_charset_length(r
->entry_path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
946 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
947 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
948 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
949 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
951 NDR_CHECK(ndr_push_GUID(ndr
, NDR_BUFFERS
, &r
->guid
));
953 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_stores
));
954 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
955 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr
, NDR_SCALARS
, &r
->stores
[cntr_stores_1
]));
957 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
958 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr
, NDR_BUFFERS
, &r
->stores
[cntr_stores_1
]));
962 return NDR_ERR_SUCCESS
;
965 static enum ndr_err_code
ndr_pull_dfs_Info6(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info6
*r
)
967 uint32_t _ptr_entry_path
;
968 TALLOC_CTX
*_mem_save_entry_path_0
;
969 uint32_t _ptr_comment
;
970 TALLOC_CTX
*_mem_save_comment_0
;
971 uint32_t _ptr_stores
;
972 uint32_t cntr_stores_1
;
973 TALLOC_CTX
*_mem_save_stores_0
;
974 TALLOC_CTX
*_mem_save_stores_1
;
975 if (ndr_flags
& NDR_SCALARS
) {
976 NDR_CHECK(ndr_pull_align(ndr
, 4));
977 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entry_path
));
978 if (_ptr_entry_path
) {
979 NDR_PULL_ALLOC(ndr
, r
->entry_path
);
981 r
->entry_path
= NULL
;
983 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
985 NDR_PULL_ALLOC(ndr
, r
->comment
);
989 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr
, NDR_SCALARS
, &r
->state
));
990 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->timeout
));
991 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->guid
));
992 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr
, NDR_SCALARS
, &r
->flags
));
993 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pktsize
));
994 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->num_stores
));
995 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_stores
));
997 NDR_PULL_ALLOC(ndr
, r
->stores
);
1002 if (ndr_flags
& NDR_BUFFERS
) {
1003 if (r
->entry_path
) {
1004 _mem_save_entry_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1005 NDR_PULL_SET_MEM_CTX(ndr
, r
->entry_path
, 0);
1006 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->entry_path
));
1007 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->entry_path
));
1008 if (ndr_get_array_length(ndr
, &r
->entry_path
) > ndr_get_array_size(ndr
, &r
->entry_path
)) {
1009 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
));
1011 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->entry_path
), sizeof(uint16_t)));
1012 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->entry_path
, ndr_get_array_length(ndr
, &r
->entry_path
), sizeof(uint16_t), CH_UTF16
));
1013 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entry_path_0
, 0);
1016 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1017 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
1018 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
1019 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
1020 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
1021 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
));
1023 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
1024 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
1025 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
1027 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_BUFFERS
, &r
->guid
));
1029 _mem_save_stores_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1030 NDR_PULL_SET_MEM_CTX(ndr
, r
->stores
, 0);
1031 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->stores
));
1032 NDR_PULL_ALLOC_N(ndr
, r
->stores
, ndr_get_array_size(ndr
, &r
->stores
));
1033 _mem_save_stores_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1034 NDR_PULL_SET_MEM_CTX(ndr
, r
->stores
, 0);
1035 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
1036 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr
, NDR_SCALARS
, &r
->stores
[cntr_stores_1
]));
1038 for (cntr_stores_1
= 0; cntr_stores_1
< r
->num_stores
; cntr_stores_1
++) {
1039 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr
, NDR_BUFFERS
, &r
->stores
[cntr_stores_1
]));
1041 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_stores_1
, 0);
1042 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_stores_0
, 0);
1045 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->stores
, r
->num_stores
));
1048 return NDR_ERR_SUCCESS
;
1051 _PUBLIC_
void ndr_print_dfs_Info6(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info6
*r
)
1053 uint32_t cntr_stores_1
;
1054 ndr_print_struct(ndr
, name
, "dfs_Info6");
1056 ndr_print_ptr(ndr
, "entry_path", r
->entry_path
);
1058 if (r
->entry_path
) {
1059 ndr_print_string(ndr
, "entry_path", r
->entry_path
);
1062 ndr_print_ptr(ndr
, "comment", r
->comment
);
1065 ndr_print_string(ndr
, "comment", r
->comment
);
1068 ndr_print_dfs_VolumeState(ndr
, "state", r
->state
);
1069 ndr_print_uint32(ndr
, "timeout", r
->timeout
);
1070 ndr_print_GUID(ndr
, "guid", &r
->guid
);
1071 ndr_print_dfs_PropertyFlags(ndr
, "flags", r
->flags
);
1072 ndr_print_uint32(ndr
, "pktsize", r
->pktsize
);
1073 ndr_print_uint16(ndr
, "num_stores", r
->num_stores
);
1074 ndr_print_ptr(ndr
, "stores", r
->stores
);
1077 ndr
->print(ndr
, "%s: ARRAY(%d)", "stores", r
->num_stores
);
1079 for (cntr_stores_1
=0;cntr_stores_1
<r
->num_stores
;cntr_stores_1
++) {
1081 if (asprintf(&idx_1
, "[%d]", cntr_stores_1
) != -1) {
1082 ndr_print_dfs_StorageInfo2(ndr
, "stores", &r
->stores
[cntr_stores_1
]);
1092 static enum ndr_err_code
ndr_push_dfs_Info7(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info7
*r
)
1094 if (ndr_flags
& NDR_SCALARS
) {
1095 NDR_CHECK(ndr_push_align(ndr
, 4));
1096 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->generation_guid
));
1098 if (ndr_flags
& NDR_BUFFERS
) {
1099 NDR_CHECK(ndr_push_GUID(ndr
, NDR_BUFFERS
, &r
->generation_guid
));
1101 return NDR_ERR_SUCCESS
;
1104 static enum ndr_err_code
ndr_pull_dfs_Info7(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info7
*r
)
1106 if (ndr_flags
& NDR_SCALARS
) {
1107 NDR_CHECK(ndr_pull_align(ndr
, 4));
1108 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->generation_guid
));
1110 if (ndr_flags
& NDR_BUFFERS
) {
1111 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_BUFFERS
, &r
->generation_guid
));
1113 return NDR_ERR_SUCCESS
;
1116 _PUBLIC_
void ndr_print_dfs_Info7(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info7
*r
)
1118 ndr_print_struct(ndr
, name
, "dfs_Info7");
1120 ndr_print_GUID(ndr
, "generation_guid", &r
->generation_guid
);
1124 static enum ndr_err_code
ndr_push_dfs_Info100(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info100
*r
)
1126 if (ndr_flags
& NDR_SCALARS
) {
1127 NDR_CHECK(ndr_push_align(ndr
, 4));
1128 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
1130 if (ndr_flags
& NDR_BUFFERS
) {
1132 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
1133 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1134 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
1135 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1138 return NDR_ERR_SUCCESS
;
1141 static enum ndr_err_code
ndr_pull_dfs_Info100(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info100
*r
)
1143 uint32_t _ptr_comment
;
1144 TALLOC_CTX
*_mem_save_comment_0
;
1145 if (ndr_flags
& NDR_SCALARS
) {
1146 NDR_CHECK(ndr_pull_align(ndr
, 4));
1147 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
1149 NDR_PULL_ALLOC(ndr
, r
->comment
);
1154 if (ndr_flags
& NDR_BUFFERS
) {
1156 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1157 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
1158 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
1159 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
1160 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
1161 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
));
1163 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
1164 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
1165 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
1168 return NDR_ERR_SUCCESS
;
1171 _PUBLIC_
void ndr_print_dfs_Info100(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info100
*r
)
1173 ndr_print_struct(ndr
, name
, "dfs_Info100");
1175 ndr_print_ptr(ndr
, "comment", r
->comment
);
1178 ndr_print_string(ndr
, "comment", r
->comment
);
1184 static enum ndr_err_code
ndr_push_dfs_Info101(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info101
*r
)
1186 if (ndr_flags
& NDR_SCALARS
) {
1187 NDR_CHECK(ndr_push_align(ndr
, 4));
1188 NDR_CHECK(ndr_push_dfs_StorageState(ndr
, NDR_SCALARS
, r
->state
));
1190 if (ndr_flags
& NDR_BUFFERS
) {
1192 return NDR_ERR_SUCCESS
;
1195 static enum ndr_err_code
ndr_pull_dfs_Info101(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info101
*r
)
1197 if (ndr_flags
& NDR_SCALARS
) {
1198 NDR_CHECK(ndr_pull_align(ndr
, 4));
1199 NDR_CHECK(ndr_pull_dfs_StorageState(ndr
, NDR_SCALARS
, &r
->state
));
1201 if (ndr_flags
& NDR_BUFFERS
) {
1203 return NDR_ERR_SUCCESS
;
1206 _PUBLIC_
void ndr_print_dfs_Info101(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info101
*r
)
1208 ndr_print_struct(ndr
, name
, "dfs_Info101");
1210 ndr_print_dfs_StorageState(ndr
, "state", r
->state
);
1214 static enum ndr_err_code
ndr_push_dfs_Info102(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info102
*r
)
1216 if (ndr_flags
& NDR_SCALARS
) {
1217 NDR_CHECK(ndr_push_align(ndr
, 4));
1218 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->timeout
));
1220 if (ndr_flags
& NDR_BUFFERS
) {
1222 return NDR_ERR_SUCCESS
;
1225 static enum ndr_err_code
ndr_pull_dfs_Info102(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info102
*r
)
1227 if (ndr_flags
& NDR_SCALARS
) {
1228 NDR_CHECK(ndr_pull_align(ndr
, 4));
1229 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->timeout
));
1231 if (ndr_flags
& NDR_BUFFERS
) {
1233 return NDR_ERR_SUCCESS
;
1236 _PUBLIC_
void ndr_print_dfs_Info102(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info102
*r
)
1238 ndr_print_struct(ndr
, name
, "dfs_Info102");
1240 ndr_print_uint32(ndr
, "timeout", r
->timeout
);
1244 static enum ndr_err_code
ndr_push_dfs_Info103(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info103
*r
)
1246 if (ndr_flags
& NDR_SCALARS
) {
1247 NDR_CHECK(ndr_push_align(ndr
, 4));
1248 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr
, NDR_SCALARS
, r
->flags
));
1250 if (ndr_flags
& NDR_BUFFERS
) {
1252 return NDR_ERR_SUCCESS
;
1255 static enum ndr_err_code
ndr_pull_dfs_Info103(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info103
*r
)
1257 if (ndr_flags
& NDR_SCALARS
) {
1258 NDR_CHECK(ndr_pull_align(ndr
, 4));
1259 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr
, NDR_SCALARS
, &r
->flags
));
1261 if (ndr_flags
& NDR_BUFFERS
) {
1263 return NDR_ERR_SUCCESS
;
1266 _PUBLIC_
void ndr_print_dfs_Info103(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info103
*r
)
1268 ndr_print_struct(ndr
, name
, "dfs_Info103");
1270 ndr_print_dfs_PropertyFlags(ndr
, "flags", r
->flags
);
1274 static enum ndr_err_code
ndr_push_dfs_Info104(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info104
*r
)
1276 if (ndr_flags
& NDR_SCALARS
) {
1277 NDR_CHECK(ndr_push_align(ndr
, 4));
1278 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr
, NDR_SCALARS
, &r
->priority
));
1280 if (ndr_flags
& NDR_BUFFERS
) {
1282 return NDR_ERR_SUCCESS
;
1285 static enum ndr_err_code
ndr_pull_dfs_Info104(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info104
*r
)
1287 if (ndr_flags
& NDR_SCALARS
) {
1288 NDR_CHECK(ndr_pull_align(ndr
, 4));
1289 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr
, NDR_SCALARS
, &r
->priority
));
1291 if (ndr_flags
& NDR_BUFFERS
) {
1293 return NDR_ERR_SUCCESS
;
1296 _PUBLIC_
void ndr_print_dfs_Info104(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info104
*r
)
1298 ndr_print_struct(ndr
, name
, "dfs_Info104");
1300 ndr_print_dfs_Target_Priority(ndr
, "priority", &r
->priority
);
1304 static enum ndr_err_code
ndr_push_dfs_Info105(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info105
*r
)
1306 if (ndr_flags
& NDR_SCALARS
) {
1307 NDR_CHECK(ndr_push_align(ndr
, 4));
1308 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
1309 NDR_CHECK(ndr_push_dfs_VolumeState(ndr
, NDR_SCALARS
, r
->state
));
1310 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->timeout
));
1311 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->property_flag_mask
));
1312 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->property_flags
));
1314 if (ndr_flags
& NDR_BUFFERS
) {
1316 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
1317 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1318 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
1319 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1322 return NDR_ERR_SUCCESS
;
1325 static enum ndr_err_code
ndr_pull_dfs_Info105(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info105
*r
)
1327 uint32_t _ptr_comment
;
1328 TALLOC_CTX
*_mem_save_comment_0
;
1329 if (ndr_flags
& NDR_SCALARS
) {
1330 NDR_CHECK(ndr_pull_align(ndr
, 4));
1331 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
1333 NDR_PULL_ALLOC(ndr
, r
->comment
);
1337 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr
, NDR_SCALARS
, &r
->state
));
1338 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->timeout
));
1339 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->property_flag_mask
));
1340 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->property_flags
));
1342 if (ndr_flags
& NDR_BUFFERS
) {
1344 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1345 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
1346 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
1347 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
1348 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
1349 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
));
1351 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
1352 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
1353 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
1356 return NDR_ERR_SUCCESS
;
1359 _PUBLIC_
void ndr_print_dfs_Info105(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info105
*r
)
1361 ndr_print_struct(ndr
, name
, "dfs_Info105");
1363 ndr_print_ptr(ndr
, "comment", r
->comment
);
1366 ndr_print_string(ndr
, "comment", r
->comment
);
1369 ndr_print_dfs_VolumeState(ndr
, "state", r
->state
);
1370 ndr_print_uint32(ndr
, "timeout", r
->timeout
);
1371 ndr_print_uint32(ndr
, "property_flag_mask", r
->property_flag_mask
);
1372 ndr_print_uint32(ndr
, "property_flags", r
->property_flags
);
1376 static enum ndr_err_code
ndr_push_dfs_Info106(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info106
*r
)
1378 if (ndr_flags
& NDR_SCALARS
) {
1379 NDR_CHECK(ndr_push_align(ndr
, 4));
1380 NDR_CHECK(ndr_push_dfs_StorageState(ndr
, NDR_SCALARS
, r
->state
));
1381 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr
, NDR_SCALARS
, &r
->priority
));
1383 if (ndr_flags
& NDR_BUFFERS
) {
1385 return NDR_ERR_SUCCESS
;
1388 static enum ndr_err_code
ndr_pull_dfs_Info106(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info106
*r
)
1390 if (ndr_flags
& NDR_SCALARS
) {
1391 NDR_CHECK(ndr_pull_align(ndr
, 4));
1392 NDR_CHECK(ndr_pull_dfs_StorageState(ndr
, NDR_SCALARS
, &r
->state
));
1393 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr
, NDR_SCALARS
, &r
->priority
));
1395 if (ndr_flags
& NDR_BUFFERS
) {
1397 return NDR_ERR_SUCCESS
;
1400 _PUBLIC_
void ndr_print_dfs_Info106(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info106
*r
)
1402 ndr_print_struct(ndr
, name
, "dfs_Info106");
1404 ndr_print_dfs_StorageState(ndr
, "state", r
->state
);
1405 ndr_print_dfs_Target_Priority(ndr
, "priority", &r
->priority
);
1409 static enum ndr_err_code
ndr_push_dfs_Info200(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info200
*r
)
1411 if (ndr_flags
& NDR_SCALARS
) {
1412 NDR_CHECK(ndr_push_align(ndr
, 4));
1413 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dom_root
));
1415 if (ndr_flags
& NDR_BUFFERS
) {
1417 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dom_root
, CH_UTF16
)));
1418 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1419 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dom_root
, CH_UTF16
)));
1420 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dom_root
, ndr_charset_length(r
->dom_root
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1423 return NDR_ERR_SUCCESS
;
1426 static enum ndr_err_code
ndr_pull_dfs_Info200(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info200
*r
)
1428 uint32_t _ptr_dom_root
;
1429 TALLOC_CTX
*_mem_save_dom_root_0
;
1430 if (ndr_flags
& NDR_SCALARS
) {
1431 NDR_CHECK(ndr_pull_align(ndr
, 4));
1432 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dom_root
));
1433 if (_ptr_dom_root
) {
1434 NDR_PULL_ALLOC(ndr
, r
->dom_root
);
1439 if (ndr_flags
& NDR_BUFFERS
) {
1441 _mem_save_dom_root_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1442 NDR_PULL_SET_MEM_CTX(ndr
, r
->dom_root
, 0);
1443 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dom_root
));
1444 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dom_root
));
1445 if (ndr_get_array_length(ndr
, &r
->dom_root
) > ndr_get_array_size(ndr
, &r
->dom_root
)) {
1446 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
));
1448 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dom_root
), sizeof(uint16_t)));
1449 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dom_root
, ndr_get_array_length(ndr
, &r
->dom_root
), sizeof(uint16_t), CH_UTF16
));
1450 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dom_root_0
, 0);
1453 return NDR_ERR_SUCCESS
;
1456 _PUBLIC_
void ndr_print_dfs_Info200(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info200
*r
)
1458 ndr_print_struct(ndr
, name
, "dfs_Info200");
1460 ndr_print_ptr(ndr
, "dom_root", r
->dom_root
);
1463 ndr_print_string(ndr
, "dom_root", r
->dom_root
);
1469 static enum ndr_err_code
ndr_push_dfs_VolumeFlavor(struct ndr_push
*ndr
, int ndr_flags
, enum dfs_VolumeFlavor r
)
1471 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
1472 return NDR_ERR_SUCCESS
;
1475 static enum ndr_err_code
ndr_pull_dfs_VolumeFlavor(struct ndr_pull
*ndr
, int ndr_flags
, enum dfs_VolumeFlavor
*r
)
1478 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
1480 return NDR_ERR_SUCCESS
;
1483 _PUBLIC_
void ndr_print_dfs_VolumeFlavor(struct ndr_print
*ndr
, const char *name
, enum dfs_VolumeFlavor r
)
1485 const char *val
= NULL
;
1488 case DFS_VOLUME_FLAVOR_STANDALONE
: val
= "DFS_VOLUME_FLAVOR_STANDALONE"; break;
1489 case DFS_VOLUME_FLAVOR_AD_BLOB
: val
= "DFS_VOLUME_FLAVOR_AD_BLOB"; break;
1491 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1494 static enum ndr_err_code
ndr_push_dfs_Info300(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_Info300
*r
)
1496 if (ndr_flags
& NDR_SCALARS
) {
1497 NDR_CHECK(ndr_push_align(ndr
, 4));
1498 NDR_CHECK(ndr_push_dfs_VolumeFlavor(ndr
, NDR_SCALARS
, r
->flavor
));
1499 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dom_root
));
1501 if (ndr_flags
& NDR_BUFFERS
) {
1503 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dom_root
, CH_UTF16
)));
1504 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1505 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dom_root
, CH_UTF16
)));
1506 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dom_root
, ndr_charset_length(r
->dom_root
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
1509 return NDR_ERR_SUCCESS
;
1512 static enum ndr_err_code
ndr_pull_dfs_Info300(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_Info300
*r
)
1514 uint32_t _ptr_dom_root
;
1515 TALLOC_CTX
*_mem_save_dom_root_0
;
1516 if (ndr_flags
& NDR_SCALARS
) {
1517 NDR_CHECK(ndr_pull_align(ndr
, 4));
1518 NDR_CHECK(ndr_pull_dfs_VolumeFlavor(ndr
, NDR_SCALARS
, &r
->flavor
));
1519 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dom_root
));
1520 if (_ptr_dom_root
) {
1521 NDR_PULL_ALLOC(ndr
, r
->dom_root
);
1526 if (ndr_flags
& NDR_BUFFERS
) {
1528 _mem_save_dom_root_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1529 NDR_PULL_SET_MEM_CTX(ndr
, r
->dom_root
, 0);
1530 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dom_root
));
1531 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dom_root
));
1532 if (ndr_get_array_length(ndr
, &r
->dom_root
) > ndr_get_array_size(ndr
, &r
->dom_root
)) {
1533 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
));
1535 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dom_root
), sizeof(uint16_t)));
1536 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dom_root
, ndr_get_array_length(ndr
, &r
->dom_root
), sizeof(uint16_t), CH_UTF16
));
1537 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dom_root_0
, 0);
1540 return NDR_ERR_SUCCESS
;
1543 _PUBLIC_
void ndr_print_dfs_Info300(struct ndr_print
*ndr
, const char *name
, const struct dfs_Info300
*r
)
1545 ndr_print_struct(ndr
, name
, "dfs_Info300");
1547 ndr_print_dfs_VolumeFlavor(ndr
, "flavor", r
->flavor
);
1548 ndr_print_ptr(ndr
, "dom_root", r
->dom_root
);
1551 ndr_print_string(ndr
, "dom_root", r
->dom_root
);
1557 static enum ndr_err_code
ndr_push_dfs_Info(struct ndr_push
*ndr
, int ndr_flags
, const union dfs_Info
*r
)
1559 if (ndr_flags
& NDR_SCALARS
) {
1560 int level
= ndr_push_get_switch_value(ndr
, r
);
1561 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
1564 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info0
));
1568 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
1572 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info2
));
1576 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info3
));
1580 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info4
));
1584 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info5
));
1588 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info6
));
1592 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info7
));
1596 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info100
));
1600 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info101
));
1604 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info102
));
1608 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info103
));
1612 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info104
));
1616 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info105
));
1620 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info106
));
1624 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1627 if (ndr_flags
& NDR_BUFFERS
) {
1628 int level
= ndr_push_get_switch_value(ndr
, r
);
1632 NDR_CHECK(ndr_push_dfs_Info0(ndr
, NDR_SCALARS
, r
->info0
));
1638 NDR_CHECK(ndr_push_dfs_Info1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
1644 NDR_CHECK(ndr_push_dfs_Info2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
1650 NDR_CHECK(ndr_push_dfs_Info3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info3
));
1656 NDR_CHECK(ndr_push_dfs_Info4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
1662 NDR_CHECK(ndr_push_dfs_Info5(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info5
));
1668 NDR_CHECK(ndr_push_dfs_Info6(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info6
));
1674 NDR_CHECK(ndr_push_dfs_Info7(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info7
));
1680 NDR_CHECK(ndr_push_dfs_Info100(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info100
));
1686 NDR_CHECK(ndr_push_dfs_Info101(ndr
, NDR_SCALARS
, r
->info101
));
1692 NDR_CHECK(ndr_push_dfs_Info102(ndr
, NDR_SCALARS
, r
->info102
));
1698 NDR_CHECK(ndr_push_dfs_Info103(ndr
, NDR_SCALARS
, r
->info103
));
1704 NDR_CHECK(ndr_push_dfs_Info104(ndr
, NDR_SCALARS
, r
->info104
));
1710 NDR_CHECK(ndr_push_dfs_Info105(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info105
));
1716 NDR_CHECK(ndr_push_dfs_Info106(ndr
, NDR_SCALARS
, r
->info106
));
1721 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1724 return NDR_ERR_SUCCESS
;
1727 static enum ndr_err_code
ndr_pull_dfs_Info(struct ndr_pull
*ndr
, int ndr_flags
, union dfs_Info
*r
)
1731 TALLOC_CTX
*_mem_save_info0_0
;
1732 TALLOC_CTX
*_mem_save_info1_0
;
1733 TALLOC_CTX
*_mem_save_info2_0
;
1734 TALLOC_CTX
*_mem_save_info3_0
;
1735 TALLOC_CTX
*_mem_save_info4_0
;
1736 TALLOC_CTX
*_mem_save_info5_0
;
1737 TALLOC_CTX
*_mem_save_info6_0
;
1738 TALLOC_CTX
*_mem_save_info7_0
;
1739 TALLOC_CTX
*_mem_save_info100_0
;
1740 TALLOC_CTX
*_mem_save_info101_0
;
1741 TALLOC_CTX
*_mem_save_info102_0
;
1742 TALLOC_CTX
*_mem_save_info103_0
;
1743 TALLOC_CTX
*_mem_save_info104_0
;
1744 TALLOC_CTX
*_mem_save_info105_0
;
1745 TALLOC_CTX
*_mem_save_info106_0
;
1746 level
= ndr_pull_get_switch_value(ndr
, r
);
1747 if (ndr_flags
& NDR_SCALARS
) {
1748 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
1749 if (_level
!= level
) {
1750 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
1754 uint32_t _ptr_info0
;
1755 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info0
));
1757 NDR_PULL_ALLOC(ndr
, r
->info0
);
1764 uint32_t _ptr_info1
;
1765 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
1767 NDR_PULL_ALLOC(ndr
, r
->info1
);
1774 uint32_t _ptr_info2
;
1775 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info2
));
1777 NDR_PULL_ALLOC(ndr
, r
->info2
);
1784 uint32_t _ptr_info3
;
1785 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info3
));
1787 NDR_PULL_ALLOC(ndr
, r
->info3
);
1794 uint32_t _ptr_info4
;
1795 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info4
));
1797 NDR_PULL_ALLOC(ndr
, r
->info4
);
1804 uint32_t _ptr_info5
;
1805 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info5
));
1807 NDR_PULL_ALLOC(ndr
, r
->info5
);
1814 uint32_t _ptr_info6
;
1815 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info6
));
1817 NDR_PULL_ALLOC(ndr
, r
->info6
);
1824 uint32_t _ptr_info7
;
1825 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info7
));
1827 NDR_PULL_ALLOC(ndr
, r
->info7
);
1834 uint32_t _ptr_info100
;
1835 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info100
));
1837 NDR_PULL_ALLOC(ndr
, r
->info100
);
1844 uint32_t _ptr_info101
;
1845 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info101
));
1847 NDR_PULL_ALLOC(ndr
, r
->info101
);
1854 uint32_t _ptr_info102
;
1855 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info102
));
1857 NDR_PULL_ALLOC(ndr
, r
->info102
);
1864 uint32_t _ptr_info103
;
1865 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info103
));
1867 NDR_PULL_ALLOC(ndr
, r
->info103
);
1874 uint32_t _ptr_info104
;
1875 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info104
));
1877 NDR_PULL_ALLOC(ndr
, r
->info104
);
1884 uint32_t _ptr_info105
;
1885 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info105
));
1887 NDR_PULL_ALLOC(ndr
, r
->info105
);
1894 uint32_t _ptr_info106
;
1895 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info106
));
1897 NDR_PULL_ALLOC(ndr
, r
->info106
);
1904 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1907 if (ndr_flags
& NDR_BUFFERS
) {
1911 _mem_save_info0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1912 NDR_PULL_SET_MEM_CTX(ndr
, r
->info0
, 0);
1913 NDR_CHECK(ndr_pull_dfs_Info0(ndr
, NDR_SCALARS
, r
->info0
));
1914 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info0_0
, 0);
1920 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1921 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
1922 NDR_CHECK(ndr_pull_dfs_Info1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
1923 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
1929 _mem_save_info2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1930 NDR_PULL_SET_MEM_CTX(ndr
, r
->info2
, 0);
1931 NDR_CHECK(ndr_pull_dfs_Info2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
1932 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info2_0
, 0);
1938 _mem_save_info3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1939 NDR_PULL_SET_MEM_CTX(ndr
, r
->info3
, 0);
1940 NDR_CHECK(ndr_pull_dfs_Info3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info3
));
1941 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info3_0
, 0);
1947 _mem_save_info4_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1948 NDR_PULL_SET_MEM_CTX(ndr
, r
->info4
, 0);
1949 NDR_CHECK(ndr_pull_dfs_Info4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
1950 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info4_0
, 0);
1956 _mem_save_info5_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1957 NDR_PULL_SET_MEM_CTX(ndr
, r
->info5
, 0);
1958 NDR_CHECK(ndr_pull_dfs_Info5(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info5
));
1959 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info5_0
, 0);
1965 _mem_save_info6_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1966 NDR_PULL_SET_MEM_CTX(ndr
, r
->info6
, 0);
1967 NDR_CHECK(ndr_pull_dfs_Info6(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info6
));
1968 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info6_0
, 0);
1974 _mem_save_info7_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1975 NDR_PULL_SET_MEM_CTX(ndr
, r
->info7
, 0);
1976 NDR_CHECK(ndr_pull_dfs_Info7(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info7
));
1977 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info7_0
, 0);
1983 _mem_save_info100_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1984 NDR_PULL_SET_MEM_CTX(ndr
, r
->info100
, 0);
1985 NDR_CHECK(ndr_pull_dfs_Info100(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info100
));
1986 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info100_0
, 0);
1992 _mem_save_info101_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1993 NDR_PULL_SET_MEM_CTX(ndr
, r
->info101
, 0);
1994 NDR_CHECK(ndr_pull_dfs_Info101(ndr
, NDR_SCALARS
, r
->info101
));
1995 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info101_0
, 0);
2001 _mem_save_info102_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2002 NDR_PULL_SET_MEM_CTX(ndr
, r
->info102
, 0);
2003 NDR_CHECK(ndr_pull_dfs_Info102(ndr
, NDR_SCALARS
, r
->info102
));
2004 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info102_0
, 0);
2010 _mem_save_info103_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2011 NDR_PULL_SET_MEM_CTX(ndr
, r
->info103
, 0);
2012 NDR_CHECK(ndr_pull_dfs_Info103(ndr
, NDR_SCALARS
, r
->info103
));
2013 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info103_0
, 0);
2019 _mem_save_info104_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2020 NDR_PULL_SET_MEM_CTX(ndr
, r
->info104
, 0);
2021 NDR_CHECK(ndr_pull_dfs_Info104(ndr
, NDR_SCALARS
, r
->info104
));
2022 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info104_0
, 0);
2028 _mem_save_info105_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2029 NDR_PULL_SET_MEM_CTX(ndr
, r
->info105
, 0);
2030 NDR_CHECK(ndr_pull_dfs_Info105(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info105
));
2031 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info105_0
, 0);
2037 _mem_save_info106_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2038 NDR_PULL_SET_MEM_CTX(ndr
, r
->info106
, 0);
2039 NDR_CHECK(ndr_pull_dfs_Info106(ndr
, NDR_SCALARS
, r
->info106
));
2040 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info106_0
, 0);
2045 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
2048 return NDR_ERR_SUCCESS
;
2051 _PUBLIC_
void ndr_print_dfs_Info(struct ndr_print
*ndr
, const char *name
, const union dfs_Info
*r
)
2054 level
= ndr_print_get_switch_value(ndr
, r
);
2055 ndr_print_union(ndr
, name
, level
, "dfs_Info");
2058 ndr_print_ptr(ndr
, "info0", r
->info0
);
2061 ndr_print_dfs_Info0(ndr
, "info0", r
->info0
);
2067 ndr_print_ptr(ndr
, "info1", r
->info1
);
2070 ndr_print_dfs_Info1(ndr
, "info1", r
->info1
);
2076 ndr_print_ptr(ndr
, "info2", r
->info2
);
2079 ndr_print_dfs_Info2(ndr
, "info2", r
->info2
);
2085 ndr_print_ptr(ndr
, "info3", r
->info3
);
2088 ndr_print_dfs_Info3(ndr
, "info3", r
->info3
);
2094 ndr_print_ptr(ndr
, "info4", r
->info4
);
2097 ndr_print_dfs_Info4(ndr
, "info4", r
->info4
);
2103 ndr_print_ptr(ndr
, "info5", r
->info5
);
2106 ndr_print_dfs_Info5(ndr
, "info5", r
->info5
);
2112 ndr_print_ptr(ndr
, "info6", r
->info6
);
2115 ndr_print_dfs_Info6(ndr
, "info6", r
->info6
);
2121 ndr_print_ptr(ndr
, "info7", r
->info7
);
2124 ndr_print_dfs_Info7(ndr
, "info7", r
->info7
);
2130 ndr_print_ptr(ndr
, "info100", r
->info100
);
2133 ndr_print_dfs_Info100(ndr
, "info100", r
->info100
);
2139 ndr_print_ptr(ndr
, "info101", r
->info101
);
2142 ndr_print_dfs_Info101(ndr
, "info101", r
->info101
);
2148 ndr_print_ptr(ndr
, "info102", r
->info102
);
2151 ndr_print_dfs_Info102(ndr
, "info102", r
->info102
);
2157 ndr_print_ptr(ndr
, "info103", r
->info103
);
2160 ndr_print_dfs_Info103(ndr
, "info103", r
->info103
);
2166 ndr_print_ptr(ndr
, "info104", r
->info104
);
2169 ndr_print_dfs_Info104(ndr
, "info104", r
->info104
);
2175 ndr_print_ptr(ndr
, "info105", r
->info105
);
2178 ndr_print_dfs_Info105(ndr
, "info105", r
->info105
);
2184 ndr_print_ptr(ndr
, "info106", r
->info106
);
2187 ndr_print_dfs_Info106(ndr
, "info106", r
->info106
);
2193 ndr_print_bad_level(ndr
, name
, level
);
2197 static enum ndr_err_code
ndr_push_dfs_EnumArray1(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray1
*r
)
2200 if (ndr_flags
& NDR_SCALARS
) {
2201 NDR_CHECK(ndr_push_align(ndr
, 4));
2202 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2203 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2205 if (ndr_flags
& NDR_BUFFERS
) {
2207 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2208 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2209 NDR_CHECK(ndr_push_dfs_Info1(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2211 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2212 NDR_CHECK(ndr_push_dfs_Info1(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2216 return NDR_ERR_SUCCESS
;
2219 static enum ndr_err_code
ndr_pull_dfs_EnumArray1(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray1
*r
)
2223 TALLOC_CTX
*_mem_save_s_0
;
2224 TALLOC_CTX
*_mem_save_s_1
;
2225 if (ndr_flags
& NDR_SCALARS
) {
2226 NDR_CHECK(ndr_pull_align(ndr
, 4));
2227 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2228 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2230 NDR_PULL_ALLOC(ndr
, r
->s
);
2235 if (ndr_flags
& NDR_BUFFERS
) {
2237 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2238 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2239 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2240 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2241 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2242 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2243 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2244 NDR_CHECK(ndr_pull_dfs_Info1(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2246 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2247 NDR_CHECK(ndr_pull_dfs_Info1(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2249 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2250 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2253 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2256 return NDR_ERR_SUCCESS
;
2259 _PUBLIC_
void ndr_print_dfs_EnumArray1(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray1
*r
)
2262 ndr_print_struct(ndr
, name
, "dfs_EnumArray1");
2264 ndr_print_uint32(ndr
, "count", r
->count
);
2265 ndr_print_ptr(ndr
, "s", r
->s
);
2268 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", r
->count
);
2270 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2272 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2273 ndr_print_dfs_Info1(ndr
, "s", &r
->s
[cntr_s_1
]);
2283 static enum ndr_err_code
ndr_push_dfs_EnumArray2(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray2
*r
)
2286 if (ndr_flags
& NDR_SCALARS
) {
2287 NDR_CHECK(ndr_push_align(ndr
, 4));
2288 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2289 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2291 if (ndr_flags
& NDR_BUFFERS
) {
2293 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2294 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2295 NDR_CHECK(ndr_push_dfs_Info2(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2297 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2298 NDR_CHECK(ndr_push_dfs_Info2(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2302 return NDR_ERR_SUCCESS
;
2305 static enum ndr_err_code
ndr_pull_dfs_EnumArray2(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray2
*r
)
2309 TALLOC_CTX
*_mem_save_s_0
;
2310 TALLOC_CTX
*_mem_save_s_1
;
2311 if (ndr_flags
& NDR_SCALARS
) {
2312 NDR_CHECK(ndr_pull_align(ndr
, 4));
2313 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2314 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2316 NDR_PULL_ALLOC(ndr
, r
->s
);
2321 if (ndr_flags
& NDR_BUFFERS
) {
2323 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2324 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2325 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2326 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2327 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2328 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2329 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2330 NDR_CHECK(ndr_pull_dfs_Info2(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2332 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2333 NDR_CHECK(ndr_pull_dfs_Info2(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2335 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2336 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2339 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2342 return NDR_ERR_SUCCESS
;
2345 _PUBLIC_
void ndr_print_dfs_EnumArray2(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray2
*r
)
2348 ndr_print_struct(ndr
, name
, "dfs_EnumArray2");
2350 ndr_print_uint32(ndr
, "count", r
->count
);
2351 ndr_print_ptr(ndr
, "s", r
->s
);
2354 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", r
->count
);
2356 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2358 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2359 ndr_print_dfs_Info2(ndr
, "s", &r
->s
[cntr_s_1
]);
2369 static enum ndr_err_code
ndr_push_dfs_EnumArray3(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray3
*r
)
2372 if (ndr_flags
& NDR_SCALARS
) {
2373 NDR_CHECK(ndr_push_align(ndr
, 4));
2374 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2375 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2377 if (ndr_flags
& NDR_BUFFERS
) {
2379 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2380 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2381 NDR_CHECK(ndr_push_dfs_Info3(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2383 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2384 NDR_CHECK(ndr_push_dfs_Info3(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2388 return NDR_ERR_SUCCESS
;
2391 static enum ndr_err_code
ndr_pull_dfs_EnumArray3(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray3
*r
)
2395 TALLOC_CTX
*_mem_save_s_0
;
2396 TALLOC_CTX
*_mem_save_s_1
;
2397 if (ndr_flags
& NDR_SCALARS
) {
2398 NDR_CHECK(ndr_pull_align(ndr
, 4));
2399 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2400 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2402 NDR_PULL_ALLOC(ndr
, r
->s
);
2407 if (ndr_flags
& NDR_BUFFERS
) {
2409 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2410 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2411 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2412 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2413 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2414 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2415 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2416 NDR_CHECK(ndr_pull_dfs_Info3(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2418 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2419 NDR_CHECK(ndr_pull_dfs_Info3(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2421 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2422 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2425 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2428 return NDR_ERR_SUCCESS
;
2431 _PUBLIC_
void ndr_print_dfs_EnumArray3(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray3
*r
)
2434 ndr_print_struct(ndr
, name
, "dfs_EnumArray3");
2436 ndr_print_uint32(ndr
, "count", r
->count
);
2437 ndr_print_ptr(ndr
, "s", r
->s
);
2440 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", r
->count
);
2442 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2444 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2445 ndr_print_dfs_Info3(ndr
, "s", &r
->s
[cntr_s_1
]);
2455 static enum ndr_err_code
ndr_push_dfs_EnumArray4(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray4
*r
)
2458 if (ndr_flags
& NDR_SCALARS
) {
2459 NDR_CHECK(ndr_push_align(ndr
, 4));
2460 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2461 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2463 if (ndr_flags
& NDR_BUFFERS
) {
2465 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2466 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2467 NDR_CHECK(ndr_push_dfs_Info4(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2469 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2470 NDR_CHECK(ndr_push_dfs_Info4(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2474 return NDR_ERR_SUCCESS
;
2477 static enum ndr_err_code
ndr_pull_dfs_EnumArray4(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray4
*r
)
2481 TALLOC_CTX
*_mem_save_s_0
;
2482 TALLOC_CTX
*_mem_save_s_1
;
2483 if (ndr_flags
& NDR_SCALARS
) {
2484 NDR_CHECK(ndr_pull_align(ndr
, 4));
2485 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2486 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2488 NDR_PULL_ALLOC(ndr
, r
->s
);
2493 if (ndr_flags
& NDR_BUFFERS
) {
2495 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2496 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2497 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2498 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2499 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2500 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2501 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2502 NDR_CHECK(ndr_pull_dfs_Info4(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2504 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2505 NDR_CHECK(ndr_pull_dfs_Info4(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2507 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2508 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2511 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2514 return NDR_ERR_SUCCESS
;
2517 _PUBLIC_
void ndr_print_dfs_EnumArray4(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray4
*r
)
2520 ndr_print_struct(ndr
, name
, "dfs_EnumArray4");
2522 ndr_print_uint32(ndr
, "count", r
->count
);
2523 ndr_print_ptr(ndr
, "s", r
->s
);
2526 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", r
->count
);
2528 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2530 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2531 ndr_print_dfs_Info4(ndr
, "s", &r
->s
[cntr_s_1
]);
2541 static enum ndr_err_code
ndr_push_dfs_EnumArray5(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray5
*r
)
2544 if (ndr_flags
& NDR_SCALARS
) {
2545 NDR_CHECK(ndr_push_align(ndr
, 4));
2546 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2547 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2549 if (ndr_flags
& NDR_BUFFERS
) {
2551 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2552 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2553 NDR_CHECK(ndr_push_dfs_Info5(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2555 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2556 NDR_CHECK(ndr_push_dfs_Info5(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2560 return NDR_ERR_SUCCESS
;
2563 static enum ndr_err_code
ndr_pull_dfs_EnumArray5(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray5
*r
)
2567 TALLOC_CTX
*_mem_save_s_0
;
2568 TALLOC_CTX
*_mem_save_s_1
;
2569 if (ndr_flags
& NDR_SCALARS
) {
2570 NDR_CHECK(ndr_pull_align(ndr
, 4));
2571 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2572 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2574 NDR_PULL_ALLOC(ndr
, r
->s
);
2579 if (ndr_flags
& NDR_BUFFERS
) {
2581 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2582 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2583 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2584 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2585 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2586 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2587 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2588 NDR_CHECK(ndr_pull_dfs_Info5(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2590 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2591 NDR_CHECK(ndr_pull_dfs_Info5(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2593 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2594 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2597 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2600 return NDR_ERR_SUCCESS
;
2603 _PUBLIC_
void ndr_print_dfs_EnumArray5(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray5
*r
)
2606 ndr_print_struct(ndr
, name
, "dfs_EnumArray5");
2608 ndr_print_uint32(ndr
, "count", r
->count
);
2609 ndr_print_ptr(ndr
, "s", r
->s
);
2612 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", r
->count
);
2614 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2616 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2617 ndr_print_dfs_Info5(ndr
, "s", &r
->s
[cntr_s_1
]);
2627 static enum ndr_err_code
ndr_push_dfs_EnumArray6(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray6
*r
)
2630 if (ndr_flags
& NDR_SCALARS
) {
2631 NDR_CHECK(ndr_push_align(ndr
, 4));
2632 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2633 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2635 if (ndr_flags
& NDR_BUFFERS
) {
2637 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2638 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2639 NDR_CHECK(ndr_push_dfs_Info6(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2641 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2642 NDR_CHECK(ndr_push_dfs_Info6(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2646 return NDR_ERR_SUCCESS
;
2649 static enum ndr_err_code
ndr_pull_dfs_EnumArray6(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray6
*r
)
2653 TALLOC_CTX
*_mem_save_s_0
;
2654 TALLOC_CTX
*_mem_save_s_1
;
2655 if (ndr_flags
& NDR_SCALARS
) {
2656 NDR_CHECK(ndr_pull_align(ndr
, 4));
2657 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2658 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2660 NDR_PULL_ALLOC(ndr
, r
->s
);
2665 if (ndr_flags
& NDR_BUFFERS
) {
2667 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2668 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2669 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2670 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2671 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2672 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2673 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2674 NDR_CHECK(ndr_pull_dfs_Info6(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2676 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2677 NDR_CHECK(ndr_pull_dfs_Info6(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2679 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2680 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2683 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2686 return NDR_ERR_SUCCESS
;
2689 _PUBLIC_
void ndr_print_dfs_EnumArray6(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray6
*r
)
2692 ndr_print_struct(ndr
, name
, "dfs_EnumArray6");
2694 ndr_print_uint32(ndr
, "count", r
->count
);
2695 ndr_print_ptr(ndr
, "s", r
->s
);
2698 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", r
->count
);
2700 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2702 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2703 ndr_print_dfs_Info6(ndr
, "s", &r
->s
[cntr_s_1
]);
2713 static enum ndr_err_code
ndr_push_dfs_EnumArray200(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray200
*r
)
2716 if (ndr_flags
& NDR_SCALARS
) {
2717 NDR_CHECK(ndr_push_align(ndr
, 4));
2718 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2719 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2721 if (ndr_flags
& NDR_BUFFERS
) {
2723 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2724 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2725 NDR_CHECK(ndr_push_dfs_Info200(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2727 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2728 NDR_CHECK(ndr_push_dfs_Info200(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2732 return NDR_ERR_SUCCESS
;
2735 static enum ndr_err_code
ndr_pull_dfs_EnumArray200(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray200
*r
)
2739 TALLOC_CTX
*_mem_save_s_0
;
2740 TALLOC_CTX
*_mem_save_s_1
;
2741 if (ndr_flags
& NDR_SCALARS
) {
2742 NDR_CHECK(ndr_pull_align(ndr
, 4));
2743 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2744 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2746 NDR_PULL_ALLOC(ndr
, r
->s
);
2751 if (ndr_flags
& NDR_BUFFERS
) {
2753 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2754 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2755 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2756 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2757 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2758 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2759 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2760 NDR_CHECK(ndr_pull_dfs_Info200(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2762 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2763 NDR_CHECK(ndr_pull_dfs_Info200(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2765 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2766 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2769 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2772 return NDR_ERR_SUCCESS
;
2775 _PUBLIC_
void ndr_print_dfs_EnumArray200(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray200
*r
)
2778 ndr_print_struct(ndr
, name
, "dfs_EnumArray200");
2780 ndr_print_uint32(ndr
, "count", r
->count
);
2781 ndr_print_ptr(ndr
, "s", r
->s
);
2784 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", r
->count
);
2786 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2788 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2789 ndr_print_dfs_Info200(ndr
, "s", &r
->s
[cntr_s_1
]);
2799 static enum ndr_err_code
ndr_push_dfs_EnumArray300(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumArray300
*r
)
2802 if (ndr_flags
& NDR_SCALARS
) {
2803 NDR_CHECK(ndr_push_align(ndr
, 4));
2804 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2805 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->s
));
2807 if (ndr_flags
& NDR_BUFFERS
) {
2809 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2810 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2811 NDR_CHECK(ndr_push_dfs_Info300(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2813 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2814 NDR_CHECK(ndr_push_dfs_Info300(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2818 return NDR_ERR_SUCCESS
;
2821 static enum ndr_err_code
ndr_pull_dfs_EnumArray300(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumArray300
*r
)
2825 TALLOC_CTX
*_mem_save_s_0
;
2826 TALLOC_CTX
*_mem_save_s_1
;
2827 if (ndr_flags
& NDR_SCALARS
) {
2828 NDR_CHECK(ndr_pull_align(ndr
, 4));
2829 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2830 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_s
));
2832 NDR_PULL_ALLOC(ndr
, r
->s
);
2837 if (ndr_flags
& NDR_BUFFERS
) {
2839 _mem_save_s_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2840 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2841 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->s
));
2842 NDR_PULL_ALLOC_N(ndr
, r
->s
, ndr_get_array_size(ndr
, &r
->s
));
2843 _mem_save_s_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2844 NDR_PULL_SET_MEM_CTX(ndr
, r
->s
, 0);
2845 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2846 NDR_CHECK(ndr_pull_dfs_Info300(ndr
, NDR_SCALARS
, &r
->s
[cntr_s_1
]));
2848 for (cntr_s_1
= 0; cntr_s_1
< r
->count
; cntr_s_1
++) {
2849 NDR_CHECK(ndr_pull_dfs_Info300(ndr
, NDR_BUFFERS
, &r
->s
[cntr_s_1
]));
2851 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_1
, 0);
2852 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_s_0
, 0);
2855 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->s
, r
->count
));
2858 return NDR_ERR_SUCCESS
;
2861 _PUBLIC_
void ndr_print_dfs_EnumArray300(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumArray300
*r
)
2864 ndr_print_struct(ndr
, name
, "dfs_EnumArray300");
2866 ndr_print_uint32(ndr
, "count", r
->count
);
2867 ndr_print_ptr(ndr
, "s", r
->s
);
2870 ndr
->print(ndr
, "%s: ARRAY(%d)", "s", r
->count
);
2872 for (cntr_s_1
=0;cntr_s_1
<r
->count
;cntr_s_1
++) {
2874 if (asprintf(&idx_1
, "[%d]", cntr_s_1
) != -1) {
2875 ndr_print_dfs_Info300(ndr
, "s", &r
->s
[cntr_s_1
]);
2885 static enum ndr_err_code
ndr_push_dfs_EnumInfo(struct ndr_push
*ndr
, int ndr_flags
, const union dfs_EnumInfo
*r
)
2887 if (ndr_flags
& NDR_SCALARS
) {
2888 int level
= ndr_push_get_switch_value(ndr
, r
);
2889 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
2892 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
2896 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info2
));
2900 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info3
));
2904 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info4
));
2908 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info5
));
2912 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info6
));
2916 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info200
));
2920 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info300
));
2924 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
2927 if (ndr_flags
& NDR_BUFFERS
) {
2928 int level
= ndr_push_get_switch_value(ndr
, r
);
2932 NDR_CHECK(ndr_push_dfs_EnumArray1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
2938 NDR_CHECK(ndr_push_dfs_EnumArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
2944 NDR_CHECK(ndr_push_dfs_EnumArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info3
));
2950 NDR_CHECK(ndr_push_dfs_EnumArray4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
2956 NDR_CHECK(ndr_push_dfs_EnumArray5(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info5
));
2962 NDR_CHECK(ndr_push_dfs_EnumArray6(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info6
));
2968 NDR_CHECK(ndr_push_dfs_EnumArray200(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info200
));
2974 NDR_CHECK(ndr_push_dfs_EnumArray300(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info300
));
2979 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
2982 return NDR_ERR_SUCCESS
;
2985 static enum ndr_err_code
ndr_pull_dfs_EnumInfo(struct ndr_pull
*ndr
, int ndr_flags
, union dfs_EnumInfo
*r
)
2989 TALLOC_CTX
*_mem_save_info1_0
;
2990 TALLOC_CTX
*_mem_save_info2_0
;
2991 TALLOC_CTX
*_mem_save_info3_0
;
2992 TALLOC_CTX
*_mem_save_info4_0
;
2993 TALLOC_CTX
*_mem_save_info5_0
;
2994 TALLOC_CTX
*_mem_save_info6_0
;
2995 TALLOC_CTX
*_mem_save_info200_0
;
2996 TALLOC_CTX
*_mem_save_info300_0
;
2997 level
= ndr_pull_get_switch_value(ndr
, r
);
2998 if (ndr_flags
& NDR_SCALARS
) {
2999 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
3000 if (_level
!= level
) {
3001 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
3005 uint32_t _ptr_info1
;
3006 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
3008 NDR_PULL_ALLOC(ndr
, r
->info1
);
3015 uint32_t _ptr_info2
;
3016 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info2
));
3018 NDR_PULL_ALLOC(ndr
, r
->info2
);
3025 uint32_t _ptr_info3
;
3026 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info3
));
3028 NDR_PULL_ALLOC(ndr
, r
->info3
);
3035 uint32_t _ptr_info4
;
3036 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info4
));
3038 NDR_PULL_ALLOC(ndr
, r
->info4
);
3045 uint32_t _ptr_info5
;
3046 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info5
));
3048 NDR_PULL_ALLOC(ndr
, r
->info5
);
3055 uint32_t _ptr_info6
;
3056 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info6
));
3058 NDR_PULL_ALLOC(ndr
, r
->info6
);
3065 uint32_t _ptr_info200
;
3066 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info200
));
3068 NDR_PULL_ALLOC(ndr
, r
->info200
);
3075 uint32_t _ptr_info300
;
3076 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info300
));
3078 NDR_PULL_ALLOC(ndr
, r
->info300
);
3085 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3088 if (ndr_flags
& NDR_BUFFERS
) {
3092 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3093 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
3094 NDR_CHECK(ndr_pull_dfs_EnumArray1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
3095 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
3101 _mem_save_info2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3102 NDR_PULL_SET_MEM_CTX(ndr
, r
->info2
, 0);
3103 NDR_CHECK(ndr_pull_dfs_EnumArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
3104 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info2_0
, 0);
3110 _mem_save_info3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3111 NDR_PULL_SET_MEM_CTX(ndr
, r
->info3
, 0);
3112 NDR_CHECK(ndr_pull_dfs_EnumArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info3
));
3113 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info3_0
, 0);
3119 _mem_save_info4_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3120 NDR_PULL_SET_MEM_CTX(ndr
, r
->info4
, 0);
3121 NDR_CHECK(ndr_pull_dfs_EnumArray4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
3122 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info4_0
, 0);
3128 _mem_save_info5_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3129 NDR_PULL_SET_MEM_CTX(ndr
, r
->info5
, 0);
3130 NDR_CHECK(ndr_pull_dfs_EnumArray5(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info5
));
3131 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info5_0
, 0);
3137 _mem_save_info6_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3138 NDR_PULL_SET_MEM_CTX(ndr
, r
->info6
, 0);
3139 NDR_CHECK(ndr_pull_dfs_EnumArray6(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info6
));
3140 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info6_0
, 0);
3146 _mem_save_info200_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3147 NDR_PULL_SET_MEM_CTX(ndr
, r
->info200
, 0);
3148 NDR_CHECK(ndr_pull_dfs_EnumArray200(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info200
));
3149 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info200_0
, 0);
3155 _mem_save_info300_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3156 NDR_PULL_SET_MEM_CTX(ndr
, r
->info300
, 0);
3157 NDR_CHECK(ndr_pull_dfs_EnumArray300(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info300
));
3158 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info300_0
, 0);
3163 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3166 return NDR_ERR_SUCCESS
;
3169 _PUBLIC_
void ndr_print_dfs_EnumInfo(struct ndr_print
*ndr
, const char *name
, const union dfs_EnumInfo
*r
)
3172 level
= ndr_print_get_switch_value(ndr
, r
);
3173 ndr_print_union(ndr
, name
, level
, "dfs_EnumInfo");
3176 ndr_print_ptr(ndr
, "info1", r
->info1
);
3179 ndr_print_dfs_EnumArray1(ndr
, "info1", r
->info1
);
3185 ndr_print_ptr(ndr
, "info2", r
->info2
);
3188 ndr_print_dfs_EnumArray2(ndr
, "info2", r
->info2
);
3194 ndr_print_ptr(ndr
, "info3", r
->info3
);
3197 ndr_print_dfs_EnumArray3(ndr
, "info3", r
->info3
);
3203 ndr_print_ptr(ndr
, "info4", r
->info4
);
3206 ndr_print_dfs_EnumArray4(ndr
, "info4", r
->info4
);
3212 ndr_print_ptr(ndr
, "info5", r
->info5
);
3215 ndr_print_dfs_EnumArray5(ndr
, "info5", r
->info5
);
3221 ndr_print_ptr(ndr
, "info6", r
->info6
);
3224 ndr_print_dfs_EnumArray6(ndr
, "info6", r
->info6
);
3230 ndr_print_ptr(ndr
, "info200", r
->info200
);
3233 ndr_print_dfs_EnumArray200(ndr
, "info200", r
->info200
);
3239 ndr_print_ptr(ndr
, "info300", r
->info300
);
3242 ndr_print_dfs_EnumArray300(ndr
, "info300", r
->info300
);
3248 ndr_print_bad_level(ndr
, name
, level
);
3252 static enum ndr_err_code
ndr_push_dfs_EnumStruct(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_EnumStruct
*r
)
3254 if (ndr_flags
& NDR_SCALARS
) {
3255 NDR_CHECK(ndr_push_align(ndr
, 4));
3256 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->level
));
3257 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->e
, r
->level
));
3258 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr
, NDR_SCALARS
, &r
->e
));
3260 if (ndr_flags
& NDR_BUFFERS
) {
3261 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr
, NDR_BUFFERS
, &r
->e
));
3263 return NDR_ERR_SUCCESS
;
3266 static enum ndr_err_code
ndr_pull_dfs_EnumStruct(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_EnumStruct
*r
)
3268 if (ndr_flags
& NDR_SCALARS
) {
3269 NDR_CHECK(ndr_pull_align(ndr
, 4));
3270 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->level
));
3271 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->e
, r
->level
));
3272 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr
, NDR_SCALARS
, &r
->e
));
3274 if (ndr_flags
& NDR_BUFFERS
) {
3275 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr
, NDR_BUFFERS
, &r
->e
));
3277 return NDR_ERR_SUCCESS
;
3280 _PUBLIC_
void ndr_print_dfs_EnumStruct(struct ndr_print
*ndr
, const char *name
, const struct dfs_EnumStruct
*r
)
3282 ndr_print_struct(ndr
, name
, "dfs_EnumStruct");
3284 ndr_print_uint32(ndr
, "level", r
->level
);
3285 ndr_print_set_switch_value(ndr
, &r
->e
, r
->level
);
3286 ndr_print_dfs_EnumInfo(ndr
, "e", &r
->e
);
3290 static enum ndr_err_code
ndr_push_dfs_UnknownStruct(struct ndr_push
*ndr
, int ndr_flags
, const struct dfs_UnknownStruct
*r
)
3292 if (ndr_flags
& NDR_SCALARS
) {
3293 NDR_CHECK(ndr_push_align(ndr
, 4));
3294 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown1
));
3295 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->unknown2
));
3297 if (ndr_flags
& NDR_BUFFERS
) {
3299 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->unknown2
, CH_UTF16
)));
3300 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3301 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->unknown2
, CH_UTF16
)));
3302 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->unknown2
, ndr_charset_length(r
->unknown2
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3305 return NDR_ERR_SUCCESS
;
3308 static enum ndr_err_code
ndr_pull_dfs_UnknownStruct(struct ndr_pull
*ndr
, int ndr_flags
, struct dfs_UnknownStruct
*r
)
3310 uint32_t _ptr_unknown2
;
3311 TALLOC_CTX
*_mem_save_unknown2_0
;
3312 if (ndr_flags
& NDR_SCALARS
) {
3313 NDR_CHECK(ndr_pull_align(ndr
, 4));
3314 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
3315 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown2
));
3316 if (_ptr_unknown2
) {
3317 NDR_PULL_ALLOC(ndr
, r
->unknown2
);
3322 if (ndr_flags
& NDR_BUFFERS
) {
3324 _mem_save_unknown2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3325 NDR_PULL_SET_MEM_CTX(ndr
, r
->unknown2
, 0);
3326 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->unknown2
));
3327 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->unknown2
));
3328 if (ndr_get_array_length(ndr
, &r
->unknown2
) > ndr_get_array_size(ndr
, &r
->unknown2
)) {
3329 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
));
3331 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->unknown2
), sizeof(uint16_t)));
3332 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->unknown2
, ndr_get_array_length(ndr
, &r
->unknown2
), sizeof(uint16_t), CH_UTF16
));
3333 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown2_0
, 0);
3336 return NDR_ERR_SUCCESS
;
3339 _PUBLIC_
void ndr_print_dfs_UnknownStruct(struct ndr_print
*ndr
, const char *name
, const struct dfs_UnknownStruct
*r
)
3341 ndr_print_struct(ndr
, name
, "dfs_UnknownStruct");
3343 ndr_print_uint32(ndr
, "unknown1", r
->unknown1
);
3344 ndr_print_ptr(ndr
, "unknown2", r
->unknown2
);
3347 ndr_print_string(ndr
, "unknown2", r
->unknown2
);
3353 _PUBLIC_
enum ndr_err_code
ndr_push_dfs_GetManagerVersion(struct ndr_push
*ndr
, int flags
, const struct dfs_GetManagerVersion
*r
)
3355 if (flags
& NDR_IN
) {
3357 if (flags
& NDR_OUT
) {
3358 if (r
->out
.version
== NULL
) {
3359 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3361 NDR_CHECK(ndr_push_dfs_ManagerVersion(ndr
, NDR_SCALARS
, *r
->out
.version
));
3363 return NDR_ERR_SUCCESS
;
3366 _PUBLIC_
enum ndr_err_code
ndr_pull_dfs_GetManagerVersion(struct ndr_pull
*ndr
, int flags
, struct dfs_GetManagerVersion
*r
)
3368 TALLOC_CTX
*_mem_save_version_0
;
3369 if (flags
& NDR_IN
) {
3370 ZERO_STRUCT(r
->out
);
3372 NDR_PULL_ALLOC(ndr
, r
->out
.version
);
3373 ZERO_STRUCTP(r
->out
.version
);
3375 if (flags
& NDR_OUT
) {
3376 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3377 NDR_PULL_ALLOC(ndr
, r
->out
.version
);
3379 _mem_save_version_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3380 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.version
, LIBNDR_FLAG_REF_ALLOC
);
3381 NDR_CHECK(ndr_pull_dfs_ManagerVersion(ndr
, NDR_SCALARS
, r
->out
.version
));
3382 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_version_0
, LIBNDR_FLAG_REF_ALLOC
);
3384 return NDR_ERR_SUCCESS
;
3387 _PUBLIC_
void ndr_print_dfs_GetManagerVersion(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_GetManagerVersion
*r
)
3389 ndr_print_struct(ndr
, name
, "dfs_GetManagerVersion");
3391 if (flags
& NDR_SET_VALUES
) {
3392 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3394 if (flags
& NDR_IN
) {
3395 ndr_print_struct(ndr
, "in", "dfs_GetManagerVersion");
3399 if (flags
& NDR_OUT
) {
3400 ndr_print_struct(ndr
, "out", "dfs_GetManagerVersion");
3402 ndr_print_ptr(ndr
, "version", r
->out
.version
);
3404 ndr_print_dfs_ManagerVersion(ndr
, "version", *r
->out
.version
);
3411 static enum ndr_err_code
ndr_push_dfs_Add(struct ndr_push
*ndr
, int flags
, const struct dfs_Add
*r
)
3413 if (flags
& NDR_IN
) {
3414 if (r
->in
.path
== 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
.path
, 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
.path
, CH_UTF16
)));
3420 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.path
, ndr_charset_length(r
->in
.path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3421 if (r
->in
.server
== NULL
) {
3422 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3424 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
3425 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3426 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
3427 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3428 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.share
));
3430 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.share
, 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
.share
, CH_UTF16
)));
3433 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.share
, ndr_charset_length(r
->in
.share
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3435 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.comment
));
3436 if (r
->in
.comment
) {
3437 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
3438 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3439 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
3440 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.comment
, ndr_charset_length(r
->in
.comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3442 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
3444 if (flags
& NDR_OUT
) {
3445 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3447 return NDR_ERR_SUCCESS
;
3450 static enum ndr_err_code
ndr_pull_dfs_Add(struct ndr_pull
*ndr
, int flags
, struct dfs_Add
*r
)
3452 uint32_t _ptr_share
;
3453 uint32_t _ptr_comment
;
3454 TALLOC_CTX
*_mem_save_share_0
;
3455 TALLOC_CTX
*_mem_save_comment_0
;
3456 if (flags
& NDR_IN
) {
3457 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.path
));
3458 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.path
));
3459 if (ndr_get_array_length(ndr
, &r
->in
.path
) > ndr_get_array_size(ndr
, &r
->in
.path
)) {
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
.path
), ndr_get_array_length(ndr
, &r
->in
.path
));
3462 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.path
), sizeof(uint16_t)));
3463 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.path
, ndr_get_array_length(ndr
, &r
->in
.path
), sizeof(uint16_t), CH_UTF16
));
3464 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
3465 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
3466 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
3467 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
));
3469 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
3470 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
3471 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_share
));
3473 NDR_PULL_ALLOC(ndr
, r
->in
.share
);
3478 _mem_save_share_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3479 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.share
, 0);
3480 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.share
));
3481 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.share
));
3482 if (ndr_get_array_length(ndr
, &r
->in
.share
) > ndr_get_array_size(ndr
, &r
->in
.share
)) {
3483 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
));
3485 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.share
), sizeof(uint16_t)));
3486 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.share
, ndr_get_array_length(ndr
, &r
->in
.share
), sizeof(uint16_t), CH_UTF16
));
3487 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_share_0
, 0);
3489 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
3491 NDR_PULL_ALLOC(ndr
, r
->in
.comment
);
3493 r
->in
.comment
= NULL
;
3495 if (r
->in
.comment
) {
3496 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3497 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.comment
, 0);
3498 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.comment
));
3499 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.comment
));
3500 if (ndr_get_array_length(ndr
, &r
->in
.comment
) > ndr_get_array_size(ndr
, &r
->in
.comment
)) {
3501 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
));
3503 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t)));
3504 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.comment
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t), CH_UTF16
));
3505 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
3507 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
3509 if (flags
& NDR_OUT
) {
3510 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3512 return NDR_ERR_SUCCESS
;
3515 _PUBLIC_
void ndr_print_dfs_Add(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Add
*r
)
3517 ndr_print_struct(ndr
, name
, "dfs_Add");
3519 if (flags
& NDR_SET_VALUES
) {
3520 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3522 if (flags
& NDR_IN
) {
3523 ndr_print_struct(ndr
, "in", "dfs_Add");
3525 ndr_print_ptr(ndr
, "path", r
->in
.path
);
3527 ndr_print_string(ndr
, "path", r
->in
.path
);
3529 ndr_print_ptr(ndr
, "server", r
->in
.server
);
3531 ndr_print_string(ndr
, "server", r
->in
.server
);
3533 ndr_print_ptr(ndr
, "share", r
->in
.share
);
3536 ndr_print_string(ndr
, "share", r
->in
.share
);
3539 ndr_print_ptr(ndr
, "comment", r
->in
.comment
);
3541 if (r
->in
.comment
) {
3542 ndr_print_string(ndr
, "comment", r
->in
.comment
);
3545 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
3548 if (flags
& NDR_OUT
) {
3549 ndr_print_struct(ndr
, "out", "dfs_Add");
3551 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3557 static enum ndr_err_code
ndr_push_dfs_Remove(struct ndr_push
*ndr
, int flags
, const struct dfs_Remove
*r
)
3559 if (flags
& NDR_IN
) {
3560 if (r
->in
.dfs_entry_path
== NULL
) {
3561 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3563 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
)));
3564 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3565 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
)));
3566 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
));
3567 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
3568 if (r
->in
.servername
) {
3569 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, 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
.servername
, CH_UTF16
)));
3572 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3574 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.sharename
));
3575 if (r
->in
.sharename
) {
3576 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
)));
3577 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3578 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
)));
3579 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.sharename
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3582 if (flags
& NDR_OUT
) {
3583 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3585 return NDR_ERR_SUCCESS
;
3588 static enum ndr_err_code
ndr_pull_dfs_Remove(struct ndr_pull
*ndr
, int flags
, struct dfs_Remove
*r
)
3590 uint32_t _ptr_servername
;
3591 uint32_t _ptr_sharename
;
3592 TALLOC_CTX
*_mem_save_servername_0
;
3593 TALLOC_CTX
*_mem_save_sharename_0
;
3594 if (flags
& NDR_IN
) {
3595 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfs_entry_path
));
3596 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfs_entry_path
));
3597 if (ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
) > ndr_get_array_size(ndr
, &r
->in
.dfs_entry_path
)) {
3598 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
));
3600 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
), sizeof(uint16_t)));
3601 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
));
3602 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
3603 if (_ptr_servername
) {
3604 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
3606 r
->in
.servername
= NULL
;
3608 if (r
->in
.servername
) {
3609 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3610 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
3611 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
3612 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
3613 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
3614 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
));
3616 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
3617 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
3618 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
3620 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sharename
));
3621 if (_ptr_sharename
) {
3622 NDR_PULL_ALLOC(ndr
, r
->in
.sharename
);
3624 r
->in
.sharename
= NULL
;
3626 if (r
->in
.sharename
) {
3627 _mem_save_sharename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3628 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sharename
, 0);
3629 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.sharename
));
3630 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.sharename
));
3631 if (ndr_get_array_length(ndr
, &r
->in
.sharename
) > ndr_get_array_size(ndr
, &r
->in
.sharename
)) {
3632 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
));
3634 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.sharename
), sizeof(uint16_t)));
3635 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.sharename
, ndr_get_array_length(ndr
, &r
->in
.sharename
), sizeof(uint16_t), CH_UTF16
));
3636 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sharename_0
, 0);
3639 if (flags
& NDR_OUT
) {
3640 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3642 return NDR_ERR_SUCCESS
;
3645 _PUBLIC_
void ndr_print_dfs_Remove(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Remove
*r
)
3647 ndr_print_struct(ndr
, name
, "dfs_Remove");
3649 if (flags
& NDR_SET_VALUES
) {
3650 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3652 if (flags
& NDR_IN
) {
3653 ndr_print_struct(ndr
, "in", "dfs_Remove");
3655 ndr_print_ptr(ndr
, "dfs_entry_path", r
->in
.dfs_entry_path
);
3657 ndr_print_string(ndr
, "dfs_entry_path", r
->in
.dfs_entry_path
);
3659 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
3661 if (r
->in
.servername
) {
3662 ndr_print_string(ndr
, "servername", r
->in
.servername
);
3665 ndr_print_ptr(ndr
, "sharename", r
->in
.sharename
);
3667 if (r
->in
.sharename
) {
3668 ndr_print_string(ndr
, "sharename", r
->in
.sharename
);
3673 if (flags
& NDR_OUT
) {
3674 ndr_print_struct(ndr
, "out", "dfs_Remove");
3676 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3682 static enum ndr_err_code
ndr_push_dfs_SetInfo(struct ndr_push
*ndr
, int flags
, const struct dfs_SetInfo
*r
)
3684 if (flags
& NDR_IN
) {
3685 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
)));
3686 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3687 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
)));
3688 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
));
3689 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
3690 if (r
->in
.servername
) {
3691 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, 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
.servername
, CH_UTF16
)));
3694 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3696 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.sharename
));
3697 if (r
->in
.sharename
) {
3698 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
)));
3699 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3700 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
)));
3701 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.sharename
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3703 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
3704 if (r
->in
.info
== NULL
) {
3705 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3707 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
3708 NDR_CHECK(ndr_push_dfs_Info(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
3710 if (flags
& NDR_OUT
) {
3711 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3713 return NDR_ERR_SUCCESS
;
3716 static enum ndr_err_code
ndr_pull_dfs_SetInfo(struct ndr_pull
*ndr
, int flags
, struct dfs_SetInfo
*r
)
3718 uint32_t _ptr_servername
;
3719 uint32_t _ptr_sharename
;
3720 TALLOC_CTX
*_mem_save_servername_0
;
3721 TALLOC_CTX
*_mem_save_sharename_0
;
3722 TALLOC_CTX
*_mem_save_info_0
;
3723 if (flags
& NDR_IN
) {
3724 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfs_entry_path
));
3725 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfs_entry_path
));
3726 if (ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
) > ndr_get_array_size(ndr
, &r
->in
.dfs_entry_path
)) {
3727 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
));
3729 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
), sizeof(uint16_t)));
3730 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
));
3731 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
3732 if (_ptr_servername
) {
3733 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
3735 r
->in
.servername
= NULL
;
3737 if (r
->in
.servername
) {
3738 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3739 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
3740 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
3741 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
3742 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
3743 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
));
3745 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
3746 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
3747 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
3749 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sharename
));
3750 if (_ptr_sharename
) {
3751 NDR_PULL_ALLOC(ndr
, r
->in
.sharename
);
3753 r
->in
.sharename
= NULL
;
3755 if (r
->in
.sharename
) {
3756 _mem_save_sharename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3757 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sharename
, 0);
3758 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.sharename
));
3759 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.sharename
));
3760 if (ndr_get_array_length(ndr
, &r
->in
.sharename
) > ndr_get_array_size(ndr
, &r
->in
.sharename
)) {
3761 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.sharename
), ndr_get_array_length(ndr
, &r
->in
.sharename
));
3763 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.sharename
), sizeof(uint16_t)));
3764 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.sharename
, ndr_get_array_length(ndr
, &r
->in
.sharename
), sizeof(uint16_t), CH_UTF16
));
3765 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sharename_0
, 0);
3767 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
3768 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3769 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
3771 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3772 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
3773 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
3774 NDR_CHECK(ndr_pull_dfs_Info(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
3775 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
3777 if (flags
& NDR_OUT
) {
3778 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3780 return NDR_ERR_SUCCESS
;
3783 _PUBLIC_
void ndr_print_dfs_SetInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_SetInfo
*r
)
3785 ndr_print_struct(ndr
, name
, "dfs_SetInfo");
3787 if (flags
& NDR_SET_VALUES
) {
3788 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3790 if (flags
& NDR_IN
) {
3791 ndr_print_struct(ndr
, "in", "dfs_SetInfo");
3793 ndr_print_string(ndr
, "dfs_entry_path", r
->in
.dfs_entry_path
);
3794 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
3796 if (r
->in
.servername
) {
3797 ndr_print_string(ndr
, "servername", r
->in
.servername
);
3800 ndr_print_ptr(ndr
, "sharename", r
->in
.sharename
);
3802 if (r
->in
.sharename
) {
3803 ndr_print_string(ndr
, "sharename", r
->in
.sharename
);
3806 ndr_print_uint32(ndr
, "level", r
->in
.level
);
3807 ndr_print_ptr(ndr
, "info", r
->in
.info
);
3809 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
3810 ndr_print_dfs_Info(ndr
, "info", r
->in
.info
);
3814 if (flags
& NDR_OUT
) {
3815 ndr_print_struct(ndr
, "out", "dfs_SetInfo");
3817 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3823 static enum ndr_err_code
ndr_push_dfs_GetInfo(struct ndr_push
*ndr
, int flags
, const struct dfs_GetInfo
*r
)
3825 if (flags
& NDR_IN
) {
3826 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
)));
3827 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3828 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_entry_path
, CH_UTF16
)));
3829 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
));
3830 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
3831 if (r
->in
.servername
) {
3832 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, 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
.servername
, CH_UTF16
)));
3835 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3837 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.sharename
));
3838 if (r
->in
.sharename
) {
3839 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
)));
3840 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3841 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
)));
3842 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.sharename
, ndr_charset_length(r
->in
.sharename
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3844 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
3846 if (flags
& NDR_OUT
) {
3847 if (r
->out
.info
== NULL
) {
3848 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3850 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
3851 NDR_CHECK(ndr_push_dfs_Info(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
3852 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3854 return NDR_ERR_SUCCESS
;
3857 static enum ndr_err_code
ndr_pull_dfs_GetInfo(struct ndr_pull
*ndr
, int flags
, struct dfs_GetInfo
*r
)
3859 uint32_t _ptr_servername
;
3860 uint32_t _ptr_sharename
;
3861 TALLOC_CTX
*_mem_save_servername_0
;
3862 TALLOC_CTX
*_mem_save_sharename_0
;
3863 TALLOC_CTX
*_mem_save_info_0
;
3864 if (flags
& NDR_IN
) {
3865 ZERO_STRUCT(r
->out
);
3867 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfs_entry_path
));
3868 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfs_entry_path
));
3869 if (ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
) > ndr_get_array_size(ndr
, &r
->in
.dfs_entry_path
)) {
3870 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
));
3872 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfs_entry_path
), sizeof(uint16_t)));
3873 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
));
3874 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
3875 if (_ptr_servername
) {
3876 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
3878 r
->in
.servername
= NULL
;
3880 if (r
->in
.servername
) {
3881 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3882 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
3883 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
3884 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
3885 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
3886 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
));
3888 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
3889 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
3890 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
3892 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sharename
));
3893 if (_ptr_sharename
) {
3894 NDR_PULL_ALLOC(ndr
, r
->in
.sharename
);
3896 r
->in
.sharename
= NULL
;
3898 if (r
->in
.sharename
) {
3899 _mem_save_sharename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3900 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sharename
, 0);
3901 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.sharename
));
3902 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.sharename
));
3903 if (ndr_get_array_length(ndr
, &r
->in
.sharename
) > ndr_get_array_size(ndr
, &r
->in
.sharename
)) {
3904 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.sharename
), ndr_get_array_length(ndr
, &r
->in
.sharename
));
3906 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.sharename
), sizeof(uint16_t)));
3907 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.sharename
, ndr_get_array_length(ndr
, &r
->in
.sharename
), sizeof(uint16_t), CH_UTF16
));
3908 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sharename_0
, 0);
3910 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
3911 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
3912 ZERO_STRUCTP(r
->out
.info
);
3914 if (flags
& NDR_OUT
) {
3915 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3916 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
3918 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3919 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
3920 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
));
3921 NDR_CHECK(ndr_pull_dfs_Info(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
3922 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
3923 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3925 return NDR_ERR_SUCCESS
;
3928 _PUBLIC_
void ndr_print_dfs_GetInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_GetInfo
*r
)
3930 ndr_print_struct(ndr
, name
, "dfs_GetInfo");
3932 if (flags
& NDR_SET_VALUES
) {
3933 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3935 if (flags
& NDR_IN
) {
3936 ndr_print_struct(ndr
, "in", "dfs_GetInfo");
3938 ndr_print_string(ndr
, "dfs_entry_path", r
->in
.dfs_entry_path
);
3939 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
3941 if (r
->in
.servername
) {
3942 ndr_print_string(ndr
, "servername", r
->in
.servername
);
3945 ndr_print_ptr(ndr
, "sharename", r
->in
.sharename
);
3947 if (r
->in
.sharename
) {
3948 ndr_print_string(ndr
, "sharename", r
->in
.sharename
);
3951 ndr_print_uint32(ndr
, "level", r
->in
.level
);
3954 if (flags
& NDR_OUT
) {
3955 ndr_print_struct(ndr
, "out", "dfs_GetInfo");
3957 ndr_print_ptr(ndr
, "info", r
->out
.info
);
3959 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
3960 ndr_print_dfs_Info(ndr
, "info", r
->out
.info
);
3962 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3968 static enum ndr_err_code
ndr_push_dfs_Enum(struct ndr_push
*ndr
, int flags
, const struct dfs_Enum
*r
)
3970 if (flags
& NDR_IN
) {
3971 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
3972 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.bufsize
));
3973 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.info
));
3975 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
3977 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.total
));
3979 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.total
));
3982 if (flags
& NDR_OUT
) {
3983 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
3985 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
3987 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.total
));
3989 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.total
));
3991 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3993 return NDR_ERR_SUCCESS
;
3996 static enum ndr_err_code
ndr_pull_dfs_Enum(struct ndr_pull
*ndr
, int flags
, struct dfs_Enum
*r
)
3999 uint32_t _ptr_total
;
4000 TALLOC_CTX
*_mem_save_info_0
;
4001 TALLOC_CTX
*_mem_save_total_0
;
4002 if (flags
& NDR_IN
) {
4003 ZERO_STRUCT(r
->out
);
4005 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
4006 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.bufsize
));
4007 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
4009 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
4014 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4015 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, 0);
4016 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
4017 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
4019 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_total
));
4021 NDR_PULL_ALLOC(ndr
, r
->in
.total
);
4026 _mem_save_total_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4027 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.total
, 0);
4028 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.total
));
4029 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_0
, 0);
4032 if (flags
& NDR_OUT
) {
4033 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
4035 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
4040 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4041 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
4042 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
4043 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
4045 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_total
));
4047 NDR_PULL_ALLOC(ndr
, r
->out
.total
);
4049 r
->out
.total
= NULL
;
4052 _mem_save_total_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4053 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.total
, 0);
4054 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.total
));
4055 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_0
, 0);
4057 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4059 return NDR_ERR_SUCCESS
;
4062 _PUBLIC_
void ndr_print_dfs_Enum(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Enum
*r
)
4064 ndr_print_struct(ndr
, name
, "dfs_Enum");
4066 if (flags
& NDR_SET_VALUES
) {
4067 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4069 if (flags
& NDR_IN
) {
4070 ndr_print_struct(ndr
, "in", "dfs_Enum");
4072 ndr_print_uint32(ndr
, "level", r
->in
.level
);
4073 ndr_print_uint32(ndr
, "bufsize", r
->in
.bufsize
);
4074 ndr_print_ptr(ndr
, "info", r
->in
.info
);
4077 ndr_print_dfs_EnumStruct(ndr
, "info", r
->in
.info
);
4080 ndr_print_ptr(ndr
, "total", r
->in
.total
);
4083 ndr_print_uint32(ndr
, "total", *r
->in
.total
);
4088 if (flags
& NDR_OUT
) {
4089 ndr_print_struct(ndr
, "out", "dfs_Enum");
4091 ndr_print_ptr(ndr
, "info", r
->out
.info
);
4094 ndr_print_dfs_EnumStruct(ndr
, "info", r
->out
.info
);
4097 ndr_print_ptr(ndr
, "total", r
->out
.total
);
4100 ndr_print_uint32(ndr
, "total", *r
->out
.total
);
4103 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4109 static enum ndr_err_code
ndr_push_dfs_Rename(struct ndr_push
*ndr
, int flags
, const struct dfs_Rename
*r
)
4111 if (flags
& NDR_IN
) {
4113 if (flags
& NDR_OUT
) {
4114 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4116 return NDR_ERR_SUCCESS
;
4119 static enum ndr_err_code
ndr_pull_dfs_Rename(struct ndr_pull
*ndr
, int flags
, struct dfs_Rename
*r
)
4121 if (flags
& NDR_IN
) {
4123 if (flags
& NDR_OUT
) {
4124 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4126 return NDR_ERR_SUCCESS
;
4129 _PUBLIC_
void ndr_print_dfs_Rename(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Rename
*r
)
4131 ndr_print_struct(ndr
, name
, "dfs_Rename");
4133 if (flags
& NDR_SET_VALUES
) {
4134 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4136 if (flags
& NDR_IN
) {
4137 ndr_print_struct(ndr
, "in", "dfs_Rename");
4141 if (flags
& NDR_OUT
) {
4142 ndr_print_struct(ndr
, "out", "dfs_Rename");
4144 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4150 static enum ndr_err_code
ndr_push_dfs_Move(struct ndr_push
*ndr
, int flags
, const struct dfs_Move
*r
)
4152 if (flags
& NDR_IN
) {
4154 if (flags
& NDR_OUT
) {
4155 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4157 return NDR_ERR_SUCCESS
;
4160 static enum ndr_err_code
ndr_pull_dfs_Move(struct ndr_pull
*ndr
, int flags
, struct dfs_Move
*r
)
4162 if (flags
& NDR_IN
) {
4164 if (flags
& NDR_OUT
) {
4165 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4167 return NDR_ERR_SUCCESS
;
4170 _PUBLIC_
void ndr_print_dfs_Move(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Move
*r
)
4172 ndr_print_struct(ndr
, name
, "dfs_Move");
4174 if (flags
& NDR_SET_VALUES
) {
4175 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4177 if (flags
& NDR_IN
) {
4178 ndr_print_struct(ndr
, "in", "dfs_Move");
4182 if (flags
& NDR_OUT
) {
4183 ndr_print_struct(ndr
, "out", "dfs_Move");
4185 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4191 static enum ndr_err_code
ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push
*ndr
, int flags
, const struct dfs_ManagerGetConfigInfo
*r
)
4193 if (flags
& NDR_IN
) {
4195 if (flags
& NDR_OUT
) {
4196 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4198 return NDR_ERR_SUCCESS
;
4201 static enum ndr_err_code
ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull
*ndr
, int flags
, struct dfs_ManagerGetConfigInfo
*r
)
4203 if (flags
& NDR_IN
) {
4205 if (flags
& NDR_OUT
) {
4206 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4208 return NDR_ERR_SUCCESS
;
4211 _PUBLIC_
void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_ManagerGetConfigInfo
*r
)
4213 ndr_print_struct(ndr
, name
, "dfs_ManagerGetConfigInfo");
4215 if (flags
& NDR_SET_VALUES
) {
4216 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4218 if (flags
& NDR_IN
) {
4219 ndr_print_struct(ndr
, "in", "dfs_ManagerGetConfigInfo");
4223 if (flags
& NDR_OUT
) {
4224 ndr_print_struct(ndr
, "out", "dfs_ManagerGetConfigInfo");
4226 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4232 static enum ndr_err_code
ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push
*ndr
, int flags
, const struct dfs_ManagerSendSiteInfo
*r
)
4234 if (flags
& NDR_IN
) {
4236 if (flags
& NDR_OUT
) {
4237 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4239 return NDR_ERR_SUCCESS
;
4242 static enum ndr_err_code
ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull
*ndr
, int flags
, struct dfs_ManagerSendSiteInfo
*r
)
4244 if (flags
& NDR_IN
) {
4246 if (flags
& NDR_OUT
) {
4247 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4249 return NDR_ERR_SUCCESS
;
4252 _PUBLIC_
void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_ManagerSendSiteInfo
*r
)
4254 ndr_print_struct(ndr
, name
, "dfs_ManagerSendSiteInfo");
4256 if (flags
& NDR_SET_VALUES
) {
4257 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4259 if (flags
& NDR_IN
) {
4260 ndr_print_struct(ndr
, "in", "dfs_ManagerSendSiteInfo");
4264 if (flags
& NDR_OUT
) {
4265 ndr_print_struct(ndr
, "out", "dfs_ManagerSendSiteInfo");
4267 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4273 static enum ndr_err_code
ndr_push_dfs_AddFtRoot(struct ndr_push
*ndr
, int flags
, const struct dfs_AddFtRoot
*r
)
4275 if (flags
& NDR_IN
) {
4276 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4277 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4278 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4279 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4280 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dns_servername
, CH_UTF16
)));
4281 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4282 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dns_servername
, CH_UTF16
)));
4283 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
));
4284 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfsname
, CH_UTF16
)));
4285 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4286 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfsname
, CH_UTF16
)));
4287 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.dfsname
, ndr_charset_length(r
->in
.dfsname
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4288 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4289 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4290 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4291 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.rootshare
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4292 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
4293 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4294 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
4295 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.comment
, ndr_charset_length(r
->in
.comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4296 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_config_dn
, CH_UTF16
)));
4297 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4298 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_config_dn
, CH_UTF16
)));
4299 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
));
4300 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.unknown1
));
4301 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
4302 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.unknown2
));
4303 if (r
->in
.unknown2
) {
4304 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.unknown2
));
4305 if (*r
->in
.unknown2
) {
4306 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.unknown2
));
4310 if (flags
& NDR_OUT
) {
4311 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.unknown2
));
4312 if (r
->out
.unknown2
) {
4313 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.unknown2
));
4314 if (*r
->out
.unknown2
) {
4315 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.unknown2
));
4318 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4320 return NDR_ERR_SUCCESS
;
4323 static enum ndr_err_code
ndr_pull_dfs_AddFtRoot(struct ndr_pull
*ndr
, int flags
, struct dfs_AddFtRoot
*r
)
4325 uint32_t _ptr_unknown2
;
4326 TALLOC_CTX
*_mem_save_unknown2_0
;
4327 TALLOC_CTX
*_mem_save_unknown2_1
;
4328 if (flags
& NDR_IN
) {
4329 ZERO_STRUCT(r
->out
);
4331 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
4332 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
4333 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.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
.servername
), ndr_get_array_length(ndr
, &r
->in
.servername
));
4336 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
4337 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
4338 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dns_servername
));
4339 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dns_servername
));
4340 if (ndr_get_array_length(ndr
, &r
->in
.dns_servername
) > ndr_get_array_size(ndr
, &r
->in
.dns_servername
)) {
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
.dns_servername
), ndr_get_array_length(ndr
, &r
->in
.dns_servername
));
4343 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dns_servername
), sizeof(uint16_t)));
4344 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
));
4345 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfsname
));
4346 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfsname
));
4347 if (ndr_get_array_length(ndr
, &r
->in
.dfsname
) > ndr_get_array_size(ndr
, &r
->in
.dfsname
)) {
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
.dfsname
), ndr_get_array_length(ndr
, &r
->in
.dfsname
));
4350 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfsname
), sizeof(uint16_t)));
4351 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.dfsname
, ndr_get_array_length(ndr
, &r
->in
.dfsname
), sizeof(uint16_t), CH_UTF16
));
4352 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rootshare
));
4353 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rootshare
));
4354 if (ndr_get_array_length(ndr
, &r
->in
.rootshare
) > ndr_get_array_size(ndr
, &r
->in
.rootshare
)) {
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
.rootshare
), ndr_get_array_length(ndr
, &r
->in
.rootshare
));
4357 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t)));
4358 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.rootshare
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t), CH_UTF16
));
4359 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.comment
));
4360 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.comment
));
4361 if (ndr_get_array_length(ndr
, &r
->in
.comment
) > ndr_get_array_size(ndr
, &r
->in
.comment
)) {
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
.comment
), ndr_get_array_length(ndr
, &r
->in
.comment
));
4364 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t)));
4365 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.comment
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t), CH_UTF16
));
4366 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfs_config_dn
));
4367 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfs_config_dn
));
4368 if (ndr_get_array_length(ndr
, &r
->in
.dfs_config_dn
) > ndr_get_array_size(ndr
, &r
->in
.dfs_config_dn
)) {
4369 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
));
4371 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfs_config_dn
), sizeof(uint16_t)));
4372 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
));
4373 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.unknown1
));
4374 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
4375 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown2
));
4376 if (_ptr_unknown2
) {
4377 NDR_PULL_ALLOC(ndr
, r
->in
.unknown2
);
4379 r
->in
.unknown2
= NULL
;
4381 if (r
->in
.unknown2
) {
4382 _mem_save_unknown2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4383 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.unknown2
, 0);
4384 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown2
));
4385 if (_ptr_unknown2
) {
4386 NDR_PULL_ALLOC(ndr
, *r
->in
.unknown2
);
4388 *r
->in
.unknown2
= NULL
;
4390 if (*r
->in
.unknown2
) {
4391 _mem_save_unknown2_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4392 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.unknown2
, 0);
4393 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.unknown2
));
4394 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown2_1
, 0);
4396 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown2_0
, 0);
4399 if (flags
& NDR_OUT
) {
4400 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown2
));
4401 if (_ptr_unknown2
) {
4402 NDR_PULL_ALLOC(ndr
, r
->out
.unknown2
);
4404 r
->out
.unknown2
= NULL
;
4406 if (r
->out
.unknown2
) {
4407 _mem_save_unknown2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4408 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.unknown2
, 0);
4409 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown2
));
4410 if (_ptr_unknown2
) {
4411 NDR_PULL_ALLOC(ndr
, *r
->out
.unknown2
);
4413 *r
->out
.unknown2
= NULL
;
4415 if (*r
->out
.unknown2
) {
4416 _mem_save_unknown2_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4417 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.unknown2
, 0);
4418 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.unknown2
));
4419 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown2_1
, 0);
4421 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown2_0
, 0);
4423 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4425 return NDR_ERR_SUCCESS
;
4428 _PUBLIC_
void ndr_print_dfs_AddFtRoot(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_AddFtRoot
*r
)
4430 ndr_print_struct(ndr
, name
, "dfs_AddFtRoot");
4432 if (flags
& NDR_SET_VALUES
) {
4433 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4435 if (flags
& NDR_IN
) {
4436 ndr_print_struct(ndr
, "in", "dfs_AddFtRoot");
4438 ndr_print_string(ndr
, "servername", r
->in
.servername
);
4439 ndr_print_string(ndr
, "dns_servername", r
->in
.dns_servername
);
4440 ndr_print_string(ndr
, "dfsname", r
->in
.dfsname
);
4441 ndr_print_string(ndr
, "rootshare", r
->in
.rootshare
);
4442 ndr_print_string(ndr
, "comment", r
->in
.comment
);
4443 ndr_print_string(ndr
, "dfs_config_dn", r
->in
.dfs_config_dn
);
4444 ndr_print_uint8(ndr
, "unknown1", r
->in
.unknown1
);
4445 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
4446 ndr_print_ptr(ndr
, "unknown2", r
->in
.unknown2
);
4448 if (r
->in
.unknown2
) {
4449 ndr_print_ptr(ndr
, "unknown2", *r
->in
.unknown2
);
4451 if (*r
->in
.unknown2
) {
4452 ndr_print_dfs_UnknownStruct(ndr
, "unknown2", *r
->in
.unknown2
);
4459 if (flags
& NDR_OUT
) {
4460 ndr_print_struct(ndr
, "out", "dfs_AddFtRoot");
4462 ndr_print_ptr(ndr
, "unknown2", r
->out
.unknown2
);
4464 if (r
->out
.unknown2
) {
4465 ndr_print_ptr(ndr
, "unknown2", *r
->out
.unknown2
);
4467 if (*r
->out
.unknown2
) {
4468 ndr_print_dfs_UnknownStruct(ndr
, "unknown2", *r
->out
.unknown2
);
4473 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4479 static enum ndr_err_code
ndr_push_dfs_RemoveFtRoot(struct ndr_push
*ndr
, int flags
, const struct dfs_RemoveFtRoot
*r
)
4481 if (flags
& NDR_IN
) {
4482 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4483 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4484 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4485 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4486 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dns_servername
, CH_UTF16
)));
4487 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4488 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dns_servername
, CH_UTF16
)));
4489 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
));
4490 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfsname
, CH_UTF16
)));
4491 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4492 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfsname
, CH_UTF16
)));
4493 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.dfsname
, ndr_charset_length(r
->in
.dfsname
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4494 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4495 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4496 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4497 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.rootshare
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4498 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
4499 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.unknown
));
4500 if (r
->in
.unknown
) {
4501 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.unknown
));
4502 if (*r
->in
.unknown
) {
4503 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.unknown
));
4507 if (flags
& NDR_OUT
) {
4508 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.unknown
));
4509 if (r
->out
.unknown
) {
4510 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.unknown
));
4511 if (*r
->out
.unknown
) {
4512 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.unknown
));
4515 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4517 return NDR_ERR_SUCCESS
;
4520 static enum ndr_err_code
ndr_pull_dfs_RemoveFtRoot(struct ndr_pull
*ndr
, int flags
, struct dfs_RemoveFtRoot
*r
)
4522 uint32_t _ptr_unknown
;
4523 TALLOC_CTX
*_mem_save_unknown_0
;
4524 TALLOC_CTX
*_mem_save_unknown_1
;
4525 if (flags
& NDR_IN
) {
4526 ZERO_STRUCT(r
->out
);
4528 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
4529 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
4530 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.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
.servername
), ndr_get_array_length(ndr
, &r
->in
.servername
));
4533 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
4534 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
4535 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dns_servername
));
4536 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dns_servername
));
4537 if (ndr_get_array_length(ndr
, &r
->in
.dns_servername
) > ndr_get_array_size(ndr
, &r
->in
.dns_servername
)) {
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
.dns_servername
), ndr_get_array_length(ndr
, &r
->in
.dns_servername
));
4540 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dns_servername
), sizeof(uint16_t)));
4541 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
));
4542 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfsname
));
4543 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfsname
));
4544 if (ndr_get_array_length(ndr
, &r
->in
.dfsname
) > ndr_get_array_size(ndr
, &r
->in
.dfsname
)) {
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
.dfsname
), ndr_get_array_length(ndr
, &r
->in
.dfsname
));
4547 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfsname
), sizeof(uint16_t)));
4548 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.dfsname
, ndr_get_array_length(ndr
, &r
->in
.dfsname
), sizeof(uint16_t), CH_UTF16
));
4549 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rootshare
));
4550 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rootshare
));
4551 if (ndr_get_array_length(ndr
, &r
->in
.rootshare
) > ndr_get_array_size(ndr
, &r
->in
.rootshare
)) {
4552 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.rootshare
), ndr_get_array_length(ndr
, &r
->in
.rootshare
));
4554 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t)));
4555 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.rootshare
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t), CH_UTF16
));
4556 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
4557 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown
));
4559 NDR_PULL_ALLOC(ndr
, r
->in
.unknown
);
4561 r
->in
.unknown
= NULL
;
4563 if (r
->in
.unknown
) {
4564 _mem_save_unknown_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4565 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.unknown
, 0);
4566 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown
));
4568 NDR_PULL_ALLOC(ndr
, *r
->in
.unknown
);
4570 *r
->in
.unknown
= NULL
;
4572 if (*r
->in
.unknown
) {
4573 _mem_save_unknown_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4574 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.unknown
, 0);
4575 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.unknown
));
4576 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown_1
, 0);
4578 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown_0
, 0);
4581 if (flags
& NDR_OUT
) {
4582 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown
));
4584 NDR_PULL_ALLOC(ndr
, r
->out
.unknown
);
4586 r
->out
.unknown
= NULL
;
4588 if (r
->out
.unknown
) {
4589 _mem_save_unknown_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4590 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.unknown
, 0);
4591 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_unknown
));
4593 NDR_PULL_ALLOC(ndr
, *r
->out
.unknown
);
4595 *r
->out
.unknown
= NULL
;
4597 if (*r
->out
.unknown
) {
4598 _mem_save_unknown_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4599 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.unknown
, 0);
4600 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.unknown
));
4601 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown_1
, 0);
4603 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_unknown_0
, 0);
4605 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4607 return NDR_ERR_SUCCESS
;
4610 _PUBLIC_
void ndr_print_dfs_RemoveFtRoot(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_RemoveFtRoot
*r
)
4612 ndr_print_struct(ndr
, name
, "dfs_RemoveFtRoot");
4614 if (flags
& NDR_SET_VALUES
) {
4615 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4617 if (flags
& NDR_IN
) {
4618 ndr_print_struct(ndr
, "in", "dfs_RemoveFtRoot");
4620 ndr_print_string(ndr
, "servername", r
->in
.servername
);
4621 ndr_print_string(ndr
, "dns_servername", r
->in
.dns_servername
);
4622 ndr_print_string(ndr
, "dfsname", r
->in
.dfsname
);
4623 ndr_print_string(ndr
, "rootshare", r
->in
.rootshare
);
4624 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
4625 ndr_print_ptr(ndr
, "unknown", r
->in
.unknown
);
4627 if (r
->in
.unknown
) {
4628 ndr_print_ptr(ndr
, "unknown", *r
->in
.unknown
);
4630 if (*r
->in
.unknown
) {
4631 ndr_print_dfs_UnknownStruct(ndr
, "unknown", *r
->in
.unknown
);
4638 if (flags
& NDR_OUT
) {
4639 ndr_print_struct(ndr
, "out", "dfs_RemoveFtRoot");
4641 ndr_print_ptr(ndr
, "unknown", r
->out
.unknown
);
4643 if (r
->out
.unknown
) {
4644 ndr_print_ptr(ndr
, "unknown", *r
->out
.unknown
);
4646 if (*r
->out
.unknown
) {
4647 ndr_print_dfs_UnknownStruct(ndr
, "unknown", *r
->out
.unknown
);
4652 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4658 static enum ndr_err_code
ndr_push_dfs_AddStdRoot(struct ndr_push
*ndr
, int flags
, const struct dfs_AddStdRoot
*r
)
4660 if (flags
& NDR_IN
) {
4661 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4662 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4663 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4664 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4665 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4666 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4667 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4668 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.rootshare
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4669 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
4670 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4671 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
4672 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.comment
, ndr_charset_length(r
->in
.comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4673 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
4675 if (flags
& NDR_OUT
) {
4676 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4678 return NDR_ERR_SUCCESS
;
4681 static enum ndr_err_code
ndr_pull_dfs_AddStdRoot(struct ndr_pull
*ndr
, int flags
, struct dfs_AddStdRoot
*r
)
4683 if (flags
& NDR_IN
) {
4684 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
4685 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
4686 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
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
.servername
), ndr_get_array_length(ndr
, &r
->in
.servername
));
4689 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
4690 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
4691 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rootshare
));
4692 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rootshare
));
4693 if (ndr_get_array_length(ndr
, &r
->in
.rootshare
) > ndr_get_array_size(ndr
, &r
->in
.rootshare
)) {
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
.rootshare
), ndr_get_array_length(ndr
, &r
->in
.rootshare
));
4696 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t)));
4697 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.rootshare
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t), CH_UTF16
));
4698 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.comment
));
4699 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.comment
));
4700 if (ndr_get_array_length(ndr
, &r
->in
.comment
) > ndr_get_array_size(ndr
, &r
->in
.comment
)) {
4701 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
));
4703 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t)));
4704 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.comment
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t), CH_UTF16
));
4705 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
4707 if (flags
& NDR_OUT
) {
4708 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4710 return NDR_ERR_SUCCESS
;
4713 _PUBLIC_
void ndr_print_dfs_AddStdRoot(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_AddStdRoot
*r
)
4715 ndr_print_struct(ndr
, name
, "dfs_AddStdRoot");
4717 if (flags
& NDR_SET_VALUES
) {
4718 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4720 if (flags
& NDR_IN
) {
4721 ndr_print_struct(ndr
, "in", "dfs_AddStdRoot");
4723 ndr_print_string(ndr
, "servername", r
->in
.servername
);
4724 ndr_print_string(ndr
, "rootshare", r
->in
.rootshare
);
4725 ndr_print_string(ndr
, "comment", r
->in
.comment
);
4726 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
4729 if (flags
& NDR_OUT
) {
4730 ndr_print_struct(ndr
, "out", "dfs_AddStdRoot");
4732 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4738 static enum ndr_err_code
ndr_push_dfs_RemoveStdRoot(struct ndr_push
*ndr
, int flags
, const struct dfs_RemoveStdRoot
*r
)
4740 if (flags
& NDR_IN
) {
4741 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4742 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4743 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4744 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4745 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4746 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4747 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4748 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.rootshare
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4749 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
4751 if (flags
& NDR_OUT
) {
4752 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4754 return NDR_ERR_SUCCESS
;
4757 static enum ndr_err_code
ndr_pull_dfs_RemoveStdRoot(struct ndr_pull
*ndr
, int flags
, struct dfs_RemoveStdRoot
*r
)
4759 if (flags
& NDR_IN
) {
4760 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
4761 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
4762 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
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
.servername
), ndr_get_array_length(ndr
, &r
->in
.servername
));
4765 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
4766 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
4767 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rootshare
));
4768 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rootshare
));
4769 if (ndr_get_array_length(ndr
, &r
->in
.rootshare
) > ndr_get_array_size(ndr
, &r
->in
.rootshare
)) {
4770 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
));
4772 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t)));
4773 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.rootshare
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t), CH_UTF16
));
4774 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
4776 if (flags
& NDR_OUT
) {
4777 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4779 return NDR_ERR_SUCCESS
;
4782 _PUBLIC_
void ndr_print_dfs_RemoveStdRoot(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_RemoveStdRoot
*r
)
4784 ndr_print_struct(ndr
, name
, "dfs_RemoveStdRoot");
4786 if (flags
& NDR_SET_VALUES
) {
4787 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4789 if (flags
& NDR_IN
) {
4790 ndr_print_struct(ndr
, "in", "dfs_RemoveStdRoot");
4792 ndr_print_string(ndr
, "servername", r
->in
.servername
);
4793 ndr_print_string(ndr
, "rootshare", r
->in
.rootshare
);
4794 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
4797 if (flags
& NDR_OUT
) {
4798 ndr_print_struct(ndr
, "out", "dfs_RemoveStdRoot");
4800 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4806 static enum ndr_err_code
ndr_push_dfs_ManagerInitialize(struct ndr_push
*ndr
, int flags
, const struct dfs_ManagerInitialize
*r
)
4808 if (flags
& NDR_IN
) {
4809 if (r
->in
.servername
== NULL
) {
4810 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4812 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4813 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4814 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4815 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4816 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
4818 if (flags
& NDR_OUT
) {
4819 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4821 return NDR_ERR_SUCCESS
;
4824 static enum ndr_err_code
ndr_pull_dfs_ManagerInitialize(struct ndr_pull
*ndr
, int flags
, struct dfs_ManagerInitialize
*r
)
4826 if (flags
& NDR_IN
) {
4827 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
4828 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
4829 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
4830 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
));
4832 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
4833 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
4834 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
4836 if (flags
& NDR_OUT
) {
4837 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4839 return NDR_ERR_SUCCESS
;
4842 _PUBLIC_
void ndr_print_dfs_ManagerInitialize(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_ManagerInitialize
*r
)
4844 ndr_print_struct(ndr
, name
, "dfs_ManagerInitialize");
4846 if (flags
& NDR_SET_VALUES
) {
4847 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4849 if (flags
& NDR_IN
) {
4850 ndr_print_struct(ndr
, "in", "dfs_ManagerInitialize");
4852 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
4854 ndr_print_string(ndr
, "servername", r
->in
.servername
);
4856 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
4859 if (flags
& NDR_OUT
) {
4860 ndr_print_struct(ndr
, "out", "dfs_ManagerInitialize");
4862 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4868 static enum ndr_err_code
ndr_push_dfs_AddStdRootForced(struct ndr_push
*ndr
, int flags
, const struct dfs_AddStdRootForced
*r
)
4870 if (flags
& NDR_IN
) {
4871 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4872 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4873 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4874 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4875 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4876 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4877 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
4878 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.rootshare
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4879 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
4880 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4881 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.comment
, CH_UTF16
)));
4882 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.comment
, ndr_charset_length(r
->in
.comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4883 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.store
, CH_UTF16
)));
4884 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4885 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.store
, CH_UTF16
)));
4886 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.store
, ndr_charset_length(r
->in
.store
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4888 if (flags
& NDR_OUT
) {
4889 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4891 return NDR_ERR_SUCCESS
;
4894 static enum ndr_err_code
ndr_pull_dfs_AddStdRootForced(struct ndr_pull
*ndr
, int flags
, struct dfs_AddStdRootForced
*r
)
4896 if (flags
& NDR_IN
) {
4897 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
4898 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
4899 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
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
.servername
), ndr_get_array_length(ndr
, &r
->in
.servername
));
4902 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
4903 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
4904 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rootshare
));
4905 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rootshare
));
4906 if (ndr_get_array_length(ndr
, &r
->in
.rootshare
) > ndr_get_array_size(ndr
, &r
->in
.rootshare
)) {
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
.rootshare
), ndr_get_array_length(ndr
, &r
->in
.rootshare
));
4909 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t)));
4910 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.rootshare
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t), CH_UTF16
));
4911 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.comment
));
4912 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.comment
));
4913 if (ndr_get_array_length(ndr
, &r
->in
.comment
) > ndr_get_array_size(ndr
, &r
->in
.comment
)) {
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
.comment
), ndr_get_array_length(ndr
, &r
->in
.comment
));
4916 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t)));
4917 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.comment
, ndr_get_array_length(ndr
, &r
->in
.comment
), sizeof(uint16_t), CH_UTF16
));
4918 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.store
));
4919 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.store
));
4920 if (ndr_get_array_length(ndr
, &r
->in
.store
) > ndr_get_array_size(ndr
, &r
->in
.store
)) {
4921 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
));
4923 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.store
), sizeof(uint16_t)));
4924 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.store
, ndr_get_array_length(ndr
, &r
->in
.store
), sizeof(uint16_t), CH_UTF16
));
4926 if (flags
& NDR_OUT
) {
4927 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4929 return NDR_ERR_SUCCESS
;
4932 _PUBLIC_
void ndr_print_dfs_AddStdRootForced(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_AddStdRootForced
*r
)
4934 ndr_print_struct(ndr
, name
, "dfs_AddStdRootForced");
4936 if (flags
& NDR_SET_VALUES
) {
4937 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4939 if (flags
& NDR_IN
) {
4940 ndr_print_struct(ndr
, "in", "dfs_AddStdRootForced");
4942 ndr_print_string(ndr
, "servername", r
->in
.servername
);
4943 ndr_print_string(ndr
, "rootshare", r
->in
.rootshare
);
4944 ndr_print_string(ndr
, "comment", r
->in
.comment
);
4945 ndr_print_string(ndr
, "store", r
->in
.store
);
4948 if (flags
& NDR_OUT
) {
4949 ndr_print_struct(ndr
, "out", "dfs_AddStdRootForced");
4951 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4957 static enum ndr_err_code
ndr_push_dfs_GetDcAddress(struct ndr_push
*ndr
, int flags
, const struct dfs_GetDcAddress
*r
)
4959 if (flags
& NDR_IN
) {
4960 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4961 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4962 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
4963 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4964 if (r
->in
.server_fullname
== NULL
) {
4965 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4967 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.server_fullname
));
4968 if (*r
->in
.server_fullname
) {
4969 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->in
.server_fullname
, CH_UTF16
)));
4970 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4971 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->in
.server_fullname
, CH_UTF16
)));
4972 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
));
4974 if (r
->in
.is_root
== NULL
) {
4975 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4977 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, *r
->in
.is_root
));
4978 if (r
->in
.ttl
== NULL
) {
4979 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4981 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.ttl
));
4983 if (flags
& NDR_OUT
) {
4984 if (r
->out
.server_fullname
== NULL
) {
4985 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4987 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.server_fullname
));
4988 if (*r
->out
.server_fullname
) {
4989 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.server_fullname
, CH_UTF16
)));
4990 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4991 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.server_fullname
, CH_UTF16
)));
4992 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
));
4994 if (r
->out
.is_root
== NULL
) {
4995 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4997 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, *r
->out
.is_root
));
4998 if (r
->out
.ttl
== NULL
) {
4999 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5001 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.ttl
));
5002 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5004 return NDR_ERR_SUCCESS
;
5007 static enum ndr_err_code
ndr_pull_dfs_GetDcAddress(struct ndr_pull
*ndr
, int flags
, struct dfs_GetDcAddress
*r
)
5009 uint32_t _ptr_server_fullname
;
5010 TALLOC_CTX
*_mem_save_server_fullname_0
;
5011 TALLOC_CTX
*_mem_save_server_fullname_1
;
5012 TALLOC_CTX
*_mem_save_is_root_0
;
5013 TALLOC_CTX
*_mem_save_ttl_0
;
5014 if (flags
& NDR_IN
) {
5015 ZERO_STRUCT(r
->out
);
5017 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
5018 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
5019 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
5020 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
));
5022 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
5023 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
5024 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5025 NDR_PULL_ALLOC(ndr
, r
->in
.server_fullname
);
5027 _mem_save_server_fullname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5028 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_fullname
, LIBNDR_FLAG_REF_ALLOC
);
5029 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_fullname
));
5030 if (_ptr_server_fullname
) {
5031 NDR_PULL_ALLOC(ndr
, *r
->in
.server_fullname
);
5033 *r
->in
.server_fullname
= NULL
;
5035 if (*r
->in
.server_fullname
) {
5036 _mem_save_server_fullname_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5037 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.server_fullname
, 0);
5038 NDR_CHECK(ndr_pull_array_size(ndr
, r
->in
.server_fullname
));
5039 NDR_CHECK(ndr_pull_array_length(ndr
, r
->in
.server_fullname
));
5040 if (ndr_get_array_length(ndr
, r
->in
.server_fullname
) > ndr_get_array_size(ndr
, r
->in
.server_fullname
)) {
5041 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
));
5043 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, r
->in
.server_fullname
), sizeof(uint16_t)));
5044 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
));
5045 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_fullname_1
, 0);
5047 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_fullname_0
, LIBNDR_FLAG_REF_ALLOC
);
5048 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5049 NDR_PULL_ALLOC(ndr
, r
->in
.is_root
);
5051 _mem_save_is_root_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5052 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.is_root
, LIBNDR_FLAG_REF_ALLOC
);
5053 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, r
->in
.is_root
));
5054 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_is_root_0
, LIBNDR_FLAG_REF_ALLOC
);
5055 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5056 NDR_PULL_ALLOC(ndr
, r
->in
.ttl
);
5058 _mem_save_ttl_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5059 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.ttl
, LIBNDR_FLAG_REF_ALLOC
);
5060 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.ttl
));
5061 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ttl_0
, LIBNDR_FLAG_REF_ALLOC
);
5062 NDR_PULL_ALLOC(ndr
, r
->out
.server_fullname
);
5063 *r
->out
.server_fullname
= *r
->in
.server_fullname
;
5064 NDR_PULL_ALLOC(ndr
, r
->out
.is_root
);
5065 *r
->out
.is_root
= *r
->in
.is_root
;
5066 NDR_PULL_ALLOC(ndr
, r
->out
.ttl
);
5067 *r
->out
.ttl
= *r
->in
.ttl
;
5069 if (flags
& NDR_OUT
) {
5070 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5071 NDR_PULL_ALLOC(ndr
, r
->out
.server_fullname
);
5073 _mem_save_server_fullname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5074 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.server_fullname
, LIBNDR_FLAG_REF_ALLOC
);
5075 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_fullname
));
5076 if (_ptr_server_fullname
) {
5077 NDR_PULL_ALLOC(ndr
, *r
->out
.server_fullname
);
5079 *r
->out
.server_fullname
= NULL
;
5081 if (*r
->out
.server_fullname
) {
5082 _mem_save_server_fullname_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5083 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.server_fullname
, 0);
5084 NDR_CHECK(ndr_pull_array_size(ndr
, r
->out
.server_fullname
));
5085 NDR_CHECK(ndr_pull_array_length(ndr
, r
->out
.server_fullname
));
5086 if (ndr_get_array_length(ndr
, r
->out
.server_fullname
) > ndr_get_array_size(ndr
, r
->out
.server_fullname
)) {
5087 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
));
5089 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, r
->out
.server_fullname
), sizeof(uint16_t)));
5090 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
));
5091 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_fullname_1
, 0);
5093 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_fullname_0
, LIBNDR_FLAG_REF_ALLOC
);
5094 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5095 NDR_PULL_ALLOC(ndr
, r
->out
.is_root
);
5097 _mem_save_is_root_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5098 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.is_root
, LIBNDR_FLAG_REF_ALLOC
);
5099 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, r
->out
.is_root
));
5100 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_is_root_0
, LIBNDR_FLAG_REF_ALLOC
);
5101 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5102 NDR_PULL_ALLOC(ndr
, r
->out
.ttl
);
5104 _mem_save_ttl_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5105 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.ttl
, LIBNDR_FLAG_REF_ALLOC
);
5106 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.ttl
));
5107 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ttl_0
, LIBNDR_FLAG_REF_ALLOC
);
5108 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5110 return NDR_ERR_SUCCESS
;
5113 _PUBLIC_
void ndr_print_dfs_GetDcAddress(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_GetDcAddress
*r
)
5115 ndr_print_struct(ndr
, name
, "dfs_GetDcAddress");
5117 if (flags
& NDR_SET_VALUES
) {
5118 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5120 if (flags
& NDR_IN
) {
5121 ndr_print_struct(ndr
, "in", "dfs_GetDcAddress");
5123 ndr_print_string(ndr
, "servername", r
->in
.servername
);
5124 ndr_print_ptr(ndr
, "server_fullname", r
->in
.server_fullname
);
5126 ndr_print_ptr(ndr
, "server_fullname", *r
->in
.server_fullname
);
5128 if (*r
->in
.server_fullname
) {
5129 ndr_print_string(ndr
, "server_fullname", *r
->in
.server_fullname
);
5133 ndr_print_ptr(ndr
, "is_root", r
->in
.is_root
);
5135 ndr_print_uint8(ndr
, "is_root", *r
->in
.is_root
);
5137 ndr_print_ptr(ndr
, "ttl", r
->in
.ttl
);
5139 ndr_print_uint32(ndr
, "ttl", *r
->in
.ttl
);
5143 if (flags
& NDR_OUT
) {
5144 ndr_print_struct(ndr
, "out", "dfs_GetDcAddress");
5146 ndr_print_ptr(ndr
, "server_fullname", r
->out
.server_fullname
);
5148 ndr_print_ptr(ndr
, "server_fullname", *r
->out
.server_fullname
);
5150 if (*r
->out
.server_fullname
) {
5151 ndr_print_string(ndr
, "server_fullname", *r
->out
.server_fullname
);
5155 ndr_print_ptr(ndr
, "is_root", r
->out
.is_root
);
5157 ndr_print_uint8(ndr
, "is_root", *r
->out
.is_root
);
5159 ndr_print_ptr(ndr
, "ttl", r
->out
.ttl
);
5161 ndr_print_uint32(ndr
, "ttl", *r
->out
.ttl
);
5163 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5169 static enum ndr_err_code
ndr_push_dfs_SetDcAddress(struct ndr_push
*ndr
, int flags
, const struct dfs_SetDcAddress
*r
)
5171 if (flags
& NDR_IN
) {
5172 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
5173 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5174 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
5175 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5176 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_fullname
, CH_UTF16
)));
5177 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5178 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_fullname
, CH_UTF16
)));
5179 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
));
5180 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
5181 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.ttl
));
5183 if (flags
& NDR_OUT
) {
5184 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5186 return NDR_ERR_SUCCESS
;
5189 static enum ndr_err_code
ndr_pull_dfs_SetDcAddress(struct ndr_pull
*ndr
, int flags
, struct dfs_SetDcAddress
*r
)
5191 if (flags
& NDR_IN
) {
5192 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
5193 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
5194 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
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
.servername
), ndr_get_array_length(ndr
, &r
->in
.servername
));
5197 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
5198 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
5199 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_fullname
));
5200 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_fullname
));
5201 if (ndr_get_array_length(ndr
, &r
->in
.server_fullname
) > ndr_get_array_size(ndr
, &r
->in
.server_fullname
)) {
5202 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
));
5204 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_fullname
), sizeof(uint16_t)));
5205 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
));
5206 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
5207 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.ttl
));
5209 if (flags
& NDR_OUT
) {
5210 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5212 return NDR_ERR_SUCCESS
;
5215 _PUBLIC_
void ndr_print_dfs_SetDcAddress(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_SetDcAddress
*r
)
5217 ndr_print_struct(ndr
, name
, "dfs_SetDcAddress");
5219 if (flags
& NDR_SET_VALUES
) {
5220 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5222 if (flags
& NDR_IN
) {
5223 ndr_print_struct(ndr
, "in", "dfs_SetDcAddress");
5225 ndr_print_string(ndr
, "servername", r
->in
.servername
);
5226 ndr_print_string(ndr
, "server_fullname", r
->in
.server_fullname
);
5227 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
5228 ndr_print_uint32(ndr
, "ttl", r
->in
.ttl
);
5231 if (flags
& NDR_OUT
) {
5232 ndr_print_struct(ndr
, "out", "dfs_SetDcAddress");
5234 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5240 static enum ndr_err_code
ndr_push_dfs_FlushFtTable(struct ndr_push
*ndr
, int flags
, const struct dfs_FlushFtTable
*r
)
5242 if (flags
& NDR_IN
) {
5243 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
5244 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5245 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
5246 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5247 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
5248 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5249 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
)));
5250 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.rootshare
, ndr_charset_length(r
->in
.rootshare
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5252 if (flags
& NDR_OUT
) {
5253 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5255 return NDR_ERR_SUCCESS
;
5258 static enum ndr_err_code
ndr_pull_dfs_FlushFtTable(struct ndr_pull
*ndr
, int flags
, struct dfs_FlushFtTable
*r
)
5260 if (flags
& NDR_IN
) {
5261 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
5262 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
5263 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
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
.servername
), ndr_get_array_length(ndr
, &r
->in
.servername
));
5266 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
5267 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
5268 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.rootshare
));
5269 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.rootshare
));
5270 if (ndr_get_array_length(ndr
, &r
->in
.rootshare
) > ndr_get_array_size(ndr
, &r
->in
.rootshare
)) {
5271 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
));
5273 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t)));
5274 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.rootshare
, ndr_get_array_length(ndr
, &r
->in
.rootshare
), sizeof(uint16_t), CH_UTF16
));
5276 if (flags
& NDR_OUT
) {
5277 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5279 return NDR_ERR_SUCCESS
;
5282 _PUBLIC_
void ndr_print_dfs_FlushFtTable(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_FlushFtTable
*r
)
5284 ndr_print_struct(ndr
, name
, "dfs_FlushFtTable");
5286 if (flags
& NDR_SET_VALUES
) {
5287 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5289 if (flags
& NDR_IN
) {
5290 ndr_print_struct(ndr
, "in", "dfs_FlushFtTable");
5292 ndr_print_string(ndr
, "servername", r
->in
.servername
);
5293 ndr_print_string(ndr
, "rootshare", r
->in
.rootshare
);
5296 if (flags
& NDR_OUT
) {
5297 ndr_print_struct(ndr
, "out", "dfs_FlushFtTable");
5299 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5305 static enum ndr_err_code
ndr_push_dfs_Add2(struct ndr_push
*ndr
, int flags
, const struct dfs_Add2
*r
)
5307 if (flags
& NDR_IN
) {
5309 if (flags
& NDR_OUT
) {
5310 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5312 return NDR_ERR_SUCCESS
;
5315 static enum ndr_err_code
ndr_pull_dfs_Add2(struct ndr_pull
*ndr
, int flags
, struct dfs_Add2
*r
)
5317 if (flags
& NDR_IN
) {
5319 if (flags
& NDR_OUT
) {
5320 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5322 return NDR_ERR_SUCCESS
;
5325 _PUBLIC_
void ndr_print_dfs_Add2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Add2
*r
)
5327 ndr_print_struct(ndr
, name
, "dfs_Add2");
5329 if (flags
& NDR_SET_VALUES
) {
5330 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5332 if (flags
& NDR_IN
) {
5333 ndr_print_struct(ndr
, "in", "dfs_Add2");
5337 if (flags
& NDR_OUT
) {
5338 ndr_print_struct(ndr
, "out", "dfs_Add2");
5340 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5346 static enum ndr_err_code
ndr_push_dfs_Remove2(struct ndr_push
*ndr
, int flags
, const struct dfs_Remove2
*r
)
5348 if (flags
& NDR_IN
) {
5350 if (flags
& NDR_OUT
) {
5351 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5353 return NDR_ERR_SUCCESS
;
5356 static enum ndr_err_code
ndr_pull_dfs_Remove2(struct ndr_pull
*ndr
, int flags
, struct dfs_Remove2
*r
)
5358 if (flags
& NDR_IN
) {
5360 if (flags
& NDR_OUT
) {
5361 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5363 return NDR_ERR_SUCCESS
;
5366 _PUBLIC_
void ndr_print_dfs_Remove2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_Remove2
*r
)
5368 ndr_print_struct(ndr
, name
, "dfs_Remove2");
5370 if (flags
& NDR_SET_VALUES
) {
5371 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5373 if (flags
& NDR_IN
) {
5374 ndr_print_struct(ndr
, "in", "dfs_Remove2");
5378 if (flags
& NDR_OUT
) {
5379 ndr_print_struct(ndr
, "out", "dfs_Remove2");
5381 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5387 _PUBLIC_
enum ndr_err_code
ndr_push_dfs_EnumEx(struct ndr_push
*ndr
, int flags
, const struct dfs_EnumEx
*r
)
5389 if (flags
& NDR_IN
) {
5390 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_name
, CH_UTF16
)));
5391 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5392 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dfs_name
, CH_UTF16
)));
5393 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
));
5394 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
5395 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.bufsize
));
5396 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.info
));
5398 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
5400 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.total
));
5402 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.total
));
5405 if (flags
& NDR_OUT
) {
5406 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
5408 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
5410 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.total
));
5412 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.total
));
5414 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5416 return NDR_ERR_SUCCESS
;
5419 _PUBLIC_
enum ndr_err_code
ndr_pull_dfs_EnumEx(struct ndr_pull
*ndr
, int flags
, struct dfs_EnumEx
*r
)
5422 uint32_t _ptr_total
;
5423 TALLOC_CTX
*_mem_save_info_0
;
5424 TALLOC_CTX
*_mem_save_total_0
;
5425 if (flags
& NDR_IN
) {
5426 ZERO_STRUCT(r
->out
);
5428 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dfs_name
));
5429 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dfs_name
));
5430 if (ndr_get_array_length(ndr
, &r
->in
.dfs_name
) > ndr_get_array_size(ndr
, &r
->in
.dfs_name
)) {
5431 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
));
5433 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dfs_name
), sizeof(uint16_t)));
5434 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
));
5435 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
5436 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.bufsize
));
5437 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
5439 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
5444 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5445 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, 0);
5446 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
5447 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
5449 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_total
));
5451 NDR_PULL_ALLOC(ndr
, r
->in
.total
);
5456 _mem_save_total_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5457 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.total
, 0);
5458 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.total
));
5459 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_0
, 0);
5462 if (flags
& NDR_OUT
) {
5463 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
5465 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
5470 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5471 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
5472 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
5473 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
5475 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_total
));
5477 NDR_PULL_ALLOC(ndr
, r
->out
.total
);
5479 r
->out
.total
= NULL
;
5482 _mem_save_total_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5483 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.total
, 0);
5484 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.total
));
5485 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_total_0
, 0);
5487 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5489 return NDR_ERR_SUCCESS
;
5492 _PUBLIC_
void ndr_print_dfs_EnumEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_EnumEx
*r
)
5494 ndr_print_struct(ndr
, name
, "dfs_EnumEx");
5496 if (flags
& NDR_SET_VALUES
) {
5497 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5499 if (flags
& NDR_IN
) {
5500 ndr_print_struct(ndr
, "in", "dfs_EnumEx");
5502 ndr_print_string(ndr
, "dfs_name", r
->in
.dfs_name
);
5503 ndr_print_uint32(ndr
, "level", r
->in
.level
);
5504 ndr_print_uint32(ndr
, "bufsize", r
->in
.bufsize
);
5505 ndr_print_ptr(ndr
, "info", r
->in
.info
);
5508 ndr_print_dfs_EnumStruct(ndr
, "info", r
->in
.info
);
5511 ndr_print_ptr(ndr
, "total", r
->in
.total
);
5514 ndr_print_uint32(ndr
, "total", *r
->in
.total
);
5519 if (flags
& NDR_OUT
) {
5520 ndr_print_struct(ndr
, "out", "dfs_EnumEx");
5522 ndr_print_ptr(ndr
, "info", r
->out
.info
);
5525 ndr_print_dfs_EnumStruct(ndr
, "info", r
->out
.info
);
5528 ndr_print_ptr(ndr
, "total", r
->out
.total
);
5531 ndr_print_uint32(ndr
, "total", *r
->out
.total
);
5534 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5540 static enum ndr_err_code
ndr_push_dfs_SetInfo2(struct ndr_push
*ndr
, int flags
, const struct dfs_SetInfo2
*r
)
5542 if (flags
& NDR_IN
) {
5544 if (flags
& NDR_OUT
) {
5545 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5547 return NDR_ERR_SUCCESS
;
5550 static enum ndr_err_code
ndr_pull_dfs_SetInfo2(struct ndr_pull
*ndr
, int flags
, struct dfs_SetInfo2
*r
)
5552 if (flags
& NDR_IN
) {
5554 if (flags
& NDR_OUT
) {
5555 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5557 return NDR_ERR_SUCCESS
;
5560 _PUBLIC_
void ndr_print_dfs_SetInfo2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct dfs_SetInfo2
*r
)
5562 ndr_print_struct(ndr
, name
, "dfs_SetInfo2");
5564 if (flags
& NDR_SET_VALUES
) {
5565 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5567 if (flags
& NDR_IN
) {
5568 ndr_print_struct(ndr
, "in", "dfs_SetInfo2");
5572 if (flags
& NDR_OUT
) {
5573 ndr_print_struct(ndr
, "out", "dfs_SetInfo2");
5575 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5581 static const struct ndr_interface_call netdfs_calls
[] = {
5583 "dfs_GetManagerVersion",
5584 sizeof(struct dfs_GetManagerVersion
),
5585 (ndr_push_flags_fn_t
) ndr_push_dfs_GetManagerVersion
,
5586 (ndr_pull_flags_fn_t
) ndr_pull_dfs_GetManagerVersion
,
5587 (ndr_print_function_t
) ndr_print_dfs_GetManagerVersion
,
5592 sizeof(struct dfs_Add
),
5593 (ndr_push_flags_fn_t
) ndr_push_dfs_Add
,
5594 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Add
,
5595 (ndr_print_function_t
) ndr_print_dfs_Add
,
5600 sizeof(struct dfs_Remove
),
5601 (ndr_push_flags_fn_t
) ndr_push_dfs_Remove
,
5602 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Remove
,
5603 (ndr_print_function_t
) ndr_print_dfs_Remove
,
5608 sizeof(struct dfs_SetInfo
),
5609 (ndr_push_flags_fn_t
) ndr_push_dfs_SetInfo
,
5610 (ndr_pull_flags_fn_t
) ndr_pull_dfs_SetInfo
,
5611 (ndr_print_function_t
) ndr_print_dfs_SetInfo
,
5616 sizeof(struct dfs_GetInfo
),
5617 (ndr_push_flags_fn_t
) ndr_push_dfs_GetInfo
,
5618 (ndr_pull_flags_fn_t
) ndr_pull_dfs_GetInfo
,
5619 (ndr_print_function_t
) ndr_print_dfs_GetInfo
,
5624 sizeof(struct dfs_Enum
),
5625 (ndr_push_flags_fn_t
) ndr_push_dfs_Enum
,
5626 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Enum
,
5627 (ndr_print_function_t
) ndr_print_dfs_Enum
,
5632 sizeof(struct dfs_Rename
),
5633 (ndr_push_flags_fn_t
) ndr_push_dfs_Rename
,
5634 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Rename
,
5635 (ndr_print_function_t
) ndr_print_dfs_Rename
,
5640 sizeof(struct dfs_Move
),
5641 (ndr_push_flags_fn_t
) ndr_push_dfs_Move
,
5642 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Move
,
5643 (ndr_print_function_t
) ndr_print_dfs_Move
,
5647 "dfs_ManagerGetConfigInfo",
5648 sizeof(struct dfs_ManagerGetConfigInfo
),
5649 (ndr_push_flags_fn_t
) ndr_push_dfs_ManagerGetConfigInfo
,
5650 (ndr_pull_flags_fn_t
) ndr_pull_dfs_ManagerGetConfigInfo
,
5651 (ndr_print_function_t
) ndr_print_dfs_ManagerGetConfigInfo
,
5655 "dfs_ManagerSendSiteInfo",
5656 sizeof(struct dfs_ManagerSendSiteInfo
),
5657 (ndr_push_flags_fn_t
) ndr_push_dfs_ManagerSendSiteInfo
,
5658 (ndr_pull_flags_fn_t
) ndr_pull_dfs_ManagerSendSiteInfo
,
5659 (ndr_print_function_t
) ndr_print_dfs_ManagerSendSiteInfo
,
5664 sizeof(struct dfs_AddFtRoot
),
5665 (ndr_push_flags_fn_t
) ndr_push_dfs_AddFtRoot
,
5666 (ndr_pull_flags_fn_t
) ndr_pull_dfs_AddFtRoot
,
5667 (ndr_print_function_t
) ndr_print_dfs_AddFtRoot
,
5672 sizeof(struct dfs_RemoveFtRoot
),
5673 (ndr_push_flags_fn_t
) ndr_push_dfs_RemoveFtRoot
,
5674 (ndr_pull_flags_fn_t
) ndr_pull_dfs_RemoveFtRoot
,
5675 (ndr_print_function_t
) ndr_print_dfs_RemoveFtRoot
,
5680 sizeof(struct dfs_AddStdRoot
),
5681 (ndr_push_flags_fn_t
) ndr_push_dfs_AddStdRoot
,
5682 (ndr_pull_flags_fn_t
) ndr_pull_dfs_AddStdRoot
,
5683 (ndr_print_function_t
) ndr_print_dfs_AddStdRoot
,
5687 "dfs_RemoveStdRoot",
5688 sizeof(struct dfs_RemoveStdRoot
),
5689 (ndr_push_flags_fn_t
) ndr_push_dfs_RemoveStdRoot
,
5690 (ndr_pull_flags_fn_t
) ndr_pull_dfs_RemoveStdRoot
,
5691 (ndr_print_function_t
) ndr_print_dfs_RemoveStdRoot
,
5695 "dfs_ManagerInitialize",
5696 sizeof(struct dfs_ManagerInitialize
),
5697 (ndr_push_flags_fn_t
) ndr_push_dfs_ManagerInitialize
,
5698 (ndr_pull_flags_fn_t
) ndr_pull_dfs_ManagerInitialize
,
5699 (ndr_print_function_t
) ndr_print_dfs_ManagerInitialize
,
5703 "dfs_AddStdRootForced",
5704 sizeof(struct dfs_AddStdRootForced
),
5705 (ndr_push_flags_fn_t
) ndr_push_dfs_AddStdRootForced
,
5706 (ndr_pull_flags_fn_t
) ndr_pull_dfs_AddStdRootForced
,
5707 (ndr_print_function_t
) ndr_print_dfs_AddStdRootForced
,
5712 sizeof(struct dfs_GetDcAddress
),
5713 (ndr_push_flags_fn_t
) ndr_push_dfs_GetDcAddress
,
5714 (ndr_pull_flags_fn_t
) ndr_pull_dfs_GetDcAddress
,
5715 (ndr_print_function_t
) ndr_print_dfs_GetDcAddress
,
5720 sizeof(struct dfs_SetDcAddress
),
5721 (ndr_push_flags_fn_t
) ndr_push_dfs_SetDcAddress
,
5722 (ndr_pull_flags_fn_t
) ndr_pull_dfs_SetDcAddress
,
5723 (ndr_print_function_t
) ndr_print_dfs_SetDcAddress
,
5728 sizeof(struct dfs_FlushFtTable
),
5729 (ndr_push_flags_fn_t
) ndr_push_dfs_FlushFtTable
,
5730 (ndr_pull_flags_fn_t
) ndr_pull_dfs_FlushFtTable
,
5731 (ndr_print_function_t
) ndr_print_dfs_FlushFtTable
,
5736 sizeof(struct dfs_Add2
),
5737 (ndr_push_flags_fn_t
) ndr_push_dfs_Add2
,
5738 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Add2
,
5739 (ndr_print_function_t
) ndr_print_dfs_Add2
,
5744 sizeof(struct dfs_Remove2
),
5745 (ndr_push_flags_fn_t
) ndr_push_dfs_Remove2
,
5746 (ndr_pull_flags_fn_t
) ndr_pull_dfs_Remove2
,
5747 (ndr_print_function_t
) ndr_print_dfs_Remove2
,
5752 sizeof(struct dfs_EnumEx
),
5753 (ndr_push_flags_fn_t
) ndr_push_dfs_EnumEx
,
5754 (ndr_pull_flags_fn_t
) ndr_pull_dfs_EnumEx
,
5755 (ndr_print_function_t
) ndr_print_dfs_EnumEx
,
5760 sizeof(struct dfs_SetInfo2
),
5761 (ndr_push_flags_fn_t
) ndr_push_dfs_SetInfo2
,
5762 (ndr_pull_flags_fn_t
) ndr_pull_dfs_SetInfo2
,
5763 (ndr_print_function_t
) ndr_print_dfs_SetInfo2
,
5766 { NULL
, 0, NULL
, NULL
, NULL
, false }
5769 static const char * const netdfs_endpoint_strings
[] = {
5770 "ncacn_np:[\\pipe\\netdfs]",
5775 static const struct ndr_interface_string_array netdfs_endpoints
= {
5777 .names
= netdfs_endpoint_strings
5780 static const char * const netdfs_authservice_strings
[] = {
5784 static const struct ndr_interface_string_array netdfs_authservices
= {
5786 .names
= netdfs_authservice_strings
5790 const struct ndr_interface_table ndr_table_netdfs
= {
5793 {0x4fc742e0,0x4a10,0x11cf,{0x82,0x73},{0x00,0xaa,0x00,0x4a,0xe6,0x73}},
5796 .helpstring
= NDR_NETDFS_HELPSTRING
,
5798 .calls
= netdfs_calls
,
5799 .endpoints
= &netdfs_endpoints
,
5800 .authservices
= &netdfs_authservices