diff options
Diffstat (limited to 'source4/librpc/ndr/ndr_basic.c')
-rw-r--r-- | source4/librpc/ndr/ndr_basic.c | 192 |
1 files changed, 0 insertions, 192 deletions
diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c index 5046b860a3..efff2dbc5f 100644 --- a/source4/librpc/ndr/ndr_basic.c +++ b/source4/librpc/ndr/ndr_basic.c @@ -263,66 +263,6 @@ NTSTATUS ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *data } /* - pull an array of uint16 -*/ -NTSTATUS ndr_pull_array_uint16(struct ndr_pull *ndr, int ndr_flags, uint16_t *data, uint32_t n) -{ - uint32_t i; - if (!(ndr_flags & NDR_SCALARS)) { - return NT_STATUS_OK; - } - for (i=0;i<n;i++) { - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &data[i])); - } - return NT_STATUS_OK; -} - -/* - pull a const array of uint32_t -*/ -NTSTATUS ndr_pull_array_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *data, uint32_t n) -{ - uint32_t i; - if (!(ndr_flags & NDR_SCALARS)) { - return NT_STATUS_OK; - } - for (i=0;i<n;i++) { - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &data[i])); - } - return NT_STATUS_OK; -} - -/* - pull a const array of hyper -*/ -NTSTATUS ndr_pull_array_hyper(struct ndr_pull *ndr, int ndr_flags, uint64_t *data, uint32_t n) -{ - uint32_t i; - if (!(ndr_flags & NDR_SCALARS)) { - return NT_STATUS_OK; - } - for (i=0;i<n;i++) { - NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &data[i])); - } - return NT_STATUS_OK; -} - -/* - pull a const array of WERROR -*/ -NTSTATUS ndr_pull_array_WERROR(struct ndr_pull *ndr, int ndr_flags, WERROR *data, uint32_t n) -{ - uint32_t i; - if (!(ndr_flags & NDR_SCALARS)) { - return NT_STATUS_OK; - } - for (i=0;i<n;i++) { - NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &data[i])); - } - return NT_STATUS_OK; -} - -/* push a int8_t */ NTSTATUS ndr_push_int8(struct ndr_push *ndr, int ndr_flags, int8_t v) @@ -481,66 +421,6 @@ NTSTATUS ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const uint8_t } /* - push an array of uint16 -*/ -NTSTATUS ndr_push_array_uint16(struct ndr_push *ndr, int ndr_flags, const uint16_t *data, uint32_t n) -{ - int i; - if (!(ndr_flags & NDR_SCALARS)) { - return NT_STATUS_OK; - } - for (i=0;i<n;i++) { - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, data[i])); - } - return NT_STATUS_OK; -} - -/* - push an array of uint32_t -*/ -NTSTATUS ndr_push_array_uint32(struct ndr_push *ndr, int ndr_flags, const uint32_t *data, uint32_t n) -{ - int i; - if (!(ndr_flags & NDR_SCALARS)) { - return NT_STATUS_OK; - } - for (i=0;i<n;i++) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, data[i])); - } - return NT_STATUS_OK; -} - -/* - push an array of hyper -*/ -NTSTATUS ndr_push_array_hyper(struct ndr_push *ndr, int ndr_flags, const uint64_t *data, uint32_t n) -{ - int i; - if (!(ndr_flags & NDR_SCALARS)) { - return NT_STATUS_OK; - } - for (i=0;i<n;i++) { - NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, data[i])); - } - return NT_STATUS_OK; -} - -/* - push an array of hyper -*/ -NTSTATUS ndr_push_array_WERROR(struct ndr_push *ndr, int ndr_flags, const WERROR *data, uint32_t n) -{ - int i; - if (!(ndr_flags & NDR_SCALARS)) { - return NT_STATUS_OK; - } - for (i=0;i<n;i++) { - NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, data[i])); - } - return NT_STATUS_OK; -} - -/* save the current position */ void ndr_push_save(struct ndr_push *ndr, struct ndr_push_save *save) @@ -837,78 +717,6 @@ void ndr_print_bad_level(struct ndr_print *ndr, const char *name, uint16_t level ndr->print(ndr, "UNKNOWN LEVEL %u", level); } -void ndr_print_array_WERROR(struct ndr_print *ndr, const char *name, - const WERROR *data, uint32_t count) -{ - int i; - - ndr->print(ndr, "%s: ARRAY(%d)", name, count); - ndr->depth++; - for (i=0;i<count;i++) { - char *idx=NULL; - asprintf(&idx, "[%d]", i); - if (idx) { - ndr_print_WERROR(ndr, idx, data[i]); - free(idx); - } - } - ndr->depth--; -} - -void ndr_print_array_hyper(struct ndr_print *ndr, const char *name, - const uint64_t *data, uint32_t count) -{ - int i; - - ndr->print(ndr, "%s: ARRAY(%d)", name, count); - ndr->depth++; - for (i=0;i<count;i++) { - char *idx=NULL; - asprintf(&idx, "[%d]", i); - if (idx) { - ndr_print_hyper(ndr, idx, data[i]); - free(idx); - } - } - ndr->depth--; -} - -void ndr_print_array_uint32(struct ndr_print *ndr, const char *name, - const uint32_t *data, uint32_t count) -{ - int i; - - ndr->print(ndr, "%s: ARRAY(%d)", name, count); - ndr->depth++; - for (i=0;i<count;i++) { - char *idx=NULL; - asprintf(&idx, "[%d]", i); - if (idx) { - ndr_print_uint32(ndr, idx, data[i]); - free(idx); - } - } - ndr->depth--; -} - -void ndr_print_array_uint16(struct ndr_print *ndr, const char *name, - const uint16_t *data, uint32_t count) -{ - int i; - - ndr->print(ndr, "%s: ARRAY(%d)", name, count); - ndr->depth++; - for (i=0;i<count;i++) { - char *idx=NULL; - asprintf(&idx, "[%d]", i); - if (idx) { - ndr_print_uint16(ndr, idx, data[i]); - free(idx); - } - } - ndr->depth--; -} - void ndr_print_array_uint8(struct ndr_print *ndr, const char *name, const uint8_t *data, uint32_t count) { |