1/* parser auto-generated by pidl */ 2 3#include "includes.h" 4#include "../librpc/gen_ndr/ndr_dfs.h" 5 6#include "librpc/gen_ndr/ndr_misc.h" 7static enum ndr_err_code ndr_push_dfs_ManagerVersion(struct ndr_push *ndr, int ndr_flags, enum dfs_ManagerVersion r) 8{ 9 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r)); 10 return NDR_ERR_SUCCESS; 11} 12 13static enum ndr_err_code ndr_pull_dfs_ManagerVersion(struct ndr_pull *ndr, int ndr_flags, enum dfs_ManagerVersion *r) 14{ 15 uint32_t v; 16 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v)); 17 *r = v; 18 return NDR_ERR_SUCCESS; 19} 20 21_PUBLIC_ void ndr_print_dfs_ManagerVersion(struct ndr_print *ndr, const char *name, enum dfs_ManagerVersion r) 22{ 23 const char *val = NULL; 24 25 switch (r) { 26 case DFS_MANAGER_VERSION_NT4: val = "DFS_MANAGER_VERSION_NT4"; break; 27 case DFS_MANAGER_VERSION_W2K: val = "DFS_MANAGER_VERSION_W2K"; break; 28 case DFS_MANAGER_VERSION_W2K3: val = "DFS_MANAGER_VERSION_W2K3"; break; 29 case DFS_MANAGER_VERSION_W2K8: val = "DFS_MANAGER_VERSION_W2K8"; break; 30 } 31 ndr_print_enum(ndr, name, "ENUM", val, r); 32} 33 34static enum ndr_err_code ndr_push_dfs_Info0(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info0 *r) 35{ 36 if (ndr_flags & NDR_SCALARS) { 37 NDR_CHECK(ndr_push_align(ndr, 1)); 38 NDR_CHECK(ndr_push_trailer_align(ndr, 1)); 39 } 40 if (ndr_flags & NDR_BUFFERS) { 41 } 42 return NDR_ERR_SUCCESS; 43} 44 45static enum ndr_err_code ndr_pull_dfs_Info0(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info0 *r) 46{ 47 if (ndr_flags & NDR_SCALARS) { 48 NDR_CHECK(ndr_pull_align(ndr, 1)); 49 NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); 50 } 51 if (ndr_flags & NDR_BUFFERS) { 52 } 53 return NDR_ERR_SUCCESS; 54} 55 56_PUBLIC_ void ndr_print_dfs_Info0(struct ndr_print *ndr, const char *name, const struct dfs_Info0 *r) 57{ 58 ndr_print_struct(ndr, name, "dfs_Info0"); 59 ndr->depth++; 60 ndr->depth--; 61} 62 63static enum ndr_err_code ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info1 *r) 64{ 65 if (ndr_flags & NDR_SCALARS) { 66 NDR_CHECK(ndr_push_align(ndr, 5)); 67 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path)); 68 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 69 } 70 if (ndr_flags & NDR_BUFFERS) { 71 if (r->path) { 72 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); 73 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 74 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); 75 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 76 } 77 } 78 return NDR_ERR_SUCCESS; 79} 80 81static enum ndr_err_code ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info1 *r) 82{ 83 uint32_t _ptr_path; 84 TALLOC_CTX *_mem_save_path_0; 85 if (ndr_flags & NDR_SCALARS) { 86 NDR_CHECK(ndr_pull_align(ndr, 5)); 87 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path)); 88 if (_ptr_path) { 89 NDR_PULL_ALLOC(ndr, r->path); 90 } else { 91 r->path = NULL; 92 } 93 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 94 } 95 if (ndr_flags & NDR_BUFFERS) { 96 if (r->path) { 97 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr); 98 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0); 99 NDR_CHECK(ndr_pull_array_size(ndr, &r->path)); 100 NDR_CHECK(ndr_pull_array_length(ndr, &r->path)); 101 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) { 102 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path)); 103 } 104 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t))); 105 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16)); 106 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0); 107 } 108 } 109 return NDR_ERR_SUCCESS; 110} 111 112_PUBLIC_ void ndr_print_dfs_Info1(struct ndr_print *ndr, const char *name, const struct dfs_Info1 *r) 113{ 114 ndr_print_struct(ndr, name, "dfs_Info1"); 115 ndr->depth++; 116 ndr_print_ptr(ndr, "path", r->path); 117 ndr->depth++; 118 if (r->path) { 119 ndr_print_string(ndr, "path", r->path); 120 } 121 ndr->depth--; 122 ndr->depth--; 123} 124 125_PUBLIC_ enum ndr_err_code ndr_push_dfs_VolumeState(struct ndr_push *ndr, int ndr_flags, uint32_t r) 126{ 127 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); 128 return NDR_ERR_SUCCESS; 129} 130 131_PUBLIC_ enum ndr_err_code ndr_pull_dfs_VolumeState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) 132{ 133 uint32_t v; 134 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); 135 *r = v; 136 return NDR_ERR_SUCCESS; 137} 138 139_PUBLIC_ void ndr_print_dfs_VolumeState(struct ndr_print *ndr, const char *name, uint32_t r) 140{ 141 ndr_print_uint32(ndr, name, r); 142 ndr->depth++; 143 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OK", DFS_VOLUME_STATE_OK, r); 144 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_INCONSISTENT", DFS_VOLUME_STATE_INCONSISTENT, r); 145 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OFFLINE", DFS_VOLUME_STATE_OFFLINE, r); 146 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_ONLINE", DFS_VOLUME_STATE_ONLINE, r); 147 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_STANDALONE", DFS_VOLUME_STATE_STANDALONE, r); 148 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_AD_BLOB", DFS_VOLUME_STATE_AD_BLOB, r); 149 ndr->depth--; 150} 151 152static enum ndr_err_code ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info2 *r) 153{ 154 if (ndr_flags & NDR_SCALARS) { 155 NDR_CHECK(ndr_push_align(ndr, 5)); 156 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path)); 157 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); 158 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state)); 159 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); 160 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 161 } 162 if (ndr_flags & NDR_BUFFERS) { 163 if (r->path) { 164 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); 165 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 166 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); 167 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 168 } 169 if (r->comment) { 170 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); 171 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 172 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); 173 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 174 } 175 } 176 return NDR_ERR_SUCCESS; 177} 178 179static enum ndr_err_code ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r) 180{ 181 uint32_t _ptr_path; 182 TALLOC_CTX *_mem_save_path_0; 183 uint32_t _ptr_comment; 184 TALLOC_CTX *_mem_save_comment_0; 185 if (ndr_flags & NDR_SCALARS) { 186 NDR_CHECK(ndr_pull_align(ndr, 5)); 187 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path)); 188 if (_ptr_path) { 189 NDR_PULL_ALLOC(ndr, r->path); 190 } else { 191 r->path = NULL; 192 } 193 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment)); 194 if (_ptr_comment) { 195 NDR_PULL_ALLOC(ndr, r->comment); 196 } else { 197 r->comment = NULL; 198 } 199 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state)); 200 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores)); 201 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 202 } 203 if (ndr_flags & NDR_BUFFERS) { 204 if (r->path) { 205 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr); 206 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0); 207 NDR_CHECK(ndr_pull_array_size(ndr, &r->path)); 208 NDR_CHECK(ndr_pull_array_length(ndr, &r->path)); 209 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) { 210 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path)); 211 } 212 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t))); 213 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16)); 214 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0); 215 } 216 if (r->comment) { 217 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr); 218 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0); 219 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment)); 220 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment)); 221 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) { 222 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment)); 223 } 224 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t))); 225 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16)); 226 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); 227 } 228 } 229 return NDR_ERR_SUCCESS; 230} 231 232_PUBLIC_ void ndr_print_dfs_Info2(struct ndr_print *ndr, const char *name, const struct dfs_Info2 *r) 233{ 234 ndr_print_struct(ndr, name, "dfs_Info2"); 235 ndr->depth++; 236 ndr_print_ptr(ndr, "path", r->path); 237 ndr->depth++; 238 if (r->path) { 239 ndr_print_string(ndr, "path", r->path); 240 } 241 ndr->depth--; 242 ndr_print_ptr(ndr, "comment", r->comment); 243 ndr->depth++; 244 if (r->comment) { 245 ndr_print_string(ndr, "comment", r->comment); 246 } 247 ndr->depth--; 248 ndr_print_dfs_VolumeState(ndr, "state", r->state); 249 ndr_print_uint32(ndr, "num_stores", r->num_stores); 250 ndr->depth--; 251} 252 253_PUBLIC_ enum ndr_err_code ndr_push_dfs_StorageState(struct ndr_push *ndr, int ndr_flags, uint32_t r) 254{ 255 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); 256 return NDR_ERR_SUCCESS; 257} 258 259_PUBLIC_ enum ndr_err_code ndr_pull_dfs_StorageState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) 260{ 261 uint32_t v; 262 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); 263 *r = v; 264 return NDR_ERR_SUCCESS; 265} 266 267_PUBLIC_ void ndr_print_dfs_StorageState(struct ndr_print *ndr, const char *name, uint32_t r) 268{ 269 ndr_print_uint32(ndr, name, r); 270 ndr->depth++; 271 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_OFFLINE", DFS_STORAGE_STATE_OFFLINE, r); 272 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ONLINE", DFS_STORAGE_STATE_ONLINE, r); 273 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ACTIVE", DFS_STORAGE_STATE_ACTIVE, r); 274 ndr->depth--; 275} 276 277static enum ndr_err_code ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo *r) 278{ 279 if (ndr_flags & NDR_SCALARS) { 280 NDR_CHECK(ndr_push_align(ndr, 5)); 281 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state)); 282 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server)); 283 NDR_CHECK(ndr_push_unique_ptr(ndr, r->share)); 284 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 285 } 286 if (ndr_flags & NDR_BUFFERS) { 287 if (r->server) { 288 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16))); 289 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 290 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16))); 291 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server, ndr_charset_length(r->server, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 292 } 293 if (r->share) { 294 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16))); 295 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 296 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16))); 297 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 298 } 299 } 300 return NDR_ERR_SUCCESS; 301} 302 303static enum ndr_err_code ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r) 304{ 305 uint32_t _ptr_server; 306 TALLOC_CTX *_mem_save_server_0; 307 uint32_t _ptr_share; 308 TALLOC_CTX *_mem_save_share_0; 309 if (ndr_flags & NDR_SCALARS) { 310 NDR_CHECK(ndr_pull_align(ndr, 5)); 311 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state)); 312 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server)); 313 if (_ptr_server) { 314 NDR_PULL_ALLOC(ndr, r->server); 315 } else { 316 r->server = NULL; 317 } 318 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share)); 319 if (_ptr_share) { 320 NDR_PULL_ALLOC(ndr, r->share); 321 } else { 322 r->share = NULL; 323 } 324 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 325 } 326 if (ndr_flags & NDR_BUFFERS) { 327 if (r->server) { 328 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr); 329 NDR_PULL_SET_MEM_CTX(ndr, r->server, 0); 330 NDR_CHECK(ndr_pull_array_size(ndr, &r->server)); 331 NDR_CHECK(ndr_pull_array_length(ndr, &r->server)); 332 if (ndr_get_array_length(ndr, &r->server) > ndr_get_array_size(ndr, &r->server)) { 333 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->server), ndr_get_array_length(ndr, &r->server)); 334 } 335 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server), sizeof(uint16_t))); 336 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server, ndr_get_array_length(ndr, &r->server), sizeof(uint16_t), CH_UTF16)); 337 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0); 338 } 339 if (r->share) { 340 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr); 341 NDR_PULL_SET_MEM_CTX(ndr, r->share, 0); 342 NDR_CHECK(ndr_pull_array_size(ndr, &r->share)); 343 NDR_CHECK(ndr_pull_array_length(ndr, &r->share)); 344 if (ndr_get_array_length(ndr, &r->share) > ndr_get_array_size(ndr, &r->share)) { 345 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->share), ndr_get_array_length(ndr, &r->share)); 346 } 347 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t))); 348 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t), CH_UTF16)); 349 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0); 350 } 351 } 352 return NDR_ERR_SUCCESS; 353} 354 355_PUBLIC_ void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo *r) 356{ 357 ndr_print_struct(ndr, name, "dfs_StorageInfo"); 358 ndr->depth++; 359 ndr_print_dfs_StorageState(ndr, "state", r->state); 360 ndr_print_ptr(ndr, "server", r->server); 361 ndr->depth++; 362 if (r->server) { 363 ndr_print_string(ndr, "server", r->server); 364 } 365 ndr->depth--; 366 ndr_print_ptr(ndr, "share", r->share); 367 ndr->depth++; 368 if (r->share) { 369 ndr_print_string(ndr, "share", r->share); 370 } 371 ndr->depth--; 372 ndr->depth--; 373} 374 375static enum ndr_err_code ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info3 *r) 376{ 377 uint32_t cntr_stores_1; 378 if (ndr_flags & NDR_SCALARS) { 379 NDR_CHECK(ndr_push_align(ndr, 5)); 380 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path)); 381 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); 382 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state)); 383 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); 384 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores)); 385 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 386 } 387 if (ndr_flags & NDR_BUFFERS) { 388 if (r->path) { 389 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); 390 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 391 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); 392 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 393 } 394 if (r->comment) { 395 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); 396 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 397 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); 398 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 399 } 400 if (r->stores) { 401 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_stores)); 402 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { 403 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1])); 404 } 405 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { 406 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1])); 407 } 408 } 409 } 410 return NDR_ERR_SUCCESS; 411} 412 413static enum ndr_err_code ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r) 414{ 415 uint32_t _ptr_path; 416 TALLOC_CTX *_mem_save_path_0; 417 uint32_t _ptr_comment; 418 TALLOC_CTX *_mem_save_comment_0; 419 uint32_t _ptr_stores; 420 uint32_t cntr_stores_1; 421 TALLOC_CTX *_mem_save_stores_0; 422 TALLOC_CTX *_mem_save_stores_1; 423 if (ndr_flags & NDR_SCALARS) { 424 NDR_CHECK(ndr_pull_align(ndr, 5)); 425 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path)); 426 if (_ptr_path) { 427 NDR_PULL_ALLOC(ndr, r->path); 428 } else { 429 r->path = NULL; 430 } 431 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment)); 432 if (_ptr_comment) { 433 NDR_PULL_ALLOC(ndr, r->comment); 434 } else { 435 r->comment = NULL; 436 } 437 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state)); 438 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores)); 439 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores)); 440 if (_ptr_stores) { 441 NDR_PULL_ALLOC(ndr, r->stores); 442 } else { 443 r->stores = NULL; 444 } 445 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 446 } 447 if (ndr_flags & NDR_BUFFERS) { 448 if (r->path) { 449 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr); 450 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0); 451 NDR_CHECK(ndr_pull_array_size(ndr, &r->path)); 452 NDR_CHECK(ndr_pull_array_length(ndr, &r->path)); 453 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) { 454 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path)); 455 } 456 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t))); 457 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16)); 458 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0); 459 } 460 if (r->comment) { 461 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr); 462 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0); 463 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment)); 464 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment)); 465 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) { 466 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment)); 467 } 468 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t))); 469 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16)); 470 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); 471 } 472 if (r->stores) { 473 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr); 474 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0); 475 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores)); 476 NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores)); 477 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr); 478 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0); 479 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { 480 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1])); 481 } 482 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { 483 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1])); 484 } 485 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0); 486 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0); 487 } 488 if (r->stores) { 489 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores)); 490 } 491 } 492 return NDR_ERR_SUCCESS; 493} 494 495_PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const struct dfs_Info3 *r) 496{ 497 uint32_t cntr_stores_1; 498 ndr_print_struct(ndr, name, "dfs_Info3"); 499 ndr->depth++; 500 ndr_print_ptr(ndr, "path", r->path); 501 ndr->depth++; 502 if (r->path) { 503 ndr_print_string(ndr, "path", r->path); 504 } 505 ndr->depth--; 506 ndr_print_ptr(ndr, "comment", r->comment); 507 ndr->depth++; 508 if (r->comment) { 509 ndr_print_string(ndr, "comment", r->comment); 510 } 511 ndr->depth--; 512 ndr_print_dfs_VolumeState(ndr, "state", r->state); 513 ndr_print_uint32(ndr, "num_stores", r->num_stores); 514 ndr_print_ptr(ndr, "stores", r->stores); 515 ndr->depth++; 516 if (r->stores) { 517 ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores); 518 ndr->depth++; 519 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) { 520 char *idx_1=NULL; 521 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) { 522 ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]); 523 free(idx_1); 524 } 525 } 526 ndr->depth--; 527 } 528 ndr->depth--; 529 ndr->depth--; 530} 531 532static enum ndr_err_code ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info4 *r) 533{ 534 uint32_t cntr_stores_1; 535 if (ndr_flags & NDR_SCALARS) { 536 NDR_CHECK(ndr_push_align(ndr, 5)); 537 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path)); 538 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); 539 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state)); 540 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout)); 541 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid)); 542 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); 543 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores)); 544 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 545 } 546 if (ndr_flags & NDR_BUFFERS) { 547 if (r->path) { 548 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); 549 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 550 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); 551 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 552 } 553 if (r->comment) { 554 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); 555 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 556 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); 557 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 558 } 559 if (r->stores) { 560 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_stores)); 561 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { 562 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1])); 563 } 564 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { 565 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1])); 566 } 567 } 568 } 569 return NDR_ERR_SUCCESS; 570} 571 572static enum ndr_err_code ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info4 *r) 573{ 574 uint32_t _ptr_path; 575 TALLOC_CTX *_mem_save_path_0; 576 uint32_t _ptr_comment; 577 TALLOC_CTX *_mem_save_comment_0; 578 uint32_t _ptr_stores; 579 uint32_t cntr_stores_1; 580 TALLOC_CTX *_mem_save_stores_0; 581 TALLOC_CTX *_mem_save_stores_1; 582 if (ndr_flags & NDR_SCALARS) { 583 NDR_CHECK(ndr_pull_align(ndr, 5)); 584 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path)); 585 if (_ptr_path) { 586 NDR_PULL_ALLOC(ndr, r->path); 587 } else { 588 r->path = NULL; 589 } 590 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment)); 591 if (_ptr_comment) { 592 NDR_PULL_ALLOC(ndr, r->comment); 593 } else { 594 r->comment = NULL; 595 } 596 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state)); 597 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout)); 598 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid)); 599 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores)); 600 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores)); 601 if (_ptr_stores) { 602 NDR_PULL_ALLOC(ndr, r->stores); 603 } else { 604 r->stores = NULL; 605 } 606 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 607 } 608 if (ndr_flags & NDR_BUFFERS) { 609 if (r->path) { 610 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr); 611 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0); 612 NDR_CHECK(ndr_pull_array_size(ndr, &r->path)); 613 NDR_CHECK(ndr_pull_array_length(ndr, &r->path)); 614 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) { 615 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path)); 616 } 617 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t))); 618 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16)); 619 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0); 620 } 621 if (r->comment) { 622 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr); 623 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0); 624 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment)); 625 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment)); 626 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) { 627 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment)); 628 } 629 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t))); 630 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16)); 631 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); 632 } 633 if (r->stores) { 634 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr); 635 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0); 636 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores)); 637 NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores)); 638 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr); 639 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0); 640 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { 641 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1])); 642 } 643 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { 644 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1])); 645 } 646 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0); 647 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0); 648 } 649 if (r->stores) { 650 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores)); 651 } 652 } 653 return NDR_ERR_SUCCESS; 654} 655 656_PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const struct dfs_Info4 *r) 657{ 658 uint32_t cntr_stores_1; 659 ndr_print_struct(ndr, name, "dfs_Info4"); 660 ndr->depth++; 661 ndr_print_ptr(ndr, "path", r->path); 662 ndr->depth++; 663 if (r->path) { 664 ndr_print_string(ndr, "path", r->path); 665 } 666 ndr->depth--; 667 ndr_print_ptr(ndr, "comment", r->comment); 668 ndr->depth++; 669 if (r->comment) { 670 ndr_print_string(ndr, "comment", r->comment); 671 } 672 ndr->depth--; 673 ndr_print_dfs_VolumeState(ndr, "state", r->state); 674 ndr_print_uint32(ndr, "timeout", r->timeout); 675 ndr_print_GUID(ndr, "guid", &r->guid); 676 ndr_print_uint32(ndr, "num_stores", r->num_stores); 677 ndr_print_ptr(ndr, "stores", r->stores); 678 ndr->depth++; 679 if (r->stores) { 680 ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores); 681 ndr->depth++; 682 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) { 683 char *idx_1=NULL; 684 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) { 685 ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]); 686 free(idx_1); 687 } 688 } 689 ndr->depth--; 690 } 691 ndr->depth--; 692 ndr->depth--; 693} 694 695_PUBLIC_ enum ndr_err_code ndr_push_dfs_PropertyFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r) 696{ 697 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); 698 return NDR_ERR_SUCCESS; 699} 700 701_PUBLIC_ enum ndr_err_code ndr_pull_dfs_PropertyFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) 702{ 703 uint32_t v; 704 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); 705 *r = v; 706 return NDR_ERR_SUCCESS; 707} 708 709_PUBLIC_ void ndr_print_dfs_PropertyFlags(struct ndr_print *ndr, const char *name, uint32_t r) 710{ 711 ndr_print_uint32(ndr, name, r); 712 ndr->depth++; 713 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_INSITE_REFERRALS", DFS_PROPERTY_FLAG_INSITE_REFERRALS, r); 714 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_ROOT_SCALABILITY", DFS_PROPERTY_FLAG_ROOT_SCALABILITY, r); 715 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_SITE_COSTING", DFS_PROPERTY_FLAG_SITE_COSTING, r); 716 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_TARGET_FAILBACK", DFS_PROPERTY_FLAG_TARGET_FAILBACK, r); 717 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_CLUSTER_ENABLED", DFS_PROPERTY_FLAG_CLUSTER_ENABLED, r); 718 ndr->depth--; 719} 720 721static enum ndr_err_code ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info5 *r) 722{ 723 if (ndr_flags & NDR_SCALARS) { 724 NDR_CHECK(ndr_push_align(ndr, 5)); 725 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path)); 726 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); 727 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state)); 728 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout)); 729 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid)); 730 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags)); 731 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize)); 732 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); 733 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 734 } 735 if (ndr_flags & NDR_BUFFERS) { 736 if (r->path) { 737 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); 738 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 739 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); 740 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 741 } 742 if (r->comment) { 743 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); 744 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 745 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); 746 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 747 } 748 } 749 return NDR_ERR_SUCCESS; 750} 751 752static enum ndr_err_code ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info5 *r) 753{ 754 uint32_t _ptr_path; 755 TALLOC_CTX *_mem_save_path_0; 756 uint32_t _ptr_comment; 757 TALLOC_CTX *_mem_save_comment_0; 758 if (ndr_flags & NDR_SCALARS) { 759 NDR_CHECK(ndr_pull_align(ndr, 5)); 760 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path)); 761 if (_ptr_path) { 762 NDR_PULL_ALLOC(ndr, r->path); 763 } else { 764 r->path = NULL; 765 } 766 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment)); 767 if (_ptr_comment) { 768 NDR_PULL_ALLOC(ndr, r->comment); 769 } else { 770 r->comment = NULL; 771 } 772 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state)); 773 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout)); 774 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid)); 775 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags)); 776 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize)); 777 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores)); 778 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 779 } 780 if (ndr_flags & NDR_BUFFERS) { 781 if (r->path) { 782 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr); 783 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0); 784 NDR_CHECK(ndr_pull_array_size(ndr, &r->path)); 785 NDR_CHECK(ndr_pull_array_length(ndr, &r->path)); 786 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) { 787 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path)); 788 } 789 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t))); 790 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16)); 791 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0); 792 } 793 if (r->comment) { 794 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr); 795 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0); 796 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment)); 797 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment)); 798 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) { 799 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment)); 800 } 801 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t))); 802 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16)); 803 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); 804 } 805 } 806 return NDR_ERR_SUCCESS; 807} 808 809_PUBLIC_ void ndr_print_dfs_Info5(struct ndr_print *ndr, const char *name, const struct dfs_Info5 *r) 810{ 811 ndr_print_struct(ndr, name, "dfs_Info5"); 812 ndr->depth++; 813 ndr_print_ptr(ndr, "path", r->path); 814 ndr->depth++; 815 if (r->path) { 816 ndr_print_string(ndr, "path", r->path); 817 } 818 ndr->depth--; 819 ndr_print_ptr(ndr, "comment", r->comment); 820 ndr->depth++; 821 if (r->comment) { 822 ndr_print_string(ndr, "comment", r->comment); 823 } 824 ndr->depth--; 825 ndr_print_dfs_VolumeState(ndr, "state", r->state); 826 ndr_print_uint32(ndr, "timeout", r->timeout); 827 ndr_print_GUID(ndr, "guid", &r->guid); 828 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags); 829 ndr_print_uint32(ndr, "pktsize", r->pktsize); 830 ndr_print_uint32(ndr, "num_stores", r->num_stores); 831 ndr->depth--; 832} 833 834static enum ndr_err_code ndr_push_dfs_Target_PriorityClass(struct ndr_push *ndr, int ndr_flags, enum dfs_Target_PriorityClass r) 835{ 836 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r)); 837 return NDR_ERR_SUCCESS; 838} 839 840static enum ndr_err_code ndr_pull_dfs_Target_PriorityClass(struct ndr_pull *ndr, int ndr_flags, enum dfs_Target_PriorityClass *r) 841{ 842 uint32_t v; 843 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v)); 844 *r = v; 845 return NDR_ERR_SUCCESS; 846} 847 848_PUBLIC_ void ndr_print_dfs_Target_PriorityClass(struct ndr_print *ndr, const char *name, enum dfs_Target_PriorityClass r) 849{ 850 const char *val = NULL; 851 852 switch (r) { 853 case DFS_INVALID_PRIORITY_CLASS: val = "DFS_INVALID_PRIORITY_CLASS"; break; 854 case DFS_SITE_COST_NORMAL_PRIORITY_CLASS: val = "DFS_SITE_COST_NORMAL_PRIORITY_CLASS"; break; 855 case DFS_GLOBAL_HIGH_PRIORITY_CLASS: val = "DFS_GLOBAL_HIGH_PRIORITY_CLASS"; break; 856 case DFS_SITE_COST_HIGH_PRIORITY_CLASS: val = "DFS_SITE_COST_HIGH_PRIORITY_CLASS"; break; 857 case DFS_SITE_COST_LOW_PRIORITY_CLASS: val = "DFS_SITE_COST_LOW_PRIORITY_CLASS"; break; 858 case DFS_GLOBAL_LOW_PRIORITY_CLASS: val = "DFS_GLOBAL_LOW_PRIORITY_CLASS"; break; 859 } 860 ndr_print_enum(ndr, name, "ENUM", val, r); 861} 862 863static enum ndr_err_code ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags, const struct dfs_Target_Priority *r) 864{ 865 if (ndr_flags & NDR_SCALARS) { 866 NDR_CHECK(ndr_push_align(ndr, 4)); 867 NDR_CHECK(ndr_push_dfs_Target_PriorityClass(ndr, NDR_SCALARS, r->target_priority_class)); 868 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->target_priority_rank)); 869 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved)); 870 NDR_CHECK(ndr_push_trailer_align(ndr, 4)); 871 } 872 if (ndr_flags & NDR_BUFFERS) { 873 } 874 return NDR_ERR_SUCCESS; 875} 876 877static enum ndr_err_code ndr_pull_dfs_Target_Priority(struct ndr_pull *ndr, int ndr_flags, struct dfs_Target_Priority *r) 878{ 879 if (ndr_flags & NDR_SCALARS) { 880 NDR_CHECK(ndr_pull_align(ndr, 4)); 881 NDR_CHECK(ndr_pull_dfs_Target_PriorityClass(ndr, NDR_SCALARS, &r->target_priority_class)); 882 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->target_priority_rank)); 883 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved)); 884 NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); 885 } 886 if (ndr_flags & NDR_BUFFERS) { 887 } 888 return NDR_ERR_SUCCESS; 889} 890 891_PUBLIC_ void ndr_print_dfs_Target_Priority(struct ndr_print *ndr, const char *name, const struct dfs_Target_Priority *r) 892{ 893 ndr_print_struct(ndr, name, "dfs_Target_Priority"); 894 ndr->depth++; 895 ndr_print_dfs_Target_PriorityClass(ndr, "target_priority_class", r->target_priority_class); 896 ndr_print_uint16(ndr, "target_priority_rank", r->target_priority_rank); 897 ndr_print_uint16(ndr, "reserved", r->reserved); 898 ndr->depth--; 899} 900 901static enum ndr_err_code ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo2 *r) 902{ 903 if (ndr_flags & NDR_SCALARS) { 904 NDR_CHECK(ndr_push_align(ndr, 5)); 905 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info)); 906 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority)); 907 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 908 } 909 if (ndr_flags & NDR_BUFFERS) { 910 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info)); 911 } 912 return NDR_ERR_SUCCESS; 913} 914 915static enum ndr_err_code ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo2 *r) 916{ 917 if (ndr_flags & NDR_SCALARS) { 918 NDR_CHECK(ndr_pull_align(ndr, 5)); 919 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info)); 920 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority)); 921 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 922 } 923 if (ndr_flags & NDR_BUFFERS) { 924 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info)); 925 } 926 return NDR_ERR_SUCCESS; 927} 928 929_PUBLIC_ void ndr_print_dfs_StorageInfo2(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo2 *r) 930{ 931 ndr_print_struct(ndr, name, "dfs_StorageInfo2"); 932 ndr->depth++; 933 ndr_print_dfs_StorageInfo(ndr, "info", &r->info); 934 ndr_print_dfs_Target_Priority(ndr, "target_priority", &r->target_priority); 935 ndr->depth--; 936} 937 938static enum ndr_err_code ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info6 *r) 939{ 940 uint32_t cntr_stores_1; 941 if (ndr_flags & NDR_SCALARS) { 942 NDR_CHECK(ndr_push_align(ndr, 5)); 943 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entry_path)); 944 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); 945 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state)); 946 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout)); 947 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid)); 948 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags)); 949 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize)); 950 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_stores)); 951 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores)); 952 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 953 } 954 if (ndr_flags & NDR_BUFFERS) { 955 if (r->entry_path) { 956 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16))); 957 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 958 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16))); 959 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->entry_path, ndr_charset_length(r->entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 960 } 961 if (r->comment) { 962 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); 963 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 964 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); 965 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 966 } 967 if (r->stores) { 968 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_stores)); 969 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { 970 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1])); 971 } 972 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { 973 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1])); 974 } 975 } 976 } 977 return NDR_ERR_SUCCESS; 978} 979 980static enum ndr_err_code ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info6 *r) 981{ 982 uint32_t _ptr_entry_path; 983 TALLOC_CTX *_mem_save_entry_path_0; 984 uint32_t _ptr_comment; 985 TALLOC_CTX *_mem_save_comment_0; 986 uint32_t _ptr_stores; 987 uint32_t cntr_stores_1; 988 TALLOC_CTX *_mem_save_stores_0; 989 TALLOC_CTX *_mem_save_stores_1; 990 if (ndr_flags & NDR_SCALARS) { 991 NDR_CHECK(ndr_pull_align(ndr, 5)); 992 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entry_path)); 993 if (_ptr_entry_path) { 994 NDR_PULL_ALLOC(ndr, r->entry_path); 995 } else { 996 r->entry_path = NULL; 997 } 998 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment)); 999 if (_ptr_comment) { 1000 NDR_PULL_ALLOC(ndr, r->comment); 1001 } else { 1002 r->comment = NULL; 1003 } 1004 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state)); 1005 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout)); 1006 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid)); 1007 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags)); 1008 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize)); 1009 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_stores)); 1010 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores)); 1011 if (_ptr_stores) { 1012 NDR_PULL_ALLOC(ndr, r->stores); 1013 } else { 1014 r->stores = NULL; 1015 } 1016 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 1017 } 1018 if (ndr_flags & NDR_BUFFERS) { 1019 if (r->entry_path) { 1020 _mem_save_entry_path_0 = NDR_PULL_GET_MEM_CTX(ndr); 1021 NDR_PULL_SET_MEM_CTX(ndr, r->entry_path, 0); 1022 NDR_CHECK(ndr_pull_array_size(ndr, &r->entry_path)); 1023 NDR_CHECK(ndr_pull_array_length(ndr, &r->entry_path)); 1024 if (ndr_get_array_length(ndr, &r->entry_path) > ndr_get_array_size(ndr, &r->entry_path)) { 1025 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->entry_path), ndr_get_array_length(ndr, &r->entry_path)); 1026 } 1027 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->entry_path), sizeof(uint16_t))); 1028 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->entry_path, ndr_get_array_length(ndr, &r->entry_path), sizeof(uint16_t), CH_UTF16)); 1029 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_path_0, 0); 1030 } 1031 if (r->comment) { 1032 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr); 1033 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0); 1034 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment)); 1035 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment)); 1036 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) { 1037 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment)); 1038 } 1039 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t))); 1040 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16)); 1041 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); 1042 } 1043 if (r->stores) { 1044 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr); 1045 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0); 1046 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores)); 1047 NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores)); 1048 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr); 1049 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0); 1050 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { 1051 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1])); 1052 } 1053 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { 1054 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1])); 1055 } 1056 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0); 1057 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0); 1058 } 1059 if (r->stores) { 1060 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores)); 1061 } 1062 } 1063 return NDR_ERR_SUCCESS; 1064} 1065 1066_PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const struct dfs_Info6 *r) 1067{ 1068 uint32_t cntr_stores_1; 1069 ndr_print_struct(ndr, name, "dfs_Info6"); 1070 ndr->depth++; 1071 ndr_print_ptr(ndr, "entry_path", r->entry_path); 1072 ndr->depth++; 1073 if (r->entry_path) { 1074 ndr_print_string(ndr, "entry_path", r->entry_path); 1075 } 1076 ndr->depth--; 1077 ndr_print_ptr(ndr, "comment", r->comment); 1078 ndr->depth++; 1079 if (r->comment) { 1080 ndr_print_string(ndr, "comment", r->comment); 1081 } 1082 ndr->depth--; 1083 ndr_print_dfs_VolumeState(ndr, "state", r->state); 1084 ndr_print_uint32(ndr, "timeout", r->timeout); 1085 ndr_print_GUID(ndr, "guid", &r->guid); 1086 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags); 1087 ndr_print_uint32(ndr, "pktsize", r->pktsize); 1088 ndr_print_uint16(ndr, "num_stores", r->num_stores); 1089 ndr_print_ptr(ndr, "stores", r->stores); 1090 ndr->depth++; 1091 if (r->stores) { 1092 ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores); 1093 ndr->depth++; 1094 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) { 1095 char *idx_1=NULL; 1096 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) { 1097 ndr_print_dfs_StorageInfo2(ndr, "stores", &r->stores[cntr_stores_1]); 1098 free(idx_1); 1099 } 1100 } 1101 ndr->depth--; 1102 } 1103 ndr->depth--; 1104 ndr->depth--; 1105} 1106 1107static enum ndr_err_code ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info7 *r) 1108{ 1109 if (ndr_flags & NDR_SCALARS) { 1110 NDR_CHECK(ndr_push_align(ndr, 4)); 1111 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->generation_guid)); 1112 NDR_CHECK(ndr_push_trailer_align(ndr, 4)); 1113 } 1114 if (ndr_flags & NDR_BUFFERS) { 1115 } 1116 return NDR_ERR_SUCCESS; 1117} 1118 1119static enum ndr_err_code ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info7 *r) 1120{ 1121 if (ndr_flags & NDR_SCALARS) { 1122 NDR_CHECK(ndr_pull_align(ndr, 4)); 1123 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->generation_guid)); 1124 NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); 1125 } 1126 if (ndr_flags & NDR_BUFFERS) { 1127 } 1128 return NDR_ERR_SUCCESS; 1129} 1130 1131_PUBLIC_ void ndr_print_dfs_Info7(struct ndr_print *ndr, const char *name, const struct dfs_Info7 *r) 1132{ 1133 ndr_print_struct(ndr, name, "dfs_Info7"); 1134 ndr->depth++; 1135 ndr_print_GUID(ndr, "generation_guid", &r->generation_guid); 1136 ndr->depth--; 1137} 1138 1139static enum ndr_err_code ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r) 1140{ 1141 if (ndr_flags & NDR_SCALARS) { 1142 NDR_CHECK(ndr_push_align(ndr, 5)); 1143 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); 1144 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 1145 } 1146 if (ndr_flags & NDR_BUFFERS) { 1147 if (r->comment) { 1148 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); 1149 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 1150 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); 1151 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 1152 } 1153 } 1154 return NDR_ERR_SUCCESS; 1155} 1156 1157static enum ndr_err_code ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r) 1158{ 1159 uint32_t _ptr_comment; 1160 TALLOC_CTX *_mem_save_comment_0; 1161 if (ndr_flags & NDR_SCALARS) { 1162 NDR_CHECK(ndr_pull_align(ndr, 5)); 1163 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment)); 1164 if (_ptr_comment) { 1165 NDR_PULL_ALLOC(ndr, r->comment); 1166 } else { 1167 r->comment = NULL; 1168 } 1169 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 1170 } 1171 if (ndr_flags & NDR_BUFFERS) { 1172 if (r->comment) { 1173 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr); 1174 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0); 1175 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment)); 1176 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment)); 1177 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) { 1178 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment)); 1179 } 1180 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t))); 1181 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16)); 1182 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); 1183 } 1184 } 1185 return NDR_ERR_SUCCESS; 1186} 1187 1188_PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, const struct dfs_Info100 *r) 1189{ 1190 ndr_print_struct(ndr, name, "dfs_Info100"); 1191 ndr->depth++; 1192 ndr_print_ptr(ndr, "comment", r->comment); 1193 ndr->depth++; 1194 if (r->comment) { 1195 ndr_print_string(ndr, "comment", r->comment); 1196 } 1197 ndr->depth--; 1198 ndr->depth--; 1199} 1200 1201static enum ndr_err_code ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r) 1202{ 1203 if (ndr_flags & NDR_SCALARS) { 1204 NDR_CHECK(ndr_push_align(ndr, 4)); 1205 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state)); 1206 NDR_CHECK(ndr_push_trailer_align(ndr, 4)); 1207 } 1208 if (ndr_flags & NDR_BUFFERS) { 1209 } 1210 return NDR_ERR_SUCCESS; 1211} 1212 1213static enum ndr_err_code ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r) 1214{ 1215 if (ndr_flags & NDR_SCALARS) { 1216 NDR_CHECK(ndr_pull_align(ndr, 4)); 1217 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state)); 1218 NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); 1219 } 1220 if (ndr_flags & NDR_BUFFERS) { 1221 } 1222 return NDR_ERR_SUCCESS; 1223} 1224 1225_PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, const struct dfs_Info101 *r) 1226{ 1227 ndr_print_struct(ndr, name, "dfs_Info101"); 1228 ndr->depth++; 1229 ndr_print_dfs_StorageState(ndr, "state", r->state); 1230 ndr->depth--; 1231} 1232 1233static enum ndr_err_code ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r) 1234{ 1235 if (ndr_flags & NDR_SCALARS) { 1236 NDR_CHECK(ndr_push_align(ndr, 4)); 1237 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout)); 1238 NDR_CHECK(ndr_push_trailer_align(ndr, 4)); 1239 } 1240 if (ndr_flags & NDR_BUFFERS) { 1241 } 1242 return NDR_ERR_SUCCESS; 1243} 1244 1245static enum ndr_err_code ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r) 1246{ 1247 if (ndr_flags & NDR_SCALARS) { 1248 NDR_CHECK(ndr_pull_align(ndr, 4)); 1249 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout)); 1250 NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); 1251 } 1252 if (ndr_flags & NDR_BUFFERS) { 1253 } 1254 return NDR_ERR_SUCCESS; 1255} 1256 1257_PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, const struct dfs_Info102 *r) 1258{ 1259 ndr_print_struct(ndr, name, "dfs_Info102"); 1260 ndr->depth++; 1261 ndr_print_uint32(ndr, "timeout", r->timeout); 1262 ndr->depth--; 1263} 1264 1265static enum ndr_err_code ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info103 *r) 1266{ 1267 if (ndr_flags & NDR_SCALARS) { 1268 NDR_CHECK(ndr_push_align(ndr, 4)); 1269 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags)); 1270 NDR_CHECK(ndr_push_trailer_align(ndr, 4)); 1271 } 1272 if (ndr_flags & NDR_BUFFERS) { 1273 } 1274 return NDR_ERR_SUCCESS; 1275} 1276 1277static enum ndr_err_code ndr_pull_dfs_Info103(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info103 *r) 1278{ 1279 if (ndr_flags & NDR_SCALARS) { 1280 NDR_CHECK(ndr_pull_align(ndr, 4)); 1281 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags)); 1282 NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); 1283 } 1284 if (ndr_flags & NDR_BUFFERS) { 1285 } 1286 return NDR_ERR_SUCCESS; 1287} 1288 1289_PUBLIC_ void ndr_print_dfs_Info103(struct ndr_print *ndr, const char *name, const struct dfs_Info103 *r) 1290{ 1291 ndr_print_struct(ndr, name, "dfs_Info103"); 1292 ndr->depth++; 1293 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags); 1294 ndr->depth--; 1295} 1296 1297static enum ndr_err_code ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info104 *r) 1298{ 1299 if (ndr_flags & NDR_SCALARS) { 1300 NDR_CHECK(ndr_push_align(ndr, 4)); 1301 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority)); 1302 NDR_CHECK(ndr_push_trailer_align(ndr, 4)); 1303 } 1304 if (ndr_flags & NDR_BUFFERS) { 1305 } 1306 return NDR_ERR_SUCCESS; 1307} 1308 1309static enum ndr_err_code ndr_pull_dfs_Info104(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info104 *r) 1310{ 1311 if (ndr_flags & NDR_SCALARS) { 1312 NDR_CHECK(ndr_pull_align(ndr, 4)); 1313 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority)); 1314 NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); 1315 } 1316 if (ndr_flags & NDR_BUFFERS) { 1317 } 1318 return NDR_ERR_SUCCESS; 1319} 1320 1321_PUBLIC_ void ndr_print_dfs_Info104(struct ndr_print *ndr, const char *name, const struct dfs_Info104 *r) 1322{ 1323 ndr_print_struct(ndr, name, "dfs_Info104"); 1324 ndr->depth++; 1325 ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority); 1326 ndr->depth--; 1327} 1328 1329static enum ndr_err_code ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info105 *r) 1330{ 1331 if (ndr_flags & NDR_SCALARS) { 1332 NDR_CHECK(ndr_push_align(ndr, 5)); 1333 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); 1334 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state)); 1335 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout)); 1336 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flag_mask)); 1337 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flags)); 1338 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 1339 } 1340 if (ndr_flags & NDR_BUFFERS) { 1341 if (r->comment) { 1342 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); 1343 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 1344 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); 1345 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 1346 } 1347 } 1348 return NDR_ERR_SUCCESS; 1349} 1350 1351static enum ndr_err_code ndr_pull_dfs_Info105(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info105 *r) 1352{ 1353 uint32_t _ptr_comment; 1354 TALLOC_CTX *_mem_save_comment_0; 1355 if (ndr_flags & NDR_SCALARS) { 1356 NDR_CHECK(ndr_pull_align(ndr, 5)); 1357 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment)); 1358 if (_ptr_comment) { 1359 NDR_PULL_ALLOC(ndr, r->comment); 1360 } else { 1361 r->comment = NULL; 1362 } 1363 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state)); 1364 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout)); 1365 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flag_mask)); 1366 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flags)); 1367 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 1368 } 1369 if (ndr_flags & NDR_BUFFERS) { 1370 if (r->comment) { 1371 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr); 1372 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0); 1373 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment)); 1374 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment)); 1375 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) { 1376 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment)); 1377 } 1378 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t))); 1379 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16)); 1380 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); 1381 } 1382 } 1383 return NDR_ERR_SUCCESS; 1384} 1385 1386_PUBLIC_ void ndr_print_dfs_Info105(struct ndr_print *ndr, const char *name, const struct dfs_Info105 *r) 1387{ 1388 ndr_print_struct(ndr, name, "dfs_Info105"); 1389 ndr->depth++; 1390 ndr_print_ptr(ndr, "comment", r->comment); 1391 ndr->depth++; 1392 if (r->comment) { 1393 ndr_print_string(ndr, "comment", r->comment); 1394 } 1395 ndr->depth--; 1396 ndr_print_dfs_VolumeState(ndr, "state", r->state); 1397 ndr_print_uint32(ndr, "timeout", r->timeout); 1398 ndr_print_uint32(ndr, "property_flag_mask", r->property_flag_mask); 1399 ndr_print_uint32(ndr, "property_flags", r->property_flags); 1400 ndr->depth--; 1401} 1402 1403static enum ndr_err_code ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info106 *r) 1404{ 1405 if (ndr_flags & NDR_SCALARS) { 1406 NDR_CHECK(ndr_push_align(ndr, 4)); 1407 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state)); 1408 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority)); 1409 NDR_CHECK(ndr_push_trailer_align(ndr, 4)); 1410 } 1411 if (ndr_flags & NDR_BUFFERS) { 1412 } 1413 return NDR_ERR_SUCCESS; 1414} 1415 1416static enum ndr_err_code ndr_pull_dfs_Info106(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info106 *r) 1417{ 1418 if (ndr_flags & NDR_SCALARS) { 1419 NDR_CHECK(ndr_pull_align(ndr, 4)); 1420 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state)); 1421 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority)); 1422 NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); 1423 } 1424 if (ndr_flags & NDR_BUFFERS) { 1425 } 1426 return NDR_ERR_SUCCESS; 1427} 1428 1429_PUBLIC_ void ndr_print_dfs_Info106(struct ndr_print *ndr, const char *name, const struct dfs_Info106 *r) 1430{ 1431 ndr_print_struct(ndr, name, "dfs_Info106"); 1432 ndr->depth++; 1433 ndr_print_dfs_StorageState(ndr, "state", r->state); 1434 ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority); 1435 ndr->depth--; 1436} 1437 1438static enum ndr_err_code ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info200 *r) 1439{ 1440 if (ndr_flags & NDR_SCALARS) { 1441 NDR_CHECK(ndr_push_align(ndr, 5)); 1442 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root)); 1443 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 1444 } 1445 if (ndr_flags & NDR_BUFFERS) { 1446 if (r->dom_root) { 1447 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16))); 1448 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 1449 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16))); 1450 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 1451 } 1452 } 1453 return NDR_ERR_SUCCESS; 1454} 1455 1456static enum ndr_err_code ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r) 1457{ 1458 uint32_t _ptr_dom_root; 1459 TALLOC_CTX *_mem_save_dom_root_0; 1460 if (ndr_flags & NDR_SCALARS) { 1461 NDR_CHECK(ndr_pull_align(ndr, 5)); 1462 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root)); 1463 if (_ptr_dom_root) { 1464 NDR_PULL_ALLOC(ndr, r->dom_root); 1465 } else { 1466 r->dom_root = NULL; 1467 } 1468 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 1469 } 1470 if (ndr_flags & NDR_BUFFERS) { 1471 if (r->dom_root) { 1472 _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr); 1473 NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0); 1474 NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root)); 1475 NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root)); 1476 if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) { 1477 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->dom_root), ndr_get_array_length(ndr, &r->dom_root)); 1478 } 1479 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t))); 1480 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16)); 1481 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0); 1482 } 1483 } 1484 return NDR_ERR_SUCCESS; 1485} 1486 1487_PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, const struct dfs_Info200 *r) 1488{ 1489 ndr_print_struct(ndr, name, "dfs_Info200"); 1490 ndr->depth++; 1491 ndr_print_ptr(ndr, "dom_root", r->dom_root); 1492 ndr->depth++; 1493 if (r->dom_root) { 1494 ndr_print_string(ndr, "dom_root", r->dom_root); 1495 } 1496 ndr->depth--; 1497 ndr->depth--; 1498} 1499 1500static enum ndr_err_code ndr_push_dfs_VolumeFlavor(struct ndr_push *ndr, int ndr_flags, enum dfs_VolumeFlavor r) 1501{ 1502 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); 1503 return NDR_ERR_SUCCESS; 1504} 1505 1506static enum ndr_err_code ndr_pull_dfs_VolumeFlavor(struct ndr_pull *ndr, int ndr_flags, enum dfs_VolumeFlavor *r) 1507{ 1508 uint16_t v; 1509 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); 1510 *r = v; 1511 return NDR_ERR_SUCCESS; 1512} 1513 1514_PUBLIC_ void ndr_print_dfs_VolumeFlavor(struct ndr_print *ndr, const char *name, enum dfs_VolumeFlavor r) 1515{ 1516 const char *val = NULL; 1517 1518 switch (r) { 1519 case DFS_VOLUME_FLAVOR_STANDALONE: val = "DFS_VOLUME_FLAVOR_STANDALONE"; break; 1520 case DFS_VOLUME_FLAVOR_AD_BLOB: val = "DFS_VOLUME_FLAVOR_AD_BLOB"; break; 1521 } 1522 ndr_print_enum(ndr, name, "ENUM", val, r); 1523} 1524 1525static enum ndr_err_code ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info300 *r) 1526{ 1527 if (ndr_flags & NDR_SCALARS) { 1528 NDR_CHECK(ndr_push_align(ndr, 5)); 1529 NDR_CHECK(ndr_push_dfs_VolumeFlavor(ndr, NDR_SCALARS, r->flavor)); 1530 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root)); 1531 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 1532 } 1533 if (ndr_flags & NDR_BUFFERS) { 1534 if (r->dom_root) { 1535 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16))); 1536 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 1537 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16))); 1538 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 1539 } 1540 } 1541 return NDR_ERR_SUCCESS; 1542} 1543 1544static enum ndr_err_code ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r) 1545{ 1546 uint32_t _ptr_dom_root; 1547 TALLOC_CTX *_mem_save_dom_root_0; 1548 if (ndr_flags & NDR_SCALARS) { 1549 NDR_CHECK(ndr_pull_align(ndr, 5)); 1550 NDR_CHECK(ndr_pull_dfs_VolumeFlavor(ndr, NDR_SCALARS, &r->flavor)); 1551 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root)); 1552 if (_ptr_dom_root) { 1553 NDR_PULL_ALLOC(ndr, r->dom_root); 1554 } else { 1555 r->dom_root = NULL; 1556 } 1557 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 1558 } 1559 if (ndr_flags & NDR_BUFFERS) { 1560 if (r->dom_root) { 1561 _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr); 1562 NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0); 1563 NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root)); 1564 NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root)); 1565 if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) { 1566 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->dom_root), ndr_get_array_length(ndr, &r->dom_root)); 1567 } 1568 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t))); 1569 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16)); 1570 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0); 1571 } 1572 } 1573 return NDR_ERR_SUCCESS; 1574} 1575 1576_PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, const struct dfs_Info300 *r) 1577{ 1578 ndr_print_struct(ndr, name, "dfs_Info300"); 1579 ndr->depth++; 1580 ndr_print_dfs_VolumeFlavor(ndr, "flavor", r->flavor); 1581 ndr_print_ptr(ndr, "dom_root", r->dom_root); 1582 ndr->depth++; 1583 if (r->dom_root) { 1584 ndr_print_string(ndr, "dom_root", r->dom_root); 1585 } 1586 ndr->depth--; 1587 ndr->depth--; 1588} 1589 1590static enum ndr_err_code ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_Info *r) 1591{ 1592 if (ndr_flags & NDR_SCALARS) { 1593 int level = ndr_push_get_switch_value(ndr, r); 1594 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); 1595 NDR_CHECK(ndr_push_union_align(ndr, 5)); 1596 switch (level) { 1597 case 0: { 1598 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0)); 1599 break; } 1600 1601 case 1: { 1602 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); 1603 break; } 1604 1605 case 2: { 1606 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2)); 1607 break; } 1608 1609 case 3: { 1610 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3)); 1611 break; } 1612 1613 case 4: { 1614 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4)); 1615 break; } 1616 1617 case 5: { 1618 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5)); 1619 break; } 1620 1621 case 6: { 1622 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6)); 1623 break; } 1624 1625 case 7: { 1626 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info7)); 1627 break; } 1628 1629 case 100: { 1630 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100)); 1631 break; } 1632 1633 case 101: { 1634 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101)); 1635 break; } 1636 1637 case 102: { 1638 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102)); 1639 break; } 1640 1641 case 103: { 1642 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info103)); 1643 break; } 1644 1645 case 104: { 1646 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info104)); 1647 break; } 1648 1649 case 105: { 1650 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info105)); 1651 break; } 1652 1653 case 106: { 1654 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info106)); 1655 break; } 1656 1657 default: 1658 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); 1659 } 1660 } 1661 if (ndr_flags & NDR_BUFFERS) { 1662 int level = ndr_push_get_switch_value(ndr, r); 1663 switch (level) { 1664 case 0: 1665 if (r->info0) { 1666 NDR_CHECK(ndr_push_dfs_Info0(ndr, NDR_SCALARS, r->info0)); 1667 } 1668 break; 1669 1670 case 1: 1671 if (r->info1) { 1672 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1)); 1673 } 1674 break; 1675 1676 case 2: 1677 if (r->info2) { 1678 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2)); 1679 } 1680 break; 1681 1682 case 3: 1683 if (r->info3) { 1684 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3)); 1685 } 1686 break; 1687 1688 case 4: 1689 if (r->info4) { 1690 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4)); 1691 } 1692 break; 1693 1694 case 5: 1695 if (r->info5) { 1696 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5)); 1697 } 1698 break; 1699 1700 case 6: 1701 if (r->info6) { 1702 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6)); 1703 } 1704 break; 1705 1706 case 7: 1707 if (r->info7) { 1708 NDR_CHECK(ndr_push_dfs_Info7(ndr, NDR_SCALARS, r->info7)); 1709 } 1710 break; 1711 1712 case 100: 1713 if (r->info100) { 1714 NDR_CHECK(ndr_push_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100)); 1715 } 1716 break; 1717 1718 case 101: 1719 if (r->info101) { 1720 NDR_CHECK(ndr_push_dfs_Info101(ndr, NDR_SCALARS, r->info101)); 1721 } 1722 break; 1723 1724 case 102: 1725 if (r->info102) { 1726 NDR_CHECK(ndr_push_dfs_Info102(ndr, NDR_SCALARS, r->info102)); 1727 } 1728 break; 1729 1730 case 103: 1731 if (r->info103) { 1732 NDR_CHECK(ndr_push_dfs_Info103(ndr, NDR_SCALARS, r->info103)); 1733 } 1734 break; 1735 1736 case 104: 1737 if (r->info104) { 1738 NDR_CHECK(ndr_push_dfs_Info104(ndr, NDR_SCALARS, r->info104)); 1739 } 1740 break; 1741 1742 case 105: 1743 if (r->info105) { 1744 NDR_CHECK(ndr_push_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105)); 1745 } 1746 break; 1747 1748 case 106: 1749 if (r->info106) { 1750 NDR_CHECK(ndr_push_dfs_Info106(ndr, NDR_SCALARS, r->info106)); 1751 } 1752 break; 1753 1754 default: 1755 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); 1756 } 1757 } 1758 return NDR_ERR_SUCCESS; 1759} 1760 1761static enum ndr_err_code ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info *r) 1762{ 1763 int level; 1764 uint32_t _level; 1765 TALLOC_CTX *_mem_save_info0_0; 1766 TALLOC_CTX *_mem_save_info1_0; 1767 TALLOC_CTX *_mem_save_info2_0; 1768 TALLOC_CTX *_mem_save_info3_0; 1769 TALLOC_CTX *_mem_save_info4_0; 1770 TALLOC_CTX *_mem_save_info5_0; 1771 TALLOC_CTX *_mem_save_info6_0; 1772 TALLOC_CTX *_mem_save_info7_0; 1773 TALLOC_CTX *_mem_save_info100_0; 1774 TALLOC_CTX *_mem_save_info101_0; 1775 TALLOC_CTX *_mem_save_info102_0; 1776 TALLOC_CTX *_mem_save_info103_0; 1777 TALLOC_CTX *_mem_save_info104_0; 1778 TALLOC_CTX *_mem_save_info105_0; 1779 TALLOC_CTX *_mem_save_info106_0; 1780 level = ndr_pull_get_switch_value(ndr, r); 1781 if (ndr_flags & NDR_SCALARS) { 1782 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level)); 1783 if (_level != level) { 1784 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); 1785 } 1786 NDR_CHECK(ndr_pull_union_align(ndr, 5)); 1787 switch (level) { 1788 case 0: { 1789 uint32_t _ptr_info0; 1790 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0)); 1791 if (_ptr_info0) { 1792 NDR_PULL_ALLOC(ndr, r->info0); 1793 } else { 1794 r->info0 = NULL; 1795 } 1796 break; } 1797 1798 case 1: { 1799 uint32_t _ptr_info1; 1800 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1)); 1801 if (_ptr_info1) { 1802 NDR_PULL_ALLOC(ndr, r->info1); 1803 } else { 1804 r->info1 = NULL; 1805 } 1806 break; } 1807 1808 case 2: { 1809 uint32_t _ptr_info2; 1810 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2)); 1811 if (_ptr_info2) { 1812 NDR_PULL_ALLOC(ndr, r->info2); 1813 } else { 1814 r->info2 = NULL; 1815 } 1816 break; } 1817 1818 case 3: { 1819 uint32_t _ptr_info3; 1820 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3)); 1821 if (_ptr_info3) { 1822 NDR_PULL_ALLOC(ndr, r->info3); 1823 } else { 1824 r->info3 = NULL; 1825 } 1826 break; } 1827 1828 case 4: { 1829 uint32_t _ptr_info4; 1830 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4)); 1831 if (_ptr_info4) { 1832 NDR_PULL_ALLOC(ndr, r->info4); 1833 } else { 1834 r->info4 = NULL; 1835 } 1836 break; } 1837 1838 case 5: { 1839 uint32_t _ptr_info5; 1840 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5)); 1841 if (_ptr_info5) { 1842 NDR_PULL_ALLOC(ndr, r->info5); 1843 } else { 1844 r->info5 = NULL; 1845 } 1846 break; } 1847 1848 case 6: { 1849 uint32_t _ptr_info6; 1850 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6)); 1851 if (_ptr_info6) { 1852 NDR_PULL_ALLOC(ndr, r->info6); 1853 } else { 1854 r->info6 = NULL; 1855 } 1856 break; } 1857 1858 case 7: { 1859 uint32_t _ptr_info7; 1860 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info7)); 1861 if (_ptr_info7) { 1862 NDR_PULL_ALLOC(ndr, r->info7); 1863 } else { 1864 r->info7 = NULL; 1865 } 1866 break; } 1867 1868 case 100: { 1869 uint32_t _ptr_info100; 1870 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100)); 1871 if (_ptr_info100) { 1872 NDR_PULL_ALLOC(ndr, r->info100); 1873 } else { 1874 r->info100 = NULL; 1875 } 1876 break; } 1877 1878 case 101: { 1879 uint32_t _ptr_info101; 1880 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info101)); 1881 if (_ptr_info101) { 1882 NDR_PULL_ALLOC(ndr, r->info101); 1883 } else { 1884 r->info101 = NULL; 1885 } 1886 break; } 1887 1888 case 102: { 1889 uint32_t _ptr_info102; 1890 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info102)); 1891 if (_ptr_info102) { 1892 NDR_PULL_ALLOC(ndr, r->info102); 1893 } else { 1894 r->info102 = NULL; 1895 } 1896 break; } 1897 1898 case 103: { 1899 uint32_t _ptr_info103; 1900 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info103)); 1901 if (_ptr_info103) { 1902 NDR_PULL_ALLOC(ndr, r->info103); 1903 } else { 1904 r->info103 = NULL; 1905 } 1906 break; } 1907 1908 case 104: { 1909 uint32_t _ptr_info104; 1910 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info104)); 1911 if (_ptr_info104) { 1912 NDR_PULL_ALLOC(ndr, r->info104); 1913 } else { 1914 r->info104 = NULL; 1915 } 1916 break; } 1917 1918 case 105: { 1919 uint32_t _ptr_info105; 1920 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info105)); 1921 if (_ptr_info105) { 1922 NDR_PULL_ALLOC(ndr, r->info105); 1923 } else { 1924 r->info105 = NULL; 1925 } 1926 break; } 1927 1928 case 106: { 1929 uint32_t _ptr_info106; 1930 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info106)); 1931 if (_ptr_info106) { 1932 NDR_PULL_ALLOC(ndr, r->info106); 1933 } else { 1934 r->info106 = NULL; 1935 } 1936 break; } 1937 1938 default: 1939 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); 1940 } 1941 } 1942 if (ndr_flags & NDR_BUFFERS) { 1943 switch (level) { 1944 case 0: 1945 if (r->info0) { 1946 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr); 1947 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0); 1948 NDR_CHECK(ndr_pull_dfs_Info0(ndr, NDR_SCALARS, r->info0)); 1949 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0); 1950 } 1951 break; 1952 1953 case 1: 1954 if (r->info1) { 1955 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr); 1956 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0); 1957 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1)); 1958 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0); 1959 } 1960 break; 1961 1962 case 2: 1963 if (r->info2) { 1964 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr); 1965 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0); 1966 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2)); 1967 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0); 1968 } 1969 break; 1970 1971 case 3: 1972 if (r->info3) { 1973 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr); 1974 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0); 1975 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3)); 1976 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0); 1977 } 1978 break; 1979 1980 case 4: 1981 if (r->info4) { 1982 _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr); 1983 NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0); 1984 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4)); 1985 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0); 1986 } 1987 break; 1988 1989 case 5: 1990 if (r->info5) { 1991 _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr); 1992 NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0); 1993 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5)); 1994 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0); 1995 } 1996 break; 1997 1998 case 6: 1999 if (r->info6) { 2000 _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr); 2001 NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0); 2002 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6)); 2003 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0); 2004 } 2005 break; 2006 2007 case 7: 2008 if (r->info7) { 2009 _mem_save_info7_0 = NDR_PULL_GET_MEM_CTX(ndr); 2010 NDR_PULL_SET_MEM_CTX(ndr, r->info7, 0); 2011 NDR_CHECK(ndr_pull_dfs_Info7(ndr, NDR_SCALARS, r->info7)); 2012 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info7_0, 0); 2013 } 2014 break; 2015 2016 case 100: 2017 if (r->info100) { 2018 _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr); 2019 NDR_PULL_SET_MEM_CTX(ndr, r->info100, 0); 2020 NDR_CHECK(ndr_pull_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100)); 2021 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info100_0, 0); 2022 } 2023 break; 2024 2025 case 101: 2026 if (r->info101) { 2027 _mem_save_info101_0 = NDR_PULL_GET_MEM_CTX(ndr); 2028 NDR_PULL_SET_MEM_CTX(ndr, r->info101, 0); 2029 NDR_CHECK(ndr_pull_dfs_Info101(ndr, NDR_SCALARS, r->info101)); 2030 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info101_0, 0); 2031 } 2032 break; 2033 2034 case 102: 2035 if (r->info102) { 2036 _mem_save_info102_0 = NDR_PULL_GET_MEM_CTX(ndr); 2037 NDR_PULL_SET_MEM_CTX(ndr, r->info102, 0); 2038 NDR_CHECK(ndr_pull_dfs_Info102(ndr, NDR_SCALARS, r->info102)); 2039 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info102_0, 0); 2040 } 2041 break; 2042 2043 case 103: 2044 if (r->info103) { 2045 _mem_save_info103_0 = NDR_PULL_GET_MEM_CTX(ndr); 2046 NDR_PULL_SET_MEM_CTX(ndr, r->info103, 0); 2047 NDR_CHECK(ndr_pull_dfs_Info103(ndr, NDR_SCALARS, r->info103)); 2048 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info103_0, 0); 2049 } 2050 break; 2051 2052 case 104: 2053 if (r->info104) { 2054 _mem_save_info104_0 = NDR_PULL_GET_MEM_CTX(ndr); 2055 NDR_PULL_SET_MEM_CTX(ndr, r->info104, 0); 2056 NDR_CHECK(ndr_pull_dfs_Info104(ndr, NDR_SCALARS, r->info104)); 2057 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info104_0, 0); 2058 } 2059 break; 2060 2061 case 105: 2062 if (r->info105) { 2063 _mem_save_info105_0 = NDR_PULL_GET_MEM_CTX(ndr); 2064 NDR_PULL_SET_MEM_CTX(ndr, r->info105, 0); 2065 NDR_CHECK(ndr_pull_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105)); 2066 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info105_0, 0); 2067 } 2068 break; 2069 2070 case 106: 2071 if (r->info106) { 2072 _mem_save_info106_0 = NDR_PULL_GET_MEM_CTX(ndr); 2073 NDR_PULL_SET_MEM_CTX(ndr, r->info106, 0); 2074 NDR_CHECK(ndr_pull_dfs_Info106(ndr, NDR_SCALARS, r->info106)); 2075 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info106_0, 0); 2076 } 2077 break; 2078 2079 default: 2080 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); 2081 } 2082 } 2083 return NDR_ERR_SUCCESS; 2084} 2085 2086_PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const union dfs_Info *r) 2087{ 2088 int level; 2089 level = ndr_print_get_switch_value(ndr, r); 2090 ndr_print_union(ndr, name, level, "dfs_Info"); 2091 switch (level) { 2092 case 0: 2093 ndr_print_ptr(ndr, "info0", r->info0); 2094 ndr->depth++; 2095 if (r->info0) { 2096 ndr_print_dfs_Info0(ndr, "info0", r->info0); 2097 } 2098 ndr->depth--; 2099 break; 2100 2101 case 1: 2102 ndr_print_ptr(ndr, "info1", r->info1); 2103 ndr->depth++; 2104 if (r->info1) { 2105 ndr_print_dfs_Info1(ndr, "info1", r->info1); 2106 } 2107 ndr->depth--; 2108 break; 2109 2110 case 2: 2111 ndr_print_ptr(ndr, "info2", r->info2); 2112 ndr->depth++; 2113 if (r->info2) { 2114 ndr_print_dfs_Info2(ndr, "info2", r->info2); 2115 } 2116 ndr->depth--; 2117 break; 2118 2119 case 3: 2120 ndr_print_ptr(ndr, "info3", r->info3); 2121 ndr->depth++; 2122 if (r->info3) { 2123 ndr_print_dfs_Info3(ndr, "info3", r->info3); 2124 } 2125 ndr->depth--; 2126 break; 2127 2128 case 4: 2129 ndr_print_ptr(ndr, "info4", r->info4); 2130 ndr->depth++; 2131 if (r->info4) { 2132 ndr_print_dfs_Info4(ndr, "info4", r->info4); 2133 } 2134 ndr->depth--; 2135 break; 2136 2137 case 5: 2138 ndr_print_ptr(ndr, "info5", r->info5); 2139 ndr->depth++; 2140 if (r->info5) { 2141 ndr_print_dfs_Info5(ndr, "info5", r->info5); 2142 } 2143 ndr->depth--; 2144 break; 2145 2146 case 6: 2147 ndr_print_ptr(ndr, "info6", r->info6); 2148 ndr->depth++; 2149 if (r->info6) { 2150 ndr_print_dfs_Info6(ndr, "info6", r->info6); 2151 } 2152 ndr->depth--; 2153 break; 2154 2155 case 7: 2156 ndr_print_ptr(ndr, "info7", r->info7); 2157 ndr->depth++; 2158 if (r->info7) { 2159 ndr_print_dfs_Info7(ndr, "info7", r->info7); 2160 } 2161 ndr->depth--; 2162 break; 2163 2164 case 100: 2165 ndr_print_ptr(ndr, "info100", r->info100); 2166 ndr->depth++; 2167 if (r->info100) { 2168 ndr_print_dfs_Info100(ndr, "info100", r->info100); 2169 } 2170 ndr->depth--; 2171 break; 2172 2173 case 101: 2174 ndr_print_ptr(ndr, "info101", r->info101); 2175 ndr->depth++; 2176 if (r->info101) { 2177 ndr_print_dfs_Info101(ndr, "info101", r->info101); 2178 } 2179 ndr->depth--; 2180 break; 2181 2182 case 102: 2183 ndr_print_ptr(ndr, "info102", r->info102); 2184 ndr->depth++; 2185 if (r->info102) { 2186 ndr_print_dfs_Info102(ndr, "info102", r->info102); 2187 } 2188 ndr->depth--; 2189 break; 2190 2191 case 103: 2192 ndr_print_ptr(ndr, "info103", r->info103); 2193 ndr->depth++; 2194 if (r->info103) { 2195 ndr_print_dfs_Info103(ndr, "info103", r->info103); 2196 } 2197 ndr->depth--; 2198 break; 2199 2200 case 104: 2201 ndr_print_ptr(ndr, "info104", r->info104); 2202 ndr->depth++; 2203 if (r->info104) { 2204 ndr_print_dfs_Info104(ndr, "info104", r->info104); 2205 } 2206 ndr->depth--; 2207 break; 2208 2209 case 105: 2210 ndr_print_ptr(ndr, "info105", r->info105); 2211 ndr->depth++; 2212 if (r->info105) { 2213 ndr_print_dfs_Info105(ndr, "info105", r->info105); 2214 } 2215 ndr->depth--; 2216 break; 2217 2218 case 106: 2219 ndr_print_ptr(ndr, "info106", r->info106); 2220 ndr->depth++; 2221 if (r->info106) { 2222 ndr_print_dfs_Info106(ndr, "info106", r->info106); 2223 } 2224 ndr->depth--; 2225 break; 2226 2227 default: 2228 ndr_print_bad_level(ndr, name, level); 2229 } 2230} 2231 2232static enum ndr_err_code ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray1 *r) 2233{ 2234 uint32_t cntr_s_1; 2235 if (ndr_flags & NDR_SCALARS) { 2236 NDR_CHECK(ndr_push_align(ndr, 5)); 2237 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); 2238 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); 2239 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 2240 } 2241 if (ndr_flags & NDR_BUFFERS) { 2242 if (r->s) { 2243 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count)); 2244 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2245 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1])); 2246 } 2247 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2248 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); 2249 } 2250 } 2251 } 2252 return NDR_ERR_SUCCESS; 2253} 2254 2255static enum ndr_err_code ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r) 2256{ 2257 uint32_t _ptr_s; 2258 uint32_t cntr_s_1; 2259 TALLOC_CTX *_mem_save_s_0; 2260 TALLOC_CTX *_mem_save_s_1; 2261 if (ndr_flags & NDR_SCALARS) { 2262 NDR_CHECK(ndr_pull_align(ndr, 5)); 2263 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); 2264 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s)); 2265 if (_ptr_s) { 2266 NDR_PULL_ALLOC(ndr, r->s); 2267 } else { 2268 r->s = NULL; 2269 } 2270 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 2271 } 2272 if (ndr_flags & NDR_BUFFERS) { 2273 if (r->s) { 2274 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr); 2275 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); 2276 NDR_CHECK(ndr_pull_array_size(ndr, &r->s)); 2277 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s)); 2278 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr); 2279 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); 2280 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2281 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1])); 2282 } 2283 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2284 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); 2285 } 2286 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0); 2287 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0); 2288 } 2289 if (r->s) { 2290 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); 2291 } 2292 } 2293 return NDR_ERR_SUCCESS; 2294} 2295 2296_PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray1 *r) 2297{ 2298 uint32_t cntr_s_1; 2299 ndr_print_struct(ndr, name, "dfs_EnumArray1"); 2300 ndr->depth++; 2301 ndr_print_uint32(ndr, "count", r->count); 2302 ndr_print_ptr(ndr, "s", r->s); 2303 ndr->depth++; 2304 if (r->s) { 2305 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count); 2306 ndr->depth++; 2307 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) { 2308 char *idx_1=NULL; 2309 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { 2310 ndr_print_dfs_Info1(ndr, "s", &r->s[cntr_s_1]); 2311 free(idx_1); 2312 } 2313 } 2314 ndr->depth--; 2315 } 2316 ndr->depth--; 2317 ndr->depth--; 2318} 2319 2320static enum ndr_err_code ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray2 *r) 2321{ 2322 uint32_t cntr_s_1; 2323 if (ndr_flags & NDR_SCALARS) { 2324 NDR_CHECK(ndr_push_align(ndr, 5)); 2325 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); 2326 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); 2327 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 2328 } 2329 if (ndr_flags & NDR_BUFFERS) { 2330 if (r->s) { 2331 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count)); 2332 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2333 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1])); 2334 } 2335 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2336 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); 2337 } 2338 } 2339 } 2340 return NDR_ERR_SUCCESS; 2341} 2342 2343static enum ndr_err_code ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r) 2344{ 2345 uint32_t _ptr_s; 2346 uint32_t cntr_s_1; 2347 TALLOC_CTX *_mem_save_s_0; 2348 TALLOC_CTX *_mem_save_s_1; 2349 if (ndr_flags & NDR_SCALARS) { 2350 NDR_CHECK(ndr_pull_align(ndr, 5)); 2351 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); 2352 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s)); 2353 if (_ptr_s) { 2354 NDR_PULL_ALLOC(ndr, r->s); 2355 } else { 2356 r->s = NULL; 2357 } 2358 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 2359 } 2360 if (ndr_flags & NDR_BUFFERS) { 2361 if (r->s) { 2362 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr); 2363 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); 2364 NDR_CHECK(ndr_pull_array_size(ndr, &r->s)); 2365 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s)); 2366 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr); 2367 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); 2368 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2369 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1])); 2370 } 2371 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2372 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); 2373 } 2374 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0); 2375 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0); 2376 } 2377 if (r->s) { 2378 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); 2379 } 2380 } 2381 return NDR_ERR_SUCCESS; 2382} 2383 2384_PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray2 *r) 2385{ 2386 uint32_t cntr_s_1; 2387 ndr_print_struct(ndr, name, "dfs_EnumArray2"); 2388 ndr->depth++; 2389 ndr_print_uint32(ndr, "count", r->count); 2390 ndr_print_ptr(ndr, "s", r->s); 2391 ndr->depth++; 2392 if (r->s) { 2393 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count); 2394 ndr->depth++; 2395 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) { 2396 char *idx_1=NULL; 2397 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { 2398 ndr_print_dfs_Info2(ndr, "s", &r->s[cntr_s_1]); 2399 free(idx_1); 2400 } 2401 } 2402 ndr->depth--; 2403 } 2404 ndr->depth--; 2405 ndr->depth--; 2406} 2407 2408static enum ndr_err_code ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray3 *r) 2409{ 2410 uint32_t cntr_s_1; 2411 if (ndr_flags & NDR_SCALARS) { 2412 NDR_CHECK(ndr_push_align(ndr, 5)); 2413 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); 2414 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); 2415 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 2416 } 2417 if (ndr_flags & NDR_BUFFERS) { 2418 if (r->s) { 2419 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count)); 2420 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2421 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1])); 2422 } 2423 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2424 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); 2425 } 2426 } 2427 } 2428 return NDR_ERR_SUCCESS; 2429} 2430 2431static enum ndr_err_code ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r) 2432{ 2433 uint32_t _ptr_s; 2434 uint32_t cntr_s_1; 2435 TALLOC_CTX *_mem_save_s_0; 2436 TALLOC_CTX *_mem_save_s_1; 2437 if (ndr_flags & NDR_SCALARS) { 2438 NDR_CHECK(ndr_pull_align(ndr, 5)); 2439 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); 2440 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s)); 2441 if (_ptr_s) { 2442 NDR_PULL_ALLOC(ndr, r->s); 2443 } else { 2444 r->s = NULL; 2445 } 2446 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 2447 } 2448 if (ndr_flags & NDR_BUFFERS) { 2449 if (r->s) { 2450 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr); 2451 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); 2452 NDR_CHECK(ndr_pull_array_size(ndr, &r->s)); 2453 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s)); 2454 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr); 2455 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); 2456 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2457 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1])); 2458 } 2459 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2460 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); 2461 } 2462 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0); 2463 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0); 2464 } 2465 if (r->s) { 2466 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); 2467 } 2468 } 2469 return NDR_ERR_SUCCESS; 2470} 2471 2472_PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray3 *r) 2473{ 2474 uint32_t cntr_s_1; 2475 ndr_print_struct(ndr, name, "dfs_EnumArray3"); 2476 ndr->depth++; 2477 ndr_print_uint32(ndr, "count", r->count); 2478 ndr_print_ptr(ndr, "s", r->s); 2479 ndr->depth++; 2480 if (r->s) { 2481 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count); 2482 ndr->depth++; 2483 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) { 2484 char *idx_1=NULL; 2485 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { 2486 ndr_print_dfs_Info3(ndr, "s", &r->s[cntr_s_1]); 2487 free(idx_1); 2488 } 2489 } 2490 ndr->depth--; 2491 } 2492 ndr->depth--; 2493 ndr->depth--; 2494} 2495 2496static enum ndr_err_code ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray4 *r) 2497{ 2498 uint32_t cntr_s_1; 2499 if (ndr_flags & NDR_SCALARS) { 2500 NDR_CHECK(ndr_push_align(ndr, 5)); 2501 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); 2502 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); 2503 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 2504 } 2505 if (ndr_flags & NDR_BUFFERS) { 2506 if (r->s) { 2507 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count)); 2508 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2509 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1])); 2510 } 2511 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2512 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); 2513 } 2514 } 2515 } 2516 return NDR_ERR_SUCCESS; 2517} 2518 2519static enum ndr_err_code ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r) 2520{ 2521 uint32_t _ptr_s; 2522 uint32_t cntr_s_1; 2523 TALLOC_CTX *_mem_save_s_0; 2524 TALLOC_CTX *_mem_save_s_1; 2525 if (ndr_flags & NDR_SCALARS) { 2526 NDR_CHECK(ndr_pull_align(ndr, 5)); 2527 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); 2528 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s)); 2529 if (_ptr_s) { 2530 NDR_PULL_ALLOC(ndr, r->s); 2531 } else { 2532 r->s = NULL; 2533 } 2534 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 2535 } 2536 if (ndr_flags & NDR_BUFFERS) { 2537 if (r->s) { 2538 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr); 2539 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); 2540 NDR_CHECK(ndr_pull_array_size(ndr, &r->s)); 2541 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s)); 2542 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr); 2543 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); 2544 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2545 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1])); 2546 } 2547 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2548 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); 2549 } 2550 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0); 2551 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0); 2552 } 2553 if (r->s) { 2554 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); 2555 } 2556 } 2557 return NDR_ERR_SUCCESS; 2558} 2559 2560_PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray4 *r) 2561{ 2562 uint32_t cntr_s_1; 2563 ndr_print_struct(ndr, name, "dfs_EnumArray4"); 2564 ndr->depth++; 2565 ndr_print_uint32(ndr, "count", r->count); 2566 ndr_print_ptr(ndr, "s", r->s); 2567 ndr->depth++; 2568 if (r->s) { 2569 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count); 2570 ndr->depth++; 2571 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) { 2572 char *idx_1=NULL; 2573 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { 2574 ndr_print_dfs_Info4(ndr, "s", &r->s[cntr_s_1]); 2575 free(idx_1); 2576 } 2577 } 2578 ndr->depth--; 2579 } 2580 ndr->depth--; 2581 ndr->depth--; 2582} 2583 2584static enum ndr_err_code ndr_push_dfs_EnumArray5(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray5 *r) 2585{ 2586 uint32_t cntr_s_1; 2587 if (ndr_flags & NDR_SCALARS) { 2588 NDR_CHECK(ndr_push_align(ndr, 5)); 2589 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); 2590 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); 2591 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 2592 } 2593 if (ndr_flags & NDR_BUFFERS) { 2594 if (r->s) { 2595 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count)); 2596 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2597 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1])); 2598 } 2599 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2600 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); 2601 } 2602 } 2603 } 2604 return NDR_ERR_SUCCESS; 2605} 2606 2607static enum ndr_err_code ndr_pull_dfs_EnumArray5(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray5 *r) 2608{ 2609 uint32_t _ptr_s; 2610 uint32_t cntr_s_1; 2611 TALLOC_CTX *_mem_save_s_0; 2612 TALLOC_CTX *_mem_save_s_1; 2613 if (ndr_flags & NDR_SCALARS) { 2614 NDR_CHECK(ndr_pull_align(ndr, 5)); 2615 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); 2616 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s)); 2617 if (_ptr_s) { 2618 NDR_PULL_ALLOC(ndr, r->s); 2619 } else { 2620 r->s = NULL; 2621 } 2622 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 2623 } 2624 if (ndr_flags & NDR_BUFFERS) { 2625 if (r->s) { 2626 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr); 2627 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); 2628 NDR_CHECK(ndr_pull_array_size(ndr, &r->s)); 2629 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s)); 2630 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr); 2631 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); 2632 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2633 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1])); 2634 } 2635 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2636 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); 2637 } 2638 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0); 2639 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0); 2640 } 2641 if (r->s) { 2642 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); 2643 } 2644 } 2645 return NDR_ERR_SUCCESS; 2646} 2647 2648_PUBLIC_ void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray5 *r) 2649{ 2650 uint32_t cntr_s_1; 2651 ndr_print_struct(ndr, name, "dfs_EnumArray5"); 2652 ndr->depth++; 2653 ndr_print_uint32(ndr, "count", r->count); 2654 ndr_print_ptr(ndr, "s", r->s); 2655 ndr->depth++; 2656 if (r->s) { 2657 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count); 2658 ndr->depth++; 2659 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) { 2660 char *idx_1=NULL; 2661 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { 2662 ndr_print_dfs_Info5(ndr, "s", &r->s[cntr_s_1]); 2663 free(idx_1); 2664 } 2665 } 2666 ndr->depth--; 2667 } 2668 ndr->depth--; 2669 ndr->depth--; 2670} 2671 2672static enum ndr_err_code ndr_push_dfs_EnumArray6(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray6 *r) 2673{ 2674 uint32_t cntr_s_1; 2675 if (ndr_flags & NDR_SCALARS) { 2676 NDR_CHECK(ndr_push_align(ndr, 5)); 2677 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); 2678 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); 2679 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 2680 } 2681 if (ndr_flags & NDR_BUFFERS) { 2682 if (r->s) { 2683 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count)); 2684 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2685 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1])); 2686 } 2687 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2688 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); 2689 } 2690 } 2691 } 2692 return NDR_ERR_SUCCESS; 2693} 2694 2695static enum ndr_err_code ndr_pull_dfs_EnumArray6(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray6 *r) 2696{ 2697 uint32_t _ptr_s; 2698 uint32_t cntr_s_1; 2699 TALLOC_CTX *_mem_save_s_0; 2700 TALLOC_CTX *_mem_save_s_1; 2701 if (ndr_flags & NDR_SCALARS) { 2702 NDR_CHECK(ndr_pull_align(ndr, 5)); 2703 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); 2704 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s)); 2705 if (_ptr_s) { 2706 NDR_PULL_ALLOC(ndr, r->s); 2707 } else { 2708 r->s = NULL; 2709 } 2710 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 2711 } 2712 if (ndr_flags & NDR_BUFFERS) { 2713 if (r->s) { 2714 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr); 2715 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); 2716 NDR_CHECK(ndr_pull_array_size(ndr, &r->s)); 2717 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s)); 2718 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr); 2719 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); 2720 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2721 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1])); 2722 } 2723 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2724 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); 2725 } 2726 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0); 2727 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0); 2728 } 2729 if (r->s) { 2730 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); 2731 } 2732 } 2733 return NDR_ERR_SUCCESS; 2734} 2735 2736_PUBLIC_ void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray6 *r) 2737{ 2738 uint32_t cntr_s_1; 2739 ndr_print_struct(ndr, name, "dfs_EnumArray6"); 2740 ndr->depth++; 2741 ndr_print_uint32(ndr, "count", r->count); 2742 ndr_print_ptr(ndr, "s", r->s); 2743 ndr->depth++; 2744 if (r->s) { 2745 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count); 2746 ndr->depth++; 2747 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) { 2748 char *idx_1=NULL; 2749 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { 2750 ndr_print_dfs_Info6(ndr, "s", &r->s[cntr_s_1]); 2751 free(idx_1); 2752 } 2753 } 2754 ndr->depth--; 2755 } 2756 ndr->depth--; 2757 ndr->depth--; 2758} 2759 2760static enum ndr_err_code ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r) 2761{ 2762 uint32_t cntr_s_1; 2763 if (ndr_flags & NDR_SCALARS) { 2764 NDR_CHECK(ndr_push_align(ndr, 5)); 2765 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); 2766 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); 2767 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 2768 } 2769 if (ndr_flags & NDR_BUFFERS) { 2770 if (r->s) { 2771 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count)); 2772 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2773 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1])); 2774 } 2775 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2776 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); 2777 } 2778 } 2779 } 2780 return NDR_ERR_SUCCESS; 2781} 2782 2783static enum ndr_err_code ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r) 2784{ 2785 uint32_t _ptr_s; 2786 uint32_t cntr_s_1; 2787 TALLOC_CTX *_mem_save_s_0; 2788 TALLOC_CTX *_mem_save_s_1; 2789 if (ndr_flags & NDR_SCALARS) { 2790 NDR_CHECK(ndr_pull_align(ndr, 5)); 2791 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); 2792 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s)); 2793 if (_ptr_s) { 2794 NDR_PULL_ALLOC(ndr, r->s); 2795 } else { 2796 r->s = NULL; 2797 } 2798 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 2799 } 2800 if (ndr_flags & NDR_BUFFERS) { 2801 if (r->s) { 2802 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr); 2803 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); 2804 NDR_CHECK(ndr_pull_array_size(ndr, &r->s)); 2805 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s)); 2806 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr); 2807 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); 2808 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2809 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1])); 2810 } 2811 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2812 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); 2813 } 2814 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0); 2815 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0); 2816 } 2817 if (r->s) { 2818 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); 2819 } 2820 } 2821 return NDR_ERR_SUCCESS; 2822} 2823 2824_PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray200 *r) 2825{ 2826 uint32_t cntr_s_1; 2827 ndr_print_struct(ndr, name, "dfs_EnumArray200"); 2828 ndr->depth++; 2829 ndr_print_uint32(ndr, "count", r->count); 2830 ndr_print_ptr(ndr, "s", r->s); 2831 ndr->depth++; 2832 if (r->s) { 2833 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count); 2834 ndr->depth++; 2835 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) { 2836 char *idx_1=NULL; 2837 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { 2838 ndr_print_dfs_Info200(ndr, "s", &r->s[cntr_s_1]); 2839 free(idx_1); 2840 } 2841 } 2842 ndr->depth--; 2843 } 2844 ndr->depth--; 2845 ndr->depth--; 2846} 2847 2848static enum ndr_err_code ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray300 *r) 2849{ 2850 uint32_t cntr_s_1; 2851 if (ndr_flags & NDR_SCALARS) { 2852 NDR_CHECK(ndr_push_align(ndr, 5)); 2853 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); 2854 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); 2855 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 2856 } 2857 if (ndr_flags & NDR_BUFFERS) { 2858 if (r->s) { 2859 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count)); 2860 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2861 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1])); 2862 } 2863 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2864 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); 2865 } 2866 } 2867 } 2868 return NDR_ERR_SUCCESS; 2869} 2870 2871static enum ndr_err_code ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r) 2872{ 2873 uint32_t _ptr_s; 2874 uint32_t cntr_s_1; 2875 TALLOC_CTX *_mem_save_s_0; 2876 TALLOC_CTX *_mem_save_s_1; 2877 if (ndr_flags & NDR_SCALARS) { 2878 NDR_CHECK(ndr_pull_align(ndr, 5)); 2879 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); 2880 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s)); 2881 if (_ptr_s) { 2882 NDR_PULL_ALLOC(ndr, r->s); 2883 } else { 2884 r->s = NULL; 2885 } 2886 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 2887 } 2888 if (ndr_flags & NDR_BUFFERS) { 2889 if (r->s) { 2890 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr); 2891 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); 2892 NDR_CHECK(ndr_pull_array_size(ndr, &r->s)); 2893 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s)); 2894 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr); 2895 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); 2896 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2897 NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1])); 2898 } 2899 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { 2900 NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); 2901 } 2902 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0); 2903 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0); 2904 } 2905 if (r->s) { 2906 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); 2907 } 2908 } 2909 return NDR_ERR_SUCCESS; 2910} 2911 2912_PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray300 *r) 2913{ 2914 uint32_t cntr_s_1; 2915 ndr_print_struct(ndr, name, "dfs_EnumArray300"); 2916 ndr->depth++; 2917 ndr_print_uint32(ndr, "count", r->count); 2918 ndr_print_ptr(ndr, "s", r->s); 2919 ndr->depth++; 2920 if (r->s) { 2921 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count); 2922 ndr->depth++; 2923 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) { 2924 char *idx_1=NULL; 2925 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { 2926 ndr_print_dfs_Info300(ndr, "s", &r->s[cntr_s_1]); 2927 free(idx_1); 2928 } 2929 } 2930 ndr->depth--; 2931 } 2932 ndr->depth--; 2933 ndr->depth--; 2934} 2935 2936static enum ndr_err_code ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union dfs_EnumInfo *r) 2937{ 2938 if (ndr_flags & NDR_SCALARS) { 2939 int level = ndr_push_get_switch_value(ndr, r); 2940 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); 2941 NDR_CHECK(ndr_push_union_align(ndr, 5)); 2942 switch (level) { 2943 case 1: { 2944 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); 2945 break; } 2946 2947 case 2: { 2948 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2)); 2949 break; } 2950 2951 case 3: { 2952 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3)); 2953 break; } 2954 2955 case 4: { 2956 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4)); 2957 break; } 2958 2959 case 5: { 2960 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5)); 2961 break; } 2962 2963 case 6: { 2964 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6)); 2965 break; } 2966 2967 case 200: { 2968 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info200)); 2969 break; } 2970 2971 case 300: { 2972 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info300)); 2973 break; } 2974 2975 default: 2976 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); 2977 } 2978 } 2979 if (ndr_flags & NDR_BUFFERS) { 2980 int level = ndr_push_get_switch_value(ndr, r); 2981 switch (level) { 2982 case 1: 2983 if (r->info1) { 2984 NDR_CHECK(ndr_push_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1)); 2985 } 2986 break; 2987 2988 case 2: 2989 if (r->info2) { 2990 NDR_CHECK(ndr_push_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2)); 2991 } 2992 break; 2993 2994 case 3: 2995 if (r->info3) { 2996 NDR_CHECK(ndr_push_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3)); 2997 } 2998 break; 2999 3000 case 4: 3001 if (r->info4) { 3002 NDR_CHECK(ndr_push_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4)); 3003 } 3004 break; 3005 3006 case 5: 3007 if (r->info5) { 3008 NDR_CHECK(ndr_push_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5)); 3009 } 3010 break; 3011 3012 case 6: 3013 if (r->info6) { 3014 NDR_CHECK(ndr_push_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6)); 3015 } 3016 break; 3017 3018 case 200: 3019 if (r->info200) { 3020 NDR_CHECK(ndr_push_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200)); 3021 } 3022 break; 3023 3024 case 300: 3025 if (r->info300) { 3026 NDR_CHECK(ndr_push_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300)); 3027 } 3028 break; 3029 3030 default: 3031 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); 3032 } 3033 } 3034 return NDR_ERR_SUCCESS; 3035} 3036 3037static enum ndr_err_code ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union dfs_EnumInfo *r) 3038{ 3039 int level; 3040 uint32_t _level; 3041 TALLOC_CTX *_mem_save_info1_0; 3042 TALLOC_CTX *_mem_save_info2_0; 3043 TALLOC_CTX *_mem_save_info3_0; 3044 TALLOC_CTX *_mem_save_info4_0; 3045 TALLOC_CTX *_mem_save_info5_0; 3046 TALLOC_CTX *_mem_save_info6_0; 3047 TALLOC_CTX *_mem_save_info200_0; 3048 TALLOC_CTX *_mem_save_info300_0; 3049 level = ndr_pull_get_switch_value(ndr, r); 3050 if (ndr_flags & NDR_SCALARS) { 3051 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level)); 3052 if (_level != level) { 3053 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); 3054 } 3055 NDR_CHECK(ndr_pull_union_align(ndr, 5)); 3056 switch (level) { 3057 case 1: { 3058 uint32_t _ptr_info1; 3059 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1)); 3060 if (_ptr_info1) { 3061 NDR_PULL_ALLOC(ndr, r->info1); 3062 } else { 3063 r->info1 = NULL; 3064 } 3065 break; } 3066 3067 case 2: { 3068 uint32_t _ptr_info2; 3069 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2)); 3070 if (_ptr_info2) { 3071 NDR_PULL_ALLOC(ndr, r->info2); 3072 } else { 3073 r->info2 = NULL; 3074 } 3075 break; } 3076 3077 case 3: { 3078 uint32_t _ptr_info3; 3079 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3)); 3080 if (_ptr_info3) { 3081 NDR_PULL_ALLOC(ndr, r->info3); 3082 } else { 3083 r->info3 = NULL; 3084 } 3085 break; } 3086 3087 case 4: { 3088 uint32_t _ptr_info4; 3089 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4)); 3090 if (_ptr_info4) { 3091 NDR_PULL_ALLOC(ndr, r->info4); 3092 } else { 3093 r->info4 = NULL; 3094 } 3095 break; } 3096 3097 case 5: { 3098 uint32_t _ptr_info5; 3099 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5)); 3100 if (_ptr_info5) { 3101 NDR_PULL_ALLOC(ndr, r->info5); 3102 } else { 3103 r->info5 = NULL; 3104 } 3105 break; } 3106 3107 case 6: { 3108 uint32_t _ptr_info6; 3109 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6)); 3110 if (_ptr_info6) { 3111 NDR_PULL_ALLOC(ndr, r->info6); 3112 } else { 3113 r->info6 = NULL; 3114 } 3115 break; } 3116 3117 case 200: { 3118 uint32_t _ptr_info200; 3119 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info200)); 3120 if (_ptr_info200) { 3121 NDR_PULL_ALLOC(ndr, r->info200); 3122 } else { 3123 r->info200 = NULL; 3124 } 3125 break; } 3126 3127 case 300: { 3128 uint32_t _ptr_info300; 3129 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info300)); 3130 if (_ptr_info300) { 3131 NDR_PULL_ALLOC(ndr, r->info300); 3132 } else { 3133 r->info300 = NULL; 3134 } 3135 break; } 3136 3137 default: 3138 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); 3139 } 3140 } 3141 if (ndr_flags & NDR_BUFFERS) { 3142 switch (level) { 3143 case 1: 3144 if (r->info1) { 3145 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr); 3146 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0); 3147 NDR_CHECK(ndr_pull_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1)); 3148 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0); 3149 } 3150 break; 3151 3152 case 2: 3153 if (r->info2) { 3154 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr); 3155 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0); 3156 NDR_CHECK(ndr_pull_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2)); 3157 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0); 3158 } 3159 break; 3160 3161 case 3: 3162 if (r->info3) { 3163 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr); 3164 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0); 3165 NDR_CHECK(ndr_pull_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3)); 3166 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0); 3167 } 3168 break; 3169 3170 case 4: 3171 if (r->info4) { 3172 _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr); 3173 NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0); 3174 NDR_CHECK(ndr_pull_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4)); 3175 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0); 3176 } 3177 break; 3178 3179 case 5: 3180 if (r->info5) { 3181 _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr); 3182 NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0); 3183 NDR_CHECK(ndr_pull_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5)); 3184 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0); 3185 } 3186 break; 3187 3188 case 6: 3189 if (r->info6) { 3190 _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr); 3191 NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0); 3192 NDR_CHECK(ndr_pull_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6)); 3193 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0); 3194 } 3195 break; 3196 3197 case 200: 3198 if (r->info200) { 3199 _mem_save_info200_0 = NDR_PULL_GET_MEM_CTX(ndr); 3200 NDR_PULL_SET_MEM_CTX(ndr, r->info200, 0); 3201 NDR_CHECK(ndr_pull_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200)); 3202 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info200_0, 0); 3203 } 3204 break; 3205 3206 case 300: 3207 if (r->info300) { 3208 _mem_save_info300_0 = NDR_PULL_GET_MEM_CTX(ndr); 3209 NDR_PULL_SET_MEM_CTX(ndr, r->info300, 0); 3210 NDR_CHECK(ndr_pull_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300)); 3211 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info300_0, 0); 3212 } 3213 break; 3214 3215 default: 3216 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); 3217 } 3218 } 3219 return NDR_ERR_SUCCESS; 3220} 3221 3222_PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, const union dfs_EnumInfo *r) 3223{ 3224 int level; 3225 level = ndr_print_get_switch_value(ndr, r); 3226 ndr_print_union(ndr, name, level, "dfs_EnumInfo"); 3227 switch (level) { 3228 case 1: 3229 ndr_print_ptr(ndr, "info1", r->info1); 3230 ndr->depth++; 3231 if (r->info1) { 3232 ndr_print_dfs_EnumArray1(ndr, "info1", r->info1); 3233 } 3234 ndr->depth--; 3235 break; 3236 3237 case 2: 3238 ndr_print_ptr(ndr, "info2", r->info2); 3239 ndr->depth++; 3240 if (r->info2) { 3241 ndr_print_dfs_EnumArray2(ndr, "info2", r->info2); 3242 } 3243 ndr->depth--; 3244 break; 3245 3246 case 3: 3247 ndr_print_ptr(ndr, "info3", r->info3); 3248 ndr->depth++; 3249 if (r->info3) { 3250 ndr_print_dfs_EnumArray3(ndr, "info3", r->info3); 3251 } 3252 ndr->depth--; 3253 break; 3254 3255 case 4: 3256 ndr_print_ptr(ndr, "info4", r->info4); 3257 ndr->depth++; 3258 if (r->info4) { 3259 ndr_print_dfs_EnumArray4(ndr, "info4", r->info4); 3260 } 3261 ndr->depth--; 3262 break; 3263 3264 case 5: 3265 ndr_print_ptr(ndr, "info5", r->info5); 3266 ndr->depth++; 3267 if (r->info5) { 3268 ndr_print_dfs_EnumArray5(ndr, "info5", r->info5); 3269 } 3270 ndr->depth--; 3271 break; 3272 3273 case 6: 3274 ndr_print_ptr(ndr, "info6", r->info6); 3275 ndr->depth++; 3276 if (r->info6) { 3277 ndr_print_dfs_EnumArray6(ndr, "info6", r->info6); 3278 } 3279 ndr->depth--; 3280 break; 3281 3282 case 200: 3283 ndr_print_ptr(ndr, "info200", r->info200); 3284 ndr->depth++; 3285 if (r->info200) { 3286 ndr_print_dfs_EnumArray200(ndr, "info200", r->info200); 3287 } 3288 ndr->depth--; 3289 break; 3290 3291 case 300: 3292 ndr_print_ptr(ndr, "info300", r->info300); 3293 ndr->depth++; 3294 if (r->info300) { 3295 ndr_print_dfs_EnumArray300(ndr, "info300", r->info300); 3296 } 3297 ndr->depth--; 3298 break; 3299 3300 default: 3301 ndr_print_bad_level(ndr, name, level); 3302 } 3303} 3304 3305static enum ndr_err_code ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumStruct *r) 3306{ 3307 if (ndr_flags & NDR_SCALARS) { 3308 NDR_CHECK(ndr_push_align(ndr, 5)); 3309 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); 3310 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->e, r->level)); 3311 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e)); 3312 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 3313 } 3314 if (ndr_flags & NDR_BUFFERS) { 3315 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e)); 3316 } 3317 return NDR_ERR_SUCCESS; 3318} 3319 3320static enum ndr_err_code ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r) 3321{ 3322 if (ndr_flags & NDR_SCALARS) { 3323 NDR_CHECK(ndr_pull_align(ndr, 5)); 3324 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level)); 3325 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->e, r->level)); 3326 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e)); 3327 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 3328 } 3329 if (ndr_flags & NDR_BUFFERS) { 3330 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e)); 3331 } 3332 return NDR_ERR_SUCCESS; 3333} 3334 3335_PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, const struct dfs_EnumStruct *r) 3336{ 3337 ndr_print_struct(ndr, name, "dfs_EnumStruct"); 3338 ndr->depth++; 3339 ndr_print_uint32(ndr, "level", r->level); 3340 ndr_print_set_switch_value(ndr, &r->e, r->level); 3341 ndr_print_dfs_EnumInfo(ndr, "e", &r->e); 3342 ndr->depth--; 3343} 3344 3345static enum ndr_err_code ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_UnknownStruct *r) 3346{ 3347 if (ndr_flags & NDR_SCALARS) { 3348 NDR_CHECK(ndr_push_align(ndr, 5)); 3349 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1)); 3350 NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown2)); 3351 NDR_CHECK(ndr_push_trailer_align(ndr, 5)); 3352 } 3353 if (ndr_flags & NDR_BUFFERS) { 3354 if (r->unknown2) { 3355 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16))); 3356 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 3357 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16))); 3358 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->unknown2, ndr_charset_length(r->unknown2, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 3359 } 3360 } 3361 return NDR_ERR_SUCCESS; 3362} 3363 3364static enum ndr_err_code ndr_pull_dfs_UnknownStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_UnknownStruct *r) 3365{ 3366 uint32_t _ptr_unknown2; 3367 TALLOC_CTX *_mem_save_unknown2_0; 3368 if (ndr_flags & NDR_SCALARS) { 3369 NDR_CHECK(ndr_pull_align(ndr, 5)); 3370 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); 3371 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2)); 3372 if (_ptr_unknown2) { 3373 NDR_PULL_ALLOC(ndr, r->unknown2); 3374 } else { 3375 r->unknown2 = NULL; 3376 } 3377 NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); 3378 } 3379 if (ndr_flags & NDR_BUFFERS) { 3380 if (r->unknown2) { 3381 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr); 3382 NDR_PULL_SET_MEM_CTX(ndr, r->unknown2, 0); 3383 NDR_CHECK(ndr_pull_array_size(ndr, &r->unknown2)); 3384 NDR_CHECK(ndr_pull_array_length(ndr, &r->unknown2)); 3385 if (ndr_get_array_length(ndr, &r->unknown2) > ndr_get_array_size(ndr, &r->unknown2)) { 3386 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->unknown2), ndr_get_array_length(ndr, &r->unknown2)); 3387 } 3388 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t))); 3389 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->unknown2, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t), CH_UTF16)); 3390 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0); 3391 } 3392 } 3393 return NDR_ERR_SUCCESS; 3394} 3395 3396_PUBLIC_ void ndr_print_dfs_UnknownStruct(struct ndr_print *ndr, const char *name, const struct dfs_UnknownStruct *r) 3397{ 3398 ndr_print_struct(ndr, name, "dfs_UnknownStruct"); 3399 ndr->depth++; 3400 ndr_print_uint32(ndr, "unknown1", r->unknown1); 3401 ndr_print_ptr(ndr, "unknown2", r->unknown2); 3402 ndr->depth++; 3403 if (r->unknown2) { 3404 ndr_print_string(ndr, "unknown2", r->unknown2); 3405 } 3406 ndr->depth--; 3407 ndr->depth--; 3408} 3409 3410_PUBLIC_ enum ndr_err_code ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags, const struct dfs_GetManagerVersion *r) 3411{ 3412 if (flags & NDR_IN) { 3413 } 3414 if (flags & NDR_OUT) { 3415 if (r->out.version == NULL) { 3416 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); 3417 } 3418 NDR_CHECK(ndr_push_dfs_ManagerVersion(ndr, NDR_SCALARS, *r->out.version)); 3419 } 3420 return NDR_ERR_SUCCESS; 3421} 3422 3423_PUBLIC_ enum ndr_err_code ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags, struct dfs_GetManagerVersion *r) 3424{ 3425 TALLOC_CTX *_mem_save_version_0; 3426 if (flags & NDR_IN) { 3427 ZERO_STRUCT(r->out); 3428 3429 NDR_PULL_ALLOC(ndr, r->out.version); 3430 ZERO_STRUCTP(r->out.version); 3431 } 3432 if (flags & NDR_OUT) { 3433 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { 3434 NDR_PULL_ALLOC(ndr, r->out.version); 3435 } 3436 _mem_save_version_0 = NDR_PULL_GET_MEM_CTX(ndr); 3437 NDR_PULL_SET_MEM_CTX(ndr, r->out.version, LIBNDR_FLAG_REF_ALLOC); 3438 NDR_CHECK(ndr_pull_dfs_ManagerVersion(ndr, NDR_SCALARS, r->out.version)); 3439 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_version_0, LIBNDR_FLAG_REF_ALLOC); 3440 } 3441 return NDR_ERR_SUCCESS; 3442} 3443 3444_PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetManagerVersion *r) 3445{ 3446 ndr_print_struct(ndr, name, "dfs_GetManagerVersion"); 3447 ndr->depth++; 3448 if (flags & NDR_SET_VALUES) { 3449 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 3450 } 3451 if (flags & NDR_IN) { 3452 ndr_print_struct(ndr, "in", "dfs_GetManagerVersion"); 3453 ndr->depth++; 3454 ndr->depth--; 3455 } 3456 if (flags & NDR_OUT) { 3457 ndr_print_struct(ndr, "out", "dfs_GetManagerVersion"); 3458 ndr->depth++; 3459 ndr_print_ptr(ndr, "version", r->out.version); 3460 ndr->depth++; 3461 ndr_print_dfs_ManagerVersion(ndr, "version", *r->out.version); 3462 ndr->depth--; 3463 ndr->depth--; 3464 } 3465 ndr->depth--; 3466} 3467 3468static enum ndr_err_code ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add *r) 3469{ 3470 if (flags & NDR_IN) { 3471 if (r->in.path == NULL) { 3472 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); 3473 } 3474 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16))); 3475 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 3476 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16))); 3477 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 3478 if (r->in.server == NULL) { 3479 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); 3480 } 3481 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16))); 3482 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 3483 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16))); 3484 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 3485 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share)); 3486 if (r->in.share) { 3487 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16))); 3488 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 3489 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16))); 3490 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 3491 } 3492 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.comment)); 3493 if (r->in.comment) { 3494 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16))); 3495 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 3496 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16))); 3497 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 3498 } 3499 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); 3500 } 3501 if (flags & NDR_OUT) { 3502 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 3503 } 3504 return NDR_ERR_SUCCESS; 3505} 3506 3507static enum ndr_err_code ndr_pull_dfs_Add(struct ndr_pull *ndr, int flags, struct dfs_Add *r) 3508{ 3509 uint32_t _ptr_share; 3510 uint32_t _ptr_comment; 3511 TALLOC_CTX *_mem_save_share_0; 3512 TALLOC_CTX *_mem_save_comment_0; 3513 if (flags & NDR_IN) { 3514 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path)); 3515 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path)); 3516 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) { 3517 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path), ndr_get_array_length(ndr, &r->in.path)); 3518 } 3519 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t))); 3520 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16)); 3521 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server)); 3522 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server)); 3523 if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) { 3524 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server), ndr_get_array_length(ndr, &r->in.server)); 3525 } 3526 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t))); 3527 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16)); 3528 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share)); 3529 if (_ptr_share) { 3530 NDR_PULL_ALLOC(ndr, r->in.share); 3531 } else { 3532 r->in.share = NULL; 3533 } 3534 if (r->in.share) { 3535 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr); 3536 NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0); 3537 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share)); 3538 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share)); 3539 if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) { 3540 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share), ndr_get_array_length(ndr, &r->in.share)); 3541 } 3542 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t))); 3543 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16)); 3544 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0); 3545 } 3546 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment)); 3547 if (_ptr_comment) { 3548 NDR_PULL_ALLOC(ndr, r->in.comment); 3549 } else { 3550 r->in.comment = NULL; 3551 } 3552 if (r->in.comment) { 3553 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr); 3554 NDR_PULL_SET_MEM_CTX(ndr, r->in.comment, 0); 3555 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment)); 3556 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment)); 3557 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) { 3558 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.comment), ndr_get_array_length(ndr, &r->in.comment)); 3559 } 3560 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t))); 3561 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16)); 3562 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); 3563 } 3564 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); 3565 } 3566 if (flags & NDR_OUT) { 3567 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 3568 } 3569 return NDR_ERR_SUCCESS; 3570} 3571 3572_PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add *r) 3573{ 3574 ndr_print_struct(ndr, name, "dfs_Add"); 3575 ndr->depth++; 3576 if (flags & NDR_SET_VALUES) { 3577 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 3578 } 3579 if (flags & NDR_IN) { 3580 ndr_print_struct(ndr, "in", "dfs_Add"); 3581 ndr->depth++; 3582 ndr_print_ptr(ndr, "path", r->in.path); 3583 ndr->depth++; 3584 ndr_print_string(ndr, "path", r->in.path); 3585 ndr->depth--; 3586 ndr_print_ptr(ndr, "server", r->in.server); 3587 ndr->depth++; 3588 ndr_print_string(ndr, "server", r->in.server); 3589 ndr->depth--; 3590 ndr_print_ptr(ndr, "share", r->in.share); 3591 ndr->depth++; 3592 if (r->in.share) { 3593 ndr_print_string(ndr, "share", r->in.share); 3594 } 3595 ndr->depth--; 3596 ndr_print_ptr(ndr, "comment", r->in.comment); 3597 ndr->depth++; 3598 if (r->in.comment) { 3599 ndr_print_string(ndr, "comment", r->in.comment); 3600 } 3601 ndr->depth--; 3602 ndr_print_uint32(ndr, "flags", r->in.flags); 3603 ndr->depth--; 3604 } 3605 if (flags & NDR_OUT) { 3606 ndr_print_struct(ndr, "out", "dfs_Add"); 3607 ndr->depth++; 3608 ndr_print_WERROR(ndr, "result", r->out.result); 3609 ndr->depth--; 3610 } 3611 ndr->depth--; 3612} 3613 3614static enum ndr_err_code ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r) 3615{ 3616 if (flags & NDR_IN) { 3617 if (r->in.dfs_entry_path == NULL) { 3618 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); 3619 } 3620 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16))); 3621 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 3622 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16))); 3623 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfs_entry_path, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 3624 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername)); 3625 if (r->in.servername) { 3626 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 3627 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 3628 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 3629 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 3630 } 3631 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename)); 3632 if (r->in.sharename) { 3633 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16))); 3634 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 3635 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16))); 3636 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 3637 } 3638 } 3639 if (flags & NDR_OUT) { 3640 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 3641 } 3642 return NDR_ERR_SUCCESS; 3643} 3644 3645static enum ndr_err_code ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_Remove *r) 3646{ 3647 uint32_t _ptr_servername; 3648 uint32_t _ptr_sharename; 3649 TALLOC_CTX *_mem_save_servername_0; 3650 TALLOC_CTX *_mem_save_sharename_0; 3651 if (flags & NDR_IN) { 3652 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path)); 3653 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path)); 3654 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) { 3655 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfs_entry_path), ndr_get_array_length(ndr, &r->in.dfs_entry_path)); 3656 } 3657 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t))); 3658 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_entry_path, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t), CH_UTF16)); 3659 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername)); 3660 if (_ptr_servername) { 3661 NDR_PULL_ALLOC(ndr, r->in.servername); 3662 } else { 3663 r->in.servername = NULL; 3664 } 3665 if (r->in.servername) { 3666 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr); 3667 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0); 3668 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); 3669 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); 3670 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { 3671 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername)); 3672 } 3673 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); 3674 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); 3675 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0); 3676 } 3677 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename)); 3678 if (_ptr_sharename) { 3679 NDR_PULL_ALLOC(ndr, r->in.sharename); 3680 } else { 3681 r->in.sharename = NULL; 3682 } 3683 if (r->in.sharename) { 3684 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr); 3685 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0); 3686 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename)); 3687 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename)); 3688 if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) { 3689 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.sharename), ndr_get_array_length(ndr, &r->in.sharename)); 3690 } 3691 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t))); 3692 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16)); 3693 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0); 3694 } 3695 } 3696 if (flags & NDR_OUT) { 3697 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 3698 } 3699 return NDR_ERR_SUCCESS; 3700} 3701 3702_PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove *r) 3703{ 3704 ndr_print_struct(ndr, name, "dfs_Remove"); 3705 ndr->depth++; 3706 if (flags & NDR_SET_VALUES) { 3707 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 3708 } 3709 if (flags & NDR_IN) { 3710 ndr_print_struct(ndr, "in", "dfs_Remove"); 3711 ndr->depth++; 3712 ndr_print_ptr(ndr, "dfs_entry_path", r->in.dfs_entry_path); 3713 ndr->depth++; 3714 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path); 3715 ndr->depth--; 3716 ndr_print_ptr(ndr, "servername", r->in.servername); 3717 ndr->depth++; 3718 if (r->in.servername) { 3719 ndr_print_string(ndr, "servername", r->in.servername); 3720 } 3721 ndr->depth--; 3722 ndr_print_ptr(ndr, "sharename", r->in.sharename); 3723 ndr->depth++; 3724 if (r->in.sharename) { 3725 ndr_print_string(ndr, "sharename", r->in.sharename); 3726 } 3727 ndr->depth--; 3728 ndr->depth--; 3729 } 3730 if (flags & NDR_OUT) { 3731 ndr_print_struct(ndr, "out", "dfs_Remove"); 3732 ndr->depth++; 3733 ndr_print_WERROR(ndr, "result", r->out.result); 3734 ndr->depth--; 3735 } 3736 ndr->depth--; 3737} 3738 3739static enum ndr_err_code ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_SetInfo *r) 3740{ 3741 if (flags & NDR_IN) { 3742 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16))); 3743 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 3744 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16))); 3745 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfs_entry_path, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 3746 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername)); 3747 if (r->in.servername) { 3748 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 3749 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 3750 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 3751 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 3752 } 3753 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename)); 3754 if (r->in.sharename) { 3755 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16))); 3756 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 3757 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16))); 3758 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 3759 } 3760 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level)); 3761 if (r->in.info == NULL) { 3762 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); 3763 } 3764 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level)); 3765 NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); 3766 } 3767 if (flags & NDR_OUT) { 3768 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 3769 } 3770 return NDR_ERR_SUCCESS; 3771} 3772 3773static enum ndr_err_code ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs_SetInfo *r) 3774{ 3775 uint32_t _ptr_servername; 3776 uint32_t _ptr_sharename; 3777 TALLOC_CTX *_mem_save_servername_0; 3778 TALLOC_CTX *_mem_save_sharename_0; 3779 TALLOC_CTX *_mem_save_info_0; 3780 if (flags & NDR_IN) { 3781 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path)); 3782 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path)); 3783 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) { 3784 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfs_entry_path), ndr_get_array_length(ndr, &r->in.dfs_entry_path)); 3785 } 3786 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t))); 3787 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_entry_path, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t), CH_UTF16)); 3788 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername)); 3789 if (_ptr_servername) { 3790 NDR_PULL_ALLOC(ndr, r->in.servername); 3791 } else { 3792 r->in.servername = NULL; 3793 } 3794 if (r->in.servername) { 3795 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr); 3796 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0); 3797 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); 3798 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); 3799 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { 3800 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername)); 3801 } 3802 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); 3803 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); 3804 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0); 3805 } 3806 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename)); 3807 if (_ptr_sharename) { 3808 NDR_PULL_ALLOC(ndr, r->in.sharename); 3809 } else { 3810 r->in.sharename = NULL; 3811 } 3812 if (r->in.sharename) { 3813 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr); 3814 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0); 3815 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename)); 3816 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename)); 3817 if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) { 3818 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.sharename), ndr_get_array_length(ndr, &r->in.sharename)); 3819 } 3820 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t))); 3821 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16)); 3822 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0); 3823 } 3824 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level)); 3825 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { 3826 NDR_PULL_ALLOC(ndr, r->in.info); 3827 } 3828 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); 3829 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC); 3830 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level)); 3831 NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); 3832 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); 3833 } 3834 if (flags & NDR_OUT) { 3835 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 3836 } 3837 return NDR_ERR_SUCCESS; 3838} 3839 3840_PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo *r) 3841{ 3842 ndr_print_struct(ndr, name, "dfs_SetInfo"); 3843 ndr->depth++; 3844 if (flags & NDR_SET_VALUES) { 3845 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 3846 } 3847 if (flags & NDR_IN) { 3848 ndr_print_struct(ndr, "in", "dfs_SetInfo"); 3849 ndr->depth++; 3850 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path); 3851 ndr_print_ptr(ndr, "servername", r->in.servername); 3852 ndr->depth++; 3853 if (r->in.servername) { 3854 ndr_print_string(ndr, "servername", r->in.servername); 3855 } 3856 ndr->depth--; 3857 ndr_print_ptr(ndr, "sharename", r->in.sharename); 3858 ndr->depth++; 3859 if (r->in.sharename) { 3860 ndr_print_string(ndr, "sharename", r->in.sharename); 3861 } 3862 ndr->depth--; 3863 ndr_print_uint32(ndr, "level", r->in.level); 3864 ndr_print_ptr(ndr, "info", r->in.info); 3865 ndr->depth++; 3866 ndr_print_set_switch_value(ndr, r->in.info, r->in.level); 3867 ndr_print_dfs_Info(ndr, "info", r->in.info); 3868 ndr->depth--; 3869 ndr->depth--; 3870 } 3871 if (flags & NDR_OUT) { 3872 ndr_print_struct(ndr, "out", "dfs_SetInfo"); 3873 ndr->depth++; 3874 ndr_print_WERROR(ndr, "result", r->out.result); 3875 ndr->depth--; 3876 } 3877 ndr->depth--; 3878} 3879 3880static enum ndr_err_code ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_GetInfo *r) 3881{ 3882 if (flags & NDR_IN) { 3883 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16))); 3884 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 3885 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16))); 3886 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfs_entry_path, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 3887 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername)); 3888 if (r->in.servername) { 3889 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 3890 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 3891 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 3892 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 3893 } 3894 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename)); 3895 if (r->in.sharename) { 3896 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16))); 3897 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 3898 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16))); 3899 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 3900 } 3901 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level)); 3902 } 3903 if (flags & NDR_OUT) { 3904 if (r->out.info == NULL) { 3905 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); 3906 } 3907 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level)); 3908 NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); 3909 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 3910 } 3911 return NDR_ERR_SUCCESS; 3912} 3913 3914static enum ndr_err_code ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs_GetInfo *r) 3915{ 3916 uint32_t _ptr_servername; 3917 uint32_t _ptr_sharename; 3918 TALLOC_CTX *_mem_save_servername_0; 3919 TALLOC_CTX *_mem_save_sharename_0; 3920 TALLOC_CTX *_mem_save_info_0; 3921 if (flags & NDR_IN) { 3922 ZERO_STRUCT(r->out); 3923 3924 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path)); 3925 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path)); 3926 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) { 3927 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfs_entry_path), ndr_get_array_length(ndr, &r->in.dfs_entry_path)); 3928 } 3929 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t))); 3930 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_entry_path, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t), CH_UTF16)); 3931 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername)); 3932 if (_ptr_servername) { 3933 NDR_PULL_ALLOC(ndr, r->in.servername); 3934 } else { 3935 r->in.servername = NULL; 3936 } 3937 if (r->in.servername) { 3938 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr); 3939 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0); 3940 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); 3941 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); 3942 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { 3943 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername)); 3944 } 3945 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); 3946 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); 3947 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0); 3948 } 3949 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename)); 3950 if (_ptr_sharename) { 3951 NDR_PULL_ALLOC(ndr, r->in.sharename); 3952 } else { 3953 r->in.sharename = NULL; 3954 } 3955 if (r->in.sharename) { 3956 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr); 3957 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0); 3958 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename)); 3959 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename)); 3960 if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) { 3961 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.sharename), ndr_get_array_length(ndr, &r->in.sharename)); 3962 } 3963 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t))); 3964 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16)); 3965 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0); 3966 } 3967 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level)); 3968 NDR_PULL_ALLOC(ndr, r->out.info); 3969 ZERO_STRUCTP(r->out.info); 3970 } 3971 if (flags & NDR_OUT) { 3972 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { 3973 NDR_PULL_ALLOC(ndr, r->out.info); 3974 } 3975 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); 3976 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC); 3977 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level)); 3978 NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); 3979 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); 3980 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 3981 } 3982 return NDR_ERR_SUCCESS; 3983} 3984 3985_PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetInfo *r) 3986{ 3987 ndr_print_struct(ndr, name, "dfs_GetInfo"); 3988 ndr->depth++; 3989 if (flags & NDR_SET_VALUES) { 3990 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 3991 } 3992 if (flags & NDR_IN) { 3993 ndr_print_struct(ndr, "in", "dfs_GetInfo"); 3994 ndr->depth++; 3995 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path); 3996 ndr_print_ptr(ndr, "servername", r->in.servername); 3997 ndr->depth++; 3998 if (r->in.servername) { 3999 ndr_print_string(ndr, "servername", r->in.servername); 4000 } 4001 ndr->depth--; 4002 ndr_print_ptr(ndr, "sharename", r->in.sharename); 4003 ndr->depth++; 4004 if (r->in.sharename) { 4005 ndr_print_string(ndr, "sharename", r->in.sharename); 4006 } 4007 ndr->depth--; 4008 ndr_print_uint32(ndr, "level", r->in.level); 4009 ndr->depth--; 4010 } 4011 if (flags & NDR_OUT) { 4012 ndr_print_struct(ndr, "out", "dfs_GetInfo"); 4013 ndr->depth++; 4014 ndr_print_ptr(ndr, "info", r->out.info); 4015 ndr->depth++; 4016 ndr_print_set_switch_value(ndr, r->out.info, r->in.level); 4017 ndr_print_dfs_Info(ndr, "info", r->out.info); 4018 ndr->depth--; 4019 ndr_print_WERROR(ndr, "result", r->out.result); 4020 ndr->depth--; 4021 } 4022 ndr->depth--; 4023} 4024 4025static enum ndr_err_code ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enum *r) 4026{ 4027 if (flags & NDR_IN) { 4028 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level)); 4029 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize)); 4030 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info)); 4031 if (r->in.info) { 4032 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); 4033 } 4034 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total)); 4035 if (r->in.total) { 4036 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total)); 4037 } 4038 } 4039 if (flags & NDR_OUT) { 4040 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info)); 4041 if (r->out.info) { 4042 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); 4043 } 4044 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total)); 4045 if (r->out.total) { 4046 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total)); 4047 } 4048 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 4049 } 4050 return NDR_ERR_SUCCESS; 4051} 4052 4053static enum ndr_err_code ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r) 4054{ 4055 uint32_t _ptr_info; 4056 uint32_t _ptr_total; 4057 TALLOC_CTX *_mem_save_info_0; 4058 TALLOC_CTX *_mem_save_total_0; 4059 if (flags & NDR_IN) { 4060 ZERO_STRUCT(r->out); 4061 4062 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level)); 4063 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize)); 4064 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); 4065 if (_ptr_info) { 4066 NDR_PULL_ALLOC(ndr, r->in.info); 4067 } else { 4068 r->in.info = NULL; 4069 } 4070 if (r->in.info) { 4071 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); 4072 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0); 4073 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); 4074 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); 4075 } 4076 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total)); 4077 if (_ptr_total) { 4078 NDR_PULL_ALLOC(ndr, r->in.total); 4079 } else { 4080 r->in.total = NULL; 4081 } 4082 if (r->in.total) { 4083 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr); 4084 NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0); 4085 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total)); 4086 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0); 4087 } 4088 } 4089 if (flags & NDR_OUT) { 4090 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); 4091 if (_ptr_info) { 4092 NDR_PULL_ALLOC(ndr, r->out.info); 4093 } else { 4094 r->out.info = NULL; 4095 } 4096 if (r->out.info) { 4097 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); 4098 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0); 4099 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); 4100 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); 4101 } 4102 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total)); 4103 if (_ptr_total) { 4104 NDR_PULL_ALLOC(ndr, r->out.total); 4105 } else { 4106 r->out.total = NULL; 4107 } 4108 if (r->out.total) { 4109 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr); 4110 NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0); 4111 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total)); 4112 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0); 4113 } 4114 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 4115 } 4116 return NDR_ERR_SUCCESS; 4117} 4118 4119_PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Enum *r) 4120{ 4121 ndr_print_struct(ndr, name, "dfs_Enum"); 4122 ndr->depth++; 4123 if (flags & NDR_SET_VALUES) { 4124 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 4125 } 4126 if (flags & NDR_IN) { 4127 ndr_print_struct(ndr, "in", "dfs_Enum"); 4128 ndr->depth++; 4129 ndr_print_uint32(ndr, "level", r->in.level); 4130 ndr_print_uint32(ndr, "bufsize", r->in.bufsize); 4131 ndr_print_ptr(ndr, "info", r->in.info); 4132 ndr->depth++; 4133 if (r->in.info) { 4134 ndr_print_dfs_EnumStruct(ndr, "info", r->in.info); 4135 } 4136 ndr->depth--; 4137 ndr_print_ptr(ndr, "total", r->in.total); 4138 ndr->depth++; 4139 if (r->in.total) { 4140 ndr_print_uint32(ndr, "total", *r->in.total); 4141 } 4142 ndr->depth--; 4143 ndr->depth--; 4144 } 4145 if (flags & NDR_OUT) { 4146 ndr_print_struct(ndr, "out", "dfs_Enum"); 4147 ndr->depth++; 4148 ndr_print_ptr(ndr, "info", r->out.info); 4149 ndr->depth++; 4150 if (r->out.info) { 4151 ndr_print_dfs_EnumStruct(ndr, "info", r->out.info); 4152 } 4153 ndr->depth--; 4154 ndr_print_ptr(ndr, "total", r->out.total); 4155 ndr->depth++; 4156 if (r->out.total) { 4157 ndr_print_uint32(ndr, "total", *r->out.total); 4158 } 4159 ndr->depth--; 4160 ndr_print_WERROR(ndr, "result", r->out.result); 4161 ndr->depth--; 4162 } 4163 ndr->depth--; 4164} 4165 4166static enum ndr_err_code ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_Rename *r) 4167{ 4168 if (flags & NDR_IN) { 4169 } 4170 if (flags & NDR_OUT) { 4171 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 4172 } 4173 return NDR_ERR_SUCCESS; 4174} 4175 4176static enum ndr_err_code ndr_pull_dfs_Rename(struct ndr_pull *ndr, int flags, struct dfs_Rename *r) 4177{ 4178 if (flags & NDR_IN) { 4179 } 4180 if (flags & NDR_OUT) { 4181 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 4182 } 4183 return NDR_ERR_SUCCESS; 4184} 4185 4186_PUBLIC_ void ndr_print_dfs_Rename(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Rename *r) 4187{ 4188 ndr_print_struct(ndr, name, "dfs_Rename"); 4189 ndr->depth++; 4190 if (flags & NDR_SET_VALUES) { 4191 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 4192 } 4193 if (flags & NDR_IN) { 4194 ndr_print_struct(ndr, "in", "dfs_Rename"); 4195 ndr->depth++; 4196 ndr->depth--; 4197 } 4198 if (flags & NDR_OUT) { 4199 ndr_print_struct(ndr, "out", "dfs_Rename"); 4200 ndr->depth++; 4201 ndr_print_WERROR(ndr, "result", r->out.result); 4202 ndr->depth--; 4203 } 4204 ndr->depth--; 4205} 4206 4207static enum ndr_err_code ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Move *r) 4208{ 4209 if (flags & NDR_IN) { 4210 } 4211 if (flags & NDR_OUT) { 4212 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 4213 } 4214 return NDR_ERR_SUCCESS; 4215} 4216 4217static enum ndr_err_code ndr_pull_dfs_Move(struct ndr_pull *ndr, int flags, struct dfs_Move *r) 4218{ 4219 if (flags & NDR_IN) { 4220 } 4221 if (flags & NDR_OUT) { 4222 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 4223 } 4224 return NDR_ERR_SUCCESS; 4225} 4226 4227_PUBLIC_ void ndr_print_dfs_Move(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Move *r) 4228{ 4229 ndr_print_struct(ndr, name, "dfs_Move"); 4230 ndr->depth++; 4231 if (flags & NDR_SET_VALUES) { 4232 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 4233 } 4234 if (flags & NDR_IN) { 4235 ndr_print_struct(ndr, "in", "dfs_Move"); 4236 ndr->depth++; 4237 ndr->depth--; 4238 } 4239 if (flags & NDR_OUT) { 4240 ndr_print_struct(ndr, "out", "dfs_Move"); 4241 ndr->depth++; 4242 ndr_print_WERROR(ndr, "result", r->out.result); 4243 ndr->depth--; 4244 } 4245 ndr->depth--; 4246} 4247 4248static enum ndr_err_code ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerGetConfigInfo *r) 4249{ 4250 if (flags & NDR_IN) { 4251 } 4252 if (flags & NDR_OUT) { 4253 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 4254 } 4255 return NDR_ERR_SUCCESS; 4256} 4257 4258static enum ndr_err_code ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerGetConfigInfo *r) 4259{ 4260 if (flags & NDR_IN) { 4261 } 4262 if (flags & NDR_OUT) { 4263 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 4264 } 4265 return NDR_ERR_SUCCESS; 4266} 4267 4268_PUBLIC_ void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerGetConfigInfo *r) 4269{ 4270 ndr_print_struct(ndr, name, "dfs_ManagerGetConfigInfo"); 4271 ndr->depth++; 4272 if (flags & NDR_SET_VALUES) { 4273 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 4274 } 4275 if (flags & NDR_IN) { 4276 ndr_print_struct(ndr, "in", "dfs_ManagerGetConfigInfo"); 4277 ndr->depth++; 4278 ndr->depth--; 4279 } 4280 if (flags & NDR_OUT) { 4281 ndr_print_struct(ndr, "out", "dfs_ManagerGetConfigInfo"); 4282 ndr->depth++; 4283 ndr_print_WERROR(ndr, "result", r->out.result); 4284 ndr->depth--; 4285 } 4286 ndr->depth--; 4287} 4288 4289static enum ndr_err_code ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerSendSiteInfo *r) 4290{ 4291 if (flags & NDR_IN) { 4292 } 4293 if (flags & NDR_OUT) { 4294 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 4295 } 4296 return NDR_ERR_SUCCESS; 4297} 4298 4299static enum ndr_err_code ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerSendSiteInfo *r) 4300{ 4301 if (flags & NDR_IN) { 4302 } 4303 if (flags & NDR_OUT) { 4304 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 4305 } 4306 return NDR_ERR_SUCCESS; 4307} 4308 4309_PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerSendSiteInfo *r) 4310{ 4311 ndr_print_struct(ndr, name, "dfs_ManagerSendSiteInfo"); 4312 ndr->depth++; 4313 if (flags & NDR_SET_VALUES) { 4314 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 4315 } 4316 if (flags & NDR_IN) { 4317 ndr_print_struct(ndr, "in", "dfs_ManagerSendSiteInfo"); 4318 ndr->depth++; 4319 ndr->depth--; 4320 } 4321 if (flags & NDR_OUT) { 4322 ndr_print_struct(ndr, "out", "dfs_ManagerSendSiteInfo"); 4323 ndr->depth++; 4324 ndr_print_WERROR(ndr, "result", r->out.result); 4325 ndr->depth--; 4326 } 4327 ndr->depth--; 4328} 4329 4330static enum ndr_err_code ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct dfs_AddFtRoot *r) 4331{ 4332 if (flags & NDR_IN) { 4333 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 4334 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4335 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 4336 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4337 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16))); 4338 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4339 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16))); 4340 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dns_servername, ndr_charset_length(r->in.dns_servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4341 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16))); 4342 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4343 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16))); 4344 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4345 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); 4346 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4347 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); 4348 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4349 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16))); 4350 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4351 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16))); 4352 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4353 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16))); 4354 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4355 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16))); 4356 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfs_config_dn, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4357 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.unknown1)); 4358 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); 4359 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown2)); 4360 if (r->in.unknown2) { 4361 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown2)); 4362 if (*r->in.unknown2) { 4363 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2)); 4364 } 4365 } 4366 } 4367 if (flags & NDR_OUT) { 4368 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown2)); 4369 if (r->out.unknown2) { 4370 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown2)); 4371 if (*r->out.unknown2) { 4372 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2)); 4373 } 4374 } 4375 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 4376 } 4377 return NDR_ERR_SUCCESS; 4378} 4379 4380static enum ndr_err_code ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct dfs_AddFtRoot *r) 4381{ 4382 uint32_t _ptr_unknown2; 4383 TALLOC_CTX *_mem_save_unknown2_0; 4384 TALLOC_CTX *_mem_save_unknown2_1; 4385 if (flags & NDR_IN) { 4386 ZERO_STRUCT(r->out); 4387 4388 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); 4389 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); 4390 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { 4391 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername)); 4392 } 4393 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); 4394 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); 4395 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername)); 4396 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername)); 4397 if (ndr_get_array_length(ndr, &r->in.dns_servername) > ndr_get_array_size(ndr, &r->in.dns_servername)) { 4398 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dns_servername), ndr_get_array_length(ndr, &r->in.dns_servername)); 4399 } 4400 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t))); 4401 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dns_servername, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t), CH_UTF16)); 4402 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname)); 4403 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname)); 4404 if (ndr_get_array_length(ndr, &r->in.dfsname) > ndr_get_array_size(ndr, &r->in.dfsname)) { 4405 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfsname), ndr_get_array_length(ndr, &r->in.dfsname)); 4406 } 4407 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t))); 4408 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t), CH_UTF16)); 4409 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare)); 4410 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare)); 4411 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) { 4412 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rootshare), ndr_get_array_length(ndr, &r->in.rootshare)); 4413 } 4414 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t))); 4415 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16)); 4416 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment)); 4417 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment)); 4418 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) { 4419 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.comment), ndr_get_array_length(ndr, &r->in.comment)); 4420 } 4421 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t))); 4422 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16)); 4423 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_config_dn)); 4424 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_config_dn)); 4425 if (ndr_get_array_length(ndr, &r->in.dfs_config_dn) > ndr_get_array_size(ndr, &r->in.dfs_config_dn)) { 4426 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfs_config_dn), ndr_get_array_length(ndr, &r->in.dfs_config_dn)); 4427 } 4428 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_config_dn), sizeof(uint16_t))); 4429 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_config_dn, ndr_get_array_length(ndr, &r->in.dfs_config_dn), sizeof(uint16_t), CH_UTF16)); 4430 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.unknown1)); 4431 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); 4432 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2)); 4433 if (_ptr_unknown2) { 4434 NDR_PULL_ALLOC(ndr, r->in.unknown2); 4435 } else { 4436 r->in.unknown2 = NULL; 4437 } 4438 if (r->in.unknown2) { 4439 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr); 4440 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown2, 0); 4441 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2)); 4442 if (_ptr_unknown2) { 4443 NDR_PULL_ALLOC(ndr, *r->in.unknown2); 4444 } else { 4445 *r->in.unknown2 = NULL; 4446 } 4447 if (*r->in.unknown2) { 4448 _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr); 4449 NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown2, 0); 4450 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2)); 4451 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0); 4452 } 4453 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0); 4454 } 4455 } 4456 if (flags & NDR_OUT) { 4457 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2)); 4458 if (_ptr_unknown2) { 4459 NDR_PULL_ALLOC(ndr, r->out.unknown2); 4460 } else { 4461 r->out.unknown2 = NULL; 4462 } 4463 if (r->out.unknown2) { 4464 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr); 4465 NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown2, 0); 4466 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2)); 4467 if (_ptr_unknown2) { 4468 NDR_PULL_ALLOC(ndr, *r->out.unknown2); 4469 } else { 4470 *r->out.unknown2 = NULL; 4471 } 4472 if (*r->out.unknown2) { 4473 _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr); 4474 NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown2, 0); 4475 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2)); 4476 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0); 4477 } 4478 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0); 4479 } 4480 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 4481 } 4482 return NDR_ERR_SUCCESS; 4483} 4484 4485_PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddFtRoot *r) 4486{ 4487 ndr_print_struct(ndr, name, "dfs_AddFtRoot"); 4488 ndr->depth++; 4489 if (flags & NDR_SET_VALUES) { 4490 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 4491 } 4492 if (flags & NDR_IN) { 4493 ndr_print_struct(ndr, "in", "dfs_AddFtRoot"); 4494 ndr->depth++; 4495 ndr_print_string(ndr, "servername", r->in.servername); 4496 ndr_print_string(ndr, "dns_servername", r->in.dns_servername); 4497 ndr_print_string(ndr, "dfsname", r->in.dfsname); 4498 ndr_print_string(ndr, "rootshare", r->in.rootshare); 4499 ndr_print_string(ndr, "comment", r->in.comment); 4500 ndr_print_string(ndr, "dfs_config_dn", r->in.dfs_config_dn); 4501 ndr_print_uint8(ndr, "unknown1", r->in.unknown1); 4502 ndr_print_uint32(ndr, "flags", r->in.flags); 4503 ndr_print_ptr(ndr, "unknown2", r->in.unknown2); 4504 ndr->depth++; 4505 if (r->in.unknown2) { 4506 ndr_print_ptr(ndr, "unknown2", *r->in.unknown2); 4507 ndr->depth++; 4508 if (*r->in.unknown2) { 4509 ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->in.unknown2); 4510 } 4511 ndr->depth--; 4512 } 4513 ndr->depth--; 4514 ndr->depth--; 4515 } 4516 if (flags & NDR_OUT) { 4517 ndr_print_struct(ndr, "out", "dfs_AddFtRoot"); 4518 ndr->depth++; 4519 ndr_print_ptr(ndr, "unknown2", r->out.unknown2); 4520 ndr->depth++; 4521 if (r->out.unknown2) { 4522 ndr_print_ptr(ndr, "unknown2", *r->out.unknown2); 4523 ndr->depth++; 4524 if (*r->out.unknown2) { 4525 ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->out.unknown2); 4526 } 4527 ndr->depth--; 4528 } 4529 ndr->depth--; 4530 ndr_print_WERROR(ndr, "result", r->out.result); 4531 ndr->depth--; 4532 } 4533 ndr->depth--; 4534} 4535 4536static enum ndr_err_code ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveFtRoot *r) 4537{ 4538 if (flags & NDR_IN) { 4539 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 4540 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4541 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 4542 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4543 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16))); 4544 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4545 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16))); 4546 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dns_servername, ndr_charset_length(r->in.dns_servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4547 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16))); 4548 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4549 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16))); 4550 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4551 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); 4552 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4553 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); 4554 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4555 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); 4556 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown)); 4557 if (r->in.unknown) { 4558 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown)); 4559 if (*r->in.unknown) { 4560 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown)); 4561 } 4562 } 4563 } 4564 if (flags & NDR_OUT) { 4565 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown)); 4566 if (r->out.unknown) { 4567 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown)); 4568 if (*r->out.unknown) { 4569 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown)); 4570 } 4571 } 4572 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 4573 } 4574 return NDR_ERR_SUCCESS; 4575} 4576 4577static enum ndr_err_code ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveFtRoot *r) 4578{ 4579 uint32_t _ptr_unknown; 4580 TALLOC_CTX *_mem_save_unknown_0; 4581 TALLOC_CTX *_mem_save_unknown_1; 4582 if (flags & NDR_IN) { 4583 ZERO_STRUCT(r->out); 4584 4585 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); 4586 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); 4587 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { 4588 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername)); 4589 } 4590 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); 4591 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); 4592 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername)); 4593 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername)); 4594 if (ndr_get_array_length(ndr, &r->in.dns_servername) > ndr_get_array_size(ndr, &r->in.dns_servername)) { 4595 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dns_servername), ndr_get_array_length(ndr, &r->in.dns_servername)); 4596 } 4597 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t))); 4598 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dns_servername, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t), CH_UTF16)); 4599 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname)); 4600 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname)); 4601 if (ndr_get_array_length(ndr, &r->in.dfsname) > ndr_get_array_size(ndr, &r->in.dfsname)) { 4602 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfsname), ndr_get_array_length(ndr, &r->in.dfsname)); 4603 } 4604 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t))); 4605 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t), CH_UTF16)); 4606 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare)); 4607 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare)); 4608 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) { 4609 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rootshare), ndr_get_array_length(ndr, &r->in.rootshare)); 4610 } 4611 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t))); 4612 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16)); 4613 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); 4614 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown)); 4615 if (_ptr_unknown) { 4616 NDR_PULL_ALLOC(ndr, r->in.unknown); 4617 } else { 4618 r->in.unknown = NULL; 4619 } 4620 if (r->in.unknown) { 4621 _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr); 4622 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown, 0); 4623 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown)); 4624 if (_ptr_unknown) { 4625 NDR_PULL_ALLOC(ndr, *r->in.unknown); 4626 } else { 4627 *r->in.unknown = NULL; 4628 } 4629 if (*r->in.unknown) { 4630 _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr); 4631 NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown, 0); 4632 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown)); 4633 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0); 4634 } 4635 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0); 4636 } 4637 } 4638 if (flags & NDR_OUT) { 4639 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown)); 4640 if (_ptr_unknown) { 4641 NDR_PULL_ALLOC(ndr, r->out.unknown); 4642 } else { 4643 r->out.unknown = NULL; 4644 } 4645 if (r->out.unknown) { 4646 _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr); 4647 NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown, 0); 4648 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown)); 4649 if (_ptr_unknown) { 4650 NDR_PULL_ALLOC(ndr, *r->out.unknown); 4651 } else { 4652 *r->out.unknown = NULL; 4653 } 4654 if (*r->out.unknown) { 4655 _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr); 4656 NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown, 0); 4657 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown)); 4658 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0); 4659 } 4660 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0); 4661 } 4662 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 4663 } 4664 return NDR_ERR_SUCCESS; 4665} 4666 4667_PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveFtRoot *r) 4668{ 4669 ndr_print_struct(ndr, name, "dfs_RemoveFtRoot"); 4670 ndr->depth++; 4671 if (flags & NDR_SET_VALUES) { 4672 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 4673 } 4674 if (flags & NDR_IN) { 4675 ndr_print_struct(ndr, "in", "dfs_RemoveFtRoot"); 4676 ndr->depth++; 4677 ndr_print_string(ndr, "servername", r->in.servername); 4678 ndr_print_string(ndr, "dns_servername", r->in.dns_servername); 4679 ndr_print_string(ndr, "dfsname", r->in.dfsname); 4680 ndr_print_string(ndr, "rootshare", r->in.rootshare); 4681 ndr_print_uint32(ndr, "flags", r->in.flags); 4682 ndr_print_ptr(ndr, "unknown", r->in.unknown); 4683 ndr->depth++; 4684 if (r->in.unknown) { 4685 ndr_print_ptr(ndr, "unknown", *r->in.unknown); 4686 ndr->depth++; 4687 if (*r->in.unknown) { 4688 ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->in.unknown); 4689 } 4690 ndr->depth--; 4691 } 4692 ndr->depth--; 4693 ndr->depth--; 4694 } 4695 if (flags & NDR_OUT) { 4696 ndr_print_struct(ndr, "out", "dfs_RemoveFtRoot"); 4697 ndr->depth++; 4698 ndr_print_ptr(ndr, "unknown", r->out.unknown); 4699 ndr->depth++; 4700 if (r->out.unknown) { 4701 ndr_print_ptr(ndr, "unknown", *r->out.unknown); 4702 ndr->depth++; 4703 if (*r->out.unknown) { 4704 ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->out.unknown); 4705 } 4706 ndr->depth--; 4707 } 4708 ndr->depth--; 4709 ndr_print_WERROR(ndr, "result", r->out.result); 4710 ndr->depth--; 4711 } 4712 ndr->depth--; 4713} 4714 4715static enum ndr_err_code ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct dfs_AddStdRoot *r) 4716{ 4717 if (flags & NDR_IN) { 4718 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 4719 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4720 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 4721 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4722 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); 4723 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4724 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); 4725 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4726 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16))); 4727 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4728 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16))); 4729 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4730 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); 4731 } 4732 if (flags & NDR_OUT) { 4733 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 4734 } 4735 return NDR_ERR_SUCCESS; 4736} 4737 4738static enum ndr_err_code ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct dfs_AddStdRoot *r) 4739{ 4740 if (flags & NDR_IN) { 4741 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); 4742 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); 4743 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { 4744 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername)); 4745 } 4746 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); 4747 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); 4748 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare)); 4749 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare)); 4750 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) { 4751 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rootshare), ndr_get_array_length(ndr, &r->in.rootshare)); 4752 } 4753 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t))); 4754 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16)); 4755 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment)); 4756 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment)); 4757 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) { 4758 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.comment), ndr_get_array_length(ndr, &r->in.comment)); 4759 } 4760 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t))); 4761 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16)); 4762 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); 4763 } 4764 if (flags & NDR_OUT) { 4765 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 4766 } 4767 return NDR_ERR_SUCCESS; 4768} 4769 4770_PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRoot *r) 4771{ 4772 ndr_print_struct(ndr, name, "dfs_AddStdRoot"); 4773 ndr->depth++; 4774 if (flags & NDR_SET_VALUES) { 4775 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 4776 } 4777 if (flags & NDR_IN) { 4778 ndr_print_struct(ndr, "in", "dfs_AddStdRoot"); 4779 ndr->depth++; 4780 ndr_print_string(ndr, "servername", r->in.servername); 4781 ndr_print_string(ndr, "rootshare", r->in.rootshare); 4782 ndr_print_string(ndr, "comment", r->in.comment); 4783 ndr_print_uint32(ndr, "flags", r->in.flags); 4784 ndr->depth--; 4785 } 4786 if (flags & NDR_OUT) { 4787 ndr_print_struct(ndr, "out", "dfs_AddStdRoot"); 4788 ndr->depth++; 4789 ndr_print_WERROR(ndr, "result", r->out.result); 4790 ndr->depth--; 4791 } 4792 ndr->depth--; 4793} 4794 4795static enum ndr_err_code ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveStdRoot *r) 4796{ 4797 if (flags & NDR_IN) { 4798 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 4799 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4800 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 4801 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4802 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); 4803 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4804 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); 4805 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4806 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); 4807 } 4808 if (flags & NDR_OUT) { 4809 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 4810 } 4811 return NDR_ERR_SUCCESS; 4812} 4813 4814static enum ndr_err_code ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveStdRoot *r) 4815{ 4816 if (flags & NDR_IN) { 4817 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); 4818 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); 4819 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { 4820 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername)); 4821 } 4822 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); 4823 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); 4824 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare)); 4825 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare)); 4826 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) { 4827 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rootshare), ndr_get_array_length(ndr, &r->in.rootshare)); 4828 } 4829 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t))); 4830 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16)); 4831 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); 4832 } 4833 if (flags & NDR_OUT) { 4834 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 4835 } 4836 return NDR_ERR_SUCCESS; 4837} 4838 4839_PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveStdRoot *r) 4840{ 4841 ndr_print_struct(ndr, name, "dfs_RemoveStdRoot"); 4842 ndr->depth++; 4843 if (flags & NDR_SET_VALUES) { 4844 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 4845 } 4846 if (flags & NDR_IN) { 4847 ndr_print_struct(ndr, "in", "dfs_RemoveStdRoot"); 4848 ndr->depth++; 4849 ndr_print_string(ndr, "servername", r->in.servername); 4850 ndr_print_string(ndr, "rootshare", r->in.rootshare); 4851 ndr_print_uint32(ndr, "flags", r->in.flags); 4852 ndr->depth--; 4853 } 4854 if (flags & NDR_OUT) { 4855 ndr_print_struct(ndr, "out", "dfs_RemoveStdRoot"); 4856 ndr->depth++; 4857 ndr_print_WERROR(ndr, "result", r->out.result); 4858 ndr->depth--; 4859 } 4860 ndr->depth--; 4861} 4862 4863static enum ndr_err_code ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r) 4864{ 4865 if (flags & NDR_IN) { 4866 if (r->in.servername == NULL) { 4867 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); 4868 } 4869 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 4870 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4871 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 4872 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4873 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); 4874 } 4875 if (flags & NDR_OUT) { 4876 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 4877 } 4878 return NDR_ERR_SUCCESS; 4879} 4880 4881static enum ndr_err_code ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, struct dfs_ManagerInitialize *r) 4882{ 4883 if (flags & NDR_IN) { 4884 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); 4885 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); 4886 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { 4887 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername)); 4888 } 4889 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); 4890 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); 4891 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); 4892 } 4893 if (flags & NDR_OUT) { 4894 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 4895 } 4896 return NDR_ERR_SUCCESS; 4897} 4898 4899_PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerInitialize *r) 4900{ 4901 ndr_print_struct(ndr, name, "dfs_ManagerInitialize"); 4902 ndr->depth++; 4903 if (flags & NDR_SET_VALUES) { 4904 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 4905 } 4906 if (flags & NDR_IN) { 4907 ndr_print_struct(ndr, "in", "dfs_ManagerInitialize"); 4908 ndr->depth++; 4909 ndr_print_ptr(ndr, "servername", r->in.servername); 4910 ndr->depth++; 4911 ndr_print_string(ndr, "servername", r->in.servername); 4912 ndr->depth--; 4913 ndr_print_uint32(ndr, "flags", r->in.flags); 4914 ndr->depth--; 4915 } 4916 if (flags & NDR_OUT) { 4917 ndr_print_struct(ndr, "out", "dfs_ManagerInitialize"); 4918 ndr->depth++; 4919 ndr_print_WERROR(ndr, "result", r->out.result); 4920 ndr->depth--; 4921 } 4922 ndr->depth--; 4923} 4924 4925static enum ndr_err_code ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const struct dfs_AddStdRootForced *r) 4926{ 4927 if (flags & NDR_IN) { 4928 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 4929 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4930 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 4931 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4932 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); 4933 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4934 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); 4935 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4936 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16))); 4937 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4938 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16))); 4939 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4940 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16))); 4941 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 4942 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16))); 4943 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.store, ndr_charset_length(r->in.store, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 4944 } 4945 if (flags & NDR_OUT) { 4946 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 4947 } 4948 return NDR_ERR_SUCCESS; 4949} 4950 4951static enum ndr_err_code ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, struct dfs_AddStdRootForced *r) 4952{ 4953 if (flags & NDR_IN) { 4954 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); 4955 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); 4956 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { 4957 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername)); 4958 } 4959 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); 4960 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); 4961 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare)); 4962 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare)); 4963 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) { 4964 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rootshare), ndr_get_array_length(ndr, &r->in.rootshare)); 4965 } 4966 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t))); 4967 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16)); 4968 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment)); 4969 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment)); 4970 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) { 4971 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.comment), ndr_get_array_length(ndr, &r->in.comment)); 4972 } 4973 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t))); 4974 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16)); 4975 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.store)); 4976 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.store)); 4977 if (ndr_get_array_length(ndr, &r->in.store) > ndr_get_array_size(ndr, &r->in.store)) { 4978 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.store), ndr_get_array_length(ndr, &r->in.store)); 4979 } 4980 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.store), sizeof(uint16_t))); 4981 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.store, ndr_get_array_length(ndr, &r->in.store), sizeof(uint16_t), CH_UTF16)); 4982 } 4983 if (flags & NDR_OUT) { 4984 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 4985 } 4986 return NDR_ERR_SUCCESS; 4987} 4988 4989_PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRootForced *r) 4990{ 4991 ndr_print_struct(ndr, name, "dfs_AddStdRootForced"); 4992 ndr->depth++; 4993 if (flags & NDR_SET_VALUES) { 4994 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 4995 } 4996 if (flags & NDR_IN) { 4997 ndr_print_struct(ndr, "in", "dfs_AddStdRootForced"); 4998 ndr->depth++; 4999 ndr_print_string(ndr, "servername", r->in.servername); 5000 ndr_print_string(ndr, "rootshare", r->in.rootshare); 5001 ndr_print_string(ndr, "comment", r->in.comment); 5002 ndr_print_string(ndr, "store", r->in.store); 5003 ndr->depth--; 5004 } 5005 if (flags & NDR_OUT) { 5006 ndr_print_struct(ndr, "out", "dfs_AddStdRootForced"); 5007 ndr->depth++; 5008 ndr_print_WERROR(ndr, "result", r->out.result); 5009 ndr->depth--; 5010 } 5011 ndr->depth--; 5012} 5013 5014static enum ndr_err_code ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r) 5015{ 5016 if (flags & NDR_IN) { 5017 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 5018 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 5019 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 5020 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 5021 if (r->in.server_fullname == NULL) { 5022 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); 5023 } 5024 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.server_fullname)); 5025 if (*r->in.server_fullname) { 5026 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16))); 5027 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 5028 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16))); 5029 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->in.server_fullname, ndr_charset_length(*r->in.server_fullname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 5030 } 5031 if (r->in.is_root == NULL) { 5032 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); 5033 } 5034 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.is_root)); 5035 if (r->in.ttl == NULL) { 5036 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); 5037 } 5038 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.ttl)); 5039 } 5040 if (flags & NDR_OUT) { 5041 if (r->out.server_fullname == NULL) { 5042 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); 5043 } 5044 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.server_fullname)); 5045 if (*r->out.server_fullname) { 5046 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16))); 5047 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 5048 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16))); 5049 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.server_fullname, ndr_charset_length(*r->out.server_fullname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 5050 } 5051 if (r->out.is_root == NULL) { 5052 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); 5053 } 5054 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.is_root)); 5055 if (r->out.ttl == NULL) { 5056 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); 5057 } 5058 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.ttl)); 5059 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 5060 } 5061 return NDR_ERR_SUCCESS; 5062} 5063 5064static enum ndr_err_code ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r) 5065{ 5066 uint32_t _ptr_server_fullname; 5067 TALLOC_CTX *_mem_save_server_fullname_0; 5068 TALLOC_CTX *_mem_save_server_fullname_1; 5069 TALLOC_CTX *_mem_save_is_root_0; 5070 TALLOC_CTX *_mem_save_ttl_0; 5071 if (flags & NDR_IN) { 5072 ZERO_STRUCT(r->out); 5073 5074 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); 5075 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); 5076 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { 5077 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername)); 5078 } 5079 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); 5080 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); 5081 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { 5082 NDR_PULL_ALLOC(ndr, r->in.server_fullname); 5083 } 5084 _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr); 5085 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_fullname, LIBNDR_FLAG_REF_ALLOC); 5086 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname)); 5087 if (_ptr_server_fullname) { 5088 NDR_PULL_ALLOC(ndr, *r->in.server_fullname); 5089 } else { 5090 *r->in.server_fullname = NULL; 5091 } 5092 if (*r->in.server_fullname) { 5093 _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr); 5094 NDR_PULL_SET_MEM_CTX(ndr, *r->in.server_fullname, 0); 5095 NDR_CHECK(ndr_pull_array_size(ndr, r->in.server_fullname)); 5096 NDR_CHECK(ndr_pull_array_length(ndr, r->in.server_fullname)); 5097 if (ndr_get_array_length(ndr, r->in.server_fullname) > ndr_get_array_size(ndr, r->in.server_fullname)) { 5098 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->in.server_fullname), ndr_get_array_length(ndr, r->in.server_fullname)); 5099 } 5100 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->in.server_fullname), sizeof(uint16_t))); 5101 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->in.server_fullname, ndr_get_array_length(ndr, r->in.server_fullname), sizeof(uint16_t), CH_UTF16)); 5102 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0); 5103 } 5104 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC); 5105 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { 5106 NDR_PULL_ALLOC(ndr, r->in.is_root); 5107 } 5108 _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr); 5109 NDR_PULL_SET_MEM_CTX(ndr, r->in.is_root, LIBNDR_FLAG_REF_ALLOC); 5110 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.is_root)); 5111 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC); 5112 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { 5113 NDR_PULL_ALLOC(ndr, r->in.ttl); 5114 } 5115 _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr); 5116 NDR_PULL_SET_MEM_CTX(ndr, r->in.ttl, LIBNDR_FLAG_REF_ALLOC); 5117 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.ttl)); 5118 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC); 5119 NDR_PULL_ALLOC(ndr, r->out.server_fullname); 5120 *r->out.server_fullname = *r->in.server_fullname; 5121 NDR_PULL_ALLOC(ndr, r->out.is_root); 5122 *r->out.is_root = *r->in.is_root; 5123 NDR_PULL_ALLOC(ndr, r->out.ttl); 5124 *r->out.ttl = *r->in.ttl; 5125 } 5126 if (flags & NDR_OUT) { 5127 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { 5128 NDR_PULL_ALLOC(ndr, r->out.server_fullname); 5129 } 5130 _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr); 5131 NDR_PULL_SET_MEM_CTX(ndr, r->out.server_fullname, LIBNDR_FLAG_REF_ALLOC); 5132 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname)); 5133 if (_ptr_server_fullname) { 5134 NDR_PULL_ALLOC(ndr, *r->out.server_fullname); 5135 } else { 5136 *r->out.server_fullname = NULL; 5137 } 5138 if (*r->out.server_fullname) { 5139 _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr); 5140 NDR_PULL_SET_MEM_CTX(ndr, *r->out.server_fullname, 0); 5141 NDR_CHECK(ndr_pull_array_size(ndr, r->out.server_fullname)); 5142 NDR_CHECK(ndr_pull_array_length(ndr, r->out.server_fullname)); 5143 if (ndr_get_array_length(ndr, r->out.server_fullname) > ndr_get_array_size(ndr, r->out.server_fullname)) { 5144 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.server_fullname), ndr_get_array_length(ndr, r->out.server_fullname)); 5145 } 5146 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.server_fullname), sizeof(uint16_t))); 5147 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.server_fullname, ndr_get_array_length(ndr, r->out.server_fullname), sizeof(uint16_t), CH_UTF16)); 5148 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0); 5149 } 5150 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC); 5151 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { 5152 NDR_PULL_ALLOC(ndr, r->out.is_root); 5153 } 5154 _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr); 5155 NDR_PULL_SET_MEM_CTX(ndr, r->out.is_root, LIBNDR_FLAG_REF_ALLOC); 5156 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.is_root)); 5157 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC); 5158 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { 5159 NDR_PULL_ALLOC(ndr, r->out.ttl); 5160 } 5161 _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr); 5162 NDR_PULL_SET_MEM_CTX(ndr, r->out.ttl, LIBNDR_FLAG_REF_ALLOC); 5163 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.ttl)); 5164 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC); 5165 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 5166 } 5167 return NDR_ERR_SUCCESS; 5168} 5169 5170_PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetDcAddress *r) 5171{ 5172 ndr_print_struct(ndr, name, "dfs_GetDcAddress"); 5173 ndr->depth++; 5174 if (flags & NDR_SET_VALUES) { 5175 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 5176 } 5177 if (flags & NDR_IN) { 5178 ndr_print_struct(ndr, "in", "dfs_GetDcAddress"); 5179 ndr->depth++; 5180 ndr_print_string(ndr, "servername", r->in.servername); 5181 ndr_print_ptr(ndr, "server_fullname", r->in.server_fullname); 5182 ndr->depth++; 5183 ndr_print_ptr(ndr, "server_fullname", *r->in.server_fullname); 5184 ndr->depth++; 5185 if (*r->in.server_fullname) { 5186 ndr_print_string(ndr, "server_fullname", *r->in.server_fullname); 5187 } 5188 ndr->depth--; 5189 ndr->depth--; 5190 ndr_print_ptr(ndr, "is_root", r->in.is_root); 5191 ndr->depth++; 5192 ndr_print_uint8(ndr, "is_root", *r->in.is_root); 5193 ndr->depth--; 5194 ndr_print_ptr(ndr, "ttl", r->in.ttl); 5195 ndr->depth++; 5196 ndr_print_uint32(ndr, "ttl", *r->in.ttl); 5197 ndr->depth--; 5198 ndr->depth--; 5199 } 5200 if (flags & NDR_OUT) { 5201 ndr_print_struct(ndr, "out", "dfs_GetDcAddress"); 5202 ndr->depth++; 5203 ndr_print_ptr(ndr, "server_fullname", r->out.server_fullname); 5204 ndr->depth++; 5205 ndr_print_ptr(ndr, "server_fullname", *r->out.server_fullname); 5206 ndr->depth++; 5207 if (*r->out.server_fullname) { 5208 ndr_print_string(ndr, "server_fullname", *r->out.server_fullname); 5209 } 5210 ndr->depth--; 5211 ndr->depth--; 5212 ndr_print_ptr(ndr, "is_root", r->out.is_root); 5213 ndr->depth++; 5214 ndr_print_uint8(ndr, "is_root", *r->out.is_root); 5215 ndr->depth--; 5216 ndr_print_ptr(ndr, "ttl", r->out.ttl); 5217 ndr->depth++; 5218 ndr_print_uint32(ndr, "ttl", *r->out.ttl); 5219 ndr->depth--; 5220 ndr_print_WERROR(ndr, "result", r->out.result); 5221 ndr->depth--; 5222 } 5223 ndr->depth--; 5224} 5225 5226static enum ndr_err_code ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r) 5227{ 5228 if (flags & NDR_IN) { 5229 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 5230 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 5231 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 5232 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 5233 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16))); 5234 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 5235 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16))); 5236 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_fullname, ndr_charset_length(r->in.server_fullname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 5237 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); 5238 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ttl)); 5239 } 5240 if (flags & NDR_OUT) { 5241 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 5242 } 5243 return NDR_ERR_SUCCESS; 5244} 5245 5246static enum ndr_err_code ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r) 5247{ 5248 if (flags & NDR_IN) { 5249 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); 5250 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); 5251 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { 5252 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername)); 5253 } 5254 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); 5255 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); 5256 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_fullname)); 5257 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_fullname)); 5258 if (ndr_get_array_length(ndr, &r->in.server_fullname) > ndr_get_array_size(ndr, &r->in.server_fullname)) { 5259 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_fullname), ndr_get_array_length(ndr, &r->in.server_fullname)); 5260 } 5261 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_fullname), sizeof(uint16_t))); 5262 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_fullname, ndr_get_array_length(ndr, &r->in.server_fullname), sizeof(uint16_t), CH_UTF16)); 5263 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); 5264 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ttl)); 5265 } 5266 if (flags & NDR_OUT) { 5267 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 5268 } 5269 return NDR_ERR_SUCCESS; 5270} 5271 5272_PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetDcAddress *r) 5273{ 5274 ndr_print_struct(ndr, name, "dfs_SetDcAddress"); 5275 ndr->depth++; 5276 if (flags & NDR_SET_VALUES) { 5277 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 5278 } 5279 if (flags & NDR_IN) { 5280 ndr_print_struct(ndr, "in", "dfs_SetDcAddress"); 5281 ndr->depth++; 5282 ndr_print_string(ndr, "servername", r->in.servername); 5283 ndr_print_string(ndr, "server_fullname", r->in.server_fullname); 5284 ndr_print_uint32(ndr, "flags", r->in.flags); 5285 ndr_print_uint32(ndr, "ttl", r->in.ttl); 5286 ndr->depth--; 5287 } 5288 if (flags & NDR_OUT) { 5289 ndr_print_struct(ndr, "out", "dfs_SetDcAddress"); 5290 ndr->depth++; 5291 ndr_print_WERROR(ndr, "result", r->out.result); 5292 ndr->depth--; 5293 } 5294 ndr->depth--; 5295} 5296 5297static enum ndr_err_code ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct dfs_FlushFtTable *r) 5298{ 5299 if (flags & NDR_IN) { 5300 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 5301 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 5302 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); 5303 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 5304 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); 5305 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 5306 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); 5307 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 5308 } 5309 if (flags & NDR_OUT) { 5310 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 5311 } 5312 return NDR_ERR_SUCCESS; 5313} 5314 5315static enum ndr_err_code ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struct dfs_FlushFtTable *r) 5316{ 5317 if (flags & NDR_IN) { 5318 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); 5319 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); 5320 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { 5321 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername)); 5322 } 5323 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); 5324 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); 5325 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare)); 5326 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare)); 5327 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) { 5328 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rootshare), ndr_get_array_length(ndr, &r->in.rootshare)); 5329 } 5330 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t))); 5331 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16)); 5332 } 5333 if (flags & NDR_OUT) { 5334 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 5335 } 5336 return NDR_ERR_SUCCESS; 5337} 5338 5339_PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name, int flags, const struct dfs_FlushFtTable *r) 5340{ 5341 ndr_print_struct(ndr, name, "dfs_FlushFtTable"); 5342 ndr->depth++; 5343 if (flags & NDR_SET_VALUES) { 5344 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 5345 } 5346 if (flags & NDR_IN) { 5347 ndr_print_struct(ndr, "in", "dfs_FlushFtTable"); 5348 ndr->depth++; 5349 ndr_print_string(ndr, "servername", r->in.servername); 5350 ndr_print_string(ndr, "rootshare", r->in.rootshare); 5351 ndr->depth--; 5352 } 5353 if (flags & NDR_OUT) { 5354 ndr_print_struct(ndr, "out", "dfs_FlushFtTable"); 5355 ndr->depth++; 5356 ndr_print_WERROR(ndr, "result", r->out.result); 5357 ndr->depth--; 5358 } 5359 ndr->depth--; 5360} 5361 5362static enum ndr_err_code ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add2 *r) 5363{ 5364 if (flags & NDR_IN) { 5365 } 5366 if (flags & NDR_OUT) { 5367 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 5368 } 5369 return NDR_ERR_SUCCESS; 5370} 5371 5372static enum ndr_err_code ndr_pull_dfs_Add2(struct ndr_pull *ndr, int flags, struct dfs_Add2 *r) 5373{ 5374 if (flags & NDR_IN) { 5375 } 5376 if (flags & NDR_OUT) { 5377 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 5378 } 5379 return NDR_ERR_SUCCESS; 5380} 5381 5382_PUBLIC_ void ndr_print_dfs_Add2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add2 *r) 5383{ 5384 ndr_print_struct(ndr, name, "dfs_Add2"); 5385 ndr->depth++; 5386 if (flags & NDR_SET_VALUES) { 5387 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 5388 } 5389 if (flags & NDR_IN) { 5390 ndr_print_struct(ndr, "in", "dfs_Add2"); 5391 ndr->depth++; 5392 ndr->depth--; 5393 } 5394 if (flags & NDR_OUT) { 5395 ndr_print_struct(ndr, "out", "dfs_Add2"); 5396 ndr->depth++; 5397 ndr_print_WERROR(ndr, "result", r->out.result); 5398 ndr->depth--; 5399 } 5400 ndr->depth--; 5401} 5402 5403static enum ndr_err_code ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_Remove2 *r) 5404{ 5405 if (flags & NDR_IN) { 5406 } 5407 if (flags & NDR_OUT) { 5408 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 5409 } 5410 return NDR_ERR_SUCCESS; 5411} 5412 5413static enum ndr_err_code ndr_pull_dfs_Remove2(struct ndr_pull *ndr, int flags, struct dfs_Remove2 *r) 5414{ 5415 if (flags & NDR_IN) { 5416 } 5417 if (flags & NDR_OUT) { 5418 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 5419 } 5420 return NDR_ERR_SUCCESS; 5421} 5422 5423_PUBLIC_ void ndr_print_dfs_Remove2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove2 *r) 5424{ 5425 ndr_print_struct(ndr, name, "dfs_Remove2"); 5426 ndr->depth++; 5427 if (flags & NDR_SET_VALUES) { 5428 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 5429 } 5430 if (flags & NDR_IN) { 5431 ndr_print_struct(ndr, "in", "dfs_Remove2"); 5432 ndr->depth++; 5433 ndr->depth--; 5434 } 5435 if (flags & NDR_OUT) { 5436 ndr_print_struct(ndr, "out", "dfs_Remove2"); 5437 ndr->depth++; 5438 ndr_print_WERROR(ndr, "result", r->out.result); 5439 ndr->depth--; 5440 } 5441 ndr->depth--; 5442} 5443 5444_PUBLIC_ enum ndr_err_code ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r) 5445{ 5446 if (flags & NDR_IN) { 5447 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16))); 5448 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); 5449 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16))); 5450 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfs_name, ndr_charset_length(r->in.dfs_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); 5451 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level)); 5452 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize)); 5453 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info)); 5454 if (r->in.info) { 5455 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); 5456 } 5457 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total)); 5458 if (r->in.total) { 5459 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total)); 5460 } 5461 } 5462 if (flags & NDR_OUT) { 5463 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info)); 5464 if (r->out.info) { 5465 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); 5466 } 5467 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total)); 5468 if (r->out.total) { 5469 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total)); 5470 } 5471 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 5472 } 5473 return NDR_ERR_SUCCESS; 5474} 5475 5476_PUBLIC_ enum ndr_err_code ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r) 5477{ 5478 uint32_t _ptr_info; 5479 uint32_t _ptr_total; 5480 TALLOC_CTX *_mem_save_info_0; 5481 TALLOC_CTX *_mem_save_total_0; 5482 if (flags & NDR_IN) { 5483 ZERO_STRUCT(r->out); 5484 5485 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_name)); 5486 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_name)); 5487 if (ndr_get_array_length(ndr, &r->in.dfs_name) > ndr_get_array_size(ndr, &r->in.dfs_name)) { 5488 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfs_name), ndr_get_array_length(ndr, &r->in.dfs_name)); 5489 } 5490 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_name), sizeof(uint16_t))); 5491 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_name, ndr_get_array_length(ndr, &r->in.dfs_name), sizeof(uint16_t), CH_UTF16)); 5492 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level)); 5493 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize)); 5494 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); 5495 if (_ptr_info) { 5496 NDR_PULL_ALLOC(ndr, r->in.info); 5497 } else { 5498 r->in.info = NULL; 5499 } 5500 if (r->in.info) { 5501 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); 5502 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0); 5503 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); 5504 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); 5505 } 5506 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total)); 5507 if (_ptr_total) { 5508 NDR_PULL_ALLOC(ndr, r->in.total); 5509 } else { 5510 r->in.total = NULL; 5511 } 5512 if (r->in.total) { 5513 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr); 5514 NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0); 5515 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total)); 5516 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0); 5517 } 5518 } 5519 if (flags & NDR_OUT) { 5520 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); 5521 if (_ptr_info) { 5522 NDR_PULL_ALLOC(ndr, r->out.info); 5523 } else { 5524 r->out.info = NULL; 5525 } 5526 if (r->out.info) { 5527 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); 5528 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0); 5529 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); 5530 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); 5531 } 5532 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total)); 5533 if (_ptr_total) { 5534 NDR_PULL_ALLOC(ndr, r->out.total); 5535 } else { 5536 r->out.total = NULL; 5537 } 5538 if (r->out.total) { 5539 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr); 5540 NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0); 5541 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total)); 5542 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0); 5543 } 5544 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 5545 } 5546 return NDR_ERR_SUCCESS; 5547} 5548 5549_PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int flags, const struct dfs_EnumEx *r) 5550{ 5551 ndr_print_struct(ndr, name, "dfs_EnumEx"); 5552 ndr->depth++; 5553 if (flags & NDR_SET_VALUES) { 5554 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 5555 } 5556 if (flags & NDR_IN) { 5557 ndr_print_struct(ndr, "in", "dfs_EnumEx"); 5558 ndr->depth++; 5559 ndr_print_string(ndr, "dfs_name", r->in.dfs_name); 5560 ndr_print_uint32(ndr, "level", r->in.level); 5561 ndr_print_uint32(ndr, "bufsize", r->in.bufsize); 5562 ndr_print_ptr(ndr, "info", r->in.info); 5563 ndr->depth++; 5564 if (r->in.info) { 5565 ndr_print_dfs_EnumStruct(ndr, "info", r->in.info); 5566 } 5567 ndr->depth--; 5568 ndr_print_ptr(ndr, "total", r->in.total); 5569 ndr->depth++; 5570 if (r->in.total) { 5571 ndr_print_uint32(ndr, "total", *r->in.total); 5572 } 5573 ndr->depth--; 5574 ndr->depth--; 5575 } 5576 if (flags & NDR_OUT) { 5577 ndr_print_struct(ndr, "out", "dfs_EnumEx"); 5578 ndr->depth++; 5579 ndr_print_ptr(ndr, "info", r->out.info); 5580 ndr->depth++; 5581 if (r->out.info) { 5582 ndr_print_dfs_EnumStruct(ndr, "info", r->out.info); 5583 } 5584 ndr->depth--; 5585 ndr_print_ptr(ndr, "total", r->out.total); 5586 ndr->depth++; 5587 if (r->out.total) { 5588 ndr_print_uint32(ndr, "total", *r->out.total); 5589 } 5590 ndr->depth--; 5591 ndr_print_WERROR(ndr, "result", r->out.result); 5592 ndr->depth--; 5593 } 5594 ndr->depth--; 5595} 5596 5597static enum ndr_err_code ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs_SetInfo2 *r) 5598{ 5599 if (flags & NDR_IN) { 5600 } 5601 if (flags & NDR_OUT) { 5602 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); 5603 } 5604 return NDR_ERR_SUCCESS; 5605} 5606 5607static enum ndr_err_code ndr_pull_dfs_SetInfo2(struct ndr_pull *ndr, int flags, struct dfs_SetInfo2 *r) 5608{ 5609 if (flags & NDR_IN) { 5610 } 5611 if (flags & NDR_OUT) { 5612 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); 5613 } 5614 return NDR_ERR_SUCCESS; 5615} 5616 5617_PUBLIC_ void ndr_print_dfs_SetInfo2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo2 *r) 5618{ 5619 ndr_print_struct(ndr, name, "dfs_SetInfo2"); 5620 ndr->depth++; 5621 if (flags & NDR_SET_VALUES) { 5622 ndr->flags |= LIBNDR_PRINT_SET_VALUES; 5623 } 5624 if (flags & NDR_IN) { 5625 ndr_print_struct(ndr, "in", "dfs_SetInfo2"); 5626 ndr->depth++; 5627 ndr->depth--; 5628 } 5629 if (flags & NDR_OUT) { 5630 ndr_print_struct(ndr, "out", "dfs_SetInfo2"); 5631 ndr->depth++; 5632 ndr_print_WERROR(ndr, "result", r->out.result); 5633 ndr->depth--; 5634 } 5635 ndr->depth--; 5636} 5637 5638static const struct ndr_interface_call netdfs_calls[] = { 5639 { 5640 "dfs_GetManagerVersion", 5641 sizeof(struct dfs_GetManagerVersion), 5642 (ndr_push_flags_fn_t) ndr_push_dfs_GetManagerVersion, 5643 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetManagerVersion, 5644 (ndr_print_function_t) ndr_print_dfs_GetManagerVersion, 5645 false, 5646 }, 5647 { 5648 "dfs_Add", 5649 sizeof(struct dfs_Add), 5650 (ndr_push_flags_fn_t) ndr_push_dfs_Add, 5651 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add, 5652 (ndr_print_function_t) ndr_print_dfs_Add, 5653 false, 5654 }, 5655 { 5656 "dfs_Remove", 5657 sizeof(struct dfs_Remove), 5658 (ndr_push_flags_fn_t) ndr_push_dfs_Remove, 5659 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove, 5660 (ndr_print_function_t) ndr_print_dfs_Remove, 5661 false, 5662 }, 5663 { 5664 "dfs_SetInfo", 5665 sizeof(struct dfs_SetInfo), 5666 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo, 5667 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo, 5668 (ndr_print_function_t) ndr_print_dfs_SetInfo, 5669 false, 5670 }, 5671 { 5672 "dfs_GetInfo", 5673 sizeof(struct dfs_GetInfo), 5674 (ndr_push_flags_fn_t) ndr_push_dfs_GetInfo, 5675 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetInfo, 5676 (ndr_print_function_t) ndr_print_dfs_GetInfo, 5677 false, 5678 }, 5679 { 5680 "dfs_Enum", 5681 sizeof(struct dfs_Enum), 5682 (ndr_push_flags_fn_t) ndr_push_dfs_Enum, 5683 (ndr_pull_flags_fn_t) ndr_pull_dfs_Enum, 5684 (ndr_print_function_t) ndr_print_dfs_Enum, 5685 false, 5686 }, 5687 { 5688 "dfs_Rename", 5689 sizeof(struct dfs_Rename), 5690 (ndr_push_flags_fn_t) ndr_push_dfs_Rename, 5691 (ndr_pull_flags_fn_t) ndr_pull_dfs_Rename, 5692 (ndr_print_function_t) ndr_print_dfs_Rename, 5693 false, 5694 }, 5695 { 5696 "dfs_Move", 5697 sizeof(struct dfs_Move), 5698 (ndr_push_flags_fn_t) ndr_push_dfs_Move, 5699 (ndr_pull_flags_fn_t) ndr_pull_dfs_Move, 5700 (ndr_print_function_t) ndr_print_dfs_Move, 5701 false, 5702 }, 5703 { 5704 "dfs_ManagerGetConfigInfo", 5705 sizeof(struct dfs_ManagerGetConfigInfo), 5706 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerGetConfigInfo, 5707 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerGetConfigInfo, 5708 (ndr_print_function_t) ndr_print_dfs_ManagerGetConfigInfo, 5709 false, 5710 }, 5711 { 5712 "dfs_ManagerSendSiteInfo", 5713 sizeof(struct dfs_ManagerSendSiteInfo), 5714 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerSendSiteInfo, 5715 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerSendSiteInfo, 5716 (ndr_print_function_t) ndr_print_dfs_ManagerSendSiteInfo, 5717 false, 5718 }, 5719 { 5720 "dfs_AddFtRoot", 5721 sizeof(struct dfs_AddFtRoot), 5722 (ndr_push_flags_fn_t) ndr_push_dfs_AddFtRoot, 5723 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddFtRoot, 5724 (ndr_print_function_t) ndr_print_dfs_AddFtRoot, 5725 false, 5726 }, 5727 { 5728 "dfs_RemoveFtRoot", 5729 sizeof(struct dfs_RemoveFtRoot), 5730 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveFtRoot, 5731 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveFtRoot, 5732 (ndr_print_function_t) ndr_print_dfs_RemoveFtRoot, 5733 false, 5734 }, 5735 { 5736 "dfs_AddStdRoot", 5737 sizeof(struct dfs_AddStdRoot), 5738 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRoot, 5739 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRoot, 5740 (ndr_print_function_t) ndr_print_dfs_AddStdRoot, 5741 false, 5742 }, 5743 { 5744 "dfs_RemoveStdRoot", 5745 sizeof(struct dfs_RemoveStdRoot), 5746 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveStdRoot, 5747 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveStdRoot, 5748 (ndr_print_function_t) ndr_print_dfs_RemoveStdRoot, 5749 false, 5750 }, 5751 { 5752 "dfs_ManagerInitialize", 5753 sizeof(struct dfs_ManagerInitialize), 5754 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerInitialize, 5755 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerInitialize, 5756 (ndr_print_function_t) ndr_print_dfs_ManagerInitialize, 5757 false, 5758 }, 5759 { 5760 "dfs_AddStdRootForced", 5761 sizeof(struct dfs_AddStdRootForced), 5762 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRootForced, 5763 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRootForced, 5764 (ndr_print_function_t) ndr_print_dfs_AddStdRootForced, 5765 false, 5766 }, 5767 { 5768 "dfs_GetDcAddress", 5769 sizeof(struct dfs_GetDcAddress), 5770 (ndr_push_flags_fn_t) ndr_push_dfs_GetDcAddress, 5771 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetDcAddress, 5772 (ndr_print_function_t) ndr_print_dfs_GetDcAddress, 5773 false, 5774 }, 5775 { 5776 "dfs_SetDcAddress", 5777 sizeof(struct dfs_SetDcAddress), 5778 (ndr_push_flags_fn_t) ndr_push_dfs_SetDcAddress, 5779 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetDcAddress, 5780 (ndr_print_function_t) ndr_print_dfs_SetDcAddress, 5781 false, 5782 }, 5783 { 5784 "dfs_FlushFtTable", 5785 sizeof(struct dfs_FlushFtTable), 5786 (ndr_push_flags_fn_t) ndr_push_dfs_FlushFtTable, 5787 (ndr_pull_flags_fn_t) ndr_pull_dfs_FlushFtTable, 5788 (ndr_print_function_t) ndr_print_dfs_FlushFtTable, 5789 false, 5790 }, 5791 { 5792 "dfs_Add2", 5793 sizeof(struct dfs_Add2), 5794 (ndr_push_flags_fn_t) ndr_push_dfs_Add2, 5795 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add2, 5796 (ndr_print_function_t) ndr_print_dfs_Add2, 5797 false, 5798 }, 5799 { 5800 "dfs_Remove2", 5801 sizeof(struct dfs_Remove2), 5802 (ndr_push_flags_fn_t) ndr_push_dfs_Remove2, 5803 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove2, 5804 (ndr_print_function_t) ndr_print_dfs_Remove2, 5805 false, 5806 }, 5807 { 5808 "dfs_EnumEx", 5809 sizeof(struct dfs_EnumEx), 5810 (ndr_push_flags_fn_t) ndr_push_dfs_EnumEx, 5811 (ndr_pull_flags_fn_t) ndr_pull_dfs_EnumEx, 5812 (ndr_print_function_t) ndr_print_dfs_EnumEx, 5813 false, 5814 }, 5815 { 5816 "dfs_SetInfo2", 5817 sizeof(struct dfs_SetInfo2), 5818 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo2, 5819 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo2, 5820 (ndr_print_function_t) ndr_print_dfs_SetInfo2, 5821 false, 5822 }, 5823 { NULL, 0, NULL, NULL, NULL, false } 5824}; 5825 5826static const char * const netdfs_endpoint_strings[] = { 5827 "ncacn_np:[\\pipe\\netdfs]", 5828 "ncacn_ip_tcp:", 5829 "ncalrpc:", 5830}; 5831 5832static const struct ndr_interface_string_array netdfs_endpoints = { 5833 .count = 3, 5834 .names = netdfs_endpoint_strings 5835}; 5836 5837static const char * const netdfs_authservice_strings[] = { 5838 "host", 5839}; 5840 5841static const struct ndr_interface_string_array netdfs_authservices = { 5842 .count = 1, 5843 .names = netdfs_authservice_strings 5844}; 5845 5846 5847const struct ndr_interface_table ndr_table_netdfs = { 5848 .name = "netdfs", 5849 .syntax_id = { 5850 {0x4fc742e0,0x4a10,0x11cf,{0x82,0x73},{0x00,0xaa,0x00,0x4a,0xe6,0x73}}, 5851 NDR_NETDFS_VERSION 5852 }, 5853 .helpstring = NDR_NETDFS_HELPSTRING, 5854 .num_calls = 23, 5855 .calls = netdfs_calls, 5856 .endpoints = &netdfs_endpoints, 5857 .authservices = &netdfs_authservices 5858}; 5859 5860