diff options
Diffstat (limited to 'source3/librpc/ndr/ndr_basic.c')
-rw-r--r-- | source3/librpc/ndr/ndr_basic.c | 182 |
1 files changed, 91 insertions, 91 deletions
diff --git a/source3/librpc/ndr/ndr_basic.c b/source3/librpc/ndr/ndr_basic.c index b406791a27..0ef78a2a54 100644 --- a/source3/librpc/ndr/ndr_basic.c +++ b/source3/librpc/ndr/ndr_basic.c @@ -58,126 +58,126 @@ _PUBLIC_ void ndr_check_padding(struct ndr_pull *ndr, size_t n) /* parse a int8_t */ -_PUBLIC_ NTSTATUS ndr_pull_int8(struct ndr_pull *ndr, int ndr_flags, int8_t *v) +_PUBLIC_ enum ndr_err_code ndr_pull_int8(struct ndr_pull *ndr, int ndr_flags, int8_t *v) { NDR_PULL_NEED_BYTES(ndr, 1); *v = (int8_t)CVAL(ndr->data, ndr->offset); ndr->offset += 1; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* parse a uint8_t */ -_PUBLIC_ NTSTATUS ndr_pull_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *v) +_PUBLIC_ enum ndr_err_code ndr_pull_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *v) { NDR_PULL_NEED_BYTES(ndr, 1); *v = CVAL(ndr->data, ndr->offset); ndr->offset += 1; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* parse a int16_t */ -_PUBLIC_ NTSTATUS ndr_pull_int16(struct ndr_pull *ndr, int ndr_flags, int16_t *v) +_PUBLIC_ enum ndr_err_code ndr_pull_int16(struct ndr_pull *ndr, int ndr_flags, int16_t *v) { NDR_PULL_ALIGN(ndr, 2); NDR_PULL_NEED_BYTES(ndr, 2); *v = (uint16_t)NDR_SVAL(ndr, ndr->offset); ndr->offset += 2; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* parse a uint16_t */ -_PUBLIC_ NTSTATUS ndr_pull_uint16(struct ndr_pull *ndr, int ndr_flags, uint16_t *v) +_PUBLIC_ enum ndr_err_code ndr_pull_uint16(struct ndr_pull *ndr, int ndr_flags, uint16_t *v) { NDR_PULL_ALIGN(ndr, 2); NDR_PULL_NEED_BYTES(ndr, 2); *v = NDR_SVAL(ndr, ndr->offset); ndr->offset += 2; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* parse a int32_t */ -_PUBLIC_ NTSTATUS ndr_pull_int32(struct ndr_pull *ndr, int ndr_flags, int32_t *v) +_PUBLIC_ enum ndr_err_code ndr_pull_int32(struct ndr_pull *ndr, int ndr_flags, int32_t *v) { NDR_PULL_ALIGN(ndr, 4); NDR_PULL_NEED_BYTES(ndr, 4); *v = NDR_IVALS(ndr, ndr->offset); ndr->offset += 4; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* parse a uint32_t */ -_PUBLIC_ NTSTATUS ndr_pull_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *v) +_PUBLIC_ enum ndr_err_code ndr_pull_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *v) { NDR_PULL_ALIGN(ndr, 4); NDR_PULL_NEED_BYTES(ndr, 4); *v = NDR_IVAL(ndr, ndr->offset); ndr->offset += 4; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* parse a pointer referent identifier */ -_PUBLIC_ NTSTATUS ndr_pull_generic_ptr(struct ndr_pull *ndr, uint32_t *v) +_PUBLIC_ enum ndr_err_code ndr_pull_generic_ptr(struct ndr_pull *ndr, uint32_t *v) { NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, v)); if (*v != 0) { ndr->ptr_count++; } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* parse a ref pointer referent identifier */ -_PUBLIC_ NTSTATUS ndr_pull_ref_ptr(struct ndr_pull *ndr, uint32_t *v) +_PUBLIC_ enum ndr_err_code ndr_pull_ref_ptr(struct ndr_pull *ndr, uint32_t *v) { NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, v)); /* ref pointers always point to data */ *v = 1; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* parse a udlong */ -_PUBLIC_ NTSTATUS ndr_pull_udlong(struct ndr_pull *ndr, int ndr_flags, uint64_t *v) +_PUBLIC_ enum ndr_err_code ndr_pull_udlong(struct ndr_pull *ndr, int ndr_flags, uint64_t *v) { NDR_PULL_ALIGN(ndr, 4); NDR_PULL_NEED_BYTES(ndr, 8); *v = NDR_IVAL(ndr, ndr->offset); *v |= (uint64_t)(NDR_IVAL(ndr, ndr->offset+4)) << 32; ndr->offset += 8; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* parse a udlongr */ -_PUBLIC_ NTSTATUS ndr_pull_udlongr(struct ndr_pull *ndr, int ndr_flags, uint64_t *v) +_PUBLIC_ enum ndr_err_code ndr_pull_udlongr(struct ndr_pull *ndr, int ndr_flags, uint64_t *v) { NDR_PULL_ALIGN(ndr, 4); NDR_PULL_NEED_BYTES(ndr, 8); *v = ((uint64_t)NDR_IVAL(ndr, ndr->offset)) << 32; *v |= NDR_IVAL(ndr, ndr->offset+4); ndr->offset += 8; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* parse a dlong */ -_PUBLIC_ NTSTATUS ndr_pull_dlong(struct ndr_pull *ndr, int ndr_flags, int64_t *v) +_PUBLIC_ enum ndr_err_code ndr_pull_dlong(struct ndr_pull *ndr, int ndr_flags, int64_t *v) { return ndr_pull_udlong(ndr, ndr_flags, (uint64_t *)v); } @@ -185,7 +185,7 @@ _PUBLIC_ NTSTATUS ndr_pull_dlong(struct ndr_pull *ndr, int ndr_flags, int64_t *v /* parse a hyper */ -_PUBLIC_ NTSTATUS ndr_pull_hyper(struct ndr_pull *ndr, int ndr_flags, uint64_t *v) +_PUBLIC_ enum ndr_err_code ndr_pull_hyper(struct ndr_pull *ndr, int ndr_flags, uint64_t *v) { NDR_PULL_ALIGN(ndr, 8); return ndr_pull_udlong(ndr, ndr_flags, v); @@ -194,7 +194,7 @@ _PUBLIC_ NTSTATUS ndr_pull_hyper(struct ndr_pull *ndr, int ndr_flags, uint64_t * /* parse a pointer */ -_PUBLIC_ NTSTATUS ndr_pull_pointer(struct ndr_pull *ndr, int ndr_flags, void* *v) +_PUBLIC_ enum ndr_err_code ndr_pull_pointer(struct ndr_pull *ndr, int ndr_flags, void* *v) { intptr_t h; NDR_PULL_ALIGN(ndr, sizeof(h)); @@ -202,24 +202,24 @@ _PUBLIC_ NTSTATUS ndr_pull_pointer(struct ndr_pull *ndr, int ndr_flags, void* *v memcpy(&h, ndr->data+ndr->offset, sizeof(h)); ndr->offset += sizeof(h); *v = (void *)h; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* pull a NTSTATUS */ -_PUBLIC_ NTSTATUS ndr_pull_NTSTATUS(struct ndr_pull *ndr, int ndr_flags, NTSTATUS *status) +_PUBLIC_ enum ndr_err_code ndr_pull_NTSTATUS(struct ndr_pull *ndr, int ndr_flags, NTSTATUS *status) { uint32_t v; NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); *status = NT_STATUS(v); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* push a NTSTATUS */ -_PUBLIC_ NTSTATUS ndr_push_NTSTATUS(struct ndr_push *ndr, int ndr_flags, NTSTATUS status) +_PUBLIC_ enum ndr_err_code ndr_push_NTSTATUS(struct ndr_push *ndr, int ndr_flags, NTSTATUS status) { return ndr_push_uint32(ndr, ndr_flags, NT_STATUS_V(status)); } @@ -232,18 +232,18 @@ _PUBLIC_ void ndr_print_NTSTATUS(struct ndr_print *ndr, const char *name, NTSTAT /* pull a WERROR */ -_PUBLIC_ NTSTATUS ndr_pull_WERROR(struct ndr_pull *ndr, int ndr_flags, WERROR *status) +_PUBLIC_ enum ndr_err_code ndr_pull_WERROR(struct ndr_pull *ndr, int ndr_flags, WERROR *status) { uint32_t v; NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); *status = W_ERROR(v); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* push a WERROR */ -_PUBLIC_ NTSTATUS ndr_push_WERROR(struct ndr_push *ndr, int ndr_flags, WERROR status) +_PUBLIC_ enum ndr_err_code ndr_push_WERROR(struct ndr_push *ndr, int ndr_flags, WERROR status) { return ndr_push_uint32(ndr, NDR_SCALARS, W_ERROR_V(status)); } @@ -256,21 +256,21 @@ _PUBLIC_ void ndr_print_WERROR(struct ndr_print *ndr, const char *name, WERROR r /* parse a set of bytes */ -_PUBLIC_ NTSTATUS ndr_pull_bytes(struct ndr_pull *ndr, uint8_t *data, uint32_t n) +_PUBLIC_ enum ndr_err_code ndr_pull_bytes(struct ndr_pull *ndr, uint8_t *data, uint32_t n) { NDR_PULL_NEED_BYTES(ndr, n); memcpy(data, ndr->data + ndr->offset, n); ndr->offset += n; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* pull an array of uint8 */ -_PUBLIC_ NTSTATUS ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *data, uint32_t n) +_PUBLIC_ enum ndr_err_code ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *data, uint32_t n) { if (!(ndr_flags & NDR_SCALARS)) { - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } return ndr_pull_bytes(ndr, data, n); } @@ -278,103 +278,103 @@ _PUBLIC_ NTSTATUS ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, uint /* push a int8_t */ -_PUBLIC_ NTSTATUS ndr_push_int8(struct ndr_push *ndr, int ndr_flags, int8_t v) +_PUBLIC_ enum ndr_err_code ndr_push_int8(struct ndr_push *ndr, int ndr_flags, int8_t v) { NDR_PUSH_NEED_BYTES(ndr, 1); SCVAL(ndr->data, ndr->offset, (uint8_t)v); ndr->offset += 1; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* push a uint8_t */ -_PUBLIC_ NTSTATUS ndr_push_uint8(struct ndr_push *ndr, int ndr_flags, uint8_t v) +_PUBLIC_ enum ndr_err_code ndr_push_uint8(struct ndr_push *ndr, int ndr_flags, uint8_t v) { NDR_PUSH_NEED_BYTES(ndr, 1); SCVAL(ndr->data, ndr->offset, v); ndr->offset += 1; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* push a int16_t */ -_PUBLIC_ NTSTATUS ndr_push_int16(struct ndr_push *ndr, int ndr_flags, int16_t v) +_PUBLIC_ enum ndr_err_code ndr_push_int16(struct ndr_push *ndr, int ndr_flags, int16_t v) { NDR_PUSH_ALIGN(ndr, 2); NDR_PUSH_NEED_BYTES(ndr, 2); NDR_SSVAL(ndr, ndr->offset, (uint16_t)v); ndr->offset += 2; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* push a uint16_t */ -_PUBLIC_ NTSTATUS ndr_push_uint16(struct ndr_push *ndr, int ndr_flags, uint16_t v) +_PUBLIC_ enum ndr_err_code ndr_push_uint16(struct ndr_push *ndr, int ndr_flags, uint16_t v) { NDR_PUSH_ALIGN(ndr, 2); NDR_PUSH_NEED_BYTES(ndr, 2); NDR_SSVAL(ndr, ndr->offset, v); ndr->offset += 2; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* push a int32_t */ -_PUBLIC_ NTSTATUS ndr_push_int32(struct ndr_push *ndr, int ndr_flags, int32_t v) +_PUBLIC_ enum ndr_err_code ndr_push_int32(struct ndr_push *ndr, int ndr_flags, int32_t v) { NDR_PUSH_ALIGN(ndr, 4); NDR_PUSH_NEED_BYTES(ndr, 4); NDR_SIVALS(ndr, ndr->offset, v); ndr->offset += 4; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* push a uint32_t */ -_PUBLIC_ NTSTATUS ndr_push_uint32(struct ndr_push *ndr, int ndr_flags, uint32_t v) +_PUBLIC_ enum ndr_err_code ndr_push_uint32(struct ndr_push *ndr, int ndr_flags, uint32_t v) { NDR_PUSH_ALIGN(ndr, 4); NDR_PUSH_NEED_BYTES(ndr, 4); NDR_SIVAL(ndr, ndr->offset, v); ndr->offset += 4; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* push a udlong */ -_PUBLIC_ NTSTATUS ndr_push_udlong(struct ndr_push *ndr, int ndr_flags, uint64_t v) +_PUBLIC_ enum ndr_err_code ndr_push_udlong(struct ndr_push *ndr, int ndr_flags, uint64_t v) { NDR_PUSH_ALIGN(ndr, 4); NDR_PUSH_NEED_BYTES(ndr, 8); NDR_SIVAL(ndr, ndr->offset, (v & 0xFFFFFFFF)); NDR_SIVAL(ndr, ndr->offset+4, (v>>32)); ndr->offset += 8; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* push a udlongr */ -_PUBLIC_ NTSTATUS ndr_push_udlongr(struct ndr_push *ndr, int ndr_flags, uint64_t v) +_PUBLIC_ enum ndr_err_code ndr_push_udlongr(struct ndr_push *ndr, int ndr_flags, uint64_t v) { NDR_PUSH_ALIGN(ndr, 4); NDR_PUSH_NEED_BYTES(ndr, 8); NDR_SIVAL(ndr, ndr->offset, (v>>32)); NDR_SIVAL(ndr, ndr->offset+4, (v & 0xFFFFFFFF)); ndr->offset += 8; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* push a dlong */ -_PUBLIC_ NTSTATUS ndr_push_dlong(struct ndr_push *ndr, int ndr_flags, int64_t v) +_PUBLIC_ enum ndr_err_code ndr_push_dlong(struct ndr_push *ndr, int ndr_flags, int64_t v) { return ndr_push_udlong(ndr, NDR_SCALARS, (uint64_t)v); } @@ -382,7 +382,7 @@ _PUBLIC_ NTSTATUS ndr_push_dlong(struct ndr_push *ndr, int ndr_flags, int64_t v) /* push a hyper */ -_PUBLIC_ NTSTATUS ndr_push_hyper(struct ndr_push *ndr, int ndr_flags, uint64_t v) +_PUBLIC_ enum ndr_err_code ndr_push_hyper(struct ndr_push *ndr, int ndr_flags, uint64_t v) { NDR_PUSH_ALIGN(ndr, 8); return ndr_push_udlong(ndr, NDR_SCALARS, v); @@ -391,57 +391,57 @@ _PUBLIC_ NTSTATUS ndr_push_hyper(struct ndr_push *ndr, int ndr_flags, uint64_t v /* push a pointer */ -_PUBLIC_ NTSTATUS ndr_push_pointer(struct ndr_push *ndr, int ndr_flags, void* v) +_PUBLIC_ enum ndr_err_code ndr_push_pointer(struct ndr_push *ndr, int ndr_flags, void* v) { intptr_t h = (intptr_t)v; NDR_PUSH_ALIGN(ndr, sizeof(h)); NDR_PUSH_NEED_BYTES(ndr, sizeof(h)); memcpy(ndr->data+ndr->offset, &h, sizeof(h)); ndr->offset += sizeof(h); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -_PUBLIC_ NTSTATUS ndr_push_align(struct ndr_push *ndr, size_t size) +_PUBLIC_ enum ndr_err_code ndr_push_align(struct ndr_push *ndr, size_t size) { NDR_PUSH_ALIGN(ndr, size); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -_PUBLIC_ NTSTATUS ndr_pull_align(struct ndr_pull *ndr, size_t size) +_PUBLIC_ enum ndr_err_code ndr_pull_align(struct ndr_pull *ndr, size_t size) { NDR_PULL_ALIGN(ndr, size); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* push some bytes */ -_PUBLIC_ NTSTATUS ndr_push_bytes(struct ndr_push *ndr, const uint8_t *data, uint32_t n) +_PUBLIC_ enum ndr_err_code ndr_push_bytes(struct ndr_push *ndr, const uint8_t *data, uint32_t n) { NDR_PUSH_NEED_BYTES(ndr, n); memcpy(ndr->data + ndr->offset, data, n); ndr->offset += n; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* push some zero bytes */ -_PUBLIC_ NTSTATUS ndr_push_zero(struct ndr_push *ndr, uint32_t n) +_PUBLIC_ enum ndr_err_code ndr_push_zero(struct ndr_push *ndr, uint32_t n) { NDR_PUSH_NEED_BYTES(ndr, n); memset(ndr->data + ndr->offset, 0, n); ndr->offset += n; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* push an array of uint8 */ -_PUBLIC_ NTSTATUS ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const uint8_t *data, uint32_t n) +_PUBLIC_ enum ndr_err_code ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const uint8_t *data, uint32_t n) { if (!(ndr_flags & NDR_SCALARS)) { - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } return ndr_push_bytes(ndr, data, n); } @@ -465,7 +465,7 @@ _PUBLIC_ void ndr_push_restore(struct ndr_push *ndr, struct ndr_push_save *save) /* push a unique non-zero value if a pointer is non-NULL, otherwise 0 */ -_PUBLIC_ NTSTATUS ndr_push_unique_ptr(struct ndr_push *ndr, const void *p) +_PUBLIC_ enum ndr_err_code ndr_push_unique_ptr(struct ndr_push *ndr, const void *p) { uint32_t ptr = 0; if (p) { @@ -479,7 +479,7 @@ _PUBLIC_ NTSTATUS ndr_push_unique_ptr(struct ndr_push *ndr, const void *p) /* push a 'simple' full non-zero value if a pointer is non-NULL, otherwise 0 */ -_PUBLIC_ NTSTATUS ndr_push_full_ptr(struct ndr_push *ndr, const void *p) +_PUBLIC_ enum ndr_err_code ndr_push_full_ptr(struct ndr_push *ndr, const void *p) { uint32_t ptr = 0; if (p) { @@ -497,7 +497,7 @@ _PUBLIC_ NTSTATUS ndr_push_full_ptr(struct ndr_push *ndr, const void *p) /* push always a 0, if a pointer is NULL it's a fatal error */ -_PUBLIC_ NTSTATUS ndr_push_ref_ptr(struct ndr_push *ndr) +_PUBLIC_ enum ndr_err_code ndr_push_ref_ptr(struct ndr_push *ndr) { return ndr_push_uint32(ndr, NDR_SCALARS, 0xAEF1AEF1); } @@ -506,63 +506,63 @@ _PUBLIC_ NTSTATUS ndr_push_ref_ptr(struct ndr_push *ndr) /* push a NTTIME */ -_PUBLIC_ NTSTATUS ndr_push_NTTIME(struct ndr_push *ndr, int ndr_flags, NTTIME t) +_PUBLIC_ enum ndr_err_code ndr_push_NTTIME(struct ndr_push *ndr, int ndr_flags, NTTIME t) { NDR_CHECK(ndr_push_udlong(ndr, ndr_flags, t)); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* pull a NTTIME */ -_PUBLIC_ NTSTATUS ndr_pull_NTTIME(struct ndr_pull *ndr, int ndr_flags, NTTIME *t) +_PUBLIC_ enum ndr_err_code ndr_pull_NTTIME(struct ndr_pull *ndr, int ndr_flags, NTTIME *t) { NDR_CHECK(ndr_pull_udlong(ndr, ndr_flags, t)); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* push a NTTIME */ -_PUBLIC_ NTSTATUS ndr_push_NTTIME_1sec(struct ndr_push *ndr, int ndr_flags, NTTIME t) +_PUBLIC_ enum ndr_err_code ndr_push_NTTIME_1sec(struct ndr_push *ndr, int ndr_flags, NTTIME t) { t /= 10000000; NDR_CHECK(ndr_push_hyper(ndr, ndr_flags, t)); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* pull a NTTIME_1sec */ -_PUBLIC_ NTSTATUS ndr_pull_NTTIME_1sec(struct ndr_pull *ndr, int ndr_flags, NTTIME *t) +_PUBLIC_ enum ndr_err_code ndr_pull_NTTIME_1sec(struct ndr_pull *ndr, int ndr_flags, NTTIME *t) { NDR_CHECK(ndr_pull_hyper(ndr, ndr_flags, t)); (*t) *= 10000000; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* pull a NTTIME_hyper */ -_PUBLIC_ NTSTATUS ndr_pull_NTTIME_hyper(struct ndr_pull *ndr, int ndr_flags, NTTIME *t) +_PUBLIC_ enum ndr_err_code ndr_pull_NTTIME_hyper(struct ndr_pull *ndr, int ndr_flags, NTTIME *t) { NDR_CHECK(ndr_pull_hyper(ndr, ndr_flags, t)); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* push a NTTIME_hyper */ -_PUBLIC_ NTSTATUS ndr_push_NTTIME_hyper(struct ndr_push *ndr, int ndr_flags, NTTIME t) +_PUBLIC_ enum ndr_err_code ndr_push_NTTIME_hyper(struct ndr_push *ndr, int ndr_flags, NTTIME t) { NDR_CHECK(ndr_push_hyper(ndr, ndr_flags, t)); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* push a time_t */ -_PUBLIC_ NTSTATUS ndr_push_time_t(struct ndr_push *ndr, int ndr_flags, time_t t) +_PUBLIC_ enum ndr_err_code ndr_push_time_t(struct ndr_push *ndr, int ndr_flags, time_t t) { return ndr_push_uint32(ndr, ndr_flags, t); } @@ -570,32 +570,32 @@ _PUBLIC_ NTSTATUS ndr_push_time_t(struct ndr_push *ndr, int ndr_flags, time_t t) /* pull a time_t */ -_PUBLIC_ NTSTATUS ndr_pull_time_t(struct ndr_pull *ndr, int ndr_flags, time_t *t) +_PUBLIC_ enum ndr_err_code ndr_pull_time_t(struct ndr_pull *ndr, int ndr_flags, time_t *t) { uint32_t tt; NDR_CHECK(ndr_pull_uint32(ndr, ndr_flags, &tt)); *t = tt; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* pull a ipv4address */ -_PUBLIC_ NTSTATUS ndr_pull_ipv4address(struct ndr_pull *ndr, int ndr_flags, const char **address) +_PUBLIC_ enum ndr_err_code ndr_pull_ipv4address(struct ndr_pull *ndr, int ndr_flags, const char **address) { struct in_addr in; NDR_CHECK(ndr_pull_uint32(ndr, ndr_flags, &in.s_addr)); in.s_addr = htonl(in.s_addr); *address = talloc_strdup(ndr->current_mem_ctx, inet_ntoa(in)); - NT_STATUS_HAVE_NO_MEMORY(*address); - return NT_STATUS_OK; + NDR_ERR_HAVE_NO_MEMORY(*address); + return NDR_ERR_SUCCESS; } /* push a ipv4address */ -_PUBLIC_ NTSTATUS ndr_push_ipv4address(struct ndr_push *ndr, int ndr_flags, const char *address) +_PUBLIC_ enum ndr_err_code ndr_push_ipv4address(struct ndr_push *ndr, int ndr_flags, const char *address) { uint32_t addr; if (!is_ipaddress(address)) { @@ -605,7 +605,7 @@ _PUBLIC_ NTSTATUS ndr_push_ipv4address(struct ndr_push *ndr, int ndr_flags, cons } addr = inet_addr(address); NDR_CHECK(ndr_push_uint32(ndr, ndr_flags, htonl(addr))); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* @@ -794,7 +794,7 @@ _PUBLIC_ void ndr_print_DATA_BLOB(struct ndr_print *ndr, const char *name, DATA_ /* push a DATA_BLOB onto the wire. */ -_PUBLIC_ NTSTATUS ndr_push_DATA_BLOB(struct ndr_push *ndr, int ndr_flags, DATA_BLOB blob) +_PUBLIC_ enum ndr_err_code ndr_push_DATA_BLOB(struct ndr_push *ndr, int ndr_flags, DATA_BLOB blob) { if (ndr->flags & LIBNDR_ALIGN_FLAGS) { if (ndr->flags & LIBNDR_FLAG_ALIGN2) { @@ -810,13 +810,13 @@ _PUBLIC_ NTSTATUS ndr_push_DATA_BLOB(struct ndr_push *ndr, int ndr_flags, DATA_B NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, blob.length)); } NDR_CHECK(ndr_push_bytes(ndr, blob.data, blob.length)); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* pull a DATA_BLOB from the wire. */ -_PUBLIC_ NTSTATUS ndr_pull_DATA_BLOB(struct ndr_pull *ndr, int ndr_flags, DATA_BLOB *blob) +_PUBLIC_ enum ndr_err_code ndr_pull_DATA_BLOB(struct ndr_pull *ndr, int ndr_flags, DATA_BLOB *blob) { uint32_t length = 0; @@ -839,7 +839,7 @@ _PUBLIC_ NTSTATUS ndr_pull_DATA_BLOB(struct ndr_pull *ndr, int ndr_flags, DATA_B NDR_PULL_NEED_BYTES(ndr, length); *blob = data_blob_talloc(ndr->current_mem_ctx, ndr->data+ndr->offset, length); ndr->offset += length; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ uint32_t ndr_size_DATA_BLOB(int ret, const DATA_BLOB *data, int flags) |