diff options
Diffstat (limited to 'source4/librpc/ndr/ndr_basic.c')
-rw-r--r-- | source4/librpc/ndr/ndr_basic.c | 160 |
1 files changed, 80 insertions, 80 deletions
diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c index ccc1c8a016..000a0c3498 100644 --- a/source4/librpc/ndr/ndr_basic.c +++ b/source4/librpc/ndr/ndr_basic.c @@ -36,7 +36,7 @@ these could also indicate that real structure elements have been mistaken for padding in the IDL */ -void ndr_check_padding(struct ndr_pull *ndr, size_t n) +_PUBLIC_ void ndr_check_padding(struct ndr_pull *ndr, size_t n) { size_t ofs2 = (ndr->offset + (n-1)) & ~(n-1); int i; @@ -58,7 +58,7 @@ void ndr_check_padding(struct ndr_pull *ndr, size_t n) /* parse a int8_t */ -NTSTATUS ndr_pull_int8(struct ndr_pull *ndr, int ndr_flags, int8_t *v) +_PUBLIC_ NTSTATUS 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); @@ -69,7 +69,7 @@ NTSTATUS ndr_pull_int8(struct ndr_pull *ndr, int ndr_flags, int8_t *v) /* parse a uint8_t */ -NTSTATUS ndr_pull_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *v) +_PUBLIC_ NTSTATUS 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); @@ -80,7 +80,7 @@ NTSTATUS ndr_pull_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *v) /* parse a int16_t */ -NTSTATUS ndr_pull_int16(struct ndr_pull *ndr, int ndr_flags, int16_t *v) +_PUBLIC_ NTSTATUS ndr_pull_int16(struct ndr_pull *ndr, int ndr_flags, int16_t *v) { NDR_PULL_ALIGN(ndr, 2); NDR_PULL_NEED_BYTES(ndr, 2); @@ -92,7 +92,7 @@ NTSTATUS ndr_pull_int16(struct ndr_pull *ndr, int ndr_flags, int16_t *v) /* parse a uint16_t */ -NTSTATUS ndr_pull_uint16(struct ndr_pull *ndr, int ndr_flags, uint16_t *v) +_PUBLIC_ NTSTATUS ndr_pull_uint16(struct ndr_pull *ndr, int ndr_flags, uint16_t *v) { NDR_PULL_ALIGN(ndr, 2); NDR_PULL_NEED_BYTES(ndr, 2); @@ -104,7 +104,7 @@ NTSTATUS ndr_pull_uint16(struct ndr_pull *ndr, int ndr_flags, uint16_t *v) /* parse a int32_t */ -NTSTATUS ndr_pull_int32(struct ndr_pull *ndr, int ndr_flags, int32_t *v) +_PUBLIC_ NTSTATUS ndr_pull_int32(struct ndr_pull *ndr, int ndr_flags, int32_t *v) { NDR_PULL_ALIGN(ndr, 4); NDR_PULL_NEED_BYTES(ndr, 4); @@ -116,7 +116,7 @@ NTSTATUS ndr_pull_int32(struct ndr_pull *ndr, int ndr_flags, int32_t *v) /* parse a uint32_t */ -NTSTATUS ndr_pull_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *v) +_PUBLIC_ NTSTATUS ndr_pull_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *v) { NDR_PULL_ALIGN(ndr, 4); NDR_PULL_NEED_BYTES(ndr, 4); @@ -128,7 +128,7 @@ NTSTATUS ndr_pull_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *v) /* parse a pointer referent identifier */ -NTSTATUS ndr_pull_generic_ptr(struct ndr_pull *ndr, uint32_t *v) +_PUBLIC_ NTSTATUS ndr_pull_generic_ptr(struct ndr_pull *ndr, uint32_t *v) { NTSTATUS status; status = ndr_pull_uint32(ndr, NDR_SCALARS, v); @@ -141,7 +141,7 @@ NTSTATUS ndr_pull_generic_ptr(struct ndr_pull *ndr, uint32_t *v) /* parse a ref pointer referent identifier */ -NTSTATUS ndr_pull_ref_ptr(struct ndr_pull *ndr, uint32_t *v) +_PUBLIC_ NTSTATUS 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 */ @@ -152,7 +152,7 @@ NTSTATUS ndr_pull_ref_ptr(struct ndr_pull *ndr, uint32_t *v) /* parse a udlong */ -NTSTATUS ndr_pull_udlong(struct ndr_pull *ndr, int ndr_flags, uint64_t *v) +_PUBLIC_ NTSTATUS ndr_pull_udlong(struct ndr_pull *ndr, int ndr_flags, uint64_t *v) { NDR_PULL_ALIGN(ndr, 4); NDR_PULL_NEED_BYTES(ndr, 8); @@ -165,7 +165,7 @@ NTSTATUS ndr_pull_udlong(struct ndr_pull *ndr, int ndr_flags, uint64_t *v) /* parse a udlongr */ -NTSTATUS ndr_pull_udlongr(struct ndr_pull *ndr, int ndr_flags, uint64_t *v) +_PUBLIC_ NTSTATUS ndr_pull_udlongr(struct ndr_pull *ndr, int ndr_flags, uint64_t *v) { NDR_PULL_ALIGN(ndr, 4); NDR_PULL_NEED_BYTES(ndr, 8); @@ -178,7 +178,7 @@ NTSTATUS ndr_pull_udlongr(struct ndr_pull *ndr, int ndr_flags, uint64_t *v) /* parse a dlong */ -NTSTATUS ndr_pull_dlong(struct ndr_pull *ndr, int ndr_flags, int64_t *v) +_PUBLIC_ NTSTATUS ndr_pull_dlong(struct ndr_pull *ndr, int ndr_flags, int64_t *v) { return ndr_pull_udlong(ndr, ndr_flags, (uint64_t *)v); } @@ -186,7 +186,7 @@ NTSTATUS ndr_pull_dlong(struct ndr_pull *ndr, int ndr_flags, int64_t *v) /* parse a hyper */ -NTSTATUS ndr_pull_hyper(struct ndr_pull *ndr, int ndr_flags, uint64_t *v) +_PUBLIC_ NTSTATUS 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); @@ -195,7 +195,7 @@ NTSTATUS ndr_pull_hyper(struct ndr_pull *ndr, int ndr_flags, uint64_t *v) /* parse a pointer */ -NTSTATUS ndr_pull_pointer(struct ndr_pull *ndr, int ndr_flags, void* *v) +_PUBLIC_ NTSTATUS ndr_pull_pointer(struct ndr_pull *ndr, int ndr_flags, void* *v) { intptr_t h; NDR_PULL_ALIGN(ndr, sizeof(h)); @@ -209,7 +209,7 @@ NTSTATUS ndr_pull_pointer(struct ndr_pull *ndr, int ndr_flags, void* *v) /* pull a NTSTATUS */ -NTSTATUS ndr_pull_NTSTATUS(struct ndr_pull *ndr, int ndr_flags, NTSTATUS *status) +_PUBLIC_ NTSTATUS ndr_pull_NTSTATUS(struct ndr_pull *ndr, int ndr_flags, NTSTATUS *status) { uint32_t v; NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); @@ -220,12 +220,12 @@ NTSTATUS ndr_pull_NTSTATUS(struct ndr_pull *ndr, int ndr_flags, NTSTATUS *status /* push a NTSTATUS */ -NTSTATUS ndr_push_NTSTATUS(struct ndr_push *ndr, int ndr_flags, NTSTATUS status) +_PUBLIC_ NTSTATUS ndr_push_NTSTATUS(struct ndr_push *ndr, int ndr_flags, NTSTATUS status) { return ndr_push_uint32(ndr, ndr_flags, NT_STATUS_V(status)); } -void ndr_print_NTSTATUS(struct ndr_print *ndr, const char *name, NTSTATUS r) +_PUBLIC_ void ndr_print_NTSTATUS(struct ndr_print *ndr, const char *name, NTSTATUS r) { ndr->print(ndr, "%-25s: %s", name, nt_errstr(r)); } @@ -233,7 +233,7 @@ void ndr_print_NTSTATUS(struct ndr_print *ndr, const char *name, NTSTATUS r) /* pull a WERROR */ -NTSTATUS ndr_pull_WERROR(struct ndr_pull *ndr, int ndr_flags, WERROR *status) +_PUBLIC_ NTSTATUS ndr_pull_WERROR(struct ndr_pull *ndr, int ndr_flags, WERROR *status) { uint32_t v; NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); @@ -244,12 +244,12 @@ NTSTATUS ndr_pull_WERROR(struct ndr_pull *ndr, int ndr_flags, WERROR *status) /* push a WERROR */ -NTSTATUS ndr_push_WERROR(struct ndr_push *ndr, int ndr_flags, WERROR status) +_PUBLIC_ NTSTATUS ndr_push_WERROR(struct ndr_push *ndr, int ndr_flags, WERROR status) { return ndr_push_uint32(ndr, NDR_SCALARS, W_ERROR_V(status)); } -void ndr_print_WERROR(struct ndr_print *ndr, const char *name, WERROR r) +_PUBLIC_ void ndr_print_WERROR(struct ndr_print *ndr, const char *name, WERROR r) { ndr->print(ndr, "%-25s: %s", name, win_errstr(r)); } @@ -257,7 +257,7 @@ void ndr_print_WERROR(struct ndr_print *ndr, const char *name, WERROR r) /* parse a set of bytes */ -NTSTATUS ndr_pull_bytes(struct ndr_pull *ndr, uint8_t *data, uint32_t n) +_PUBLIC_ NTSTATUS 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); @@ -268,7 +268,7 @@ NTSTATUS ndr_pull_bytes(struct ndr_pull *ndr, uint8_t *data, uint32_t n) /* pull an array of uint8 */ -NTSTATUS ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *data, uint32_t n) +_PUBLIC_ NTSTATUS 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; @@ -279,7 +279,7 @@ NTSTATUS ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *data /* push a int8_t */ -NTSTATUS ndr_push_int8(struct ndr_push *ndr, int ndr_flags, int8_t v) +_PUBLIC_ NTSTATUS 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); @@ -290,7 +290,7 @@ NTSTATUS ndr_push_int8(struct ndr_push *ndr, int ndr_flags, int8_t v) /* push a uint8_t */ -NTSTATUS ndr_push_uint8(struct ndr_push *ndr, int ndr_flags, uint8_t v) +_PUBLIC_ NTSTATUS 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); @@ -301,7 +301,7 @@ NTSTATUS ndr_push_uint8(struct ndr_push *ndr, int ndr_flags, uint8_t v) /* push a int16_t */ -NTSTATUS ndr_push_int16(struct ndr_push *ndr, int ndr_flags, int16_t v) +_PUBLIC_ NTSTATUS ndr_push_int16(struct ndr_push *ndr, int ndr_flags, int16_t v) { NDR_PUSH_ALIGN(ndr, 2); NDR_PUSH_NEED_BYTES(ndr, 2); @@ -313,7 +313,7 @@ NTSTATUS ndr_push_int16(struct ndr_push *ndr, int ndr_flags, int16_t v) /* push a uint16_t */ -NTSTATUS ndr_push_uint16(struct ndr_push *ndr, int ndr_flags, uint16_t v) +_PUBLIC_ NTSTATUS ndr_push_uint16(struct ndr_push *ndr, int ndr_flags, uint16_t v) { NDR_PUSH_ALIGN(ndr, 2); NDR_PUSH_NEED_BYTES(ndr, 2); @@ -325,7 +325,7 @@ NTSTATUS ndr_push_uint16(struct ndr_push *ndr, int ndr_flags, uint16_t v) /* push a int32_t */ -NTSTATUS ndr_push_int32(struct ndr_push *ndr, int ndr_flags, int32_t v) +_PUBLIC_ NTSTATUS ndr_push_int32(struct ndr_push *ndr, int ndr_flags, int32_t v) { NDR_PUSH_ALIGN(ndr, 4); NDR_PUSH_NEED_BYTES(ndr, 4); @@ -337,7 +337,7 @@ NTSTATUS ndr_push_int32(struct ndr_push *ndr, int ndr_flags, int32_t v) /* push a uint32_t */ -NTSTATUS ndr_push_uint32(struct ndr_push *ndr, int ndr_flags, uint32_t v) +_PUBLIC_ NTSTATUS ndr_push_uint32(struct ndr_push *ndr, int ndr_flags, uint32_t v) { NDR_PUSH_ALIGN(ndr, 4); NDR_PUSH_NEED_BYTES(ndr, 4); @@ -349,7 +349,7 @@ NTSTATUS ndr_push_uint32(struct ndr_push *ndr, int ndr_flags, uint32_t v) /* push a udlong */ -NTSTATUS ndr_push_udlong(struct ndr_push *ndr, int ndr_flags, uint64_t v) +_PUBLIC_ NTSTATUS ndr_push_udlong(struct ndr_push *ndr, int ndr_flags, uint64_t v) { NDR_PUSH_ALIGN(ndr, 4); NDR_PUSH_NEED_BYTES(ndr, 8); @@ -362,7 +362,7 @@ NTSTATUS ndr_push_udlong(struct ndr_push *ndr, int ndr_flags, uint64_t v) /* push a udlongr */ -NTSTATUS ndr_push_udlongr(struct ndr_push *ndr, int ndr_flags, uint64_t v) +_PUBLIC_ NTSTATUS ndr_push_udlongr(struct ndr_push *ndr, int ndr_flags, uint64_t v) { NDR_PUSH_ALIGN(ndr, 4); NDR_PUSH_NEED_BYTES(ndr, 8); @@ -375,7 +375,7 @@ NTSTATUS ndr_push_udlongr(struct ndr_push *ndr, int ndr_flags, uint64_t v) /* push a dlong */ -NTSTATUS ndr_push_dlong(struct ndr_push *ndr, int ndr_flags, int64_t v) +_PUBLIC_ NTSTATUS ndr_push_dlong(struct ndr_push *ndr, int ndr_flags, int64_t v) { return ndr_push_udlong(ndr, NDR_SCALARS, (uint64_t)v); } @@ -383,7 +383,7 @@ NTSTATUS ndr_push_dlong(struct ndr_push *ndr, int ndr_flags, int64_t v) /* push a hyper */ -NTSTATUS ndr_push_hyper(struct ndr_push *ndr, int ndr_flags, uint64_t v) +_PUBLIC_ NTSTATUS 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); @@ -392,7 +392,7 @@ NTSTATUS ndr_push_hyper(struct ndr_push *ndr, int ndr_flags, uint64_t v) /* push a pointer */ -NTSTATUS ndr_push_pointer(struct ndr_push *ndr, int ndr_flags, void* v) +_PUBLIC_ NTSTATUS ndr_push_pointer(struct ndr_push *ndr, int ndr_flags, void* v) { intptr_t h = (intptr_t)v; NDR_PUSH_ALIGN(ndr, sizeof(h)); @@ -402,13 +402,13 @@ NTSTATUS ndr_push_pointer(struct ndr_push *ndr, int ndr_flags, void* v) return NT_STATUS_OK; } -NTSTATUS ndr_push_align(struct ndr_push *ndr, size_t size) +_PUBLIC_ NTSTATUS ndr_push_align(struct ndr_push *ndr, size_t size) { NDR_PUSH_ALIGN(ndr, size); return NT_STATUS_OK; } -NTSTATUS ndr_pull_align(struct ndr_pull *ndr, size_t size) +_PUBLIC_ NTSTATUS ndr_pull_align(struct ndr_pull *ndr, size_t size) { NDR_PULL_ALIGN(ndr, size); return NT_STATUS_OK; @@ -417,7 +417,7 @@ NTSTATUS ndr_pull_align(struct ndr_pull *ndr, size_t size) /* push some bytes */ -NTSTATUS ndr_push_bytes(struct ndr_push *ndr, const uint8_t *data, uint32_t n) +_PUBLIC_ NTSTATUS 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); @@ -428,7 +428,7 @@ NTSTATUS ndr_push_bytes(struct ndr_push *ndr, const uint8_t *data, uint32_t n) /* push some zero bytes */ -NTSTATUS ndr_push_zero(struct ndr_push *ndr, uint32_t n) +_PUBLIC_ NTSTATUS ndr_push_zero(struct ndr_push *ndr, uint32_t n) { NDR_PUSH_NEED_BYTES(ndr, n); memset(ndr->data + ndr->offset, 0, n); @@ -439,7 +439,7 @@ NTSTATUS ndr_push_zero(struct ndr_push *ndr, uint32_t n) /* push an array of uint8 */ -NTSTATUS ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const uint8_t *data, uint32_t n) +_PUBLIC_ NTSTATUS 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; @@ -450,7 +450,7 @@ NTSTATUS ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const uint8_t /* save the current position */ -void ndr_push_save(struct ndr_push *ndr, struct ndr_push_save *save) +_PUBLIC_ void ndr_push_save(struct ndr_push *ndr, struct ndr_push_save *save) { save->offset = ndr->offset; } @@ -458,7 +458,7 @@ void ndr_push_save(struct ndr_push *ndr, struct ndr_push_save *save) /* restore the position */ -void ndr_push_restore(struct ndr_push *ndr, struct ndr_push_save *save) +_PUBLIC_ void ndr_push_restore(struct ndr_push *ndr, struct ndr_push_save *save) { ndr->offset = save->offset; } @@ -466,7 +466,7 @@ 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 */ -NTSTATUS ndr_push_unique_ptr(struct ndr_push *ndr, const void *p) +_PUBLIC_ NTSTATUS ndr_push_unique_ptr(struct ndr_push *ndr, const void *p) { uint32_t ptr = 0; if (p) { @@ -480,7 +480,7 @@ 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 */ -NTSTATUS ndr_push_sptr_ptr(struct ndr_push *ndr, const void *p) +_PUBLIC_ NTSTATUS ndr_push_sptr_ptr(struct ndr_push *ndr, const void *p) { uint32_t ptr = 0; if (p) { @@ -493,7 +493,7 @@ NTSTATUS ndr_push_sptr_ptr(struct ndr_push *ndr, const void *p) /* push always a 0, if a pointer is NULL it's a fatal error */ -NTSTATUS ndr_push_ref_ptr(struct ndr_push *ndr, const void *p) +_PUBLIC_ NTSTATUS ndr_push_ref_ptr(struct ndr_push *ndr, const void *p) { if (p == NULL) { return NT_STATUS_INVALID_PARAMETER_MIX; @@ -505,7 +505,7 @@ NTSTATUS ndr_push_ref_ptr(struct ndr_push *ndr, const void *p) /* push a NTTIME */ -NTSTATUS ndr_push_NTTIME(struct ndr_push *ndr, int ndr_flags, NTTIME t) +_PUBLIC_ NTSTATUS 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; @@ -514,7 +514,7 @@ NTSTATUS ndr_push_NTTIME(struct ndr_push *ndr, int ndr_flags, NTTIME t) /* pull a NTTIME */ -NTSTATUS ndr_pull_NTTIME(struct ndr_pull *ndr, int ndr_flags, NTTIME *t) +_PUBLIC_ NTSTATUS 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; @@ -523,7 +523,7 @@ NTSTATUS ndr_pull_NTTIME(struct ndr_pull *ndr, int ndr_flags, NTTIME *t) /* push a NTTIME */ -NTSTATUS ndr_push_NTTIME_1sec(struct ndr_push *ndr, int ndr_flags, NTTIME t) +_PUBLIC_ NTSTATUS ndr_push_NTTIME_1sec(struct ndr_push *ndr, int ndr_flags, NTTIME t) { t /= 10000000; NDR_CHECK(ndr_push_hyper(ndr, ndr_flags, t)); @@ -533,7 +533,7 @@ NTSTATUS ndr_push_NTTIME_1sec(struct ndr_push *ndr, int ndr_flags, NTTIME t) /* pull a NTTIME_1sec */ -NTSTATUS ndr_pull_NTTIME_1sec(struct ndr_pull *ndr, int ndr_flags, NTTIME *t) +_PUBLIC_ NTSTATUS ndr_pull_NTTIME_1sec(struct ndr_pull *ndr, int ndr_flags, NTTIME *t) { NDR_CHECK(ndr_pull_hyper(ndr, ndr_flags, t)); (*t) *= 10000000; @@ -543,7 +543,7 @@ NTSTATUS ndr_pull_NTTIME_1sec(struct ndr_pull *ndr, int ndr_flags, NTTIME *t) /* pull a NTTIME_hyper */ -NTSTATUS ndr_pull_NTTIME_hyper(struct ndr_pull *ndr, int ndr_flags, NTTIME *t) +_PUBLIC_ NTSTATUS 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; @@ -552,7 +552,7 @@ NTSTATUS ndr_pull_NTTIME_hyper(struct ndr_pull *ndr, int ndr_flags, NTTIME *t) /* push a NTTIME_hyper */ -NTSTATUS ndr_push_NTTIME_hyper(struct ndr_push *ndr, int ndr_flags, NTTIME t) +_PUBLIC_ NTSTATUS 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; @@ -561,7 +561,7 @@ NTSTATUS ndr_push_NTTIME_hyper(struct ndr_push *ndr, int ndr_flags, NTTIME t) /* push a time_t */ -NTSTATUS ndr_push_time_t(struct ndr_push *ndr, int ndr_flags, time_t t) +_PUBLIC_ NTSTATUS ndr_push_time_t(struct ndr_push *ndr, int ndr_flags, time_t t) { return ndr_push_uint32(ndr, ndr_flags, t); } @@ -569,7 +569,7 @@ NTSTATUS ndr_push_time_t(struct ndr_push *ndr, int ndr_flags, time_t t) /* pull a time_t */ -NTSTATUS ndr_pull_time_t(struct ndr_pull *ndr, int ndr_flags, time_t *t) +_PUBLIC_ NTSTATUS 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)); @@ -581,7 +581,7 @@ NTSTATUS ndr_pull_time_t(struct ndr_pull *ndr, int ndr_flags, time_t *t) /* pull a ipv4address */ -NTSTATUS ndr_pull_ipv4address(struct ndr_pull *ndr, int ndr_flags, const char **address) +_PUBLIC_ NTSTATUS ndr_pull_ipv4address(struct ndr_pull *ndr, int ndr_flags, const char **address) { struct ipv4_addr in; NDR_CHECK(ndr_pull_uint32(ndr, ndr_flags, &in.addr)); @@ -594,7 +594,7 @@ NTSTATUS ndr_pull_ipv4address(struct ndr_pull *ndr, int ndr_flags, const char ** /* push a ipv4address */ -NTSTATUS ndr_push_ipv4address(struct ndr_push *ndr, int ndr_flags, const char *address) +_PUBLIC_ NTSTATUS ndr_push_ipv4address(struct ndr_push *ndr, int ndr_flags, const char *address) { uint32_t addr; if (!is_ipaddress(address)) { @@ -610,19 +610,19 @@ NTSTATUS ndr_push_ipv4address(struct ndr_push *ndr, int ndr_flags, const char *a /* print a ipv4address */ -void ndr_print_ipv4address(struct ndr_print *ndr, const char *name, +_PUBLIC_ void ndr_print_ipv4address(struct ndr_print *ndr, const char *name, const char *address) { ndr->print(ndr, "%-25s: %s", name, address); } -void ndr_print_struct(struct ndr_print *ndr, const char *name, const char *type) +_PUBLIC_ void ndr_print_struct(struct ndr_print *ndr, const char *name, const char *type) { ndr->print(ndr, "%s: struct %s", name, type); } -void ndr_print_enum(struct ndr_print *ndr, const char *name, const char *type, +_PUBLIC_ void ndr_print_enum(struct ndr_print *ndr, const char *name, const char *type, const char *val, uint_t value) { if (ndr->flags & LIBNDR_PRINT_ARRAY_HEX) { @@ -632,7 +632,7 @@ void ndr_print_enum(struct ndr_print *ndr, const char *name, const char *type, } } -void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size, const char *flag_name, uint_t flag, uint_t value) +_PUBLIC_ void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size, const char *flag_name, uint_t flag, uint_t value) { /* this is an attempt to support multi-bit bitmap masks */ value &= flag; @@ -648,62 +648,62 @@ void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size, const char *flag_ } } -void ndr_print_int8(struct ndr_print *ndr, const char *name, int8_t v) +_PUBLIC_ void ndr_print_int8(struct ndr_print *ndr, const char *name, int8_t v) { ndr->print(ndr, "%-25s: %d", name, v); } -void ndr_print_uint8(struct ndr_print *ndr, const char *name, uint8_t v) +_PUBLIC_ void ndr_print_uint8(struct ndr_print *ndr, const char *name, uint8_t v) { ndr->print(ndr, "%-25s: 0x%02x (%u)", name, v, v); } -void ndr_print_int16(struct ndr_print *ndr, const char *name, int16_t v) +_PUBLIC_ void ndr_print_int16(struct ndr_print *ndr, const char *name, int16_t v) { ndr->print(ndr, "%-25s: %d", name, v); } -void ndr_print_uint16(struct ndr_print *ndr, const char *name, uint16_t v) +_PUBLIC_ void ndr_print_uint16(struct ndr_print *ndr, const char *name, uint16_t v) { ndr->print(ndr, "%-25s: 0x%04x (%u)", name, v, v); } -void ndr_print_int32(struct ndr_print *ndr, const char *name, int32_t v) +_PUBLIC_ void ndr_print_int32(struct ndr_print *ndr, const char *name, int32_t v) { ndr->print(ndr, "%-25s: %d", name, v); } -void ndr_print_uint32(struct ndr_print *ndr, const char *name, uint32_t v) +_PUBLIC_ void ndr_print_uint32(struct ndr_print *ndr, const char *name, uint32_t v) { ndr->print(ndr, "%-25s: 0x%08x (%u)", name, v, v); } -void ndr_print_udlong(struct ndr_print *ndr, const char *name, uint64_t v) +_PUBLIC_ void ndr_print_udlong(struct ndr_print *ndr, const char *name, uint64_t v) { ndr->print(ndr, "%-25s: 0x%016llx (%llu)", name, v, v); } -void ndr_print_udlongr(struct ndr_print *ndr, const char *name, uint64_t v) +_PUBLIC_ void ndr_print_udlongr(struct ndr_print *ndr, const char *name, uint64_t v) { ndr_print_udlong(ndr, name, v); } -void ndr_print_dlong(struct ndr_print *ndr, const char *name, int64_t v) +_PUBLIC_ void ndr_print_dlong(struct ndr_print *ndr, const char *name, int64_t v) { ndr->print(ndr, "%-25s: 0x%016llx (%lld)", name, v, v); } -void ndr_print_hyper(struct ndr_print *ndr, const char *name, uint64_t v) +_PUBLIC_ void ndr_print_hyper(struct ndr_print *ndr, const char *name, uint64_t v) { ndr_print_dlong(ndr, name, v); } -void ndr_print_pointer(struct ndr_print *ndr, const char *name, void *v) +_PUBLIC_ void ndr_print_pointer(struct ndr_print *ndr, const char *name, void *v) { ndr->print(ndr, "%-25s: %p", name, v); } -void ndr_print_ptr(struct ndr_print *ndr, const char *name, const void *p) +_PUBLIC_ void ndr_print_ptr(struct ndr_print *ndr, const char *name, const void *p) { if (p) { ndr->print(ndr, "%-25s: *", name); @@ -712,12 +712,12 @@ void ndr_print_ptr(struct ndr_print *ndr, const char *name, const void *p) } } -void ndr_print_NTTIME(struct ndr_print *ndr, const char *name, NTTIME t) +_PUBLIC_ void ndr_print_NTTIME(struct ndr_print *ndr, const char *name, NTTIME t) { ndr->print(ndr, "%-25s: %s", name, nt_time_string(ndr, t)); } -void ndr_print_NTTIME_1sec(struct ndr_print *ndr, const char *name, NTTIME t) +_PUBLIC_ void ndr_print_NTTIME_1sec(struct ndr_print *ndr, const char *name, NTTIME t) { /* this is a standard NTTIME here * as it's already converted in the pull/push code @@ -725,12 +725,12 @@ void ndr_print_NTTIME_1sec(struct ndr_print *ndr, const char *name, NTTIME t) ndr_print_NTTIME(ndr, name, t); } -void ndr_print_NTTIME_hyper(struct ndr_print *ndr, const char *name, NTTIME t) +_PUBLIC_ void ndr_print_NTTIME_hyper(struct ndr_print *ndr, const char *name, NTTIME t) { ndr_print_NTTIME(ndr, name, t); } -void ndr_print_time_t(struct ndr_print *ndr, const char *name, time_t t) +_PUBLIC_ void ndr_print_time_t(struct ndr_print *ndr, const char *name, time_t t) { if (t == (time_t)-1 || t == 0) { ndr->print(ndr, "%-25s: (time_t)%d", name, (int)t); @@ -739,7 +739,7 @@ void ndr_print_time_t(struct ndr_print *ndr, const char *name, time_t t) } } -void ndr_print_union(struct ndr_print *ndr, const char *name, int level, const char *type) +_PUBLIC_ void ndr_print_union(struct ndr_print *ndr, const char *name, int level, const char *type) { if (ndr->flags & LIBNDR_PRINT_ARRAY_HEX) { ndr->print(ndr, "%-25s: union %s(case 0x%X)", name, type, level); @@ -748,12 +748,12 @@ void ndr_print_union(struct ndr_print *ndr, const char *name, int level, const c } } -void ndr_print_bad_level(struct ndr_print *ndr, const char *name, uint16_t level) +_PUBLIC_ 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_uint8(struct ndr_print *ndr, const char *name, +_PUBLIC_ void ndr_print_array_uint8(struct ndr_print *ndr, const char *name, const uint8_t *data, uint32_t count) { int i; @@ -781,7 +781,7 @@ void ndr_print_array_uint8(struct ndr_print *ndr, const char *name, ndr->depth--; } -void ndr_print_DATA_BLOB(struct ndr_print *ndr, const char *name, DATA_BLOB r) +_PUBLIC_ void ndr_print_DATA_BLOB(struct ndr_print *ndr, const char *name, DATA_BLOB r) { ndr->print(ndr, "%-25s: DATA_BLOB length=%u", name, r.length); if (r.length) { @@ -793,7 +793,7 @@ void ndr_print_DATA_BLOB(struct ndr_print *ndr, const char *name, DATA_BLOB r) /* push a DATA_BLOB onto the wire. */ -NTSTATUS ndr_push_DATA_BLOB(struct ndr_push *ndr, int ndr_flags, DATA_BLOB blob) +_PUBLIC_ NTSTATUS 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) { @@ -815,7 +815,7 @@ NTSTATUS ndr_push_DATA_BLOB(struct ndr_push *ndr, int ndr_flags, DATA_BLOB blob) /* pull a DATA_BLOB from the wire. */ -NTSTATUS ndr_pull_DATA_BLOB(struct ndr_pull *ndr, int ndr_flags, DATA_BLOB *blob) +_PUBLIC_ NTSTATUS ndr_pull_DATA_BLOB(struct ndr_pull *ndr, int ndr_flags, DATA_BLOB *blob) { uint32_t length; @@ -841,7 +841,7 @@ NTSTATUS ndr_pull_DATA_BLOB(struct ndr_pull *ndr, int ndr_flags, DATA_BLOB *blob return NT_STATUS_OK; } -uint32_t ndr_size_DATA_BLOB(int ret, const DATA_BLOB *data, int flags) +_PUBLIC_ uint32_t ndr_size_DATA_BLOB(int ret, const DATA_BLOB *data, int flags) { return ret + data->length; } |