From 415aa96f09fd708d134eb15a9e8f729ca3eb05c4 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 8 Sep 2006 17:21:15 +0000 Subject: r18275: add auto generated dfs code (This used to be commit edb7a3607e3fa2090310b5c405f2b0a08f51db78) --- source3/librpc/gen_ndr/ndr_dfs.c | 3657 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 3657 insertions(+) create mode 100644 source3/librpc/gen_ndr/ndr_dfs.c (limited to 'source3/librpc/gen_ndr/ndr_dfs.c') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c new file mode 100644 index 0000000000..f7151050ae --- /dev/null +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -0,0 +1,3657 @@ +/* parser auto-generated by pidl */ + +#include "includes.h" +#include "librpc/gen_ndr/ndr_dfs.h" + +NTSTATUS ndr_push_dfs_Info0(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info0 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 1)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Info0(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info0 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 1)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Info0(struct ndr_print *ndr, const char *name, const struct dfs_Info0 *r) +{ + ndr_print_struct(ndr, name, "dfs_Info0"); + ndr->depth++; + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info1 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->path)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->path) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info1 *r) +{ + uint32_t _ptr_path; + TALLOC_CTX *_mem_save_path_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path)); + if (_ptr_path) { + NDR_PULL_ALLOC(ndr, r->path); + } else { + r->path = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->path) { + _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->path, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->path)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->path)); + if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Info1(struct ndr_print *ndr, const char *name, const struct dfs_Info1 *r) +{ + ndr_print_struct(ndr, name, "dfs_Info1"); + ndr->depth++; + ndr_print_ptr(ndr, "path", r->path); + ndr->depth++; + if (r->path) { + ndr_print_string(ndr, "path", r->path); + } + ndr->depth--; + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info2 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->path)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->state)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->path) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + if (r->comment) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r) +{ + uint32_t _ptr_path; + TALLOC_CTX *_mem_save_path_0; + uint32_t _ptr_comment; + TALLOC_CTX *_mem_save_comment_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path)); + if (_ptr_path) { + NDR_PULL_ALLOC(ndr, r->path); + } else { + r->path = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment)); + if (_ptr_comment) { + NDR_PULL_ALLOC(ndr, r->comment); + } else { + r->comment = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->state)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->path) { + _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->path, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->path)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->path)); + if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0); + } + if (r->comment) { + _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->comment)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->comment)); + if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Info2(struct ndr_print *ndr, const char *name, const struct dfs_Info2 *r) +{ + ndr_print_struct(ndr, name, "dfs_Info2"); + ndr->depth++; + ndr_print_ptr(ndr, "path", r->path); + ndr->depth++; + if (r->path) { + ndr_print_string(ndr, "path", r->path); + } + ndr->depth--; + ndr_print_ptr(ndr, "comment", r->comment); + ndr->depth++; + if (r->comment) { + ndr_print_string(ndr, "comment", r->comment); + } + ndr->depth--; + ndr_print_uint32(ndr, "state", r->state); + ndr_print_uint32(ndr, "num_stores", r->num_stores); + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->state)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->server)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->share)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->server) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server, ndr_charset_length(r->server, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + if (r->share) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r) +{ + uint32_t _ptr_server; + TALLOC_CTX *_mem_save_server_0; + uint32_t _ptr_share; + TALLOC_CTX *_mem_save_share_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->state)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server)); + if (_ptr_server) { + NDR_PULL_ALLOC(ndr, r->server); + } else { + r->server = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share)); + if (_ptr_share) { + NDR_PULL_ALLOC(ndr, r->share); + } else { + r->share = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->server) { + _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->server, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->server)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->server)); + if (ndr_get_array_length(ndr, &r->server) > ndr_get_array_size(ndr, &r->server)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server, ndr_get_array_length(ndr, &r->server), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0); + } + if (r->share) { + _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->share, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->share)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->share)); + if (ndr_get_array_length(ndr, &r->share) > ndr_get_array_size(ndr, &r->share)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo *r) +{ + ndr_print_struct(ndr, name, "dfs_StorageInfo"); + ndr->depth++; + ndr_print_uint32(ndr, "state", r->state); + ndr_print_ptr(ndr, "server", r->server); + ndr->depth++; + if (r->server) { + ndr_print_string(ndr, "server", r->server); + } + ndr->depth--; + ndr_print_ptr(ndr, "share", r->share); + ndr->depth++; + if (r->share) { + ndr_print_string(ndr, "share", r->share); + } + ndr->depth--; + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info3 *r) +{ + uint32_t cntr_stores_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->path)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->state)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->path) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + if (r->comment) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + if (r->stores) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); + for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { + NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1])); + } + for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { + NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1])); + } + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r) +{ + uint32_t _ptr_path; + TALLOC_CTX *_mem_save_path_0; + uint32_t _ptr_comment; + TALLOC_CTX *_mem_save_comment_0; + uint32_t _ptr_stores; + uint32_t cntr_stores_1; + TALLOC_CTX *_mem_save_stores_0; + TALLOC_CTX *_mem_save_stores_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path)); + if (_ptr_path) { + NDR_PULL_ALLOC(ndr, r->path); + } else { + r->path = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment)); + if (_ptr_comment) { + NDR_PULL_ALLOC(ndr, r->comment); + } else { + r->comment = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->state)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores)); + if (_ptr_stores) { + NDR_PULL_ALLOC(ndr, r->stores); + } else { + r->stores = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->path) { + _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->path, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->path)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->path)); + if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0); + } + if (r->comment) { + _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->comment)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->comment)); + if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); + } + if (r->stores) { + _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->stores)); + NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores)); + _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0); + for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { + NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1])); + } + for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { + NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0); + } + if (r->stores) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores)); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const struct dfs_Info3 *r) +{ + uint32_t cntr_stores_1; + ndr_print_struct(ndr, name, "dfs_Info3"); + ndr->depth++; + ndr_print_ptr(ndr, "path", r->path); + ndr->depth++; + if (r->path) { + ndr_print_string(ndr, "path", r->path); + } + ndr->depth--; + ndr_print_ptr(ndr, "comment", r->comment); + ndr->depth++; + if (r->comment) { + ndr_print_string(ndr, "comment", r->comment); + } + ndr->depth--; + ndr_print_uint32(ndr, "state", r->state); + ndr_print_uint32(ndr, "num_stores", r->num_stores); + ndr_print_ptr(ndr, "stores", r->stores); + ndr->depth++; + if (r->stores) { + ndr->print(ndr, "%s: ARRAY(%d)", "stores", r->num_stores); + ndr->depth++; + for (cntr_stores_1=0;cntr_stores_1num_stores;cntr_stores_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_stores_1); + if (idx_1) { + ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info4 *r) +{ + uint32_t cntr_stores_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->path)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->state)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout)); + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->path) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + if (r->comment) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid)); + if (r->stores) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); + for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { + NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1])); + } + for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { + NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1])); + } + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info4 *r) +{ + uint32_t _ptr_path; + TALLOC_CTX *_mem_save_path_0; + uint32_t _ptr_comment; + TALLOC_CTX *_mem_save_comment_0; + uint32_t _ptr_stores; + uint32_t cntr_stores_1; + TALLOC_CTX *_mem_save_stores_0; + TALLOC_CTX *_mem_save_stores_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path)); + if (_ptr_path) { + NDR_PULL_ALLOC(ndr, r->path); + } else { + r->path = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment)); + if (_ptr_comment) { + NDR_PULL_ALLOC(ndr, r->comment); + } else { + r->comment = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->state)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout)); + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores)); + if (_ptr_stores) { + NDR_PULL_ALLOC(ndr, r->stores); + } else { + r->stores = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->path) { + _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->path, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->path)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->path)); + if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0); + } + if (r->comment) { + _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->comment)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->comment)); + if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); + } + NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid)); + if (r->stores) { + _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->stores)); + NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores)); + _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0); + for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { + NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1])); + } + for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { + NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0); + } + if (r->stores) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores)); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const struct dfs_Info4 *r) +{ + uint32_t cntr_stores_1; + ndr_print_struct(ndr, name, "dfs_Info4"); + ndr->depth++; + ndr_print_ptr(ndr, "path", r->path); + ndr->depth++; + if (r->path) { + ndr_print_string(ndr, "path", r->path); + } + ndr->depth--; + ndr_print_ptr(ndr, "comment", r->comment); + ndr->depth++; + if (r->comment) { + ndr_print_string(ndr, "comment", r->comment); + } + ndr->depth--; + ndr_print_uint32(ndr, "state", r->state); + ndr_print_uint32(ndr, "timeout", r->timeout); + ndr_print_GUID(ndr, "guid", &r->guid); + ndr_print_uint32(ndr, "num_stores", r->num_stores); + ndr_print_ptr(ndr, "stores", r->stores); + ndr->depth++; + if (r->stores) { + ndr->print(ndr, "%s: ARRAY(%d)", "stores", r->num_stores); + ndr->depth++; + for (cntr_stores_1=0;cntr_stores_1num_stores;cntr_stores_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_stores_1); + if (idx_1) { + ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->comment) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r) +{ + uint32_t _ptr_comment; + TALLOC_CTX *_mem_save_comment_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment)); + if (_ptr_comment) { + NDR_PULL_ALLOC(ndr, r->comment); + } else { + r->comment = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->comment) { + _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->comment)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->comment)); + if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, const struct dfs_Info100 *r) +{ + ndr_print_struct(ndr, name, "dfs_Info100"); + ndr->depth++; + ndr_print_ptr(ndr, "comment", r->comment); + ndr->depth++; + if (r->comment) { + ndr_print_string(ndr, "comment", r->comment); + } + ndr->depth--; + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->state)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->state)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, const struct dfs_Info101 *r) +{ + ndr_print_struct(ndr, name, "dfs_Info101"); + ndr->depth++; + ndr_print_uint32(ndr, "state", r->state); + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, const struct dfs_Info102 *r) +{ + ndr_print_struct(ndr, name, "dfs_Info102"); + ndr->depth++; + ndr_print_uint32(ndr, "timeout", r->timeout); + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info200 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->dom_root) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r) +{ + uint32_t _ptr_dom_root; + TALLOC_CTX *_mem_save_dom_root_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root)); + if (_ptr_dom_root) { + NDR_PULL_ALLOC(ndr, r->dom_root); + } else { + r->dom_root = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->dom_root) { + _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root)); + if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, const struct dfs_Info200 *r) +{ + ndr_print_struct(ndr, name, "dfs_Info200"); + ndr->depth++; + ndr_print_ptr(ndr, "dom_root", r->dom_root); + ndr->depth++; + if (r->dom_root) { + ndr_print_string(ndr, "dom_root", r->dom_root); + } + ndr->depth--; + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info300 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->dom_root) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r) +{ + uint32_t _ptr_dom_root; + TALLOC_CTX *_mem_save_dom_root_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root)); + if (_ptr_dom_root) { + NDR_PULL_ALLOC(ndr, r->dom_root); + } else { + r->dom_root = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->dom_root) { + _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root)); + if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, const struct dfs_Info300 *r) +{ + ndr_print_struct(ndr, name, "dfs_Info300"); + ndr->depth++; + ndr_print_uint32(ndr, "flags", r->flags); + ndr_print_ptr(ndr, "dom_root", r->dom_root); + ndr->depth++; + if (r->dom_root) { + ndr_print_string(ndr, "dom_root", r->dom_root); + } + ndr->depth--; + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_Info *r) +{ + int level; + level = ndr_push_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + switch (level) { + case 0: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0)); + break; + + case 1: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); + break; + + case 2: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2)); + break; + + case 3: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3)); + break; + + case 4: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4)); + break; + + case 100: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100)); + break; + + case 101: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101)); + break; + + case 102: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102)); + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case 0: + if (r->info0) { + NDR_CHECK(ndr_push_dfs_Info0(ndr, NDR_SCALARS, r->info0)); + } + break; + + case 1: + if (r->info1) { + NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1)); + } + break; + + case 2: + if (r->info2) { + NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2)); + } + break; + + case 3: + if (r->info3) { + NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3)); + } + break; + + case 4: + if (r->info4) { + NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4)); + } + break; + + case 100: + if (r->info100) { + NDR_CHECK(ndr_push_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100)); + } + break; + + case 101: + if (r->info101) { + NDR_CHECK(ndr_push_dfs_Info101(ndr, NDR_SCALARS, r->info101)); + } + break; + + case 102: + if (r->info102) { + NDR_CHECK(ndr_push_dfs_Info102(ndr, NDR_SCALARS, r->info102)); + } + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info *r) +{ + int level; + uint32_t _level; + TALLOC_CTX *_mem_save_info0_0; + TALLOC_CTX *_mem_save_info1_0; + TALLOC_CTX *_mem_save_info2_0; + TALLOC_CTX *_mem_save_info3_0; + TALLOC_CTX *_mem_save_info4_0; + TALLOC_CTX *_mem_save_info100_0; + TALLOC_CTX *_mem_save_info101_0; + TALLOC_CTX *_mem_save_info102_0; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level)); + if (_level != level) { + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for dfs_Info", _level); + } + switch (level) { + case 0: { + uint32_t _ptr_info0; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0)); + if (_ptr_info0) { + NDR_PULL_ALLOC(ndr, r->info0); + } else { + r->info0 = NULL; + } + break; } + + case 1: { + uint32_t _ptr_info1; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1)); + if (_ptr_info1) { + NDR_PULL_ALLOC(ndr, r->info1); + } else { + r->info1 = NULL; + } + break; } + + case 2: { + uint32_t _ptr_info2; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2)); + if (_ptr_info2) { + NDR_PULL_ALLOC(ndr, r->info2); + } else { + r->info2 = NULL; + } + break; } + + case 3: { + uint32_t _ptr_info3; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3)); + if (_ptr_info3) { + NDR_PULL_ALLOC(ndr, r->info3); + } else { + r->info3 = NULL; + } + break; } + + case 4: { + uint32_t _ptr_info4; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4)); + if (_ptr_info4) { + NDR_PULL_ALLOC(ndr, r->info4); + } else { + r->info4 = NULL; + } + break; } + + case 100: { + uint32_t _ptr_info100; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100)); + if (_ptr_info100) { + NDR_PULL_ALLOC(ndr, r->info100); + } else { + r->info100 = NULL; + } + break; } + + case 101: { + uint32_t _ptr_info101; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info101)); + if (_ptr_info101) { + NDR_PULL_ALLOC(ndr, r->info101); + } else { + r->info101 = NULL; + } + break; } + + case 102: { + uint32_t _ptr_info102; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info102)); + if (_ptr_info102) { + NDR_PULL_ALLOC(ndr, r->info102); + } else { + r->info102 = NULL; + } + break; } + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case 0: + if (r->info0) { + _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0); + NDR_CHECK(ndr_pull_dfs_Info0(ndr, NDR_SCALARS, r->info0)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0); + } + break; + + case 1: + if (r->info1) { + _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0); + NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0); + } + break; + + case 2: + if (r->info2) { + _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0); + NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0); + } + break; + + case 3: + if (r->info3) { + _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0); + NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0); + } + break; + + case 4: + if (r->info4) { + _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0); + NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0); + } + break; + + case 100: + if (r->info100) { + _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info100, 0); + NDR_CHECK(ndr_pull_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info100_0, 0); + } + break; + + case 101: + if (r->info101) { + _mem_save_info101_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info101, 0); + NDR_CHECK(ndr_pull_dfs_Info101(ndr, NDR_SCALARS, r->info101)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info101_0, 0); + } + break; + + case 102: + if (r->info102) { + _mem_save_info102_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info102, 0); + NDR_CHECK(ndr_pull_dfs_Info102(ndr, NDR_SCALARS, r->info102)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info102_0, 0); + } + break; + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const union dfs_Info *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "dfs_Info"); + switch (level) { + case 0: + ndr_print_ptr(ndr, "info0", r->info0); + ndr->depth++; + if (r->info0) { + ndr_print_dfs_Info0(ndr, "info0", r->info0); + } + ndr->depth--; + break; + + case 1: + ndr_print_ptr(ndr, "info1", r->info1); + ndr->depth++; + if (r->info1) { + ndr_print_dfs_Info1(ndr, "info1", r->info1); + } + ndr->depth--; + break; + + case 2: + ndr_print_ptr(ndr, "info2", r->info2); + ndr->depth++; + if (r->info2) { + ndr_print_dfs_Info2(ndr, "info2", r->info2); + } + ndr->depth--; + break; + + case 3: + ndr_print_ptr(ndr, "info3", r->info3); + ndr->depth++; + if (r->info3) { + ndr_print_dfs_Info3(ndr, "info3", r->info3); + } + ndr->depth--; + break; + + case 4: + ndr_print_ptr(ndr, "info4", r->info4); + ndr->depth++; + if (r->info4) { + ndr_print_dfs_Info4(ndr, "info4", r->info4); + } + ndr->depth--; + break; + + case 100: + ndr_print_ptr(ndr, "info100", r->info100); + ndr->depth++; + if (r->info100) { + ndr_print_dfs_Info100(ndr, "info100", r->info100); + } + ndr->depth--; + break; + + case 101: + ndr_print_ptr(ndr, "info101", r->info101); + ndr->depth++; + if (r->info101) { + ndr_print_dfs_Info101(ndr, "info101", r->info101); + } + ndr->depth--; + break; + + case 102: + ndr_print_ptr(ndr, "info102", r->info102); + ndr->depth++; + if (r->info102) { + ndr_print_dfs_Info102(ndr, "info102", r->info102); + } + ndr->depth--; + break; + + default: + ndr_print_bad_level(ndr, name, level); + } +} + +NTSTATUS ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray1 *r) +{ + uint32_t cntr_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r) +{ + uint32_t _ptr_s; + uint32_t cntr_s_1; + TALLOC_CTX *_mem_save_s_0; + TALLOC_CTX *_mem_save_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s)); + if (_ptr_s) { + NDR_PULL_ALLOC(ndr, r->s); + } else { + r->s = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->s)); + NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s)); + _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0); + } + if (r->s) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray1 *r) +{ + uint32_t cntr_s_1; + ndr_print_struct(ndr, name, "dfs_EnumArray1"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "s", r->s); + ndr->depth++; + if (r->s) { + ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count); + ndr->depth++; + for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_s_1); + if (idx_1) { + ndr_print_dfs_Info1(ndr, "s", &r->s[cntr_s_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray2 *r) +{ + uint32_t cntr_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r) +{ + uint32_t _ptr_s; + uint32_t cntr_s_1; + TALLOC_CTX *_mem_save_s_0; + TALLOC_CTX *_mem_save_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s)); + if (_ptr_s) { + NDR_PULL_ALLOC(ndr, r->s); + } else { + r->s = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->s)); + NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s)); + _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0); + } + if (r->s) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray2 *r) +{ + uint32_t cntr_s_1; + ndr_print_struct(ndr, name, "dfs_EnumArray2"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "s", r->s); + ndr->depth++; + if (r->s) { + ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count); + ndr->depth++; + for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_s_1); + if (idx_1) { + ndr_print_dfs_Info2(ndr, "s", &r->s[cntr_s_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray3 *r) +{ + uint32_t cntr_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r) +{ + uint32_t _ptr_s; + uint32_t cntr_s_1; + TALLOC_CTX *_mem_save_s_0; + TALLOC_CTX *_mem_save_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s)); + if (_ptr_s) { + NDR_PULL_ALLOC(ndr, r->s); + } else { + r->s = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->s)); + NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s)); + _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0); + } + if (r->s) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray3 *r) +{ + uint32_t cntr_s_1; + ndr_print_struct(ndr, name, "dfs_EnumArray3"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "s", r->s); + ndr->depth++; + if (r->s) { + ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count); + ndr->depth++; + for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_s_1); + if (idx_1) { + ndr_print_dfs_Info3(ndr, "s", &r->s[cntr_s_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray4 *r) +{ + uint32_t cntr_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r) +{ + uint32_t _ptr_s; + uint32_t cntr_s_1; + TALLOC_CTX *_mem_save_s_0; + TALLOC_CTX *_mem_save_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s)); + if (_ptr_s) { + NDR_PULL_ALLOC(ndr, r->s); + } else { + r->s = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->s)); + NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s)); + _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0); + } + if (r->s) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray4 *r) +{ + uint32_t cntr_s_1; + ndr_print_struct(ndr, name, "dfs_EnumArray4"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "s", r->s); + ndr->depth++; + if (r->s) { + ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count); + ndr->depth++; + for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_s_1); + if (idx_1) { + ndr_print_dfs_Info4(ndr, "s", &r->s[cntr_s_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r) +{ + uint32_t cntr_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r) +{ + uint32_t _ptr_s; + uint32_t cntr_s_1; + TALLOC_CTX *_mem_save_s_0; + TALLOC_CTX *_mem_save_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s)); + if (_ptr_s) { + NDR_PULL_ALLOC(ndr, r->s); + } else { + r->s = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->s)); + NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s)); + _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0); + } + if (r->s) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray200 *r) +{ + uint32_t cntr_s_1; + ndr_print_struct(ndr, name, "dfs_EnumArray200"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "s", r->s); + ndr->depth++; + if (r->s) { + ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count); + ndr->depth++; + for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_s_1); + if (idx_1) { + ndr_print_dfs_Info200(ndr, "s", &r->s[cntr_s_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray300 *r) +{ + uint32_t cntr_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r) +{ + uint32_t _ptr_s; + uint32_t cntr_s_1; + TALLOC_CTX *_mem_save_s_0; + TALLOC_CTX *_mem_save_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s)); + if (_ptr_s) { + NDR_PULL_ALLOC(ndr, r->s); + } else { + r->s = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->s)); + NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s)); + _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0); + } + if (r->s) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray300 *r) +{ + uint32_t cntr_s_1; + ndr_print_struct(ndr, name, "dfs_EnumArray300"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "s", r->s); + ndr->depth++; + if (r->s) { + ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count); + ndr->depth++; + for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_s_1); + if (idx_1) { + ndr_print_dfs_Info300(ndr, "s", &r->s[cntr_s_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union dfs_EnumInfo *r) +{ + int level; + level = ndr_push_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + switch (level) { + case 1: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); + break; + + case 2: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2)); + break; + + case 3: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3)); + break; + + case 4: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4)); + break; + + case 200: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info200)); + break; + + case 300: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info300)); + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case 1: + if (r->info1) { + NDR_CHECK(ndr_push_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1)); + } + break; + + case 2: + if (r->info2) { + NDR_CHECK(ndr_push_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2)); + } + break; + + case 3: + if (r->info3) { + NDR_CHECK(ndr_push_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3)); + } + break; + + case 4: + if (r->info4) { + NDR_CHECK(ndr_push_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4)); + } + break; + + case 200: + if (r->info200) { + NDR_CHECK(ndr_push_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200)); + } + break; + + case 300: + if (r->info300) { + NDR_CHECK(ndr_push_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300)); + } + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union dfs_EnumInfo *r) +{ + int level; + uint32_t _level; + TALLOC_CTX *_mem_save_info1_0; + TALLOC_CTX *_mem_save_info2_0; + TALLOC_CTX *_mem_save_info3_0; + TALLOC_CTX *_mem_save_info4_0; + TALLOC_CTX *_mem_save_info200_0; + TALLOC_CTX *_mem_save_info300_0; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level)); + if (_level != level) { + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for dfs_EnumInfo", _level); + } + switch (level) { + case 1: { + uint32_t _ptr_info1; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1)); + if (_ptr_info1) { + NDR_PULL_ALLOC(ndr, r->info1); + } else { + r->info1 = NULL; + } + break; } + + case 2: { + uint32_t _ptr_info2; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2)); + if (_ptr_info2) { + NDR_PULL_ALLOC(ndr, r->info2); + } else { + r->info2 = NULL; + } + break; } + + case 3: { + uint32_t _ptr_info3; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3)); + if (_ptr_info3) { + NDR_PULL_ALLOC(ndr, r->info3); + } else { + r->info3 = NULL; + } + break; } + + case 4: { + uint32_t _ptr_info4; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4)); + if (_ptr_info4) { + NDR_PULL_ALLOC(ndr, r->info4); + } else { + r->info4 = NULL; + } + break; } + + case 200: { + uint32_t _ptr_info200; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info200)); + if (_ptr_info200) { + NDR_PULL_ALLOC(ndr, r->info200); + } else { + r->info200 = NULL; + } + break; } + + case 300: { + uint32_t _ptr_info300; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info300)); + if (_ptr_info300) { + NDR_PULL_ALLOC(ndr, r->info300); + } else { + r->info300 = NULL; + } + break; } + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case 1: + if (r->info1) { + _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0); + NDR_CHECK(ndr_pull_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0); + } + break; + + case 2: + if (r->info2) { + _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0); + NDR_CHECK(ndr_pull_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0); + } + break; + + case 3: + if (r->info3) { + _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0); + NDR_CHECK(ndr_pull_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0); + } + break; + + case 4: + if (r->info4) { + _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0); + NDR_CHECK(ndr_pull_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0); + } + break; + + case 200: + if (r->info200) { + _mem_save_info200_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info200, 0); + NDR_CHECK(ndr_pull_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info200_0, 0); + } + break; + + case 300: + if (r->info300) { + _mem_save_info300_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info300, 0); + NDR_CHECK(ndr_pull_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info300_0, 0); + } + break; + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, const union dfs_EnumInfo *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "dfs_EnumInfo"); + switch (level) { + case 1: + ndr_print_ptr(ndr, "info1", r->info1); + ndr->depth++; + if (r->info1) { + ndr_print_dfs_EnumArray1(ndr, "info1", r->info1); + } + ndr->depth--; + break; + + case 2: + ndr_print_ptr(ndr, "info2", r->info2); + ndr->depth++; + if (r->info2) { + ndr_print_dfs_EnumArray2(ndr, "info2", r->info2); + } + ndr->depth--; + break; + + case 3: + ndr_print_ptr(ndr, "info3", r->info3); + ndr->depth++; + if (r->info3) { + ndr_print_dfs_EnumArray3(ndr, "info3", r->info3); + } + ndr->depth--; + break; + + case 4: + ndr_print_ptr(ndr, "info4", r->info4); + ndr->depth++; + if (r->info4) { + ndr_print_dfs_EnumArray4(ndr, "info4", r->info4); + } + ndr->depth--; + break; + + case 200: + ndr_print_ptr(ndr, "info200", r->info200); + ndr->depth++; + if (r->info200) { + ndr_print_dfs_EnumArray200(ndr, "info200", r->info200); + } + ndr->depth--; + break; + + case 300: + ndr_print_ptr(ndr, "info300", r->info300); + ndr->depth++; + if (r->info300) { + ndr_print_dfs_EnumArray300(ndr, "info300", r->info300); + } + ndr->depth--; + break; + + default: + ndr_print_bad_level(ndr, name, level); + } +} + +NTSTATUS ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumStruct *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); + NDR_CHECK(ndr_push_set_switch_value(ndr, &r->e, r->level)); + NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level)); + NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->e, r->level)); + NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, const struct dfs_EnumStruct *r) +{ + ndr_print_struct(ndr, name, "dfs_EnumStruct"); + ndr->depth++; + ndr_print_uint32(ndr, "level", r->level); + ndr_print_set_switch_value(ndr, &r->e, r->level); + ndr_print_dfs_EnumInfo(ndr, "e", &r->e); + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags, const struct dfs_GetManagerVersion *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + if (r->out.exist_flag == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.exist_flag)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags, struct dfs_GetManagerVersion *r) +{ + TALLOC_CTX *_mem_save_exist_flag_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_PULL_ALLOC(ndr, r->out.exist_flag); + ZERO_STRUCTP(r->out.exist_flag); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.exist_flag); + } + _mem_save_exist_flag_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.exist_flag, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.exist_flag)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_exist_flag_0, LIBNDR_FLAG_REF_ALLOC); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetManagerVersion *r) +{ + ndr_print_struct(ndr, name, "dfs_GetManagerVersion"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_GetManagerVersion"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_GetManagerVersion"); + ndr->depth++; + ndr_print_ptr(ndr, "exist_flag", r->out.exist_flag); + ndr->depth++; + ndr_print_uint32(ndr, "exist_flag", *r->out.exist_flag); + ndr->depth--; + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add *r) +{ + if (flags & NDR_IN) { + if (r->in.path == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + if (r->in.server == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share)); + if (r->in.share) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.comment)); + if (r->in.comment) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Add(struct ndr_pull *ndr, int flags, struct dfs_Add *r) +{ + uint32_t _ptr_share; + uint32_t _ptr_comment; + TALLOC_CTX *_mem_save_share_0; + TALLOC_CTX *_mem_save_comment_0; + if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path)); + if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server)); + if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share)); + if (_ptr_share) { + NDR_PULL_ALLOC(ndr, r->in.share); + } else { + r->in.share = NULL; + } + if (r->in.share) { + _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share)); + if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment)); + if (_ptr_comment) { + NDR_PULL_ALLOC(ndr, r->in.comment); + } else { + r->in.comment = NULL; + } + if (r->in.comment) { + _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.comment, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment)); + if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add *r) +{ + ndr_print_struct(ndr, name, "dfs_Add"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_Add"); + ndr->depth++; + ndr_print_ptr(ndr, "path", r->in.path); + ndr->depth++; + ndr_print_string(ndr, "path", r->in.path); + ndr->depth--; + ndr_print_ptr(ndr, "server", r->in.server); + ndr->depth++; + ndr_print_string(ndr, "server", r->in.server); + ndr->depth--; + ndr_print_ptr(ndr, "share", r->in.share); + ndr->depth++; + if (r->in.share) { + ndr_print_string(ndr, "share", r->in.share); + } + ndr->depth--; + ndr_print_ptr(ndr, "comment", r->in.comment); + ndr->depth++; + if (r->in.comment) { + ndr_print_string(ndr, "comment", r->in.comment); + } + ndr->depth--; + ndr_print_uint32(ndr, "flags", r->in.flags); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_Add"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r) +{ + if (flags & NDR_IN) { + if (r->in.path == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server)); + if (r->in.server) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share)); + if (r->in.share) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_Remove *r) +{ + uint32_t _ptr_server; + uint32_t _ptr_share; + TALLOC_CTX *_mem_save_server_0; + TALLOC_CTX *_mem_save_share_0; + if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path)); + if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server)); + if (_ptr_server) { + NDR_PULL_ALLOC(ndr, r->in.server); + } else { + r->in.server = NULL; + } + if (r->in.server) { + _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server)); + if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share)); + if (_ptr_share) { + NDR_PULL_ALLOC(ndr, r->in.share); + } else { + r->in.share = NULL; + } + if (r->in.share) { + _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share)); + if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0); + } + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove *r) +{ + ndr_print_struct(ndr, name, "dfs_Remove"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_Remove"); + ndr->depth++; + ndr_print_ptr(ndr, "path", r->in.path); + ndr->depth++; + ndr_print_string(ndr, "path", r->in.path); + ndr->depth--; + ndr_print_ptr(ndr, "server", r->in.server); + ndr->depth++; + if (r->in.server) { + ndr_print_string(ndr, "server", r->in.server); + } + ndr->depth--; + ndr_print_ptr(ndr, "share", r->in.share); + ndr->depth++; + if (r->in.share) { + ndr_print_string(ndr, "share", r->in.share); + } + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_Remove"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_SetInfo *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs_SetInfo *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo *r) +{ + ndr_print_struct(ndr, name, "dfs_SetInfo"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_SetInfo"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_SetInfo"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_GetInfo *r) +{ + if (flags & NDR_IN) { + if (r->in.path == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server)); + if (r->in.server) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share)); + if (r->in.share) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level)); + } + if (flags & NDR_OUT) { + if (r->out.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; + NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs_GetInfo *r) +{ + uint32_t _ptr_server; + uint32_t _ptr_share; + TALLOC_CTX *_mem_save_server_0; + TALLOC_CTX *_mem_save_share_0; + TALLOC_CTX *_mem_save_info_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path)); + if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server)); + if (_ptr_server) { + NDR_PULL_ALLOC(ndr, r->in.server); + } else { + r->in.server = NULL; + } + if (r->in.server) { + _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server)); + if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share)); + if (_ptr_share) { + NDR_PULL_ALLOC(ndr, r->in.share); + } else { + r->in.share = NULL; + } + if (r->in.share) { + _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share)); + if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0); + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level)); + NDR_PULL_ALLOC(ndr, r->out.info); + ZERO_STRUCTP(r->out.info); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.info); + } + _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetInfo *r) +{ + ndr_print_struct(ndr, name, "dfs_GetInfo"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_GetInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "path", r->in.path); + ndr->depth++; + ndr_print_string(ndr, "path", r->in.path); + ndr->depth--; + ndr_print_ptr(ndr, "server", r->in.server); + ndr->depth++; + if (r->in.server) { + ndr_print_string(ndr, "server", r->in.server); + } + ndr->depth--; + ndr_print_ptr(ndr, "share", r->in.share); + ndr->depth++; + if (r->in.share) { + ndr_print_string(ndr, "share", r->in.share); + } + ndr->depth--; + ndr_print_uint32(ndr, "level", r->in.level); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_GetInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "info", r->out.info); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->out.info, r->in.level); + ndr_print_dfs_Info(ndr, "info", r->out.info); + ndr->depth--; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enum *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info)); + if (r->in.info) { + NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown)); + if (r->in.unknown) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.unknown)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total)); + if (r->in.total) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total)); + } + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info)); + if (r->out.info) { + NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total)); + if (r->out.total) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total)); + } + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r) +{ + uint32_t _ptr_info; + uint32_t _ptr_unknown; + uint32_t _ptr_total; + TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_unknown_0; + TALLOC_CTX *_mem_save_total_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); + if (_ptr_info) { + NDR_PULL_ALLOC(ndr, r->in.info); + } else { + r->in.info = NULL; + } + if (r->in.info) { + _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0); + NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown)); + if (_ptr_unknown) { + NDR_PULL_ALLOC(ndr, r->in.unknown); + } else { + r->in.unknown = NULL; + } + if (r->in.unknown) { + _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown, 0); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.unknown)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total)); + if (_ptr_total) { + NDR_PULL_ALLOC(ndr, r->in.total); + } else { + r->in.total = NULL; + } + if (r->in.total) { + _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0); + } + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); + if (_ptr_info) { + NDR_PULL_ALLOC(ndr, r->out.info); + } else { + r->out.info = NULL; + } + if (r->out.info) { + _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0); + NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total)); + if (_ptr_total) { + NDR_PULL_ALLOC(ndr, r->out.total); + } else { + r->out.total = NULL; + } + if (r->out.total) { + _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0); + } + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Enum *r) +{ + ndr_print_struct(ndr, name, "dfs_Enum"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_Enum"); + ndr->depth++; + ndr_print_uint32(ndr, "level", r->in.level); + ndr_print_uint32(ndr, "bufsize", r->in.bufsize); + ndr_print_ptr(ndr, "info", r->in.info); + ndr->depth++; + if (r->in.info) { + ndr_print_dfs_EnumStruct(ndr, "info", r->in.info); + } + ndr->depth--; + ndr_print_ptr(ndr, "unknown", r->in.unknown); + ndr->depth++; + if (r->in.unknown) { + ndr_print_uint32(ndr, "unknown", *r->in.unknown); + } + ndr->depth--; + ndr_print_ptr(ndr, "total", r->in.total); + ndr->depth++; + if (r->in.total) { + ndr_print_uint32(ndr, "total", *r->in.total); + } + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_Enum"); + ndr->depth++; + ndr_print_ptr(ndr, "info", r->out.info); + ndr->depth++; + if (r->out.info) { + ndr_print_dfs_EnumStruct(ndr, "info", r->out.info); + } + ndr->depth--; + ndr_print_ptr(ndr, "total", r->out.total); + ndr->depth++; + if (r->out.total) { + ndr_print_uint32(ndr, "total", *r->out.total); + } + ndr->depth--; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_Rename *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Rename(struct ndr_pull *ndr, int flags, struct dfs_Rename *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Rename(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Rename *r) +{ + ndr_print_struct(ndr, name, "dfs_Rename"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_Rename"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_Rename"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Move *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Move(struct ndr_pull *ndr, int flags, struct dfs_Move *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Move(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Move *r) +{ + ndr_print_struct(ndr, name, "dfs_Move"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_Move"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_Move"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerGetConfigInfo *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerGetConfigInfo *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerGetConfigInfo *r) +{ + ndr_print_struct(ndr, name, "dfs_ManagerGetConfigInfo"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_ManagerGetConfigInfo"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_ManagerGetConfigInfo"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerSendSiteInfo *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerSendSiteInfo *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerSendSiteInfo *r) +{ + ndr_print_struct(ndr, name, "dfs_ManagerSendSiteInfo"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_ManagerSendSiteInfo"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_ManagerSendSiteInfo"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct dfs_AddFtRoot *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct dfs_AddFtRoot *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddFtRoot *r) +{ + ndr_print_struct(ndr, name, "dfs_AddFtRoot"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_AddFtRoot"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_AddFtRoot"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveFtRoot *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveFtRoot *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveFtRoot *r) +{ + ndr_print_struct(ndr, name, "dfs_RemoveFtRoot"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_RemoveFtRoot"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_RemoveFtRoot"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct dfs_AddStdRoot *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct dfs_AddStdRoot *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRoot *r) +{ + ndr_print_struct(ndr, name, "dfs_AddStdRoot"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_AddStdRoot"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_AddStdRoot"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveStdRoot *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveStdRoot *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveStdRoot *r) +{ + ndr_print_struct(ndr, name, "dfs_RemoveStdRoot"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_RemoveStdRoot"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_RemoveStdRoot"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, struct dfs_ManagerInitialize *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerInitialize *r) +{ + ndr_print_struct(ndr, name, "dfs_ManagerInitialize"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_ManagerInitialize"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_ManagerInitialize"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const struct dfs_AddStdRootForced *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, struct dfs_AddStdRootForced *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRootForced *r) +{ + ndr_print_struct(ndr, name, "dfs_AddStdRootForced"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_AddStdRootForced"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_AddStdRootForced"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetDcAddress *r) +{ + ndr_print_struct(ndr, name, "dfs_GetDcAddress"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_GetDcAddress"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_GetDcAddress"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetDcAddress *r) +{ + ndr_print_struct(ndr, name, "dfs_SetDcAddress"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_SetDcAddress"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_SetDcAddress"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct dfs_FlushFtTable *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struct dfs_FlushFtTable *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name, int flags, const struct dfs_FlushFtTable *r) +{ + ndr_print_struct(ndr, name, "dfs_FlushFtTable"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_FlushFtTable"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_FlushFtTable"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add2 *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Add2(struct ndr_pull *ndr, int flags, struct dfs_Add2 *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Add2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add2 *r) +{ + ndr_print_struct(ndr, name, "dfs_Add2"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_Add2"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_Add2"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_Remove2 *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Remove2(struct ndr_pull *ndr, int flags, struct dfs_Remove2 *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Remove2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove2 *r) +{ + ndr_print_struct(ndr, name, "dfs_Remove2"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_Remove2"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_Remove2"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int flags, const struct dfs_EnumEx *r) +{ + ndr_print_struct(ndr, name, "dfs_EnumEx"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_EnumEx"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_EnumEx"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs_SetInfo2 *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_SetInfo2(struct ndr_pull *ndr, int flags, struct dfs_SetInfo2 *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_SetInfo2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo2 *r) +{ + ndr_print_struct(ndr, name, "dfs_SetInfo2"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dfs_SetInfo2"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dfs_SetInfo2"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +const struct dcerpc_interface_call netdfs_calls[] = { + { + "dfs_GetManagerVersion", + sizeof(struct dfs_GetManagerVersion), + (ndr_push_flags_fn_t) ndr_push_dfs_GetManagerVersion, + (ndr_pull_flags_fn_t) ndr_pull_dfs_GetManagerVersion, + (ndr_print_function_t) ndr_print_dfs_GetManagerVersion, + False, + }, + { + "dfs_Add", + sizeof(struct dfs_Add), + (ndr_push_flags_fn_t) ndr_push_dfs_Add, + (ndr_pull_flags_fn_t) ndr_pull_dfs_Add, + (ndr_print_function_t) ndr_print_dfs_Add, + False, + }, + { + "dfs_Remove", + sizeof(struct dfs_Remove), + (ndr_push_flags_fn_t) ndr_push_dfs_Remove, + (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove, + (ndr_print_function_t) ndr_print_dfs_Remove, + False, + }, + { + "dfs_SetInfo", + sizeof(struct dfs_SetInfo), + (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo, + (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo, + (ndr_print_function_t) ndr_print_dfs_SetInfo, + False, + }, + { + "dfs_GetInfo", + sizeof(struct dfs_GetInfo), + (ndr_push_flags_fn_t) ndr_push_dfs_GetInfo, + (ndr_pull_flags_fn_t) ndr_pull_dfs_GetInfo, + (ndr_print_function_t) ndr_print_dfs_GetInfo, + False, + }, + { + "dfs_Enum", + sizeof(struct dfs_Enum), + (ndr_push_flags_fn_t) ndr_push_dfs_Enum, + (ndr_pull_flags_fn_t) ndr_pull_dfs_Enum, + (ndr_print_function_t) ndr_print_dfs_Enum, + False, + }, + { + "dfs_Rename", + sizeof(struct dfs_Rename), + (ndr_push_flags_fn_t) ndr_push_dfs_Rename, + (ndr_pull_flags_fn_t) ndr_pull_dfs_Rename, + (ndr_print_function_t) ndr_print_dfs_Rename, + False, + }, + { + "dfs_Move", + sizeof(struct dfs_Move), + (ndr_push_flags_fn_t) ndr_push_dfs_Move, + (ndr_pull_flags_fn_t) ndr_pull_dfs_Move, + (ndr_print_function_t) ndr_print_dfs_Move, + False, + }, + { + "dfs_ManagerGetConfigInfo", + sizeof(struct dfs_ManagerGetConfigInfo), + (ndr_push_flags_fn_t) ndr_push_dfs_ManagerGetConfigInfo, + (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerGetConfigInfo, + (ndr_print_function_t) ndr_print_dfs_ManagerGetConfigInfo, + False, + }, + { + "dfs_ManagerSendSiteInfo", + sizeof(struct dfs_ManagerSendSiteInfo), + (ndr_push_flags_fn_t) ndr_push_dfs_ManagerSendSiteInfo, + (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerSendSiteInfo, + (ndr_print_function_t) ndr_print_dfs_ManagerSendSiteInfo, + False, + }, + { + "dfs_AddFtRoot", + sizeof(struct dfs_AddFtRoot), + (ndr_push_flags_fn_t) ndr_push_dfs_AddFtRoot, + (ndr_pull_flags_fn_t) ndr_pull_dfs_AddFtRoot, + (ndr_print_function_t) ndr_print_dfs_AddFtRoot, + False, + }, + { + "dfs_RemoveFtRoot", + sizeof(struct dfs_RemoveFtRoot), + (ndr_push_flags_fn_t) ndr_push_dfs_RemoveFtRoot, + (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveFtRoot, + (ndr_print_function_t) ndr_print_dfs_RemoveFtRoot, + False, + }, + { + "dfs_AddStdRoot", + sizeof(struct dfs_AddStdRoot), + (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRoot, + (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRoot, + (ndr_print_function_t) ndr_print_dfs_AddStdRoot, + False, + }, + { + "dfs_RemoveStdRoot", + sizeof(struct dfs_RemoveStdRoot), + (ndr_push_flags_fn_t) ndr_push_dfs_RemoveStdRoot, + (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveStdRoot, + (ndr_print_function_t) ndr_print_dfs_RemoveStdRoot, + False, + }, + { + "dfs_ManagerInitialize", + sizeof(struct dfs_ManagerInitialize), + (ndr_push_flags_fn_t) ndr_push_dfs_ManagerInitialize, + (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerInitialize, + (ndr_print_function_t) ndr_print_dfs_ManagerInitialize, + False, + }, + { + "dfs_AddStdRootForced", + sizeof(struct dfs_AddStdRootForced), + (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRootForced, + (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRootForced, + (ndr_print_function_t) ndr_print_dfs_AddStdRootForced, + False, + }, + { + "dfs_GetDcAddress", + sizeof(struct dfs_GetDcAddress), + (ndr_push_flags_fn_t) ndr_push_dfs_GetDcAddress, + (ndr_pull_flags_fn_t) ndr_pull_dfs_GetDcAddress, + (ndr_print_function_t) ndr_print_dfs_GetDcAddress, + False, + }, + { + "dfs_SetDcAddress", + sizeof(struct dfs_SetDcAddress), + (ndr_push_flags_fn_t) ndr_push_dfs_SetDcAddress, + (ndr_pull_flags_fn_t) ndr_pull_dfs_SetDcAddress, + (ndr_print_function_t) ndr_print_dfs_SetDcAddress, + False, + }, + { + "dfs_FlushFtTable", + sizeof(struct dfs_FlushFtTable), + (ndr_push_flags_fn_t) ndr_push_dfs_FlushFtTable, + (ndr_pull_flags_fn_t) ndr_pull_dfs_FlushFtTable, + (ndr_print_function_t) ndr_print_dfs_FlushFtTable, + False, + }, + { + "dfs_Add2", + sizeof(struct dfs_Add2), + (ndr_push_flags_fn_t) ndr_push_dfs_Add2, + (ndr_pull_flags_fn_t) ndr_pull_dfs_Add2, + (ndr_print_function_t) ndr_print_dfs_Add2, + False, + }, + { + "dfs_Remove2", + sizeof(struct dfs_Remove2), + (ndr_push_flags_fn_t) ndr_push_dfs_Remove2, + (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove2, + (ndr_print_function_t) ndr_print_dfs_Remove2, + False, + }, + { + "dfs_EnumEx", + sizeof(struct dfs_EnumEx), + (ndr_push_flags_fn_t) ndr_push_dfs_EnumEx, + (ndr_pull_flags_fn_t) ndr_pull_dfs_EnumEx, + (ndr_print_function_t) ndr_print_dfs_EnumEx, + False, + }, + { + "dfs_SetInfo2", + sizeof(struct dfs_SetInfo2), + (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo2, + (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo2, + (ndr_print_function_t) ndr_print_dfs_SetInfo2, + False, + }, + { NULL, 0, NULL, NULL, NULL, False } +}; + +const char * const netdfs_endpoint_strings[] = { + "ncacn_np:[\\pipe\\netdfs]", +}; + +const struct dcerpc_endpoint_list netdfs_endpoints = { + .count = 1, + .names = netdfs_endpoint_strings +}; + +const char * const netdfs_authservice_strings[] = { + "host", +}; + +const struct dcerpc_authservice_list netdfs_authservices = { + .count = 1, + .names = netdfs_authservice_strings +}; + + +const struct dcerpc_interface_table dcerpc_table_netdfs = { + .name = "netdfs", + .syntax_id = { + {0x4fc742e0,0x4a10,0x11cf,{0x82,0x73},{0x00,0xaa,0x00,0x4a,0xe6,0x73}}, + DCERPC_NETDFS_VERSION + }, + .helpstring = DCERPC_NETDFS_HELPSTRING, + .num_calls = 23, + .calls = netdfs_calls, + .endpoints = &netdfs_endpoints, + .authservices = &netdfs_authservices +}; + -- cgit From 8be112a81bf7d7fb48ee82fd38c1f8d0f85bbc75 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 13 Sep 2006 13:42:23 +0000 Subject: r18469: Use new pidl-generated DFS client code. (This used to be commit e277fb067b1a12d816c8a066839751c1824d27bb) --- source3/librpc/gen_ndr/ndr_dfs.c | 116 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) (limited to 'source3/librpc/gen_ndr/ndr_dfs.c') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index f7151050ae..a3af989caf 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -3356,8 +3356,31 @@ _PUBLIC_ void ndr_print_dfs_Remove2(struct ndr_print *ndr, const char *name, int NTSTATUS ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r) { if (flags & NDR_IN) { + if (r->in.name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name, ndr_charset_length(r->in.name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info)); + if (r->in.info) { + NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total)); + if (r->in.total) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total)); + } } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info)); + if (r->out.info) { + NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total)); + if (r->out.total) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total)); + } NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NT_STATUS_OK; @@ -3365,9 +3388,72 @@ NTSTATUS ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_E NTSTATUS ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r) { + uint32_t _ptr_info; + uint32_t _ptr_total; + TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_total_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name)); + if (ndr_get_array_length(ndr, &r->in.name) > ndr_get_array_size(ndr, &r->in.name)) { + 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.name), ndr_get_array_length(ndr, &r->in.name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name, ndr_get_array_length(ndr, &r->in.name), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); + if (_ptr_info) { + NDR_PULL_ALLOC(ndr, r->in.info); + } else { + r->in.info = NULL; + } + if (r->in.info) { + _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0); + NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total)); + if (_ptr_total) { + NDR_PULL_ALLOC(ndr, r->in.total); + } else { + r->in.total = NULL; + } + if (r->in.total) { + _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0); + } } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); + if (_ptr_info) { + NDR_PULL_ALLOC(ndr, r->out.info); + } else { + r->out.info = NULL; + } + if (r->out.info) { + _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0); + NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total)); + if (_ptr_total) { + NDR_PULL_ALLOC(ndr, r->out.total); + } else { + r->out.total = NULL; + } + if (r->out.total) { + _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0); + } NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NT_STATUS_OK; @@ -3383,11 +3469,41 @@ _PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "dfs_EnumEx"); ndr->depth++; + ndr_print_ptr(ndr, "name", r->in.name); + ndr->depth++; + ndr_print_string(ndr, "name", r->in.name); + ndr->depth--; + ndr_print_uint32(ndr, "level", r->in.level); + ndr_print_uint32(ndr, "bufsize", r->in.bufsize); + ndr_print_ptr(ndr, "info", r->in.info); + ndr->depth++; + if (r->in.info) { + ndr_print_dfs_EnumStruct(ndr, "info", r->in.info); + } + ndr->depth--; + ndr_print_ptr(ndr, "total", r->in.total); + ndr->depth++; + if (r->in.total) { + ndr_print_uint32(ndr, "total", *r->in.total); + } + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "dfs_EnumEx"); ndr->depth++; + ndr_print_ptr(ndr, "info", r->out.info); + ndr->depth++; + if (r->out.info) { + ndr_print_dfs_EnumStruct(ndr, "info", r->out.info); + } + ndr->depth--; + ndr_print_ptr(ndr, "total", r->out.total); + ndr->depth++; + if (r->out.total) { + ndr_print_uint32(ndr, "total", *r->out.total); + } + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } -- cgit From 7d2152b8dc160175939eeb3b943827f3b68928bd Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 27 Feb 2007 17:17:16 +0000 Subject: r21562: Regenerate gen_ndr after pidl changes. (This used to be commit 952f648d8132a0652bb03b9e7671239e57614ee9) --- source3/librpc/gen_ndr/ndr_dfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_dfs.c') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index a3af989caf..4bd04ee33f 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -850,9 +850,8 @@ _PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, con NTSTATUS ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_Info *r) { - int level; - level = ndr_push_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { case 0: @@ -892,6 +891,7 @@ NTSTATUS ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_ } } if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); switch (level) { case 0: if (r->info0) { @@ -964,7 +964,7 @@ NTSTATUS ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info * if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level)); if (_level != level) { - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for dfs_Info", _level); + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level); } switch (level) { case 0: { @@ -1739,9 +1739,8 @@ _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name NTSTATUS ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union dfs_EnumInfo *r) { - int level; - level = ndr_push_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { case 1: @@ -1773,6 +1772,7 @@ NTSTATUS ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union } } if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); switch (level) { case 1: if (r->info1) { @@ -1831,7 +1831,7 @@ NTSTATUS ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union dfs_En if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level)); if (_level != level) { - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for dfs_EnumInfo", _level); + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level); } switch (level) { case 1: { -- cgit From a458211702da5f573f09dde196ca302f2f7cb976 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 27 Jun 2007 09:17:52 +0000 Subject: r23622: regenerate dfs rpc gen_ndr. Guenther (This used to be commit 71b3259962004c278ca2e859d5460ad47c2468d6) --- source3/librpc/gen_ndr/ndr_dfs.c | 2116 +++++++++++++++++++++++++++++++++----- 1 file changed, 1843 insertions(+), 273 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_dfs.c') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index 4bd04ee33f..137c189c46 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -3,6 +3,32 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_dfs.h" +NTSTATUS ndr_push_dfs_ManagerVersion(struct ndr_push *ndr, int ndr_flags, enum dfs_ManagerVersion r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_ManagerVersion(struct ndr_pull *ndr, int ndr_flags, enum dfs_ManagerVersion *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_ManagerVersion(struct ndr_print *ndr, const char *name, enum dfs_ManagerVersion r) +{ + const char *val = NULL; + + switch (r) { + case DFS_MANAGER_VERSION_NT4: val = "DFS_MANAGER_VERSION_NT4"; break; + case DFS_MANAGER_VERSION_W2K: val = "DFS_MANAGER_VERSION_W2K"; break; + case DFS_MANAGER_VERSION_W2K3: val = "DFS_MANAGER_VERSION_W2K3"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + NTSTATUS ndr_push_dfs_Info0(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info0 *r) { if (ndr_flags & NDR_SCALARS) { @@ -90,13 +116,40 @@ _PUBLIC_ void ndr_print_dfs_Info1(struct ndr_print *ndr, const char *name, const ndr->depth--; } +_PUBLIC_ NTSTATUS ndr_push_dfs_VolumeState(struct ndr_push *ndr, int ndr_flags, uint32_t r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NT_STATUS_OK; +} + +_PUBLIC_ NTSTATUS ndr_pull_dfs_VolumeState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_VolumeState(struct ndr_print *ndr, const char *name, uint32_t r) +{ + ndr_print_uint32(ndr, name, r); + ndr->depth++; + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OK", DFS_VOLUME_STATE_OK, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_INCONSISTENT", DFS_VOLUME_STATE_INCONSISTENT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OFFLINE", DFS_VOLUME_STATE_OFFLINE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_ONLINE", DFS_VOLUME_STATE_ONLINE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_STANDALONE", DFS_VOLUME_STATE_STANDALONE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_AD_BLOB", DFS_VOLUME_STATE_AD_BLOB, r); + ndr->depth--; +} + NTSTATUS ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info2 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->path)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->state)); + NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); } if (ndr_flags & NDR_BUFFERS) { @@ -136,7 +189,7 @@ NTSTATUS ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info } else { r->comment = NULL; } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->state)); + NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores)); } if (ndr_flags & NDR_BUFFERS) { @@ -184,16 +237,40 @@ _PUBLIC_ void ndr_print_dfs_Info2(struct ndr_print *ndr, const char *name, const ndr_print_string(ndr, "comment", r->comment); } ndr->depth--; - ndr_print_uint32(ndr, "state", r->state); + ndr_print_dfs_VolumeState(ndr, "state", r->state); ndr_print_uint32(ndr, "num_stores", r->num_stores); ndr->depth--; } +_PUBLIC_ NTSTATUS ndr_push_dfs_StorageState(struct ndr_push *ndr, int ndr_flags, uint32_t r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NT_STATUS_OK; +} + +_PUBLIC_ NTSTATUS ndr_pull_dfs_StorageState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_StorageState(struct ndr_print *ndr, const char *name, uint32_t r) +{ + ndr_print_uint32(ndr, name, r); + ndr->depth++; + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_OFFLINE", DFS_STORAGE_STATE_OFFLINE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ONLINE", DFS_STORAGE_STATE_ONLINE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ACTIVE", DFS_STORAGE_STATE_ACTIVE, r); + ndr->depth--; +} + NTSTATUS ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->state)); + NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->server)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->share)); } @@ -222,7 +299,7 @@ NTSTATUS ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct df TALLOC_CTX *_mem_save_share_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->state)); + NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server)); if (_ptr_server) { NDR_PULL_ALLOC(ndr, r->server); @@ -269,7 +346,7 @@ _PUBLIC_ void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name, { ndr_print_struct(ndr, name, "dfs_StorageInfo"); ndr->depth++; - ndr_print_uint32(ndr, "state", r->state); + ndr_print_dfs_StorageState(ndr, "state", r->state); ndr_print_ptr(ndr, "server", r->server); ndr->depth++; if (r->server) { @@ -292,7 +369,7 @@ NTSTATUS ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct df NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->path)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->state)); + NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores)); } @@ -346,7 +423,7 @@ NTSTATUS ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info } else { r->comment = NULL; } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->state)); + NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores)); if (_ptr_stores) { @@ -420,7 +497,7 @@ _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const ndr_print_string(ndr, "comment", r->comment); } ndr->depth--; - ndr_print_uint32(ndr, "state", r->state); + ndr_print_dfs_VolumeState(ndr, "state", r->state); ndr_print_uint32(ndr, "num_stores", r->num_stores); ndr_print_ptr(ndr, "stores", r->stores); ndr->depth++; @@ -448,7 +525,7 @@ NTSTATUS ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct df NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->path)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->state)); + NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); @@ -505,7 +582,7 @@ NTSTATUS ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info } else { r->comment = NULL; } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->state)); + NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout)); NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores)); @@ -565,51 +642,676 @@ NTSTATUS ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info return NT_STATUS_OK; } -_PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const struct dfs_Info4 *r) +_PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const struct dfs_Info4 *r) +{ + uint32_t cntr_stores_1; + ndr_print_struct(ndr, name, "dfs_Info4"); + ndr->depth++; + ndr_print_ptr(ndr, "path", r->path); + ndr->depth++; + if (r->path) { + ndr_print_string(ndr, "path", r->path); + } + ndr->depth--; + ndr_print_ptr(ndr, "comment", r->comment); + ndr->depth++; + if (r->comment) { + ndr_print_string(ndr, "comment", r->comment); + } + ndr->depth--; + ndr_print_dfs_VolumeState(ndr, "state", r->state); + ndr_print_uint32(ndr, "timeout", r->timeout); + ndr_print_GUID(ndr, "guid", &r->guid); + ndr_print_uint32(ndr, "num_stores", r->num_stores); + ndr_print_ptr(ndr, "stores", r->stores); + ndr->depth++; + if (r->stores) { + ndr->print(ndr, "%s: ARRAY(%d)", "stores", r->num_stores); + ndr->depth++; + for (cntr_stores_1=0;cntr_stores_1num_stores;cntr_stores_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_stores_1); + if (idx_1) { + ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +_PUBLIC_ NTSTATUS ndr_push_dfs_PropertyFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NT_STATUS_OK; +} + +_PUBLIC_ NTSTATUS ndr_pull_dfs_PropertyFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_PropertyFlags(struct ndr_print *ndr, const char *name, uint32_t r) +{ + ndr_print_uint32(ndr, name, r); + ndr->depth++; + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_INSITE_REFERRALS", DFS_PROPERTY_FLAG_INSITE_REFERRALS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_ROOT_SCALABILITY", DFS_PROPERTY_FLAG_ROOT_SCALABILITY, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_SITE_COSTING", DFS_PROPERTY_FLAG_SITE_COSTING, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_TARGET_FAILBACK", DFS_PROPERTY_FLAG_TARGET_FAILBACK, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_CLUSTER_ENABLED", DFS_PROPERTY_FLAG_CLUSTER_ENABLED, r); + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info5 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->path)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); + NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout)); + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid)); + NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->path) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + if (r->comment) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info5 *r) +{ + uint32_t _ptr_path; + TALLOC_CTX *_mem_save_path_0; + uint32_t _ptr_comment; + TALLOC_CTX *_mem_save_comment_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path)); + if (_ptr_path) { + NDR_PULL_ALLOC(ndr, r->path); + } else { + r->path = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment)); + if (_ptr_comment) { + NDR_PULL_ALLOC(ndr, r->comment); + } else { + r->comment = NULL; + } + NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout)); + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid)); + NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->path) { + _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->path, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->path)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->path)); + if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0); + } + if (r->comment) { + _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->comment)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->comment)); + if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); + } + NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Info5(struct ndr_print *ndr, const char *name, const struct dfs_Info5 *r) +{ + ndr_print_struct(ndr, name, "dfs_Info5"); + ndr->depth++; + ndr_print_ptr(ndr, "path", r->path); + ndr->depth++; + if (r->path) { + ndr_print_string(ndr, "path", r->path); + } + ndr->depth--; + ndr_print_ptr(ndr, "comment", r->comment); + ndr->depth++; + if (r->comment) { + ndr_print_string(ndr, "comment", r->comment); + } + ndr->depth--; + ndr_print_dfs_VolumeState(ndr, "state", r->state); + ndr_print_uint32(ndr, "timeout", r->timeout); + ndr_print_GUID(ndr, "guid", &r->guid); + ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags); + ndr_print_uint32(ndr, "pktsize", r->pktsize); + ndr_print_uint32(ndr, "num_stores", r->num_stores); + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Target_PriorityClass(struct ndr_push *ndr, int ndr_flags, enum dfs_Target_PriorityClass r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Target_PriorityClass(struct ndr_pull *ndr, int ndr_flags, enum dfs_Target_PriorityClass *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Target_PriorityClass(struct ndr_print *ndr, const char *name, enum dfs_Target_PriorityClass r) +{ + const char *val = NULL; + + switch (r) { + case DFS_INVALID_PRIORITY_CLASS: val = "DFS_INVALID_PRIORITY_CLASS"; break; + case DFS_SITE_COST_NORMAL_PRIORITY_CLASS: val = "DFS_SITE_COST_NORMAL_PRIORITY_CLASS"; break; + case DFS_GLOBAL_HIGH_PRIORITY_CLASS: val = "DFS_GLOBAL_HIGH_PRIORITY_CLASS"; break; + case DFS_SITE_COST_HIGH_PRIORITY_CLASS: val = "DFS_SITE_COST_HIGH_PRIORITY_CLASS"; break; + case DFS_SITE_COST_LOW_PRIORITY_CLASS: val = "DFS_SITE_COST_LOW_PRIORITY_CLASS"; break; + case DFS_GLOBAL_LOW_PRIORITY_CLASS: val = "DFS_GLOBAL_LOW_PRIORITY_CLASS"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +NTSTATUS ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags, const struct dfs_Target_Priority *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_dfs_Target_PriorityClass(ndr, NDR_SCALARS, r->target_priority_class)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->target_priority_rank)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Target_Priority(struct ndr_pull *ndr, int ndr_flags, struct dfs_Target_Priority *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_dfs_Target_PriorityClass(ndr, NDR_SCALARS, &r->target_priority_class)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->target_priority_rank)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Target_Priority(struct ndr_print *ndr, const char *name, const struct dfs_Target_Priority *r) +{ + ndr_print_struct(ndr, name, "dfs_Target_Priority"); + ndr->depth++; + ndr_print_dfs_Target_PriorityClass(ndr, "target_priority_class", r->target_priority_class); + ndr_print_uint16(ndr, "target_priority_rank", r->target_priority_rank); + ndr_print_uint16(ndr, "reserved", r->reserved); + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo2 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo2 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_StorageInfo2(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo2 *r) +{ + ndr_print_struct(ndr, name, "dfs_StorageInfo2"); + ndr->depth++; + ndr_print_dfs_StorageInfo(ndr, "info", &r->info); + ndr_print_dfs_Target_Priority(ndr, "target_priority", &r->target_priority); + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info6 *r) +{ + uint32_t cntr_stores_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->entry_path)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); + NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout)); + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid)); + NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_stores)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->entry_path) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->entry_path, ndr_charset_length(r->entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + if (r->comment) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid)); + if (r->stores) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); + for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { + NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1])); + } + for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { + NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1])); + } + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info6 *r) +{ + uint32_t _ptr_entry_path; + TALLOC_CTX *_mem_save_entry_path_0; + uint32_t _ptr_comment; + TALLOC_CTX *_mem_save_comment_0; + uint32_t _ptr_stores; + uint32_t cntr_stores_1; + TALLOC_CTX *_mem_save_stores_0; + TALLOC_CTX *_mem_save_stores_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entry_path)); + if (_ptr_entry_path) { + NDR_PULL_ALLOC(ndr, r->entry_path); + } else { + r->entry_path = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment)); + if (_ptr_comment) { + NDR_PULL_ALLOC(ndr, r->comment); + } else { + r->comment = NULL; + } + NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout)); + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid)); + NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_stores)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores)); + if (_ptr_stores) { + NDR_PULL_ALLOC(ndr, r->stores); + } else { + r->stores = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->entry_path) { + _mem_save_entry_path_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->entry_path, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->entry_path)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->entry_path)); + if (ndr_get_array_length(ndr, &r->entry_path) > ndr_get_array_size(ndr, &r->entry_path)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->entry_path), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->entry_path, ndr_get_array_length(ndr, &r->entry_path), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_path_0, 0); + } + if (r->comment) { + _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->comment)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->comment)); + if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); + } + NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid)); + if (r->stores) { + _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->stores)); + NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores)); + _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0); + for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { + NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1])); + } + for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { + NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0); + } + if (r->stores) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores)); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const struct dfs_Info6 *r) +{ + uint32_t cntr_stores_1; + ndr_print_struct(ndr, name, "dfs_Info6"); + ndr->depth++; + ndr_print_ptr(ndr, "entry_path", r->entry_path); + ndr->depth++; + if (r->entry_path) { + ndr_print_string(ndr, "entry_path", r->entry_path); + } + ndr->depth--; + ndr_print_ptr(ndr, "comment", r->comment); + ndr->depth++; + if (r->comment) { + ndr_print_string(ndr, "comment", r->comment); + } + ndr->depth--; + ndr_print_dfs_VolumeState(ndr, "state", r->state); + ndr_print_uint32(ndr, "timeout", r->timeout); + ndr_print_GUID(ndr, "guid", &r->guid); + ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags); + ndr_print_uint32(ndr, "pktsize", r->pktsize); + ndr_print_uint16(ndr, "num_stores", r->num_stores); + ndr_print_ptr(ndr, "stores", r->stores); + ndr->depth++; + if (r->stores) { + ndr->print(ndr, "%s: ARRAY(%d)", "stores", r->num_stores); + ndr->depth++; + for (cntr_stores_1=0;cntr_stores_1num_stores;cntr_stores_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_stores_1); + if (idx_1) { + ndr_print_dfs_StorageInfo2(ndr, "stores", &r->stores[cntr_stores_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info7 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->generation_guid)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->generation_guid)); + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info7 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->generation_guid)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->generation_guid)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Info7(struct ndr_print *ndr, const char *name, const struct dfs_Info7 *r) +{ + ndr_print_struct(ndr, name, "dfs_Info7"); + ndr->depth++; + ndr_print_GUID(ndr, "generation_guid", &r->generation_guid); + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->comment) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r) +{ + uint32_t _ptr_comment; + TALLOC_CTX *_mem_save_comment_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment)); + if (_ptr_comment) { + NDR_PULL_ALLOC(ndr, r->comment); + } else { + r->comment = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->comment) { + _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->comment)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->comment)); + if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, const struct dfs_Info100 *r) +{ + ndr_print_struct(ndr, name, "dfs_Info100"); + ndr->depth++; + ndr_print_ptr(ndr, "comment", r->comment); + ndr->depth++; + if (r->comment) { + ndr_print_string(ndr, "comment", r->comment); + } + ndr->depth--; + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, const struct dfs_Info101 *r) +{ + ndr_print_struct(ndr, name, "dfs_Info101"); + ndr->depth++; + ndr_print_dfs_StorageState(ndr, "state", r->state); + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, const struct dfs_Info102 *r) +{ + ndr_print_struct(ndr, name, "dfs_Info102"); + ndr->depth++; + ndr_print_uint32(ndr, "timeout", r->timeout); + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info103 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Info103(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info103 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Info103(struct ndr_print *ndr, const char *name, const struct dfs_Info103 *r) +{ + ndr_print_struct(ndr, name, "dfs_Info103"); + ndr->depth++; + ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags); + ndr->depth--; +} + +NTSTATUS ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info104 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_Info104(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info104 *r) { - uint32_t cntr_stores_1; - ndr_print_struct(ndr, name, "dfs_Info4"); - ndr->depth++; - ndr_print_ptr(ndr, "path", r->path); - ndr->depth++; - if (r->path) { - ndr_print_string(ndr, "path", r->path); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority)); } - ndr->depth--; - ndr_print_ptr(ndr, "comment", r->comment); - ndr->depth++; - if (r->comment) { - ndr_print_string(ndr, "comment", r->comment); + if (ndr_flags & NDR_BUFFERS) { } - ndr->depth--; - ndr_print_uint32(ndr, "state", r->state); - ndr_print_uint32(ndr, "timeout", r->timeout); - ndr_print_GUID(ndr, "guid", &r->guid); - ndr_print_uint32(ndr, "num_stores", r->num_stores); - ndr_print_ptr(ndr, "stores", r->stores); + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_Info104(struct ndr_print *ndr, const char *name, const struct dfs_Info104 *r) +{ + ndr_print_struct(ndr, name, "dfs_Info104"); ndr->depth++; - if (r->stores) { - ndr->print(ndr, "%s: ARRAY(%d)", "stores", r->num_stores); - ndr->depth++; - for (cntr_stores_1=0;cntr_stores_1num_stores;cntr_stores_1++) { - char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_stores_1); - if (idx_1) { - ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]); - free(idx_1); - } - } - ndr->depth--; - } - ndr->depth--; + ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority); ndr->depth--; } -NTSTATUS ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r) +NTSTATUS ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info105 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); + NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flag_mask)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flags)); } if (ndr_flags & NDR_BUFFERS) { if (r->comment) { @@ -622,7 +1324,7 @@ NTSTATUS ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r) +NTSTATUS ndr_pull_dfs_Info105(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info105 *r) { uint32_t _ptr_comment; TALLOC_CTX *_mem_save_comment_0; @@ -634,6 +1336,10 @@ NTSTATUS ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_In } else { r->comment = NULL; } + NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flag_mask)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flags)); } if (ndr_flags & NDR_BUFFERS) { if (r->comment) { @@ -652,9 +1358,9 @@ NTSTATUS ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_In return NT_STATUS_OK; } -_PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, const struct dfs_Info100 *r) +_PUBLIC_ void ndr_print_dfs_Info105(struct ndr_print *ndr, const char *name, const struct dfs_Info105 *r) { - ndr_print_struct(ndr, name, "dfs_Info100"); + ndr_print_struct(ndr, name, "dfs_Info105"); ndr->depth++; ndr_print_ptr(ndr, "comment", r->comment); ndr->depth++; @@ -662,66 +1368,43 @@ _PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, con ndr_print_string(ndr, "comment", r->comment); } ndr->depth--; + ndr_print_dfs_VolumeState(ndr, "state", r->state); + ndr_print_uint32(ndr, "timeout", r->timeout); + ndr_print_uint32(ndr, "property_flag_mask", r->property_flag_mask); + ndr_print_uint32(ndr, "property_flags", r->property_flags); ndr->depth--; } -NTSTATUS ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->state)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->state)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NT_STATUS_OK; -} - -_PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, const struct dfs_Info101 *r) -{ - ndr_print_struct(ndr, name, "dfs_Info101"); - ndr->depth++; - ndr_print_uint32(ndr, "state", r->state); - ndr->depth--; -} - -NTSTATUS ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r) +NTSTATUS ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info106 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout)); + NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state)); + NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority)); } if (ndr_flags & NDR_BUFFERS) { } return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r) +NTSTATUS ndr_pull_dfs_Info106(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info106 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout)); + NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state)); + NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority)); } if (ndr_flags & NDR_BUFFERS) { } return NT_STATUS_OK; } -_PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, const struct dfs_Info102 *r) +_PUBLIC_ void ndr_print_dfs_Info106(struct ndr_print *ndr, const char *name, const struct dfs_Info106 *r) { - ndr_print_struct(ndr, name, "dfs_Info102"); + ndr_print_struct(ndr, name, "dfs_Info106"); ndr->depth++; - ndr_print_uint32(ndr, "timeout", r->timeout); + ndr_print_dfs_StorageState(ndr, "state", r->state); + ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority); ndr->depth--; } @@ -785,11 +1468,36 @@ _PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, con ndr->depth--; } +NTSTATUS ndr_push_dfs_VolumeFlavor(struct ndr_push *ndr, int ndr_flags, enum dfs_VolumeFlavor r) +{ + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_VolumeFlavor(struct ndr_pull *ndr, int ndr_flags, enum dfs_VolumeFlavor *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); + *r = v; + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_VolumeFlavor(struct ndr_print *ndr, const char *name, enum dfs_VolumeFlavor r) +{ + const char *val = NULL; + + switch (r) { + case DFS_VOLUME_FLAVOR_STANDALONE: val = "DFS_VOLUME_FLAVOR_STANDALONE"; break; + case DFS_VOLUME_FLAVOR_AD_BLOB: val = "DFS_VOLUME_FLAVOR_AD_BLOB"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + NTSTATUS ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info300 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_dfs_VolumeFlavor(ndr, NDR_SCALARS, r->flavor)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root)); } if (ndr_flags & NDR_BUFFERS) { @@ -809,7 +1517,7 @@ NTSTATUS ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_In TALLOC_CTX *_mem_save_dom_root_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_dfs_VolumeFlavor(ndr, NDR_SCALARS, &r->flavor)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root)); if (_ptr_dom_root) { NDR_PULL_ALLOC(ndr, r->dom_root); @@ -838,7 +1546,7 @@ _PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, con { ndr_print_struct(ndr, name, "dfs_Info300"); ndr->depth++; - ndr_print_uint32(ndr, "flags", r->flags); + ndr_print_dfs_VolumeFlavor(ndr, "flavor", r->flavor); ndr_print_ptr(ndr, "dom_root", r->dom_root); ndr->depth++; if (r->dom_root) { @@ -874,6 +1582,18 @@ NTSTATUS ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4)); break; + case 5: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5)); + break; + + case 6: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6)); + break; + + case 7: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info7)); + break; + case 100: NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100)); break; @@ -886,6 +1606,22 @@ NTSTATUS ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102)); break; + case 103: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info103)); + break; + + case 104: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info104)); + break; + + case 105: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info105)); + break; + + case 106: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info106)); + break; + default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); } @@ -923,6 +1659,24 @@ NTSTATUS ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_ } break; + case 5: + if (r->info5) { + NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5)); + } + break; + + case 6: + if (r->info6) { + NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6)); + } + break; + + case 7: + if (r->info7) { + NDR_CHECK(ndr_push_dfs_Info7(ndr, NDR_SCALARS|NDR_BUFFERS, r->info7)); + } + break; + case 100: if (r->info100) { NDR_CHECK(ndr_push_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100)); @@ -941,6 +1695,30 @@ NTSTATUS ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_ } break; + case 103: + if (r->info103) { + NDR_CHECK(ndr_push_dfs_Info103(ndr, NDR_SCALARS, r->info103)); + } + break; + + case 104: + if (r->info104) { + NDR_CHECK(ndr_push_dfs_Info104(ndr, NDR_SCALARS, r->info104)); + } + break; + + case 105: + if (r->info105) { + NDR_CHECK(ndr_push_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105)); + } + break; + + case 106: + if (r->info106) { + NDR_CHECK(ndr_push_dfs_Info106(ndr, NDR_SCALARS, r->info106)); + } + break; + default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); } @@ -957,9 +1735,16 @@ NTSTATUS ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info * TALLOC_CTX *_mem_save_info2_0; TALLOC_CTX *_mem_save_info3_0; TALLOC_CTX *_mem_save_info4_0; + TALLOC_CTX *_mem_save_info5_0; + TALLOC_CTX *_mem_save_info6_0; + TALLOC_CTX *_mem_save_info7_0; TALLOC_CTX *_mem_save_info100_0; TALLOC_CTX *_mem_save_info101_0; TALLOC_CTX *_mem_save_info102_0; + TALLOC_CTX *_mem_save_info103_0; + TALLOC_CTX *_mem_save_info104_0; + TALLOC_CTX *_mem_save_info105_0; + TALLOC_CTX *_mem_save_info106_0; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level)); @@ -1017,6 +1802,36 @@ NTSTATUS ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info * } break; } + case 5: { + uint32_t _ptr_info5; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5)); + if (_ptr_info5) { + NDR_PULL_ALLOC(ndr, r->info5); + } else { + r->info5 = NULL; + } + break; } + + case 6: { + uint32_t _ptr_info6; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6)); + if (_ptr_info6) { + NDR_PULL_ALLOC(ndr, r->info6); + } else { + r->info6 = NULL; + } + break; } + + case 7: { + uint32_t _ptr_info7; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info7)); + if (_ptr_info7) { + NDR_PULL_ALLOC(ndr, r->info7); + } else { + r->info7 = NULL; + } + break; } + case 100: { uint32_t _ptr_info100; NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100)); @@ -1047,6 +1862,46 @@ NTSTATUS ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info * } break; } + case 103: { + uint32_t _ptr_info103; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info103)); + if (_ptr_info103) { + NDR_PULL_ALLOC(ndr, r->info103); + } else { + r->info103 = NULL; + } + break; } + + case 104: { + uint32_t _ptr_info104; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info104)); + if (_ptr_info104) { + NDR_PULL_ALLOC(ndr, r->info104); + } else { + r->info104 = NULL; + } + break; } + + case 105: { + uint32_t _ptr_info105; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info105)); + if (_ptr_info105) { + NDR_PULL_ALLOC(ndr, r->info105); + } else { + r->info105 = NULL; + } + break; } + + case 106: { + uint32_t _ptr_info106; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info106)); + if (_ptr_info106) { + NDR_PULL_ALLOC(ndr, r->info106); + } else { + r->info106 = NULL; + } + break; } + default: return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); } @@ -1098,6 +1953,33 @@ NTSTATUS ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info * } break; + case 5: + if (r->info5) { + _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0); + NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0); + } + break; + + case 6: + if (r->info6) { + _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0); + NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0); + } + break; + + case 7: + if (r->info7) { + _mem_save_info7_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info7, 0); + NDR_CHECK(ndr_pull_dfs_Info7(ndr, NDR_SCALARS|NDR_BUFFERS, r->info7)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info7_0, 0); + } + break; + case 100: if (r->info100) { _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -1125,6 +2007,42 @@ NTSTATUS ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info * } break; + case 103: + if (r->info103) { + _mem_save_info103_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info103, 0); + NDR_CHECK(ndr_pull_dfs_Info103(ndr, NDR_SCALARS, r->info103)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info103_0, 0); + } + break; + + case 104: + if (r->info104) { + _mem_save_info104_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info104, 0); + NDR_CHECK(ndr_pull_dfs_Info104(ndr, NDR_SCALARS, r->info104)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info104_0, 0); + } + break; + + case 105: + if (r->info105) { + _mem_save_info105_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info105, 0); + NDR_CHECK(ndr_pull_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info105_0, 0); + } + break; + + case 106: + if (r->info106) { + _mem_save_info106_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info106, 0); + NDR_CHECK(ndr_pull_dfs_Info106(ndr, NDR_SCALARS, r->info106)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info106_0, 0); + } + break; + default: return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); } @@ -1183,6 +2101,33 @@ _PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const ndr->depth--; break; + case 5: + ndr_print_ptr(ndr, "info5", r->info5); + ndr->depth++; + if (r->info5) { + ndr_print_dfs_Info5(ndr, "info5", r->info5); + } + ndr->depth--; + break; + + case 6: + ndr_print_ptr(ndr, "info6", r->info6); + ndr->depth++; + if (r->info6) { + ndr_print_dfs_Info6(ndr, "info6", r->info6); + } + ndr->depth--; + break; + + case 7: + ndr_print_ptr(ndr, "info7", r->info7); + ndr->depth++; + if (r->info7) { + ndr_print_dfs_Info7(ndr, "info7", r->info7); + } + ndr->depth--; + break; + case 100: ndr_print_ptr(ndr, "info100", r->info100); ndr->depth++; @@ -1210,6 +2155,42 @@ _PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const ndr->depth--; break; + case 103: + ndr_print_ptr(ndr, "info103", r->info103); + ndr->depth++; + if (r->info103) { + ndr_print_dfs_Info103(ndr, "info103", r->info103); + } + ndr->depth--; + break; + + case 104: + ndr_print_ptr(ndr, "info104", r->info104); + ndr->depth++; + if (r->info104) { + ndr_print_dfs_Info104(ndr, "info104", r->info104); + } + ndr->depth--; + break; + + case 105: + ndr_print_ptr(ndr, "info105", r->info105); + ndr->depth++; + if (r->info105) { + ndr_print_dfs_Info105(ndr, "info105", r->info105); + } + ndr->depth--; + break; + + case 106: + ndr_print_ptr(ndr, "info106", r->info106); + ndr->depth++; + if (r->info106) { + ndr_print_dfs_Info106(ndr, "info106", r->info106); + } + ndr->depth--; + break; + default: ndr_print_bad_level(ndr, name, level); } @@ -2064,34 +3045,97 @@ _PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, ndr->depth--; } -NTSTATUS ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags, const struct dfs_GetManagerVersion *r) +NTSTATUS ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_UnknownStruct *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown2)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->unknown2) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->unknown2, ndr_charset_length(r->unknown2, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_dfs_UnknownStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_UnknownStruct *r) +{ + uint32_t _ptr_unknown2; + TALLOC_CTX *_mem_save_unknown2_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2)); + if (_ptr_unknown2) { + NDR_PULL_ALLOC(ndr, r->unknown2); + } else { + r->unknown2 = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->unknown2) { + _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->unknown2, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->unknown2)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->unknown2)); + if (ndr_get_array_length(ndr, &r->unknown2) > ndr_get_array_size(ndr, &r->unknown2)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->unknown2, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_dfs_UnknownStruct(struct ndr_print *ndr, const char *name, const struct dfs_UnknownStruct *r) +{ + ndr_print_struct(ndr, name, "dfs_UnknownStruct"); + ndr->depth++; + ndr_print_uint32(ndr, "unknown1", r->unknown1); + ndr_print_ptr(ndr, "unknown2", r->unknown2); + ndr->depth++; + if (r->unknown2) { + ndr_print_string(ndr, "unknown2", r->unknown2); + } + ndr->depth--; + ndr->depth--; +} + +_PUBLIC_ NTSTATUS ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags, const struct dfs_GetManagerVersion *r) { if (flags & NDR_IN) { } if (flags & NDR_OUT) { - if (r->out.exist_flag == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.exist_flag)); + if (r->out.version == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; + NDR_CHECK(ndr_push_dfs_ManagerVersion(ndr, NDR_SCALARS, *r->out.version)); } return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags, struct dfs_GetManagerVersion *r) +_PUBLIC_ NTSTATUS ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags, struct dfs_GetManagerVersion *r) { - TALLOC_CTX *_mem_save_exist_flag_0; + TALLOC_CTX *_mem_save_version_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); - NDR_PULL_ALLOC(ndr, r->out.exist_flag); - ZERO_STRUCTP(r->out.exist_flag); + NDR_PULL_ALLOC(ndr, r->out.version); + ZERO_STRUCTP(r->out.version); } if (flags & NDR_OUT) { if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->out.exist_flag); + NDR_PULL_ALLOC(ndr, r->out.version); } - _mem_save_exist_flag_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.exist_flag, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.exist_flag)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_exist_flag_0, LIBNDR_FLAG_REF_ALLOC); + _mem_save_version_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.version, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_dfs_ManagerVersion(ndr, NDR_SCALARS, r->out.version)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_version_0, LIBNDR_FLAG_REF_ALLOC); } return NT_STATUS_OK; } @@ -2111,9 +3155,9 @@ _PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "dfs_GetManagerVersion"); ndr->depth++; - ndr_print_ptr(ndr, "exist_flag", r->out.exist_flag); + ndr_print_ptr(ndr, "version", r->out.version); ndr->depth++; - ndr_print_uint32(ndr, "exist_flag", *r->out.exist_flag); + ndr_print_dfs_ManagerVersion(ndr, "version", *r->out.version); ndr->depth--; ndr->depth--; } @@ -2265,24 +3309,24 @@ _PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int fla NTSTATUS ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r) { if (flags & NDR_IN) { - if (r->in.path == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16))); + if (r->in.dfs_entry_path == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16))); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server)); - if (r->in.server) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16))); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16)); - } - NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share)); - if (r->in.share) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16))); + 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)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername)); + if (r->in.servername) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename)); + if (r->in.sharename) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } } if (flags & NDR_OUT) { @@ -2293,53 +3337,53 @@ NTSTATUS ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_R NTSTATUS ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_Remove *r) { - uint32_t _ptr_server; - uint32_t _ptr_share; - TALLOC_CTX *_mem_save_server_0; - TALLOC_CTX *_mem_save_share_0; + uint32_t _ptr_servername; + uint32_t _ptr_sharename; + TALLOC_CTX *_mem_save_servername_0; + TALLOC_CTX *_mem_save_sharename_0; if (flags & NDR_IN) { - NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path)); - NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path)); - if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) { - 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)); - } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16)); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server)); - if (_ptr_server) { - NDR_PULL_ALLOC(ndr, r->in.server); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path)); + if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t))); + 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)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername)); + if (_ptr_servername) { + NDR_PULL_ALLOC(ndr, r->in.servername); } else { - r->in.server = NULL; - } - if (r->in.server) { - _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0); - NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server)); - NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server)); - if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) { - 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)); - } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0); + r->in.servername = NULL; + } + if (r->in.servername) { + _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); + if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0); } - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share)); - if (_ptr_share) { - NDR_PULL_ALLOC(ndr, r->in.share); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename)); + if (_ptr_sharename) { + NDR_PULL_ALLOC(ndr, r->in.sharename); } else { - r->in.share = NULL; - } - if (r->in.share) { - _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0); - NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share)); - NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share)); - if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) { - 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)); + r->in.sharename = NULL; + } + if (r->in.sharename) { + _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename)); + if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) { + 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)); } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0); + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0); } } if (flags & NDR_OUT) { @@ -2358,20 +3402,20 @@ _PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "dfs_Remove"); ndr->depth++; - ndr_print_ptr(ndr, "path", r->in.path); + ndr_print_ptr(ndr, "dfs_entry_path", r->in.dfs_entry_path); ndr->depth++; - ndr_print_string(ndr, "path", r->in.path); + ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path); ndr->depth--; - ndr_print_ptr(ndr, "server", r->in.server); + ndr_print_ptr(ndr, "servername", r->in.servername); ndr->depth++; - if (r->in.server) { - ndr_print_string(ndr, "server", r->in.server); + if (r->in.servername) { + ndr_print_string(ndr, "servername", r->in.servername); } ndr->depth--; - ndr_print_ptr(ndr, "share", r->in.share); + ndr_print_ptr(ndr, "sharename", r->in.sharename); ndr->depth++; - if (r->in.share) { - ndr_print_string(ndr, "share", r->in.share); + if (r->in.sharename) { + ndr_print_string(ndr, "sharename", r->in.sharename); } ndr->depth--; ndr->depth--; @@ -2388,6 +3432,28 @@ _PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int NTSTATUS ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_SetInfo *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16))); + 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)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername)); + if (r->in.servername) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename)); + if (r->in.sharename) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level)); + if (r->in.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; + NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level)); + NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); @@ -2397,7 +3463,64 @@ NTSTATUS ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_ NTSTATUS ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs_SetInfo *r) { + uint32_t _ptr_servername; + uint32_t _ptr_sharename; + TALLOC_CTX *_mem_save_servername_0; + TALLOC_CTX *_mem_save_sharename_0; + TALLOC_CTX *_mem_save_info_0; if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path)); + if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t))); + 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)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername)); + if (_ptr_servername) { + NDR_PULL_ALLOC(ndr, r->in.servername); + } else { + r->in.servername = NULL; + } + if (r->in.servername) { + _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); + if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename)); + if (_ptr_sharename) { + NDR_PULL_ALLOC(ndr, r->in.sharename); + } else { + r->in.sharename = NULL; + } + if (r->in.sharename) { + _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename)); + if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0); + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.info); + } + _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level)); + NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); @@ -2415,6 +3538,25 @@ _PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "dfs_SetInfo"); ndr->depth++; + ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path); + ndr_print_ptr(ndr, "servername", r->in.servername); + ndr->depth++; + if (r->in.servername) { + ndr_print_string(ndr, "servername", r->in.servername); + } + ndr->depth--; + ndr_print_ptr(ndr, "sharename", r->in.sharename); + ndr->depth++; + if (r->in.sharename) { + ndr_print_string(ndr, "sharename", r->in.sharename); + } + ndr->depth--; + ndr_print_uint32(ndr, "level", r->in.level); + ndr_print_ptr(ndr, "info", r->in.info); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->in.info, r->in.level); + ndr_print_dfs_Info(ndr, "info", r->in.info); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { @@ -2429,24 +3571,23 @@ _PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int NTSTATUS ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_GetInfo *r) { if (flags & NDR_IN) { - if (r->in.path == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16))); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server)); - if (r->in.server) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16))); + 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)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername)); + if (r->in.servername) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share)); - if (r->in.share) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16))); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename)); + if (r->in.sharename) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16))); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level)); } @@ -2461,56 +3602,56 @@ NTSTATUS ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_ NTSTATUS ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs_GetInfo *r) { - uint32_t _ptr_server; - uint32_t _ptr_share; - TALLOC_CTX *_mem_save_server_0; - TALLOC_CTX *_mem_save_share_0; + uint32_t _ptr_servername; + uint32_t _ptr_sharename; + TALLOC_CTX *_mem_save_servername_0; + TALLOC_CTX *_mem_save_sharename_0; TALLOC_CTX *_mem_save_info_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); - NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path)); - NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path)); - if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) { - 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)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path)); + if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) { + 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)); } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16)); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server)); - if (_ptr_server) { - NDR_PULL_ALLOC(ndr, r->in.server); + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t))); + 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)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername)); + if (_ptr_servername) { + NDR_PULL_ALLOC(ndr, r->in.servername); } else { - r->in.server = NULL; - } - if (r->in.server) { - _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0); - NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server)); - NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server)); - if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) { - 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)); - } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0); + r->in.servername = NULL; + } + if (r->in.servername) { + _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); + if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0); } - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share)); - if (_ptr_share) { - NDR_PULL_ALLOC(ndr, r->in.share); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename)); + if (_ptr_sharename) { + NDR_PULL_ALLOC(ndr, r->in.sharename); } else { - r->in.share = NULL; - } - if (r->in.share) { - _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0); - NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share)); - NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share)); - if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) { - 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)); + r->in.sharename = NULL; + } + if (r->in.sharename) { + _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename)); + if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) { + 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)); } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0); + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0); } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level)); NDR_PULL_ALLOC(ndr, r->out.info); @@ -2540,20 +3681,17 @@ _PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "dfs_GetInfo"); ndr->depth++; - ndr_print_ptr(ndr, "path", r->in.path); - ndr->depth++; - ndr_print_string(ndr, "path", r->in.path); - ndr->depth--; - ndr_print_ptr(ndr, "server", r->in.server); + ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path); + ndr_print_ptr(ndr, "servername", r->in.servername); ndr->depth++; - if (r->in.server) { - ndr_print_string(ndr, "server", r->in.server); + if (r->in.servername) { + ndr_print_string(ndr, "servername", r->in.servername); } ndr->depth--; - ndr_print_ptr(ndr, "share", r->in.share); + ndr_print_ptr(ndr, "sharename", r->in.sharename); ndr->depth++; - if (r->in.share) { - ndr_print_string(ndr, "share", r->in.share); + if (r->in.sharename) { + ndr_print_string(ndr, "sharename", r->in.sharename); } ndr->depth--; ndr_print_uint32(ndr, "level", r->in.level); @@ -2582,10 +3720,6 @@ NTSTATUS ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enu if (r->in.info) { NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); } - NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown)); - if (r->in.unknown) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.unknown)); - } NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total)); if (r->in.total) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total)); @@ -2608,10 +3742,8 @@ NTSTATUS ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enu NTSTATUS ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r) { uint32_t _ptr_info; - uint32_t _ptr_unknown; uint32_t _ptr_total; TALLOC_CTX *_mem_save_info_0; - TALLOC_CTX *_mem_save_unknown_0; TALLOC_CTX *_mem_save_total_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -2630,18 +3762,6 @@ NTSTATUS ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r) NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); } - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown)); - if (_ptr_unknown) { - NDR_PULL_ALLOC(ndr, r->in.unknown); - } else { - r->in.unknown = NULL; - } - if (r->in.unknown) { - _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown, 0); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.unknown)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0); - } NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total)); if (_ptr_total) { NDR_PULL_ALLOC(ndr, r->in.total); @@ -2703,12 +3823,6 @@ _PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int fl ndr_print_dfs_EnumStruct(ndr, "info", r->in.info); } ndr->depth--; - ndr_print_ptr(ndr, "unknown", r->in.unknown); - ndr->depth++; - if (r->in.unknown) { - ndr_print_uint32(ndr, "unknown", *r->in.unknown); - } - ndr->depth--; ndr_print_ptr(ndr, "total", r->in.total); ndr->depth++; if (r->in.total) { @@ -2905,8 +4019,48 @@ _PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const cha NTSTATUS ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct dfs_AddFtRoot *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16))); + 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)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16))); + 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)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.unknown1)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown2)); + if (r->in.unknown2) { + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown2)); + if (*r->in.unknown2) { + NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2)); + } + } } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown2)); + if (r->out.unknown2) { + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown2)); + if (*r->out.unknown2) { + NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2)); + } + } NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NT_STATUS_OK; @@ -2914,9 +4068,104 @@ NTSTATUS ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct df NTSTATUS ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct dfs_AddFtRoot *r) { + uint32_t _ptr_unknown2; + TALLOC_CTX *_mem_save_unknown2_0; + TALLOC_CTX *_mem_save_unknown2_1; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); + if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername)); + if (ndr_get_array_length(ndr, &r->in.dns_servername) > ndr_get_array_size(ndr, &r->in.dns_servername)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t))); + 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)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname)); + if (ndr_get_array_length(ndr, &r->in.dfsname) > ndr_get_array_size(ndr, &r->in.dfsname)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare)); + if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment)); + if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_config_dn)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_config_dn)); + if (ndr_get_array_length(ndr, &r->in.dfs_config_dn) > ndr_get_array_size(ndr, &r->in.dfs_config_dn)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_config_dn), sizeof(uint16_t))); + 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)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.unknown1)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2)); + if (_ptr_unknown2) { + NDR_PULL_ALLOC(ndr, r->in.unknown2); + } else { + r->in.unknown2 = NULL; + } + if (r->in.unknown2) { + _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown2, 0); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2)); + if (_ptr_unknown2) { + NDR_PULL_ALLOC(ndr, *r->in.unknown2); + } else { + *r->in.unknown2 = NULL; + } + if (*r->in.unknown2) { + _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown2, 0); + NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0); + } } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2)); + if (_ptr_unknown2) { + NDR_PULL_ALLOC(ndr, r->out.unknown2); + } else { + r->out.unknown2 = NULL; + } + if (r->out.unknown2) { + _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown2, 0); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2)); + if (_ptr_unknown2) { + NDR_PULL_ALLOC(ndr, *r->out.unknown2); + } else { + *r->out.unknown2 = NULL; + } + if (*r->out.unknown2) { + _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown2, 0); + NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0); + } NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NT_STATUS_OK; @@ -2932,11 +4181,41 @@ _PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, i if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "dfs_AddFtRoot"); ndr->depth++; + ndr_print_string(ndr, "servername", r->in.servername); + ndr_print_string(ndr, "dns_servername", r->in.dns_servername); + ndr_print_string(ndr, "dfsname", r->in.dfsname); + ndr_print_string(ndr, "rootshare", r->in.rootshare); + ndr_print_string(ndr, "comment", r->in.comment); + ndr_print_string(ndr, "dfs_config_dn", r->in.dfs_config_dn); + ndr_print_uint8(ndr, "unknown1", r->in.unknown1); + ndr_print_uint32(ndr, "flags", r->in.flags); + ndr_print_ptr(ndr, "unknown2", r->in.unknown2); + ndr->depth++; + if (r->in.unknown2) { + ndr_print_ptr(ndr, "unknown2", *r->in.unknown2); + ndr->depth++; + if (*r->in.unknown2) { + ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->in.unknown2); + } + ndr->depth--; + } + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "dfs_AddFtRoot"); ndr->depth++; + ndr_print_ptr(ndr, "unknown2", r->out.unknown2); + ndr->depth++; + if (r->out.unknown2) { + ndr_print_ptr(ndr, "unknown2", *r->out.unknown2); + ndr->depth++; + if (*r->out.unknown2) { + ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->out.unknown2); + } + ndr->depth--; + } + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } @@ -2946,8 +4225,39 @@ _PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, i NTSTATUS ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveFtRoot *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16))); + 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)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown)); + if (r->in.unknown) { + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown)); + if (*r->in.unknown) { + NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown)); + } + } } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown)); + if (r->out.unknown) { + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown)); + if (*r->out.unknown) { + NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown)); + } + } NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NT_STATUS_OK; @@ -2955,9 +4265,89 @@ NTSTATUS ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct NTSTATUS ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveFtRoot *r) { + uint32_t _ptr_unknown; + TALLOC_CTX *_mem_save_unknown_0; + TALLOC_CTX *_mem_save_unknown_1; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); + if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername)); + if (ndr_get_array_length(ndr, &r->in.dns_servername) > ndr_get_array_size(ndr, &r->in.dns_servername)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t))); + 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)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname)); + if (ndr_get_array_length(ndr, &r->in.dfsname) > ndr_get_array_size(ndr, &r->in.dfsname)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare)); + if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown)); + if (_ptr_unknown) { + NDR_PULL_ALLOC(ndr, r->in.unknown); + } else { + r->in.unknown = NULL; + } + if (r->in.unknown) { + _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown, 0); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown)); + if (_ptr_unknown) { + NDR_PULL_ALLOC(ndr, *r->in.unknown); + } else { + *r->in.unknown = NULL; + } + if (*r->in.unknown) { + _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown, 0); + NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0); + } } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown)); + if (_ptr_unknown) { + NDR_PULL_ALLOC(ndr, r->out.unknown); + } else { + r->out.unknown = NULL; + } + if (r->out.unknown) { + _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown, 0); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown)); + if (_ptr_unknown) { + NDR_PULL_ALLOC(ndr, *r->out.unknown); + } else { + *r->out.unknown = NULL; + } + if (*r->out.unknown) { + _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown, 0); + NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0); + } NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NT_STATUS_OK; @@ -2973,11 +4363,38 @@ _PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "dfs_RemoveFtRoot"); ndr->depth++; + ndr_print_string(ndr, "servername", r->in.servername); + ndr_print_string(ndr, "dns_servername", r->in.dns_servername); + ndr_print_string(ndr, "dfsname", r->in.dfsname); + ndr_print_string(ndr, "rootshare", r->in.rootshare); + ndr_print_uint32(ndr, "flags", r->in.flags); + ndr_print_ptr(ndr, "unknown", r->in.unknown); + ndr->depth++; + if (r->in.unknown) { + ndr_print_ptr(ndr, "unknown", *r->in.unknown); + ndr->depth++; + if (*r->in.unknown) { + ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->in.unknown); + } + ndr->depth--; + } + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "dfs_RemoveFtRoot"); ndr->depth++; + ndr_print_ptr(ndr, "unknown", r->out.unknown); + ndr->depth++; + if (r->out.unknown) { + ndr_print_ptr(ndr, "unknown", *r->out.unknown); + ndr->depth++; + if (*r->out.unknown) { + ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->out.unknown); + } + ndr->depth--; + } + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } @@ -2987,6 +4404,19 @@ _PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name NTSTATUS ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct dfs_AddStdRoot *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); @@ -2997,6 +4427,28 @@ NTSTATUS ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct d NTSTATUS ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct dfs_AddStdRoot *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); + if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare)); + if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment)); + if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); @@ -3014,6 +4466,10 @@ _PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "dfs_AddStdRoot"); ndr->depth++; + ndr_print_string(ndr, "servername", r->in.servername); + ndr_print_string(ndr, "rootshare", r->in.rootshare); + ndr_print_string(ndr, "comment", r->in.comment); + ndr_print_uint32(ndr, "flags", r->in.flags); ndr->depth--; } if (flags & NDR_OUT) { @@ -3028,6 +4484,15 @@ _PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, NTSTATUS ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveStdRoot *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); @@ -3038,6 +4503,21 @@ NTSTATUS ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struc NTSTATUS ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveStdRoot *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); + if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare)); + if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); @@ -3055,6 +4535,9 @@ _PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *nam if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "dfs_RemoveStdRoot"); ndr->depth++; + ndr_print_string(ndr, "servername", r->in.servername); + ndr_print_string(ndr, "rootshare", r->in.rootshare); + ndr_print_uint32(ndr, "flags", r->in.flags); ndr->depth--; } if (flags & NDR_OUT) { @@ -3069,6 +4552,12 @@ _PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *nam NTSTATUS ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r) { if (flags & NDR_IN) { + if (r->in.servername == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); @@ -3079,6 +4568,14 @@ NTSTATUS ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const s NTSTATUS ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, struct dfs_ManagerInitialize *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); + if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); @@ -3096,6 +4593,11 @@ _PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "dfs_ManagerInitialize"); ndr->depth++; + ndr_print_ptr(ndr, "servername", r->in.servername); + ndr->depth++; + ndr_print_string(ndr, "servername", r->in.servername); + ndr->depth--; + ndr_print_uint32(ndr, "flags", r->in.flags); ndr->depth--; } if (flags & NDR_OUT) { @@ -3110,6 +4612,22 @@ _PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char NTSTATUS ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const struct dfs_AddStdRootForced *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.store, ndr_charset_length(r->in.store, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); @@ -3120,6 +4638,34 @@ NTSTATUS ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const st NTSTATUS ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, struct dfs_AddStdRootForced *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); + if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare)); + if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment)); + if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.store)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.store)); + if (ndr_get_array_length(ndr, &r->in.store) > ndr_get_array_size(ndr, &r->in.store)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.store), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.store, ndr_get_array_length(ndr, &r->in.store), sizeof(uint16_t), CH_UTF16)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); @@ -3137,6 +4683,10 @@ _PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char * if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "dfs_AddStdRootForced"); ndr->depth++; + ndr_print_string(ndr, "servername", r->in.servername); + ndr_print_string(ndr, "rootshare", r->in.rootshare); + ndr_print_string(ndr, "comment", r->in.comment); + ndr_print_string(ndr, "store", r->in.store); ndr->depth--; } if (flags & NDR_OUT) { @@ -3233,6 +4783,14 @@ _PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name NTSTATUS ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct dfs_FlushFtTable *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); @@ -3243,6 +4801,20 @@ NTSTATUS ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct NTSTATUS ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struct dfs_FlushFtTable *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); + if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare)); + if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); @@ -3260,6 +4832,8 @@ _PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "dfs_FlushFtTable"); ndr->depth++; + ndr_print_string(ndr, "servername", r->in.servername); + ndr_print_string(ndr, "rootshare", r->in.rootshare); ndr->depth--; } if (flags & NDR_OUT) { @@ -3353,14 +4927,13 @@ _PUBLIC_ void ndr_print_dfs_Remove2(struct ndr_print *ndr, const char *name, int ndr->depth--; } -NTSTATUS ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r) +_PUBLIC_ NTSTATUS ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r) { if (flags & NDR_IN) { - if (r->in.name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16))); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name, ndr_charset_length(r->in.name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16))); + 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)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info)); @@ -3386,7 +4959,7 @@ NTSTATUS ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_E return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r) +_PUBLIC_ NTSTATUS ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r) { uint32_t _ptr_info; uint32_t _ptr_total; @@ -3395,13 +4968,13 @@ NTSTATUS ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx if (flags & NDR_IN) { ZERO_STRUCT(r->out); - NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name)); - NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name)); - if (ndr_get_array_length(ndr, &r->in.name) > ndr_get_array_size(ndr, &r->in.name)) { - 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.name), ndr_get_array_length(ndr, &r->in.name)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_name)); + if (ndr_get_array_length(ndr, &r->in.dfs_name) > ndr_get_array_size(ndr, &r->in.dfs_name)) { + 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)); } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.name), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name, ndr_get_array_length(ndr, &r->in.name), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_name), sizeof(uint16_t))); + 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)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); @@ -3469,10 +5042,7 @@ _PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "dfs_EnumEx"); ndr->depth++; - ndr_print_ptr(ndr, "name", r->in.name); - ndr->depth++; - ndr_print_string(ndr, "name", r->in.name); - ndr->depth--; + ndr_print_string(ndr, "dfs_name", r->in.dfs_name); ndr_print_uint32(ndr, "level", r->in.level); ndr_print_uint32(ndr, "bufsize", r->in.bufsize); ndr_print_ptr(ndr, "info", r->in.info); -- cgit From 68821746d8f79e7480b936d215875eb17af7eccf Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 18 Aug 2007 10:33:44 +0000 Subject: r24538: merge from SAMBA_4_0: rename struct dcerpc_interface_call -> struct ndr_interface_call and move it to librpc/ndr/libndr.h metze (This used to be commit 24e096b3659c3070a1ce029174fba51ae59e89ad) --- source3/librpc/gen_ndr/ndr_dfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/librpc/gen_ndr/ndr_dfs.c') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index 137c189c46..1ec20d562c 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -5121,7 +5121,7 @@ _PUBLIC_ void ndr_print_dfs_SetInfo2(struct ndr_print *ndr, const char *name, in ndr->depth--; } -const struct dcerpc_interface_call netdfs_calls[] = { +const struct ndr_interface_call netdfs_calls[] = { { "dfs_GetManagerVersion", sizeof(struct dfs_GetManagerVersion), -- cgit From 24c594d0b3e5409f5622f3b682dcc4cda0412d01 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 18 Aug 2007 12:25:59 +0000 Subject: r24541: merge from SAMBA_4_0: rename struct dcerpc_endpoint_list/struct dcerpc_authservice_list into ndr_interface_string_array and move it to libndr.h metze (This used to be commit 9fec0d6c2ceaf66752baa5c8a34821bef2c5b833) --- source3/librpc/gen_ndr/ndr_dfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_dfs.c') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index 1ec20d562c..2f9fdeea31 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -5313,7 +5313,7 @@ const char * const netdfs_endpoint_strings[] = { "ncacn_np:[\\pipe\\netdfs]", }; -const struct dcerpc_endpoint_list netdfs_endpoints = { +const struct ndr_interface_string_array netdfs_endpoints = { .count = 1, .names = netdfs_endpoint_strings }; @@ -5322,7 +5322,7 @@ const char * const netdfs_authservice_strings[] = { "host", }; -const struct dcerpc_authservice_list netdfs_authservices = { +const struct ndr_interface_string_array netdfs_authservices = { .count = 1, .names = netdfs_authservice_strings }; -- cgit From c2628e19a77f2bec3f14d0f670717195c7299a90 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 19 Aug 2007 20:47:31 +0000 Subject: r24552: merge from SAMBA_4_0: rename dcerpc_interface_table -> ndr_interface_table rename dcerpc_interface_list -> ndr_interface_list and move them to libndr.h metze (This used to be commit f57d23d0f1b1c7a435f3a4ad801e58519cc92a77) --- source3/librpc/gen_ndr/ndr_dfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/librpc/gen_ndr/ndr_dfs.c') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index 2f9fdeea31..b841fb875e 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -5328,7 +5328,7 @@ const struct ndr_interface_string_array netdfs_authservices = { }; -const struct dcerpc_interface_table dcerpc_table_netdfs = { +const struct ndr_interface_table dcerpc_table_netdfs = { .name = "netdfs", .syntax_id = { {0x4fc742e0,0x4a10,0x11cf,{0x82,0x73},{0x00,0xaa,0x00,0x4a,0xe6,0x73}}, -- cgit From 2f3511c56e8a508c678f90e8fbd16116685b8a2b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 19 Aug 2007 21:23:28 +0000 Subject: r24558: merge from SAMBA_4_0: rename 'dcerpc_table_' -> 'ndr_table_' metze (This used to be commit 4e5908cd596f97d3bb73bd9c0bf3d360944f7810) --- source3/librpc/gen_ndr/ndr_dfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/librpc/gen_ndr/ndr_dfs.c') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index b841fb875e..98489b3310 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -5328,7 +5328,7 @@ const struct ndr_interface_string_array netdfs_authservices = { }; -const struct ndr_interface_table dcerpc_table_netdfs = { +const struct ndr_interface_table ndr_table_netdfs = { .name = "netdfs", .syntax_id = { {0x4fc742e0,0x4a10,0x11cf,{0x82,0x73},{0x00,0xaa,0x00,0x4a,0xe6,0x73}}, -- cgit From 8da26d3f96ac66e3f0be8aaec209867d3f285e49 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 19 Aug 2007 22:10:11 +0000 Subject: r24561: merge from SAMBA_4_0: rename some DCERPC_ prefixes into NDR_ metze (This used to be commit 8f07b8ab658ae3d63487ca5fb20065318cdd9d0e) --- source3/librpc/gen_ndr/ndr_dfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_dfs.c') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index 98489b3310..10678e48a3 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -5332,9 +5332,9 @@ const struct ndr_interface_table ndr_table_netdfs = { .name = "netdfs", .syntax_id = { {0x4fc742e0,0x4a10,0x11cf,{0x82,0x73},{0x00,0xaa,0x00,0x4a,0xe6,0x73}}, - DCERPC_NETDFS_VERSION + NDR_NETDFS_VERSION }, - .helpstring = DCERPC_NETDFS_HELPSTRING, + .helpstring = NDR_NETDFS_HELPSTRING, .num_calls = 23, .calls = netdfs_calls, .endpoints = &netdfs_endpoints, -- cgit From 725cbf6cc67ded9d1a68e2ef946cba22e613e199 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 19 Sep 2007 20:03:43 +0000 Subject: r25245: rerun 'make idl' metze (This used to be commit af91f4fd08aae117d9b48eade4d49762c9634cbc) --- source3/librpc/gen_ndr/ndr_dfs.c | 274 +++++++++++++++++++-------------------- 1 file changed, 137 insertions(+), 137 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_dfs.c') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index 10678e48a3..959abdc62d 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -3,13 +3,13 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_dfs.h" -NTSTATUS ndr_push_dfs_ManagerVersion(struct ndr_push *ndr, int ndr_flags, enum dfs_ManagerVersion r) +static NTSTATUS ndr_push_dfs_ManagerVersion(struct ndr_push *ndr, int ndr_flags, enum dfs_ManagerVersion r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_ManagerVersion(struct ndr_pull *ndr, int ndr_flags, enum dfs_ManagerVersion *r) +static NTSTATUS ndr_pull_dfs_ManagerVersion(struct ndr_pull *ndr, int ndr_flags, enum dfs_ManagerVersion *r) { uint32_t v; NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); @@ -29,7 +29,7 @@ _PUBLIC_ void ndr_print_dfs_ManagerVersion(struct ndr_print *ndr, const char *na ndr_print_enum(ndr, name, "ENUM", val, r); } -NTSTATUS ndr_push_dfs_Info0(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info0 *r) +static NTSTATUS ndr_push_dfs_Info0(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info0 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); @@ -39,7 +39,7 @@ NTSTATUS ndr_push_dfs_Info0(struct ndr_push *ndr, int ndr_flags, const struct df return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info0(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info0 *r) +static NTSTATUS ndr_pull_dfs_Info0(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info0 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); @@ -56,7 +56,7 @@ _PUBLIC_ void ndr_print_dfs_Info0(struct ndr_print *ndr, const char *name, const ndr->depth--; } -NTSTATUS ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info1 *r) +static NTSTATUS ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info1 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -73,7 +73,7 @@ NTSTATUS ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const struct df return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info1 *r) +static NTSTATUS ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info1 *r) { uint32_t _ptr_path; TALLOC_CTX *_mem_save_path_0; @@ -143,7 +143,7 @@ _PUBLIC_ void ndr_print_dfs_VolumeState(struct ndr_print *ndr, const char *name, ndr->depth--; } -NTSTATUS ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info2 *r) +static NTSTATUS ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info2 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -169,7 +169,7 @@ NTSTATUS ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct df return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r) +static NTSTATUS ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r) { uint32_t _ptr_path; TALLOC_CTX *_mem_save_path_0; @@ -266,7 +266,7 @@ _PUBLIC_ void ndr_print_dfs_StorageState(struct ndr_print *ndr, const char *name ndr->depth--; } -NTSTATUS ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo *r) +static NTSTATUS ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -291,7 +291,7 @@ NTSTATUS ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const str return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r) +static NTSTATUS ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r) { uint32_t _ptr_server; TALLOC_CTX *_mem_save_server_0; @@ -362,7 +362,7 @@ _PUBLIC_ void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name, ndr->depth--; } -NTSTATUS ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info3 *r) +static NTSTATUS ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info3 *r) { uint32_t cntr_stores_1; if (ndr_flags & NDR_SCALARS) { @@ -399,7 +399,7 @@ NTSTATUS ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct df return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r) +static NTSTATUS ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r) { uint32_t _ptr_path; TALLOC_CTX *_mem_save_path_0; @@ -518,7 +518,7 @@ _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const ndr->depth--; } -NTSTATUS ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info4 *r) +static NTSTATUS ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info4 *r) { uint32_t cntr_stores_1; if (ndr_flags & NDR_SCALARS) { @@ -558,7 +558,7 @@ NTSTATUS ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct df return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info4 *r) +static NTSTATUS ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info4 *r) { uint32_t _ptr_path; TALLOC_CTX *_mem_save_path_0; @@ -708,7 +708,7 @@ _PUBLIC_ void ndr_print_dfs_PropertyFlags(struct ndr_print *ndr, const char *nam ndr->depth--; } -NTSTATUS ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info5 *r) +static NTSTATUS ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info5 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -739,7 +739,7 @@ NTSTATUS ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct df return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info5 *r) +static NTSTATUS ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info5 *r) { uint32_t _ptr_path; TALLOC_CTX *_mem_save_path_0; @@ -821,13 +821,13 @@ _PUBLIC_ void ndr_print_dfs_Info5(struct ndr_print *ndr, const char *name, const ndr->depth--; } -NTSTATUS ndr_push_dfs_Target_PriorityClass(struct ndr_push *ndr, int ndr_flags, enum dfs_Target_PriorityClass r) +static NTSTATUS ndr_push_dfs_Target_PriorityClass(struct ndr_push *ndr, int ndr_flags, enum dfs_Target_PriorityClass r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Target_PriorityClass(struct ndr_pull *ndr, int ndr_flags, enum dfs_Target_PriorityClass *r) +static NTSTATUS ndr_pull_dfs_Target_PriorityClass(struct ndr_pull *ndr, int ndr_flags, enum dfs_Target_PriorityClass *r) { uint32_t v; NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); @@ -850,7 +850,7 @@ _PUBLIC_ void ndr_print_dfs_Target_PriorityClass(struct ndr_print *ndr, const ch ndr_print_enum(ndr, name, "ENUM", val, r); } -NTSTATUS ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags, const struct dfs_Target_Priority *r) +static NTSTATUS ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags, const struct dfs_Target_Priority *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -863,7 +863,7 @@ NTSTATUS ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags, const return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Target_Priority(struct ndr_pull *ndr, int ndr_flags, struct dfs_Target_Priority *r) +static NTSTATUS ndr_pull_dfs_Target_Priority(struct ndr_pull *ndr, int ndr_flags, struct dfs_Target_Priority *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -886,7 +886,7 @@ _PUBLIC_ void ndr_print_dfs_Target_Priority(struct ndr_print *ndr, const char *n ndr->depth--; } -NTSTATUS ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo2 *r) +static NTSTATUS ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo2 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -899,7 +899,7 @@ NTSTATUS ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const st return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo2 *r) +static NTSTATUS ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo2 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -921,7 +921,7 @@ _PUBLIC_ void ndr_print_dfs_StorageInfo2(struct ndr_print *ndr, const char *name ndr->depth--; } -NTSTATUS ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info6 *r) +static NTSTATUS ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info6 *r) { uint32_t cntr_stores_1; if (ndr_flags & NDR_SCALARS) { @@ -963,7 +963,7 @@ NTSTATUS ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const struct df return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info6 *r) +static NTSTATUS ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info6 *r) { uint32_t _ptr_entry_path; TALLOC_CTX *_mem_save_entry_path_0; @@ -1091,7 +1091,7 @@ _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const ndr->depth--; } -NTSTATUS ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info7 *r) +static NTSTATUS ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info7 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1103,7 +1103,7 @@ NTSTATUS ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const struct df return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info7 *r) +static NTSTATUS ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info7 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -1123,7 +1123,7 @@ _PUBLIC_ void ndr_print_dfs_Info7(struct ndr_print *ndr, const char *name, const ndr->depth--; } -NTSTATUS ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r) +static NTSTATUS ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1140,7 +1140,7 @@ NTSTATUS ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r) +static NTSTATUS ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r) { uint32_t _ptr_comment; TALLOC_CTX *_mem_save_comment_0; @@ -1183,7 +1183,7 @@ _PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, con ndr->depth--; } -NTSTATUS ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r) +static NTSTATUS ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1194,7 +1194,7 @@ NTSTATUS ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r) +static NTSTATUS ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -1213,7 +1213,7 @@ _PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, con ndr->depth--; } -NTSTATUS ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r) +static NTSTATUS ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1224,7 +1224,7 @@ NTSTATUS ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r) +static NTSTATUS ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -1243,7 +1243,7 @@ _PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, con ndr->depth--; } -NTSTATUS ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info103 *r) +static NTSTATUS ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info103 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1254,7 +1254,7 @@ NTSTATUS ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const struct return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info103(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info103 *r) +static NTSTATUS ndr_pull_dfs_Info103(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info103 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -1273,7 +1273,7 @@ _PUBLIC_ void ndr_print_dfs_Info103(struct ndr_print *ndr, const char *name, con ndr->depth--; } -NTSTATUS ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info104 *r) +static NTSTATUS ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info104 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1284,7 +1284,7 @@ NTSTATUS ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const struct return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info104(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info104 *r) +static NTSTATUS ndr_pull_dfs_Info104(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info104 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -1303,7 +1303,7 @@ _PUBLIC_ void ndr_print_dfs_Info104(struct ndr_print *ndr, const char *name, con ndr->depth--; } -NTSTATUS ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info105 *r) +static NTSTATUS ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info105 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1324,7 +1324,7 @@ NTSTATUS ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info105(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info105 *r) +static NTSTATUS ndr_pull_dfs_Info105(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info105 *r) { uint32_t _ptr_comment; TALLOC_CTX *_mem_save_comment_0; @@ -1375,7 +1375,7 @@ _PUBLIC_ void ndr_print_dfs_Info105(struct ndr_print *ndr, const char *name, con ndr->depth--; } -NTSTATUS ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info106 *r) +static NTSTATUS ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info106 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1387,7 +1387,7 @@ NTSTATUS ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const struct return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info106(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info106 *r) +static NTSTATUS ndr_pull_dfs_Info106(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info106 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -1408,7 +1408,7 @@ _PUBLIC_ void ndr_print_dfs_Info106(struct ndr_print *ndr, const char *name, con ndr->depth--; } -NTSTATUS ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info200 *r) +static NTSTATUS ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info200 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1425,7 +1425,7 @@ NTSTATUS ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r) +static NTSTATUS ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r) { uint32_t _ptr_dom_root; TALLOC_CTX *_mem_save_dom_root_0; @@ -1468,13 +1468,13 @@ _PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, con ndr->depth--; } -NTSTATUS ndr_push_dfs_VolumeFlavor(struct ndr_push *ndr, int ndr_flags, enum dfs_VolumeFlavor r) +static NTSTATUS ndr_push_dfs_VolumeFlavor(struct ndr_push *ndr, int ndr_flags, enum dfs_VolumeFlavor r) { NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_VolumeFlavor(struct ndr_pull *ndr, int ndr_flags, enum dfs_VolumeFlavor *r) +static NTSTATUS ndr_pull_dfs_VolumeFlavor(struct ndr_pull *ndr, int ndr_flags, enum dfs_VolumeFlavor *r) { uint16_t v; NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); @@ -1493,7 +1493,7 @@ _PUBLIC_ void ndr_print_dfs_VolumeFlavor(struct ndr_print *ndr, const char *name ndr_print_enum(ndr, name, "ENUM", val, r); } -NTSTATUS ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info300 *r) +static NTSTATUS ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info300 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1511,7 +1511,7 @@ NTSTATUS ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r) +static NTSTATUS ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r) { uint32_t _ptr_dom_root; TALLOC_CTX *_mem_save_dom_root_0; @@ -1556,7 +1556,7 @@ _PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, con ndr->depth--; } -NTSTATUS ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_Info *r) +static NTSTATUS ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_Info *r) { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); @@ -1726,7 +1726,7 @@ NTSTATUS ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_ return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info *r) +static NTSTATUS ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info *r) { int level; uint32_t _level; @@ -2196,7 +2196,7 @@ _PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const } } -NTSTATUS ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray1 *r) +static NTSTATUS ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray1 *r) { uint32_t cntr_s_1; if (ndr_flags & NDR_SCALARS) { @@ -2218,7 +2218,7 @@ NTSTATUS ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const stru return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r) +static NTSTATUS ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r) { uint32_t _ptr_s; uint32_t cntr_s_1; @@ -2283,7 +2283,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, ndr->depth--; } -NTSTATUS ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray2 *r) +static NTSTATUS ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray2 *r) { uint32_t cntr_s_1; if (ndr_flags & NDR_SCALARS) { @@ -2305,7 +2305,7 @@ NTSTATUS ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const stru return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r) +static NTSTATUS ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r) { uint32_t _ptr_s; uint32_t cntr_s_1; @@ -2370,7 +2370,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, ndr->depth--; } -NTSTATUS ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray3 *r) +static NTSTATUS ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray3 *r) { uint32_t cntr_s_1; if (ndr_flags & NDR_SCALARS) { @@ -2392,7 +2392,7 @@ NTSTATUS ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const stru return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r) +static NTSTATUS ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r) { uint32_t _ptr_s; uint32_t cntr_s_1; @@ -2457,7 +2457,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, ndr->depth--; } -NTSTATUS ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray4 *r) +static NTSTATUS ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray4 *r) { uint32_t cntr_s_1; if (ndr_flags & NDR_SCALARS) { @@ -2479,7 +2479,7 @@ NTSTATUS ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const stru return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r) +static NTSTATUS ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r) { uint32_t _ptr_s; uint32_t cntr_s_1; @@ -2544,7 +2544,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, ndr->depth--; } -NTSTATUS ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r) +static NTSTATUS ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r) { uint32_t cntr_s_1; if (ndr_flags & NDR_SCALARS) { @@ -2566,7 +2566,7 @@ NTSTATUS ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const st return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r) +static NTSTATUS ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r) { uint32_t _ptr_s; uint32_t cntr_s_1; @@ -2631,7 +2631,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name ndr->depth--; } -NTSTATUS ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray300 *r) +static NTSTATUS ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray300 *r) { uint32_t cntr_s_1; if (ndr_flags & NDR_SCALARS) { @@ -2653,7 +2653,7 @@ NTSTATUS ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const st return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r) +static NTSTATUS ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r) { uint32_t _ptr_s; uint32_t cntr_s_1; @@ -2718,7 +2718,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name ndr->depth--; } -NTSTATUS ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union dfs_EnumInfo *r) +static NTSTATUS ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union dfs_EnumInfo *r) { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); @@ -2798,7 +2798,7 @@ NTSTATUS ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union dfs_EnumInfo *r) +static NTSTATUS ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union dfs_EnumInfo *r) { int level; uint32_t _level; @@ -3007,7 +3007,7 @@ _PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, co } } -NTSTATUS ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumStruct *r) +static NTSTATUS ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumStruct *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -3021,7 +3021,7 @@ NTSTATUS ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const stru return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r) +static NTSTATUS ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -3045,7 +3045,7 @@ _PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, ndr->depth--; } -NTSTATUS ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_UnknownStruct *r) +static NTSTATUS ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_UnknownStruct *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -3063,7 +3063,7 @@ NTSTATUS ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, const s return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_UnknownStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_UnknownStruct *r) +static NTSTATUS ndr_pull_dfs_UnknownStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_UnknownStruct *r) { uint32_t _ptr_unknown2; TALLOC_CTX *_mem_save_unknown2_0; @@ -3164,7 +3164,7 @@ _PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char ndr->depth--; } -NTSTATUS ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add *r) +static NTSTATUS ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add *r) { if (flags & NDR_IN) { if (r->in.path == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; @@ -3199,7 +3199,7 @@ NTSTATUS ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Add(struct ndr_pull *ndr, int flags, struct dfs_Add *r) +static NTSTATUS ndr_pull_dfs_Add(struct ndr_pull *ndr, int flags, struct dfs_Add *r) { uint32_t _ptr_share; uint32_t _ptr_comment; @@ -3306,7 +3306,7 @@ _PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int fla ndr->depth--; } -NTSTATUS ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r) +static NTSTATUS ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r) { if (flags & NDR_IN) { if (r->in.dfs_entry_path == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; @@ -3335,7 +3335,7 @@ NTSTATUS ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_R return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_Remove *r) +static NTSTATUS ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_Remove *r) { uint32_t _ptr_servername; uint32_t _ptr_sharename; @@ -3429,7 +3429,7 @@ _PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int ndr->depth--; } -NTSTATUS ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_SetInfo *r) +static NTSTATUS ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_SetInfo *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16))); @@ -3461,7 +3461,7 @@ NTSTATUS ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_ return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs_SetInfo *r) +static NTSTATUS ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs_SetInfo *r) { uint32_t _ptr_servername; uint32_t _ptr_sharename; @@ -3568,7 +3568,7 @@ _PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int ndr->depth--; } -NTSTATUS ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_GetInfo *r) +static NTSTATUS ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_GetInfo *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16))); @@ -3600,7 +3600,7 @@ NTSTATUS ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_ return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs_GetInfo *r) +static NTSTATUS ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs_GetInfo *r) { uint32_t _ptr_servername; uint32_t _ptr_sharename; @@ -3711,7 +3711,7 @@ _PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int ndr->depth--; } -NTSTATUS ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enum *r) +static NTSTATUS ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enum *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level)); @@ -3739,7 +3739,7 @@ NTSTATUS ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enu return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r) +static NTSTATUS ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r) { uint32_t _ptr_info; uint32_t _ptr_total; @@ -3852,7 +3852,7 @@ _PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int fl ndr->depth--; } -NTSTATUS ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_Rename *r) +static NTSTATUS ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_Rename *r) { if (flags & NDR_IN) { } @@ -3862,7 +3862,7 @@ NTSTATUS ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_R return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Rename(struct ndr_pull *ndr, int flags, struct dfs_Rename *r) +static NTSTATUS ndr_pull_dfs_Rename(struct ndr_pull *ndr, int flags, struct dfs_Rename *r) { if (flags & NDR_IN) { } @@ -3893,7 +3893,7 @@ _PUBLIC_ void ndr_print_dfs_Rename(struct ndr_print *ndr, const char *name, int ndr->depth--; } -NTSTATUS ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Move *r) +static NTSTATUS ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Move *r) { if (flags & NDR_IN) { } @@ -3903,7 +3903,7 @@ NTSTATUS ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Mov return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Move(struct ndr_pull *ndr, int flags, struct dfs_Move *r) +static NTSTATUS ndr_pull_dfs_Move(struct ndr_pull *ndr, int flags, struct dfs_Move *r) { if (flags & NDR_IN) { } @@ -3934,7 +3934,7 @@ _PUBLIC_ void ndr_print_dfs_Move(struct ndr_print *ndr, const char *name, int fl ndr->depth--; } -NTSTATUS ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerGetConfigInfo *r) +static NTSTATUS ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerGetConfigInfo *r) { if (flags & NDR_IN) { } @@ -3944,7 +3944,7 @@ NTSTATUS ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, cons return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerGetConfigInfo *r) +static NTSTATUS ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerGetConfigInfo *r) { if (flags & NDR_IN) { } @@ -3975,7 +3975,7 @@ _PUBLIC_ void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print *ndr, const ch ndr->depth--; } -NTSTATUS ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerSendSiteInfo *r) +static NTSTATUS ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerSendSiteInfo *r) { if (flags & NDR_IN) { } @@ -3985,7 +3985,7 @@ NTSTATUS ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerSendSiteInfo *r) +static NTSTATUS ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerSendSiteInfo *r) { if (flags & NDR_IN) { } @@ -4016,7 +4016,7 @@ _PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const cha ndr->depth--; } -NTSTATUS ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct dfs_AddFtRoot *r) +static NTSTATUS ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct dfs_AddFtRoot *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); @@ -4066,7 +4066,7 @@ NTSTATUS ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct df return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct dfs_AddFtRoot *r) +static NTSTATUS ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct dfs_AddFtRoot *r) { uint32_t _ptr_unknown2; TALLOC_CTX *_mem_save_unknown2_0; @@ -4222,7 +4222,7 @@ _PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, i ndr->depth--; } -NTSTATUS ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveFtRoot *r) +static NTSTATUS ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveFtRoot *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); @@ -4263,7 +4263,7 @@ NTSTATUS ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveFtRoot *r) +static NTSTATUS ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveFtRoot *r) { uint32_t _ptr_unknown; TALLOC_CTX *_mem_save_unknown_0; @@ -4401,7 +4401,7 @@ _PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name ndr->depth--; } -NTSTATUS ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct dfs_AddStdRoot *r) +static NTSTATUS ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct dfs_AddStdRoot *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); @@ -4424,7 +4424,7 @@ NTSTATUS ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct d return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct dfs_AddStdRoot *r) +static NTSTATUS ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct dfs_AddStdRoot *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); @@ -4481,7 +4481,7 @@ _PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, ndr->depth--; } -NTSTATUS ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveStdRoot *r) +static NTSTATUS ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveStdRoot *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); @@ -4500,7 +4500,7 @@ NTSTATUS ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struc return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveStdRoot *r) +static NTSTATUS ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveStdRoot *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); @@ -4549,7 +4549,7 @@ _PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *nam ndr->depth--; } -NTSTATUS ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r) +static NTSTATUS ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r) { if (flags & NDR_IN) { if (r->in.servername == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; @@ -4565,7 +4565,7 @@ NTSTATUS ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const s return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, struct dfs_ManagerInitialize *r) +static NTSTATUS ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, struct dfs_ManagerInitialize *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); @@ -4609,7 +4609,7 @@ _PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char ndr->depth--; } -NTSTATUS ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const struct dfs_AddStdRootForced *r) +static NTSTATUS ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const struct dfs_AddStdRootForced *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); @@ -4635,7 +4635,7 @@ NTSTATUS ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const st return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, struct dfs_AddStdRootForced *r) +static NTSTATUS ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, struct dfs_AddStdRootForced *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); @@ -4698,7 +4698,7 @@ _PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char * ndr->depth--; } -NTSTATUS ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r) +static NTSTATUS ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r) { if (flags & NDR_IN) { } @@ -4708,7 +4708,7 @@ NTSTATUS ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r) +static NTSTATUS ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r) { if (flags & NDR_IN) { } @@ -4739,7 +4739,7 @@ _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name ndr->depth--; } -NTSTATUS ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r) +static NTSTATUS ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r) { if (flags & NDR_IN) { } @@ -4749,7 +4749,7 @@ NTSTATUS ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r) +static NTSTATUS ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r) { if (flags & NDR_IN) { } @@ -4780,7 +4780,7 @@ _PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name ndr->depth--; } -NTSTATUS ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct dfs_FlushFtTable *r) +static NTSTATUS ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct dfs_FlushFtTable *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); @@ -4798,7 +4798,7 @@ NTSTATUS ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struct dfs_FlushFtTable *r) +static NTSTATUS ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struct dfs_FlushFtTable *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); @@ -4845,7 +4845,7 @@ _PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name ndr->depth--; } -NTSTATUS ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add2 *r) +static NTSTATUS ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add2 *r) { if (flags & NDR_IN) { } @@ -4855,7 +4855,7 @@ NTSTATUS ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Add2(struct ndr_pull *ndr, int flags, struct dfs_Add2 *r) +static NTSTATUS ndr_pull_dfs_Add2(struct ndr_pull *ndr, int flags, struct dfs_Add2 *r) { if (flags & NDR_IN) { } @@ -4886,7 +4886,7 @@ _PUBLIC_ void ndr_print_dfs_Add2(struct ndr_print *ndr, const char *name, int fl ndr->depth--; } -NTSTATUS ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_Remove2 *r) +static NTSTATUS ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_Remove2 *r) { if (flags & NDR_IN) { } @@ -4896,7 +4896,7 @@ NTSTATUS ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_ return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_Remove2(struct ndr_pull *ndr, int flags, struct dfs_Remove2 *r) +static NTSTATUS ndr_pull_dfs_Remove2(struct ndr_pull *ndr, int flags, struct dfs_Remove2 *r) { if (flags & NDR_IN) { } @@ -5080,7 +5080,7 @@ _PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int ndr->depth--; } -NTSTATUS ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs_SetInfo2 *r) +static NTSTATUS ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs_SetInfo2 *r) { if (flags & NDR_IN) { } @@ -5090,7 +5090,7 @@ NTSTATUS ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_SetInfo2(struct ndr_pull *ndr, int flags, struct dfs_SetInfo2 *r) +static NTSTATUS ndr_pull_dfs_SetInfo2(struct ndr_pull *ndr, int flags, struct dfs_SetInfo2 *r) { if (flags & NDR_IN) { } @@ -5121,14 +5121,14 @@ _PUBLIC_ void ndr_print_dfs_SetInfo2(struct ndr_print *ndr, const char *name, in ndr->depth--; } -const struct ndr_interface_call netdfs_calls[] = { +static const struct ndr_interface_call netdfs_calls[] = { { "dfs_GetManagerVersion", sizeof(struct dfs_GetManagerVersion), (ndr_push_flags_fn_t) ndr_push_dfs_GetManagerVersion, (ndr_pull_flags_fn_t) ndr_pull_dfs_GetManagerVersion, (ndr_print_function_t) ndr_print_dfs_GetManagerVersion, - False, + false, }, { "dfs_Add", @@ -5136,7 +5136,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_Add, (ndr_pull_flags_fn_t) ndr_pull_dfs_Add, (ndr_print_function_t) ndr_print_dfs_Add, - False, + false, }, { "dfs_Remove", @@ -5144,7 +5144,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_Remove, (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove, (ndr_print_function_t) ndr_print_dfs_Remove, - False, + false, }, { "dfs_SetInfo", @@ -5152,7 +5152,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo, (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo, (ndr_print_function_t) ndr_print_dfs_SetInfo, - False, + false, }, { "dfs_GetInfo", @@ -5160,7 +5160,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_GetInfo, (ndr_pull_flags_fn_t) ndr_pull_dfs_GetInfo, (ndr_print_function_t) ndr_print_dfs_GetInfo, - False, + false, }, { "dfs_Enum", @@ -5168,7 +5168,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_Enum, (ndr_pull_flags_fn_t) ndr_pull_dfs_Enum, (ndr_print_function_t) ndr_print_dfs_Enum, - False, + false, }, { "dfs_Rename", @@ -5176,7 +5176,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_Rename, (ndr_pull_flags_fn_t) ndr_pull_dfs_Rename, (ndr_print_function_t) ndr_print_dfs_Rename, - False, + false, }, { "dfs_Move", @@ -5184,7 +5184,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_Move, (ndr_pull_flags_fn_t) ndr_pull_dfs_Move, (ndr_print_function_t) ndr_print_dfs_Move, - False, + false, }, { "dfs_ManagerGetConfigInfo", @@ -5192,7 +5192,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_ManagerGetConfigInfo, (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerGetConfigInfo, (ndr_print_function_t) ndr_print_dfs_ManagerGetConfigInfo, - False, + false, }, { "dfs_ManagerSendSiteInfo", @@ -5200,7 +5200,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_ManagerSendSiteInfo, (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerSendSiteInfo, (ndr_print_function_t) ndr_print_dfs_ManagerSendSiteInfo, - False, + false, }, { "dfs_AddFtRoot", @@ -5208,7 +5208,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_AddFtRoot, (ndr_pull_flags_fn_t) ndr_pull_dfs_AddFtRoot, (ndr_print_function_t) ndr_print_dfs_AddFtRoot, - False, + false, }, { "dfs_RemoveFtRoot", @@ -5216,7 +5216,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_RemoveFtRoot, (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveFtRoot, (ndr_print_function_t) ndr_print_dfs_RemoveFtRoot, - False, + false, }, { "dfs_AddStdRoot", @@ -5224,7 +5224,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRoot, (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRoot, (ndr_print_function_t) ndr_print_dfs_AddStdRoot, - False, + false, }, { "dfs_RemoveStdRoot", @@ -5232,7 +5232,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_RemoveStdRoot, (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveStdRoot, (ndr_print_function_t) ndr_print_dfs_RemoveStdRoot, - False, + false, }, { "dfs_ManagerInitialize", @@ -5240,7 +5240,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_ManagerInitialize, (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerInitialize, (ndr_print_function_t) ndr_print_dfs_ManagerInitialize, - False, + false, }, { "dfs_AddStdRootForced", @@ -5248,7 +5248,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRootForced, (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRootForced, (ndr_print_function_t) ndr_print_dfs_AddStdRootForced, - False, + false, }, { "dfs_GetDcAddress", @@ -5256,7 +5256,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_GetDcAddress, (ndr_pull_flags_fn_t) ndr_pull_dfs_GetDcAddress, (ndr_print_function_t) ndr_print_dfs_GetDcAddress, - False, + false, }, { "dfs_SetDcAddress", @@ -5264,7 +5264,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_SetDcAddress, (ndr_pull_flags_fn_t) ndr_pull_dfs_SetDcAddress, (ndr_print_function_t) ndr_print_dfs_SetDcAddress, - False, + false, }, { "dfs_FlushFtTable", @@ -5272,7 +5272,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_FlushFtTable, (ndr_pull_flags_fn_t) ndr_pull_dfs_FlushFtTable, (ndr_print_function_t) ndr_print_dfs_FlushFtTable, - False, + false, }, { "dfs_Add2", @@ -5280,7 +5280,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_Add2, (ndr_pull_flags_fn_t) ndr_pull_dfs_Add2, (ndr_print_function_t) ndr_print_dfs_Add2, - False, + false, }, { "dfs_Remove2", @@ -5288,7 +5288,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_Remove2, (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove2, (ndr_print_function_t) ndr_print_dfs_Remove2, - False, + false, }, { "dfs_EnumEx", @@ -5296,7 +5296,7 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_EnumEx, (ndr_pull_flags_fn_t) ndr_pull_dfs_EnumEx, (ndr_print_function_t) ndr_print_dfs_EnumEx, - False, + false, }, { "dfs_SetInfo2", @@ -5304,25 +5304,25 @@ const struct ndr_interface_call netdfs_calls[] = { (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo2, (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo2, (ndr_print_function_t) ndr_print_dfs_SetInfo2, - False, + false, }, - { NULL, 0, NULL, NULL, NULL, False } + { NULL, 0, NULL, NULL, NULL, false } }; -const char * const netdfs_endpoint_strings[] = { +static const char * const netdfs_endpoint_strings[] = { "ncacn_np:[\\pipe\\netdfs]", }; -const struct ndr_interface_string_array netdfs_endpoints = { +static const struct ndr_interface_string_array netdfs_endpoints = { .count = 1, .names = netdfs_endpoint_strings }; -const char * const netdfs_authservice_strings[] = { +static const char * const netdfs_authservice_strings[] = { "host", }; -const struct ndr_interface_string_array netdfs_authservices = { +static const struct ndr_interface_string_array netdfs_authservices = { .count = 1, .names = netdfs_authservice_strings }; -- cgit From acc95a43a1a8079dc41aa1dd882bdf7dd25a6cf2 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 27 Oct 2007 11:57:48 +0200 Subject: rerun make idl metze (This used to be commit 83b3ecde1312092fd9875a2a8628652ffa6b6aca) --- source3/librpc/gen_ndr/ndr_dfs.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_dfs.c') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index 959abdc62d..bc76339bc3 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -3113,7 +3113,9 @@ _PUBLIC_ NTSTATUS ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags if (flags & NDR_IN) { } if (flags & NDR_OUT) { - if (r->out.version == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; + if (r->out.version == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } NDR_CHECK(ndr_push_dfs_ManagerVersion(ndr, NDR_SCALARS, *r->out.version)); } return NT_STATUS_OK; @@ -3167,12 +3169,16 @@ _PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char static NTSTATUS ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add *r) { if (flags & NDR_IN) { - if (r->in.path == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; + if (r->in.path == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16))); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); - if (r->in.server == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; + if (r->in.server == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16))); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16))); @@ -3309,7 +3315,9 @@ _PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int fla static NTSTATUS ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r) { if (flags & NDR_IN) { - if (r->in.dfs_entry_path == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; + if (r->in.dfs_entry_path == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16))); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16))); @@ -3451,7 +3459,9 @@ static NTSTATUS ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const stru NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level)); - if (r->in.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; + if (r->in.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level)); NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); } @@ -3592,7 +3602,9 @@ static NTSTATUS ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const stru NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level)); } if (flags & NDR_OUT) { - if (r->out.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; + if (r->out.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level)); NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); @@ -4552,7 +4564,9 @@ _PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *nam static NTSTATUS ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r) { if (flags & NDR_IN) { - if (r->in.servername == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; + if (r->in.servername == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); -- cgit From 08ace73dbbcef5543bbaee9ba7ee16a0bd42a395 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 9 Nov 2007 14:38:47 +0100 Subject: rerun make idl metze (This used to be commit 53a636828d2ba01603401086f4a5f72f9b5ea214) --- source3/librpc/gen_ndr/ndr_dfs.c | 472 +++++++++++++++++++-------------------- 1 file changed, 236 insertions(+), 236 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_dfs.c') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index bc76339bc3..4b26487a0d 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -3,18 +3,18 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_dfs.h" -static NTSTATUS ndr_push_dfs_ManagerVersion(struct ndr_push *ndr, int ndr_flags, enum dfs_ManagerVersion r) +static enum ndr_err_code ndr_push_dfs_ManagerVersion(struct ndr_push *ndr, int ndr_flags, enum dfs_ManagerVersion r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_ManagerVersion(struct ndr_pull *ndr, int ndr_flags, enum dfs_ManagerVersion *r) +static enum ndr_err_code ndr_pull_dfs_ManagerVersion(struct ndr_pull *ndr, int ndr_flags, enum dfs_ManagerVersion *r) { uint32_t v; NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); *r = v; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_ManagerVersion(struct ndr_print *ndr, const char *name, enum dfs_ManagerVersion r) @@ -29,24 +29,24 @@ _PUBLIC_ void ndr_print_dfs_ManagerVersion(struct ndr_print *ndr, const char *na ndr_print_enum(ndr, name, "ENUM", val, r); } -static NTSTATUS ndr_push_dfs_Info0(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info0 *r) +static enum ndr_err_code ndr_push_dfs_Info0(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info0 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Info0(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info0 *r) +static enum ndr_err_code ndr_pull_dfs_Info0(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info0 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Info0(struct ndr_print *ndr, const char *name, const struct dfs_Info0 *r) @@ -56,7 +56,7 @@ _PUBLIC_ void ndr_print_dfs_Info0(struct ndr_print *ndr, const char *name, const ndr->depth--; } -static NTSTATUS ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info1 *r) +static enum ndr_err_code ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info1 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -70,10 +70,10 @@ static NTSTATUS ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const st NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info1 *r) +static enum ndr_err_code ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info1 *r) { uint32_t _ptr_path; TALLOC_CTX *_mem_save_path_0; @@ -100,7 +100,7 @@ static NTSTATUS ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct d NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Info1(struct ndr_print *ndr, const char *name, const struct dfs_Info1 *r) @@ -116,18 +116,18 @@ _PUBLIC_ void ndr_print_dfs_Info1(struct ndr_print *ndr, const char *name, const ndr->depth--; } -_PUBLIC_ NTSTATUS ndr_push_dfs_VolumeState(struct ndr_push *ndr, int ndr_flags, uint32_t r) +_PUBLIC_ enum ndr_err_code ndr_push_dfs_VolumeState(struct ndr_push *ndr, int ndr_flags, uint32_t r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -_PUBLIC_ NTSTATUS ndr_pull_dfs_VolumeState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) +_PUBLIC_ enum ndr_err_code ndr_pull_dfs_VolumeState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) { uint32_t v; NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); *r = v; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_VolumeState(struct ndr_print *ndr, const char *name, uint32_t r) @@ -143,7 +143,7 @@ _PUBLIC_ void ndr_print_dfs_VolumeState(struct ndr_print *ndr, const char *name, ndr->depth--; } -static NTSTATUS ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info2 *r) +static enum ndr_err_code ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info2 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -166,10 +166,10 @@ static NTSTATUS ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const st NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r) +static enum ndr_err_code ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r) { uint32_t _ptr_path; TALLOC_CTX *_mem_save_path_0; @@ -218,7 +218,7 @@ static NTSTATUS ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct d NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Info2(struct ndr_print *ndr, const char *name, const struct dfs_Info2 *r) @@ -242,18 +242,18 @@ _PUBLIC_ void ndr_print_dfs_Info2(struct ndr_print *ndr, const char *name, const ndr->depth--; } -_PUBLIC_ NTSTATUS ndr_push_dfs_StorageState(struct ndr_push *ndr, int ndr_flags, uint32_t r) +_PUBLIC_ enum ndr_err_code ndr_push_dfs_StorageState(struct ndr_push *ndr, int ndr_flags, uint32_t r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -_PUBLIC_ NTSTATUS ndr_pull_dfs_StorageState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) +_PUBLIC_ enum ndr_err_code ndr_pull_dfs_StorageState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) { uint32_t v; NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); *r = v; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_StorageState(struct ndr_print *ndr, const char *name, uint32_t r) @@ -266,7 +266,7 @@ _PUBLIC_ void ndr_print_dfs_StorageState(struct ndr_print *ndr, const char *name ndr->depth--; } -static NTSTATUS ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo *r) +static enum ndr_err_code ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -288,10 +288,10 @@ static NTSTATUS ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, co NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r) +static enum ndr_err_code ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r) { uint32_t _ptr_server; TALLOC_CTX *_mem_save_server_0; @@ -339,7 +339,7 @@ static NTSTATUS ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, st NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo *r) @@ -362,7 +362,7 @@ _PUBLIC_ void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name, ndr->depth--; } -static NTSTATUS ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info3 *r) +static enum ndr_err_code ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info3 *r) { uint32_t cntr_stores_1; if (ndr_flags & NDR_SCALARS) { @@ -396,10 +396,10 @@ static NTSTATUS ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const st } } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r) +static enum ndr_err_code ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r) { uint32_t _ptr_path; TALLOC_CTX *_mem_save_path_0; @@ -477,7 +477,7 @@ static NTSTATUS ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct d NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores)); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const struct dfs_Info3 *r) @@ -518,7 +518,7 @@ _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const ndr->depth--; } -static NTSTATUS ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info4 *r) +static enum ndr_err_code ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info4 *r) { uint32_t cntr_stores_1; if (ndr_flags & NDR_SCALARS) { @@ -555,10 +555,10 @@ static NTSTATUS ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const st } } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info4 *r) +static enum ndr_err_code ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info4 *r) { uint32_t _ptr_path; TALLOC_CTX *_mem_save_path_0; @@ -639,7 +639,7 @@ static NTSTATUS ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct d NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores)); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const struct dfs_Info4 *r) @@ -682,18 +682,18 @@ _PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const ndr->depth--; } -_PUBLIC_ NTSTATUS ndr_push_dfs_PropertyFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r) +_PUBLIC_ enum ndr_err_code ndr_push_dfs_PropertyFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -_PUBLIC_ NTSTATUS ndr_pull_dfs_PropertyFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) +_PUBLIC_ enum ndr_err_code ndr_pull_dfs_PropertyFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) { uint32_t v; NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); *r = v; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_PropertyFlags(struct ndr_print *ndr, const char *name, uint32_t r) @@ -708,7 +708,7 @@ _PUBLIC_ void ndr_print_dfs_PropertyFlags(struct ndr_print *ndr, const char *nam ndr->depth--; } -static NTSTATUS ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info5 *r) +static enum ndr_err_code ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info5 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -736,10 +736,10 @@ static NTSTATUS ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const st } NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info5 *r) +static enum ndr_err_code ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info5 *r) { uint32_t _ptr_path; TALLOC_CTX *_mem_save_path_0; @@ -793,7 +793,7 @@ static NTSTATUS ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, struct d } NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Info5(struct ndr_print *ndr, const char *name, const struct dfs_Info5 *r) @@ -821,18 +821,18 @@ _PUBLIC_ void ndr_print_dfs_Info5(struct ndr_print *ndr, const char *name, const ndr->depth--; } -static NTSTATUS ndr_push_dfs_Target_PriorityClass(struct ndr_push *ndr, int ndr_flags, enum dfs_Target_PriorityClass r) +static enum ndr_err_code ndr_push_dfs_Target_PriorityClass(struct ndr_push *ndr, int ndr_flags, enum dfs_Target_PriorityClass r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Target_PriorityClass(struct ndr_pull *ndr, int ndr_flags, enum dfs_Target_PriorityClass *r) +static enum ndr_err_code ndr_pull_dfs_Target_PriorityClass(struct ndr_pull *ndr, int ndr_flags, enum dfs_Target_PriorityClass *r) { uint32_t v; NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); *r = v; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Target_PriorityClass(struct ndr_print *ndr, const char *name, enum dfs_Target_PriorityClass r) @@ -850,7 +850,7 @@ _PUBLIC_ void ndr_print_dfs_Target_PriorityClass(struct ndr_print *ndr, const ch ndr_print_enum(ndr, name, "ENUM", val, r); } -static NTSTATUS ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags, const struct dfs_Target_Priority *r) +static enum ndr_err_code ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags, const struct dfs_Target_Priority *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -860,10 +860,10 @@ static NTSTATUS ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags } if (ndr_flags & NDR_BUFFERS) { } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Target_Priority(struct ndr_pull *ndr, int ndr_flags, struct dfs_Target_Priority *r) +static enum ndr_err_code ndr_pull_dfs_Target_Priority(struct ndr_pull *ndr, int ndr_flags, struct dfs_Target_Priority *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -873,7 +873,7 @@ static NTSTATUS ndr_pull_dfs_Target_Priority(struct ndr_pull *ndr, int ndr_flags } if (ndr_flags & NDR_BUFFERS) { } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Target_Priority(struct ndr_print *ndr, const char *name, const struct dfs_Target_Priority *r) @@ -886,7 +886,7 @@ _PUBLIC_ void ndr_print_dfs_Target_Priority(struct ndr_print *ndr, const char *n ndr->depth--; } -static NTSTATUS ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo2 *r) +static enum ndr_err_code ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo2 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -896,10 +896,10 @@ static NTSTATUS ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, c if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo2 *r) +static enum ndr_err_code ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo2 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -909,7 +909,7 @@ static NTSTATUS ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr_flags, s if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_StorageInfo2(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo2 *r) @@ -921,7 +921,7 @@ _PUBLIC_ void ndr_print_dfs_StorageInfo2(struct ndr_print *ndr, const char *name ndr->depth--; } -static NTSTATUS ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info6 *r) +static enum ndr_err_code ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info6 *r) { uint32_t cntr_stores_1; if (ndr_flags & NDR_SCALARS) { @@ -960,10 +960,10 @@ static NTSTATUS ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const st } } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info6 *r) +static enum ndr_err_code ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info6 *r) { uint32_t _ptr_entry_path; TALLOC_CTX *_mem_save_entry_path_0; @@ -1046,7 +1046,7 @@ static NTSTATUS ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, struct d NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores)); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const struct dfs_Info6 *r) @@ -1091,7 +1091,7 @@ _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const ndr->depth--; } -static NTSTATUS ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info7 *r) +static enum ndr_err_code ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info7 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1100,10 +1100,10 @@ static NTSTATUS ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const st if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->generation_guid)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info7 *r) +static enum ndr_err_code ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info7 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -1112,7 +1112,7 @@ static NTSTATUS ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, struct d if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->generation_guid)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Info7(struct ndr_print *ndr, const char *name, const struct dfs_Info7 *r) @@ -1123,7 +1123,7 @@ _PUBLIC_ void ndr_print_dfs_Info7(struct ndr_print *ndr, const char *name, const ndr->depth--; } -static NTSTATUS ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r) +static enum ndr_err_code ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1137,10 +1137,10 @@ static NTSTATUS ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r) +static enum ndr_err_code ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r) { uint32_t _ptr_comment; TALLOC_CTX *_mem_save_comment_0; @@ -1167,7 +1167,7 @@ static NTSTATUS ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, const struct dfs_Info100 *r) @@ -1183,7 +1183,7 @@ _PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, con ndr->depth--; } -static NTSTATUS ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r) +static enum ndr_err_code ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1191,10 +1191,10 @@ static NTSTATUS ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const } if (ndr_flags & NDR_BUFFERS) { } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r) +static enum ndr_err_code ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -1202,7 +1202,7 @@ static NTSTATUS ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct } if (ndr_flags & NDR_BUFFERS) { } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, const struct dfs_Info101 *r) @@ -1213,7 +1213,7 @@ _PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, con ndr->depth--; } -static NTSTATUS ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r) +static enum ndr_err_code ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1221,10 +1221,10 @@ static NTSTATUS ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const } if (ndr_flags & NDR_BUFFERS) { } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r) +static enum ndr_err_code ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -1232,7 +1232,7 @@ static NTSTATUS ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct } if (ndr_flags & NDR_BUFFERS) { } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, const struct dfs_Info102 *r) @@ -1243,7 +1243,7 @@ _PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, con ndr->depth--; } -static NTSTATUS ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info103 *r) +static enum ndr_err_code ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info103 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1251,10 +1251,10 @@ static NTSTATUS ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const } if (ndr_flags & NDR_BUFFERS) { } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Info103(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info103 *r) +static enum ndr_err_code ndr_pull_dfs_Info103(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info103 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -1262,7 +1262,7 @@ static NTSTATUS ndr_pull_dfs_Info103(struct ndr_pull *ndr, int ndr_flags, struct } if (ndr_flags & NDR_BUFFERS) { } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Info103(struct ndr_print *ndr, const char *name, const struct dfs_Info103 *r) @@ -1273,7 +1273,7 @@ _PUBLIC_ void ndr_print_dfs_Info103(struct ndr_print *ndr, const char *name, con ndr->depth--; } -static NTSTATUS ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info104 *r) +static enum ndr_err_code ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info104 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1281,10 +1281,10 @@ static NTSTATUS ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const } if (ndr_flags & NDR_BUFFERS) { } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Info104(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info104 *r) +static enum ndr_err_code ndr_pull_dfs_Info104(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info104 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -1292,7 +1292,7 @@ static NTSTATUS ndr_pull_dfs_Info104(struct ndr_pull *ndr, int ndr_flags, struct } if (ndr_flags & NDR_BUFFERS) { } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Info104(struct ndr_print *ndr, const char *name, const struct dfs_Info104 *r) @@ -1303,7 +1303,7 @@ _PUBLIC_ void ndr_print_dfs_Info104(struct ndr_print *ndr, const char *name, con ndr->depth--; } -static NTSTATUS ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info105 *r) +static enum ndr_err_code ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info105 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1321,10 +1321,10 @@ static NTSTATUS ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Info105(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info105 *r) +static enum ndr_err_code ndr_pull_dfs_Info105(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info105 *r) { uint32_t _ptr_comment; TALLOC_CTX *_mem_save_comment_0; @@ -1355,7 +1355,7 @@ static NTSTATUS ndr_pull_dfs_Info105(struct ndr_pull *ndr, int ndr_flags, struct NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Info105(struct ndr_print *ndr, const char *name, const struct dfs_Info105 *r) @@ -1375,7 +1375,7 @@ _PUBLIC_ void ndr_print_dfs_Info105(struct ndr_print *ndr, const char *name, con ndr->depth--; } -static NTSTATUS ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info106 *r) +static enum ndr_err_code ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info106 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1384,10 +1384,10 @@ static NTSTATUS ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const } if (ndr_flags & NDR_BUFFERS) { } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Info106(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info106 *r) +static enum ndr_err_code ndr_pull_dfs_Info106(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info106 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -1396,7 +1396,7 @@ static NTSTATUS ndr_pull_dfs_Info106(struct ndr_pull *ndr, int ndr_flags, struct } if (ndr_flags & NDR_BUFFERS) { } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Info106(struct ndr_print *ndr, const char *name, const struct dfs_Info106 *r) @@ -1408,7 +1408,7 @@ _PUBLIC_ void ndr_print_dfs_Info106(struct ndr_print *ndr, const char *name, con ndr->depth--; } -static NTSTATUS ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info200 *r) +static enum ndr_err_code ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info200 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1422,10 +1422,10 @@ static NTSTATUS ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r) +static enum ndr_err_code ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r) { uint32_t _ptr_dom_root; TALLOC_CTX *_mem_save_dom_root_0; @@ -1452,7 +1452,7 @@ static NTSTATUS ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, const struct dfs_Info200 *r) @@ -1468,18 +1468,18 @@ _PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, con ndr->depth--; } -static NTSTATUS ndr_push_dfs_VolumeFlavor(struct ndr_push *ndr, int ndr_flags, enum dfs_VolumeFlavor r) +static enum ndr_err_code ndr_push_dfs_VolumeFlavor(struct ndr_push *ndr, int ndr_flags, enum dfs_VolumeFlavor r) { NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_VolumeFlavor(struct ndr_pull *ndr, int ndr_flags, enum dfs_VolumeFlavor *r) +static enum ndr_err_code ndr_pull_dfs_VolumeFlavor(struct ndr_pull *ndr, int ndr_flags, enum dfs_VolumeFlavor *r) { uint16_t v; NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); *r = v; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_VolumeFlavor(struct ndr_print *ndr, const char *name, enum dfs_VolumeFlavor r) @@ -1493,7 +1493,7 @@ _PUBLIC_ void ndr_print_dfs_VolumeFlavor(struct ndr_print *ndr, const char *name ndr_print_enum(ndr, name, "ENUM", val, r); } -static NTSTATUS ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info300 *r) +static enum ndr_err_code ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info300 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -1508,10 +1508,10 @@ static NTSTATUS ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r) +static enum ndr_err_code ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r) { uint32_t _ptr_dom_root; TALLOC_CTX *_mem_save_dom_root_0; @@ -1539,7 +1539,7 @@ static NTSTATUS ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, const struct dfs_Info300 *r) @@ -1556,7 +1556,7 @@ _PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, con ndr->depth--; } -static NTSTATUS ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_Info *r) +static enum ndr_err_code ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_Info *r) { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); @@ -1723,10 +1723,10 @@ static NTSTATUS ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const uni return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info *r) +static enum ndr_err_code ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info *r) { int level; uint32_t _level; @@ -2047,7 +2047,7 @@ static NTSTATUS ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const union dfs_Info *r) @@ -2196,7 +2196,7 @@ _PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const } } -static NTSTATUS ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray1 *r) +static enum ndr_err_code ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray1 *r) { uint32_t cntr_s_1; if (ndr_flags & NDR_SCALARS) { @@ -2215,10 +2215,10 @@ static NTSTATUS ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, con } } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r) +static enum ndr_err_code ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r) { uint32_t _ptr_s; uint32_t cntr_s_1; @@ -2255,7 +2255,7 @@ static NTSTATUS ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, str NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray1 *r) @@ -2283,7 +2283,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, ndr->depth--; } -static NTSTATUS ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray2 *r) +static enum ndr_err_code ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray2 *r) { uint32_t cntr_s_1; if (ndr_flags & NDR_SCALARS) { @@ -2302,10 +2302,10 @@ static NTSTATUS ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, con } } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r) +static enum ndr_err_code ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r) { uint32_t _ptr_s; uint32_t cntr_s_1; @@ -2342,7 +2342,7 @@ static NTSTATUS ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, str NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray2 *r) @@ -2370,7 +2370,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, ndr->depth--; } -static NTSTATUS ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray3 *r) +static enum ndr_err_code ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray3 *r) { uint32_t cntr_s_1; if (ndr_flags & NDR_SCALARS) { @@ -2389,10 +2389,10 @@ static NTSTATUS ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, con } } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r) +static enum ndr_err_code ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r) { uint32_t _ptr_s; uint32_t cntr_s_1; @@ -2429,7 +2429,7 @@ static NTSTATUS ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, str NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray3 *r) @@ -2457,7 +2457,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, ndr->depth--; } -static NTSTATUS ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray4 *r) +static enum ndr_err_code ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray4 *r) { uint32_t cntr_s_1; if (ndr_flags & NDR_SCALARS) { @@ -2476,10 +2476,10 @@ static NTSTATUS ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, con } } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r) +static enum ndr_err_code ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r) { uint32_t _ptr_s; uint32_t cntr_s_1; @@ -2516,7 +2516,7 @@ static NTSTATUS ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, str NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray4 *r) @@ -2544,7 +2544,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, ndr->depth--; } -static NTSTATUS ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r) +static enum ndr_err_code ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r) { uint32_t cntr_s_1; if (ndr_flags & NDR_SCALARS) { @@ -2563,10 +2563,10 @@ static NTSTATUS ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, c } } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r) +static enum ndr_err_code ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r) { uint32_t _ptr_s; uint32_t cntr_s_1; @@ -2603,7 +2603,7 @@ static NTSTATUS ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, s NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray200 *r) @@ -2631,7 +2631,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name ndr->depth--; } -static NTSTATUS ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray300 *r) +static enum ndr_err_code ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray300 *r) { uint32_t cntr_s_1; if (ndr_flags & NDR_SCALARS) { @@ -2650,10 +2650,10 @@ static NTSTATUS ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, c } } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r) +static enum ndr_err_code ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r) { uint32_t _ptr_s; uint32_t cntr_s_1; @@ -2690,7 +2690,7 @@ static NTSTATUS ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, s NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray300 *r) @@ -2718,7 +2718,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name ndr->depth--; } -static NTSTATUS ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union dfs_EnumInfo *r) +static enum ndr_err_code ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union dfs_EnumInfo *r) { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); @@ -2795,10 +2795,10 @@ static NTSTATUS ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union dfs_EnumInfo *r) +static enum ndr_err_code ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union dfs_EnumInfo *r) { int level; uint32_t _level; @@ -2939,7 +2939,7 @@ static NTSTATUS ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, const union dfs_EnumInfo *r) @@ -3007,7 +3007,7 @@ _PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, co } } -static NTSTATUS ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumStruct *r) +static enum ndr_err_code ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumStruct *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -3018,10 +3018,10 @@ static NTSTATUS ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, con if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r) +static enum ndr_err_code ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -3032,7 +3032,7 @@ static NTSTATUS ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, str if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, const struct dfs_EnumStruct *r) @@ -3045,7 +3045,7 @@ _PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, ndr->depth--; } -static NTSTATUS ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_UnknownStruct *r) +static enum ndr_err_code ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_UnknownStruct *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -3060,10 +3060,10 @@ static NTSTATUS ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->unknown2, ndr_charset_length(r->unknown2, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_UnknownStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_UnknownStruct *r) +static enum ndr_err_code ndr_pull_dfs_UnknownStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_UnknownStruct *r) { uint32_t _ptr_unknown2; TALLOC_CTX *_mem_save_unknown2_0; @@ -3091,7 +3091,7 @@ static NTSTATUS ndr_pull_dfs_UnknownStruct(struct ndr_pull *ndr, int ndr_flags, NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_UnknownStruct(struct ndr_print *ndr, const char *name, const struct dfs_UnknownStruct *r) @@ -3108,7 +3108,7 @@ _PUBLIC_ void ndr_print_dfs_UnknownStruct(struct ndr_print *ndr, const char *nam ndr->depth--; } -_PUBLIC_ NTSTATUS ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags, const struct dfs_GetManagerVersion *r) +_PUBLIC_ enum ndr_err_code ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags, const struct dfs_GetManagerVersion *r) { if (flags & NDR_IN) { } @@ -3118,10 +3118,10 @@ _PUBLIC_ NTSTATUS ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags } NDR_CHECK(ndr_push_dfs_ManagerVersion(ndr, NDR_SCALARS, *r->out.version)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -_PUBLIC_ NTSTATUS ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags, struct dfs_GetManagerVersion *r) +_PUBLIC_ enum ndr_err_code ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags, struct dfs_GetManagerVersion *r) { TALLOC_CTX *_mem_save_version_0; if (flags & NDR_IN) { @@ -3139,7 +3139,7 @@ _PUBLIC_ NTSTATUS ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags NDR_CHECK(ndr_pull_dfs_ManagerVersion(ndr, NDR_SCALARS, r->out.version)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_version_0, LIBNDR_FLAG_REF_ALLOC); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetManagerVersion *r) @@ -3166,7 +3166,7 @@ _PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char ndr->depth--; } -static NTSTATUS ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add *r) +static enum ndr_err_code ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add *r) { if (flags & NDR_IN) { if (r->in.path == NULL) { @@ -3202,10 +3202,10 @@ static NTSTATUS ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct d if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Add(struct ndr_pull *ndr, int flags, struct dfs_Add *r) +static enum ndr_err_code ndr_pull_dfs_Add(struct ndr_pull *ndr, int flags, struct dfs_Add *r) { uint32_t _ptr_share; uint32_t _ptr_comment; @@ -3267,7 +3267,7 @@ static NTSTATUS ndr_pull_dfs_Add(struct ndr_pull *ndr, int flags, struct dfs_Add if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add *r) @@ -3312,7 +3312,7 @@ _PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int fla ndr->depth--; } -static NTSTATUS ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r) +static enum ndr_err_code ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r) { if (flags & NDR_IN) { if (r->in.dfs_entry_path == NULL) { @@ -3340,10 +3340,10 @@ static NTSTATUS ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struc if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_Remove *r) +static enum ndr_err_code ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_Remove *r) { uint32_t _ptr_servername; uint32_t _ptr_sharename; @@ -3397,7 +3397,7 @@ static NTSTATUS ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_ if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove *r) @@ -3437,7 +3437,7 @@ _PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int ndr->depth--; } -static NTSTATUS ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_SetInfo *r) +static enum ndr_err_code ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_SetInfo *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16))); @@ -3468,10 +3468,10 @@ static NTSTATUS ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const stru if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs_SetInfo *r) +static enum ndr_err_code ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs_SetInfo *r) { uint32_t _ptr_servername; uint32_t _ptr_sharename; @@ -3535,7 +3535,7 @@ static NTSTATUS ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo *r) @@ -3578,7 +3578,7 @@ _PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int ndr->depth--; } -static NTSTATUS ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_GetInfo *r) +static enum ndr_err_code ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_GetInfo *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16))); @@ -3609,10 +3609,10 @@ static NTSTATUS ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const stru NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs_GetInfo *r) +static enum ndr_err_code ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs_GetInfo *r) { uint32_t _ptr_servername; uint32_t _ptr_sharename; @@ -3680,7 +3680,7 @@ static NTSTATUS ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetInfo *r) @@ -3723,7 +3723,7 @@ _PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int ndr->depth--; } -static NTSTATUS ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enum *r) +static enum ndr_err_code ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enum *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level)); @@ -3748,10 +3748,10 @@ static NTSTATUS ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct } NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r) +static enum ndr_err_code ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r) { uint32_t _ptr_info; uint32_t _ptr_total; @@ -3814,7 +3814,7 @@ static NTSTATUS ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_En } NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Enum *r) @@ -3864,24 +3864,24 @@ _PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int fl ndr->depth--; } -static NTSTATUS ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_Rename *r) +static enum ndr_err_code ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_Rename *r) { if (flags & NDR_IN) { } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Rename(struct ndr_pull *ndr, int flags, struct dfs_Rename *r) +static enum ndr_err_code ndr_pull_dfs_Rename(struct ndr_pull *ndr, int flags, struct dfs_Rename *r) { if (flags & NDR_IN) { } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Rename(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Rename *r) @@ -3905,24 +3905,24 @@ _PUBLIC_ void ndr_print_dfs_Rename(struct ndr_print *ndr, const char *name, int ndr->depth--; } -static NTSTATUS ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Move *r) +static enum ndr_err_code ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Move *r) { if (flags & NDR_IN) { } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Move(struct ndr_pull *ndr, int flags, struct dfs_Move *r) +static enum ndr_err_code ndr_pull_dfs_Move(struct ndr_pull *ndr, int flags, struct dfs_Move *r) { if (flags & NDR_IN) { } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Move(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Move *r) @@ -3946,24 +3946,24 @@ _PUBLIC_ void ndr_print_dfs_Move(struct ndr_print *ndr, const char *name, int fl ndr->depth--; } -static NTSTATUS ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerGetConfigInfo *r) +static enum ndr_err_code ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerGetConfigInfo *r) { if (flags & NDR_IN) { } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerGetConfigInfo *r) +static enum ndr_err_code ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerGetConfigInfo *r) { if (flags & NDR_IN) { } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerGetConfigInfo *r) @@ -3987,24 +3987,24 @@ _PUBLIC_ void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print *ndr, const ch ndr->depth--; } -static NTSTATUS ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerSendSiteInfo *r) +static enum ndr_err_code ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerSendSiteInfo *r) { if (flags & NDR_IN) { } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerSendSiteInfo *r) +static enum ndr_err_code ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerSendSiteInfo *r) { if (flags & NDR_IN) { } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerSendSiteInfo *r) @@ -4028,7 +4028,7 @@ _PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const cha ndr->depth--; } -static NTSTATUS ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct dfs_AddFtRoot *r) +static enum ndr_err_code ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct dfs_AddFtRoot *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); @@ -4075,10 +4075,10 @@ static NTSTATUS ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const st } NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct dfs_AddFtRoot *r) +static enum ndr_err_code ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct dfs_AddFtRoot *r) { uint32_t _ptr_unknown2; TALLOC_CTX *_mem_save_unknown2_0; @@ -4180,7 +4180,7 @@ static NTSTATUS ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct d } NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddFtRoot *r) @@ -4234,7 +4234,7 @@ _PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, i ndr->depth--; } -static NTSTATUS ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveFtRoot *r) +static enum ndr_err_code ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveFtRoot *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); @@ -4272,10 +4272,10 @@ static NTSTATUS ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const } NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveFtRoot *r) +static enum ndr_err_code ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveFtRoot *r) { uint32_t _ptr_unknown; TALLOC_CTX *_mem_save_unknown_0; @@ -4362,7 +4362,7 @@ static NTSTATUS ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struc } NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveFtRoot *r) @@ -4413,7 +4413,7 @@ _PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name ndr->depth--; } -static NTSTATUS ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct dfs_AddStdRoot *r) +static enum ndr_err_code ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct dfs_AddStdRoot *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); @@ -4433,10 +4433,10 @@ static NTSTATUS ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const s if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct dfs_AddStdRoot *r) +static enum ndr_err_code ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct dfs_AddStdRoot *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); @@ -4465,7 +4465,7 @@ static NTSTATUS ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRoot *r) @@ -4493,7 +4493,7 @@ _PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, ndr->depth--; } -static NTSTATUS ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveStdRoot *r) +static enum ndr_err_code ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveStdRoot *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); @@ -4509,10 +4509,10 @@ static NTSTATUS ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, cons if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveStdRoot *r) +static enum ndr_err_code ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveStdRoot *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); @@ -4534,7 +4534,7 @@ static NTSTATUS ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, stru if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveStdRoot *r) @@ -4561,7 +4561,7 @@ _PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *nam ndr->depth--; } -static NTSTATUS ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r) +static enum ndr_err_code ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r) { if (flags & NDR_IN) { if (r->in.servername == NULL) { @@ -4576,10 +4576,10 @@ static NTSTATUS ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, struct dfs_ManagerInitialize *r) +static enum ndr_err_code ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, struct dfs_ManagerInitialize *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); @@ -4594,7 +4594,7 @@ static NTSTATUS ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerInitialize *r) @@ -4623,7 +4623,7 @@ _PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char ndr->depth--; } -static NTSTATUS ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const struct dfs_AddStdRootForced *r) +static enum ndr_err_code ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const struct dfs_AddStdRootForced *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); @@ -4646,10 +4646,10 @@ static NTSTATUS ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, c if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, struct dfs_AddStdRootForced *r) +static enum ndr_err_code ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, struct dfs_AddStdRootForced *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); @@ -4684,7 +4684,7 @@ static NTSTATUS ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, s if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRootForced *r) @@ -4712,24 +4712,24 @@ _PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char * ndr->depth--; } -static NTSTATUS ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r) +static enum ndr_err_code ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r) { if (flags & NDR_IN) { } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r) +static enum ndr_err_code ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r) { if (flags & NDR_IN) { } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetDcAddress *r) @@ -4753,24 +4753,24 @@ _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name ndr->depth--; } -static NTSTATUS ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r) +static enum ndr_err_code ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r) { if (flags & NDR_IN) { } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r) +static enum ndr_err_code ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r) { if (flags & NDR_IN) { } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetDcAddress *r) @@ -4794,7 +4794,7 @@ _PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name ndr->depth--; } -static NTSTATUS ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct dfs_FlushFtTable *r) +static enum ndr_err_code ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct dfs_FlushFtTable *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); @@ -4809,10 +4809,10 @@ static NTSTATUS ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struct dfs_FlushFtTable *r) +static enum ndr_err_code ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struct dfs_FlushFtTable *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); @@ -4833,7 +4833,7 @@ static NTSTATUS ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struc if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name, int flags, const struct dfs_FlushFtTable *r) @@ -4859,24 +4859,24 @@ _PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name ndr->depth--; } -static NTSTATUS ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add2 *r) +static enum ndr_err_code ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add2 *r) { if (flags & NDR_IN) { } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Add2(struct ndr_pull *ndr, int flags, struct dfs_Add2 *r) +static enum ndr_err_code ndr_pull_dfs_Add2(struct ndr_pull *ndr, int flags, struct dfs_Add2 *r) { if (flags & NDR_IN) { } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Add2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add2 *r) @@ -4900,24 +4900,24 @@ _PUBLIC_ void ndr_print_dfs_Add2(struct ndr_print *ndr, const char *name, int fl ndr->depth--; } -static NTSTATUS ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_Remove2 *r) +static enum ndr_err_code ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_Remove2 *r) { if (flags & NDR_IN) { } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_Remove2(struct ndr_pull *ndr, int flags, struct dfs_Remove2 *r) +static enum ndr_err_code ndr_pull_dfs_Remove2(struct ndr_pull *ndr, int flags, struct dfs_Remove2 *r) { if (flags & NDR_IN) { } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_Remove2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove2 *r) @@ -4941,7 +4941,7 @@ _PUBLIC_ void ndr_print_dfs_Remove2(struct ndr_print *ndr, const char *name, int ndr->depth--; } -_PUBLIC_ NTSTATUS ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r) +_PUBLIC_ enum ndr_err_code ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16))); @@ -4970,10 +4970,10 @@ _PUBLIC_ NTSTATUS ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const str } NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -_PUBLIC_ NTSTATUS ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r) +_PUBLIC_ enum ndr_err_code ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r) { uint32_t _ptr_info; uint32_t _ptr_total; @@ -5043,7 +5043,7 @@ _PUBLIC_ NTSTATUS ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct df } NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int flags, const struct dfs_EnumEx *r) @@ -5094,24 +5094,24 @@ _PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int ndr->depth--; } -static NTSTATUS ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs_SetInfo2 *r) +static enum ndr_err_code ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs_SetInfo2 *r) { if (flags & NDR_IN) { } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_dfs_SetInfo2(struct ndr_pull *ndr, int flags, struct dfs_SetInfo2 *r) +static enum ndr_err_code ndr_pull_dfs_SetInfo2(struct ndr_pull *ndr, int flags, struct dfs_SetInfo2 *r) { if (flags & NDR_IN) { } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_dfs_SetInfo2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo2 *r) -- cgit From 5e86ac9e6d2eb7ff0f6f8461dcfc230e2d87c42c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 17 Jan 2008 13:00:12 +0100 Subject: idl: Update DFS IDL from Samba 4. (This used to be commit a6677b2e186212f723b24775293682ce5b94952e) --- source3/librpc/gen_ndr/ndr_dfs.c | 436 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 434 insertions(+), 2 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_dfs.c') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index 4b26487a0d..dee32485be 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -2544,6 +2544,180 @@ _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, ndr->depth--; } +static enum ndr_err_code ndr_push_dfs_EnumArray5(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray5 *r) +{ + uint32_t cntr_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dfs_EnumArray5(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray5 *r) +{ + uint32_t _ptr_s; + uint32_t cntr_s_1; + TALLOC_CTX *_mem_save_s_0; + TALLOC_CTX *_mem_save_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s)); + if (_ptr_s) { + NDR_PULL_ALLOC(ndr, r->s); + } else { + r->s = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->s)); + NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s)); + _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0); + } + if (r->s) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray5 *r) +{ + uint32_t cntr_s_1; + ndr_print_struct(ndr, name, "dfs_EnumArray5"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "s", r->s); + ndr->depth++; + if (r->s) { + ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count); + ndr->depth++; + for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_s_1); + if (idx_1) { + ndr_print_dfs_Info5(ndr, "s", &r->s[cntr_s_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_dfs_EnumArray6(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray6 *r) +{ + uint32_t cntr_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dfs_EnumArray6(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray6 *r) +{ + uint32_t _ptr_s; + uint32_t cntr_s_1; + TALLOC_CTX *_mem_save_s_0; + TALLOC_CTX *_mem_save_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s)); + if (_ptr_s) { + NDR_PULL_ALLOC(ndr, r->s); + } else { + r->s = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->s)); + NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s)); + _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0); + } + if (r->s) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray6 *r) +{ + uint32_t cntr_s_1; + ndr_print_struct(ndr, name, "dfs_EnumArray6"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "s", r->s); + ndr->depth++; + if (r->s) { + ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count); + ndr->depth++; + for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_s_1); + if (idx_1) { + ndr_print_dfs_Info6(ndr, "s", &r->s[cntr_s_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + static enum ndr_err_code ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r) { uint32_t cntr_s_1; @@ -2740,6 +2914,14 @@ static enum ndr_err_code ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_fla NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4)); break; + case 5: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5)); + break; + + case 6: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6)); + break; + case 200: NDR_CHECK(ndr_push_unique_ptr(ndr, r->info200)); break; @@ -2779,6 +2961,18 @@ static enum ndr_err_code ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_fla } break; + case 5: + if (r->info5) { + NDR_CHECK(ndr_push_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5)); + } + break; + + case 6: + if (r->info6) { + NDR_CHECK(ndr_push_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6)); + } + break; + case 200: if (r->info200) { NDR_CHECK(ndr_push_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200)); @@ -2806,6 +3000,8 @@ static enum ndr_err_code ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_fla TALLOC_CTX *_mem_save_info2_0; TALLOC_CTX *_mem_save_info3_0; TALLOC_CTX *_mem_save_info4_0; + TALLOC_CTX *_mem_save_info5_0; + TALLOC_CTX *_mem_save_info6_0; TALLOC_CTX *_mem_save_info200_0; TALLOC_CTX *_mem_save_info300_0; level = ndr_pull_get_switch_value(ndr, r); @@ -2855,6 +3051,26 @@ static enum ndr_err_code ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_fla } break; } + case 5: { + uint32_t _ptr_info5; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5)); + if (_ptr_info5) { + NDR_PULL_ALLOC(ndr, r->info5); + } else { + r->info5 = NULL; + } + break; } + + case 6: { + uint32_t _ptr_info6; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6)); + if (_ptr_info6) { + NDR_PULL_ALLOC(ndr, r->info6); + } else { + r->info6 = NULL; + } + break; } + case 200: { uint32_t _ptr_info200; NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info200)); @@ -2917,6 +3133,24 @@ static enum ndr_err_code ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_fla } break; + case 5: + if (r->info5) { + _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0); + NDR_CHECK(ndr_pull_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0); + } + break; + + case 6: + if (r->info6) { + _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0); + NDR_CHECK(ndr_pull_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0); + } + break; + case 200: if (r->info200) { _mem_save_info200_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -2984,6 +3218,24 @@ _PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, co ndr->depth--; break; + case 5: + ndr_print_ptr(ndr, "info5", r->info5); + ndr->depth++; + if (r->info5) { + ndr_print_dfs_EnumArray5(ndr, "info5", r->info5); + } + ndr->depth--; + break; + + case 6: + ndr_print_ptr(ndr, "info6", r->info6); + ndr->depth++; + if (r->info6) { + ndr_print_dfs_EnumArray6(ndr, "info6", r->info6); + } + ndr->depth--; + break; + case 200: ndr_print_ptr(ndr, "info200", r->info200); ndr->depth++; @@ -4715,8 +4967,50 @@ _PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char * static enum ndr_err_code ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + if (r->in.server_fullname == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + if (*r->in.server_fullname == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16))); + 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)); + if (r->in.is_root == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.is_root)); + if (r->in.ttl == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.ttl)); } if (flags & NDR_OUT) { + if (r->out.server_fullname == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + if (*r->out.server_fullname == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16))); + 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)); + if (r->out.is_root == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.is_root)); + if (r->out.ttl == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.ttl)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -4724,9 +5018,84 @@ static enum ndr_err_code ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int fla static enum ndr_err_code ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r) { + uint32_t _ptr_server_fullname; + TALLOC_CTX *_mem_save_server_fullname_0; + TALLOC_CTX *_mem_save_is_root_0; + TALLOC_CTX *_mem_save_ttl_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); + if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.server_fullname); + } + _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.server_fullname, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_server_fullname)); + NDR_CHECK(ndr_pull_array_size(ndr, r->in.server_fullname)); + NDR_CHECK(ndr_pull_array_length(ndr, r->in.server_fullname)); + if (ndr_get_array_length(ndr, r->in.server_fullname) > ndr_get_array_size(ndr, r->in.server_fullname)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->in.server_fullname), sizeof(uint16_t))); + 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)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.is_root); + } + _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.is_root, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.is_root)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.ttl); + } + _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.ttl, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.ttl)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.server_fullname); + *r->out.server_fullname = *r->in.server_fullname; + NDR_PULL_ALLOC(ndr, r->out.is_root); + *r->out.is_root = *r->in.is_root; + NDR_PULL_ALLOC(ndr, r->out.ttl); + *r->out.ttl = *r->in.ttl; } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.server_fullname); + } + _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.server_fullname, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_server_fullname)); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.server_fullname)); + NDR_CHECK(ndr_pull_array_length(ndr, r->out.server_fullname)); + if (ndr_get_array_length(ndr, r->out.server_fullname) > ndr_get_array_size(ndr, r->out.server_fullname)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.server_fullname), sizeof(uint16_t))); + 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)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.is_root); + } + _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.is_root, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.is_root)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.ttl); + } + _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.ttl, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.ttl)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -4742,11 +5111,42 @@ _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "dfs_GetDcAddress"); ndr->depth++; + ndr_print_string(ndr, "servername", r->in.servername); + ndr_print_ptr(ndr, "server_fullname", r->in.server_fullname); + ndr->depth++; + ndr_print_ptr(ndr, "server_fullname", *r->in.server_fullname); + ndr->depth++; + ndr_print_string(ndr, "server_fullname", *r->in.server_fullname); + ndr->depth--; + ndr->depth--; + ndr_print_ptr(ndr, "is_root", r->in.is_root); + ndr->depth++; + ndr_print_uint8(ndr, "is_root", *r->in.is_root); + ndr->depth--; + ndr_print_ptr(ndr, "ttl", r->in.ttl); + ndr->depth++; + ndr_print_uint32(ndr, "ttl", *r->in.ttl); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "dfs_GetDcAddress"); ndr->depth++; + ndr_print_ptr(ndr, "server_fullname", r->out.server_fullname); + ndr->depth++; + ndr_print_ptr(ndr, "server_fullname", *r->out.server_fullname); + ndr->depth++; + ndr_print_string(ndr, "server_fullname", *r->out.server_fullname); + ndr->depth--; + ndr->depth--; + ndr_print_ptr(ndr, "is_root", r->out.is_root); + ndr->depth++; + ndr_print_uint8(ndr, "is_root", *r->out.is_root); + ndr->depth--; + ndr_print_ptr(ndr, "ttl", r->out.ttl); + ndr->depth++; + ndr_print_uint32(ndr, "ttl", *r->out.ttl); + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } @@ -4756,6 +5156,16 @@ _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name static enum ndr_err_code ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16))); + 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)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ttl)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); @@ -4766,6 +5176,22 @@ static enum ndr_err_code ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int fla static enum ndr_err_code ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); + if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_fullname)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_fullname)); + if (ndr_get_array_length(ndr, &r->in.server_fullname) > ndr_get_array_size(ndr, &r->in.server_fullname)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_fullname), sizeof(uint16_t))); + 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)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ttl)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); @@ -4783,6 +5209,10 @@ _PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "dfs_SetDcAddress"); ndr->depth++; + ndr_print_string(ndr, "servername", r->in.servername); + ndr_print_string(ndr, "server_fullname", r->in.server_fullname); + ndr_print_uint32(ndr, "flags", r->in.flags); + ndr_print_uint32(ndr, "ttl", r->in.ttl); ndr->depth--; } if (flags & NDR_OUT) { @@ -5325,10 +5755,12 @@ static const struct ndr_interface_call netdfs_calls[] = { static const char * const netdfs_endpoint_strings[] = { "ncacn_np:[\\pipe\\netdfs]", + "ncacn_ip_tcp:", + "ncalrpc:", }; static const struct ndr_interface_string_array netdfs_endpoints = { - .count = 1, + .count = 3, .names = netdfs_endpoint_strings }; @@ -5337,7 +5769,7 @@ static const char * const netdfs_authservice_strings[] = { }; static const struct ndr_interface_string_array netdfs_authservices = { - .count = 1, + .count = 3, .names = netdfs_authservice_strings }; -- cgit From c49ae172cacd4a4e4292a0de526ec256d288bb19 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 7 Feb 2008 09:43:46 +0100 Subject: Re-run make idl after metzes fixes for multilevel and embedded pointers. Thanks metze! Now we can move a lot more opcodes to use pidl generated marshalling. Guenther (This used to be commit 4128ed8bdfb82324e80c0e5a4114da464d50f6de) --- source3/librpc/gen_ndr/ndr_dfs.c | 87 +++++++++++++++++++++++++--------------- 1 file changed, 55 insertions(+), 32 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_dfs.c') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index dee32485be..c373a4364c 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -4974,14 +4974,13 @@ static enum ndr_err_code ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int fla if (r->in.server_fullname == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->in.server_fullname == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.server_fullname)); + if (*r->in.server_fullname) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16))); + 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)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16))); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16))); - 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)); if (r->in.is_root == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -4995,14 +4994,13 @@ static enum ndr_err_code ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int fla if (r->out.server_fullname == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.server_fullname == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.server_fullname)); + if (*r->out.server_fullname) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16))); + 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)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16))); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16))); - 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)); if (r->out.is_root == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -5020,6 +5018,7 @@ static enum ndr_err_code ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int fla { uint32_t _ptr_server_fullname; TALLOC_CTX *_mem_save_server_fullname_0; + TALLOC_CTX *_mem_save_server_fullname_1; TALLOC_CTX *_mem_save_is_root_0; TALLOC_CTX *_mem_save_ttl_0; if (flags & NDR_IN) { @@ -5037,14 +5036,24 @@ static enum ndr_err_code ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int fla } _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.server_fullname, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_server_fullname)); - NDR_CHECK(ndr_pull_array_size(ndr, r->in.server_fullname)); - NDR_CHECK(ndr_pull_array_length(ndr, r->in.server_fullname)); - if (ndr_get_array_length(ndr, r->in.server_fullname) > ndr_get_array_size(ndr, r->in.server_fullname)) { - 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)); - } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->in.server_fullname), sizeof(uint16_t))); - 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)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname)); + if (_ptr_server_fullname) { + NDR_PULL_ALLOC(ndr, *r->in.server_fullname); + } else { + *r->in.server_fullname = NULL; + } + if (*r->in.server_fullname) { + _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->in.server_fullname, 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->in.server_fullname)); + NDR_CHECK(ndr_pull_array_length(ndr, r->in.server_fullname)); + if (ndr_get_array_length(ndr, r->in.server_fullname) > ndr_get_array_size(ndr, r->in.server_fullname)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->in.server_fullname), sizeof(uint16_t))); + 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)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.is_root); @@ -5073,14 +5082,24 @@ static enum ndr_err_code ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int fla } _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.server_fullname, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_server_fullname)); - NDR_CHECK(ndr_pull_array_size(ndr, r->out.server_fullname)); - NDR_CHECK(ndr_pull_array_length(ndr, r->out.server_fullname)); - if (ndr_get_array_length(ndr, r->out.server_fullname) > ndr_get_array_size(ndr, r->out.server_fullname)) { - 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)); - } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.server_fullname), sizeof(uint16_t))); - 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)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname)); + if (_ptr_server_fullname) { + NDR_PULL_ALLOC(ndr, *r->out.server_fullname); + } else { + *r->out.server_fullname = NULL; + } + if (*r->out.server_fullname) { + _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.server_fullname, 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.server_fullname)); + NDR_CHECK(ndr_pull_array_length(ndr, r->out.server_fullname)); + if (ndr_get_array_length(ndr, r->out.server_fullname) > ndr_get_array_size(ndr, r->out.server_fullname)) { + 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)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.server_fullname), sizeof(uint16_t))); + 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)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.is_root); @@ -5116,7 +5135,9 @@ _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_ptr(ndr, "server_fullname", *r->in.server_fullname); ndr->depth++; - ndr_print_string(ndr, "server_fullname", *r->in.server_fullname); + if (*r->in.server_fullname) { + ndr_print_string(ndr, "server_fullname", *r->in.server_fullname); + } ndr->depth--; ndr->depth--; ndr_print_ptr(ndr, "is_root", r->in.is_root); @@ -5136,7 +5157,9 @@ _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_ptr(ndr, "server_fullname", *r->out.server_fullname); ndr->depth++; - ndr_print_string(ndr, "server_fullname", *r->out.server_fullname); + if (*r->out.server_fullname) { + ndr_print_string(ndr, "server_fullname", *r->out.server_fullname); + } ndr->depth--; ndr->depth--; ndr_print_ptr(ndr, "is_root", r->out.is_root); -- cgit From 485cb23b16e62a37180b95bd5c409de6ee162084 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 11 Feb 2008 09:15:30 +0100 Subject: rerun 'make idl' metze (This used to be commit 55c74832f3a4052d8b15f01b233aab97f7001bbe) --- source3/librpc/gen_ndr/ndr_dfs.c | 92 ++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 46 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_dfs.c') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index c373a4364c..f5ce913bd2 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -1562,65 +1562,65 @@ static enum ndr_err_code ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 0: + case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0)); - break; + break; } - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2)); - break; + break; } - case 3: + case 3: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3)); - break; + break; } - case 4: + case 4: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4)); - break; + break; } - case 5: + case 5: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5)); - break; + break; } - case 6: + case 6: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6)); - break; + break; } - case 7: + case 7: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info7)); - break; + break; } - case 100: + case 100: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100)); - break; + break; } - case 101: + case 101: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101)); - break; + break; } - case 102: + case 102: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102)); - break; + break; } - case 103: + case 103: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info103)); - break; + break; } - case 104: + case 104: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info104)); - break; + break; } - case 105: + case 105: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info105)); - break; + break; } - case 106: + case 106: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info106)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -2898,37 +2898,37 @@ static enum ndr_err_code ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_fla int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2)); - break; + break; } - case 3: + case 3: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3)); - break; + break; } - case 4: + case 4: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4)); - break; + break; } - case 5: + case 5: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5)); - break; + break; } - case 6: + case 6: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6)); - break; + break; } - case 200: + case 200: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info200)); - break; + break; } - case 300: + case 300: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info300)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); -- cgit From 9712e3c11c69e2a40ea7c156dd3515dafed833ea Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 23 Feb 2008 10:54:59 +0100 Subject: make idl: Check return value of asprintf (This used to be commit d9fb7d7bdcd0e54838ff0b1cb64a7e75d8cd726a) --- source3/librpc/gen_ndr/ndr_dfs.c | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_dfs.c') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index f5ce913bd2..2e9873e929 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -506,8 +506,7 @@ _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const ndr->depth++; for (cntr_stores_1=0;cntr_stores_1num_stores;cntr_stores_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_stores_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) { ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]); free(idx_1); } @@ -670,8 +669,7 @@ _PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const ndr->depth++; for (cntr_stores_1=0;cntr_stores_1num_stores;cntr_stores_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_stores_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) { ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]); free(idx_1); } @@ -1079,8 +1077,7 @@ _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const ndr->depth++; for (cntr_stores_1=0;cntr_stores_1num_stores;cntr_stores_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_stores_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) { ndr_print_dfs_StorageInfo2(ndr, "stores", &r->stores[cntr_stores_1]); free(idx_1); } @@ -2271,8 +2268,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_s_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { ndr_print_dfs_Info1(ndr, "s", &r->s[cntr_s_1]); free(idx_1); } @@ -2358,8 +2354,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_s_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { ndr_print_dfs_Info2(ndr, "s", &r->s[cntr_s_1]); free(idx_1); } @@ -2445,8 +2440,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_s_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { ndr_print_dfs_Info3(ndr, "s", &r->s[cntr_s_1]); free(idx_1); } @@ -2532,8 +2526,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_s_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { ndr_print_dfs_Info4(ndr, "s", &r->s[cntr_s_1]); free(idx_1); } @@ -2619,8 +2612,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name, ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_s_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { ndr_print_dfs_Info5(ndr, "s", &r->s[cntr_s_1]); free(idx_1); } @@ -2706,8 +2698,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name, ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_s_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { ndr_print_dfs_Info6(ndr, "s", &r->s[cntr_s_1]); free(idx_1); } @@ -2793,8 +2784,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_s_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { ndr_print_dfs_Info200(ndr, "s", &r->s[cntr_s_1]); free(idx_1); } @@ -2880,8 +2870,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_s_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { ndr_print_dfs_Info300(ndr, "s", &r->s[cntr_s_1]); free(idx_1); } -- cgit From c7ab11f52dd5909dff4040f7d2cb0f0192df8a3b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 6 Apr 2008 00:47:53 +0200 Subject: Re-run "make idl" (This used to be commit 26218826c327d85c2ef8d0d1addaef24d249d6bf) --- source3/librpc/gen_ndr/ndr_dfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/librpc/gen_ndr/ndr_dfs.c') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index 2e9873e929..18975507c7 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -5781,7 +5781,7 @@ static const char * const netdfs_authservice_strings[] = { }; static const struct ndr_interface_string_array netdfs_authservices = { - .count = 3, + .count = 1, .names = netdfs_authservice_strings }; -- cgit From ecab49a4d3db06be9f225804474cb6c514e24f45 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 29 Apr 2008 20:12:26 +0200 Subject: Re-run make idl. Guenther (This used to be commit 89284792722ab38d98e874e477c7a4046ee2aba0) --- source3/librpc/gen_ndr/ndr_dfs.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/librpc/gen_ndr/ndr_dfs.c') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index 18975507c7..4ac0096424 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -25,6 +25,7 @@ _PUBLIC_ void ndr_print_dfs_ManagerVersion(struct ndr_print *ndr, const char *na case DFS_MANAGER_VERSION_NT4: val = "DFS_MANAGER_VERSION_NT4"; break; case DFS_MANAGER_VERSION_W2K: val = "DFS_MANAGER_VERSION_W2K"; break; case DFS_MANAGER_VERSION_W2K3: val = "DFS_MANAGER_VERSION_W2K3"; break; + case DFS_MANAGER_VERSION_W2K8: val = "DFS_MANAGER_VERSION_W2K8"; break; } ndr_print_enum(ndr, name, "ENUM", val, r); } -- cgit From 16a9020029f809707b38d12960db12abbd2ef1be Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 22 Jul 2008 11:54:54 +0200 Subject: re-run make idl after Jelmer's "poperly cast array lengths" pidl change. (f321240fa91fa19c1131f119c42f64897d220682) Michael (This used to be commit 962c2670b10addf81a242d8cb381cc010e036b8e) --- source3/librpc/gen_ndr/ndr_dfs.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_dfs.c') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index 4ac0096424..de3ac48c00 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -503,7 +503,7 @@ _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const ndr_print_ptr(ndr, "stores", r->stores); ndr->depth++; if (r->stores) { - ndr->print(ndr, "%s: ARRAY(%d)", "stores", r->num_stores); + ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores); ndr->depth++; for (cntr_stores_1=0;cntr_stores_1num_stores;cntr_stores_1++) { char *idx_1=NULL; @@ -666,7 +666,7 @@ _PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const ndr_print_ptr(ndr, "stores", r->stores); ndr->depth++; if (r->stores) { - ndr->print(ndr, "%s: ARRAY(%d)", "stores", r->num_stores); + ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores); ndr->depth++; for (cntr_stores_1=0;cntr_stores_1num_stores;cntr_stores_1++) { char *idx_1=NULL; @@ -1074,7 +1074,7 @@ _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const ndr_print_ptr(ndr, "stores", r->stores); ndr->depth++; if (r->stores) { - ndr->print(ndr, "%s: ARRAY(%d)", "stores", r->num_stores); + ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores); ndr->depth++; for (cntr_stores_1=0;cntr_stores_1num_stores;cntr_stores_1++) { char *idx_1=NULL; @@ -2265,7 +2265,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, ndr_print_ptr(ndr, "s", r->s); ndr->depth++; if (r->s) { - ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count); + ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count); ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; @@ -2351,7 +2351,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, ndr_print_ptr(ndr, "s", r->s); ndr->depth++; if (r->s) { - ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count); + ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count); ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; @@ -2437,7 +2437,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, ndr_print_ptr(ndr, "s", r->s); ndr->depth++; if (r->s) { - ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count); + ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count); ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; @@ -2523,7 +2523,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, ndr_print_ptr(ndr, "s", r->s); ndr->depth++; if (r->s) { - ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count); + ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count); ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; @@ -2609,7 +2609,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name, ndr_print_ptr(ndr, "s", r->s); ndr->depth++; if (r->s) { - ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count); + ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count); ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; @@ -2695,7 +2695,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name, ndr_print_ptr(ndr, "s", r->s); ndr->depth++; if (r->s) { - ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count); + ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count); ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; @@ -2781,7 +2781,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name ndr_print_ptr(ndr, "s", r->s); ndr->depth++; if (r->s) { - ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count); + ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count); ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; @@ -2867,7 +2867,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name ndr_print_ptr(ndr, "s", r->s); ndr->depth++; if (r->s) { - ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count); + ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count); ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; -- cgit