summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc/ndr')
-rw-r--r--source4/librpc/ndr/ndr.c114
-rw-r--r--source4/librpc/ndr/ndr_basic.c160
2 files changed, 137 insertions, 137 deletions
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c
index a7f34ec002..1f626df13b 100644
--- a/source4/librpc/ndr/ndr.c
+++ b/source4/librpc/ndr/ndr.c
@@ -46,7 +46,7 @@ const struct dcerpc_syntax_id ndr64_transfer_syntax = {
/*
work out the number of bytes needed to align on a n byte boundary
*/
-size_t ndr_align_size(uint32_t offset, size_t n)
+_PUBLIC_ size_t ndr_align_size(uint32_t offset, size_t n)
{
if ((offset & (n-1)) == 0) return 0;
return n - (offset & (n-1));
@@ -55,7 +55,7 @@ size_t ndr_align_size(uint32_t offset, size_t n)
/*
initialise a ndr parse structure from a data blob
*/
-struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx)
+_PUBLIC_ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx)
{
struct ndr_pull *ndr;
@@ -72,7 +72,7 @@ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx)
/*
advance by 'size' bytes
*/
-NTSTATUS ndr_pull_advance(struct ndr_pull *ndr, uint32_t size)
+_PUBLIC_ NTSTATUS ndr_pull_advance(struct ndr_pull *ndr, uint32_t size)
{
ndr->offset += size;
if (ndr->offset > ndr->data_size) {
@@ -98,14 +98,14 @@ static NTSTATUS ndr_pull_set_offset(struct ndr_pull *ndr, uint32_t ofs)
}
/* save the offset/size of the current ndr state */
-void ndr_pull_save(struct ndr_pull *ndr, struct ndr_pull_save *save)
+_PUBLIC_ void ndr_pull_save(struct ndr_pull *ndr, struct ndr_pull_save *save)
{
save->offset = ndr->offset;
save->data_size = ndr->data_size;
}
/* restore the size/offset of a ndr structure */
-void ndr_pull_restore(struct ndr_pull *ndr, struct ndr_pull_save *save)
+_PUBLIC_ void ndr_pull_restore(struct ndr_pull *ndr, struct ndr_pull_save *save)
{
ndr->offset = save->offset;
ndr->data_size = save->data_size;
@@ -113,7 +113,7 @@ void ndr_pull_restore(struct ndr_pull *ndr, struct ndr_pull_save *save)
/* create a ndr_push structure, ready for some marshalling */
-struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx)
+_PUBLIC_ struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx)
{
struct ndr_push *ndr;
@@ -134,20 +134,20 @@ struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx)
/* create a ndr_push structure, ready for some marshalling */
-struct ndr_push *ndr_push_init(void)
+_PUBLIC_ struct ndr_push *ndr_push_init(void)
{
return ndr_push_init_ctx(NULL);
}
/* free a ndr_push structure */
-void ndr_push_free(struct ndr_push *ndr)
+_PUBLIC_ void ndr_push_free(struct ndr_push *ndr)
{
talloc_free(ndr);
}
/* return a DATA_BLOB structure for the current ndr_push marshalled data */
-DATA_BLOB ndr_push_blob(struct ndr_push *ndr)
+_PUBLIC_ DATA_BLOB ndr_push_blob(struct ndr_push *ndr)
{
DATA_BLOB blob;
blob.data = ndr->data;
@@ -162,7 +162,7 @@ DATA_BLOB ndr_push_blob(struct ndr_push *ndr)
/*
expand the available space in the buffer to 'size'
*/
-NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32_t size)
+_PUBLIC_ NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32_t size)
{
if (ndr->alloc_size > size) {
return NT_STATUS_OK;
@@ -181,7 +181,7 @@ NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32_t size)
return NT_STATUS_OK;
}
-void ndr_print_debug_helper(struct ndr_print *ndr, const char *format, ...) _PRINTF_ATTRIBUTE(2,3)
+_PUBLIC_ void ndr_print_debug_helper(struct ndr_print *ndr, const char *format, ...) _PRINTF_ATTRIBUTE(2,3)
{
va_list ap;
char *s = NULL;
@@ -217,7 +217,7 @@ static void ndr_print_string_helper(struct ndr_print *ndr, const char *format, .
/*
a useful helper function for printing idl structures via DEBUG()
*/
-void ndr_print_debug(ndr_print_fn_t fn, const char *name, void *ptr)
+_PUBLIC_ void ndr_print_debug(ndr_print_fn_t fn, const char *name, void *ptr)
{
struct ndr_print *ndr;
@@ -233,7 +233,7 @@ void ndr_print_debug(ndr_print_fn_t fn, const char *name, void *ptr)
/*
a useful helper function for printing idl unions via DEBUG()
*/
-void ndr_print_union_debug(ndr_print_fn_t fn, const char *name, uint32_t level, void *ptr)
+_PUBLIC_ void ndr_print_union_debug(ndr_print_fn_t fn, const char *name, uint32_t level, void *ptr)
{
struct ndr_print *ndr;
@@ -250,7 +250,7 @@ void ndr_print_union_debug(ndr_print_fn_t fn, const char *name, uint32_t level,
/*
a useful helper function for printing idl function calls via DEBUG()
*/
-void ndr_print_function_debug(ndr_print_function_t fn, const char *name, int flags, void *ptr)
+_PUBLIC_ void ndr_print_function_debug(ndr_print_function_t fn, const char *name, int flags, void *ptr)
{
struct ndr_print *ndr;
@@ -267,7 +267,7 @@ void ndr_print_function_debug(ndr_print_function_t fn, const char *name, int fla
/*
a useful helper function for printing idl function calls to a string
*/
-char *ndr_print_function_string(TALLOC_CTX *mem_ctx,
+_PUBLIC_ char *ndr_print_function_string(TALLOC_CTX *mem_ctx,
ndr_print_function_t fn, const char *name,
int flags, void *ptr)
{
@@ -290,7 +290,7 @@ failed:
return ret;
}
-void ndr_set_flags(uint32_t *pflags, uint32_t new_flags)
+_PUBLIC_ void ndr_set_flags(uint32_t *pflags, uint32_t new_flags)
{
/* the big/little endian flags are inter-dependent */
if (new_flags & LIBNDR_FLAG_LITTLE_ENDIAN) {
@@ -330,7 +330,7 @@ static NTSTATUS ndr_map_error(enum ndr_err_code err)
/*
return and possibly log an NDR error
*/
-NTSTATUS ndr_pull_error(struct ndr_pull *ndr,
+_PUBLIC_ NTSTATUS ndr_pull_error(struct ndr_pull *ndr,
enum ndr_err_code err, const char *format, ...) _PRINTF_ATTRIBUTE(3,4)
{
char *s=NULL;
@@ -350,7 +350,7 @@ NTSTATUS ndr_pull_error(struct ndr_pull *ndr,
/*
return and possibly log an NDR error
*/
-NTSTATUS ndr_push_error(struct ndr_push *ndr, enum ndr_err_code err, const char *format, ...) _PRINTF_ATTRIBUTE(3,4)
+_PUBLIC_ NTSTATUS ndr_push_error(struct ndr_push *ndr, enum ndr_err_code err, const char *format, ...) _PRINTF_ATTRIBUTE(3,4)
{
char *s=NULL;
va_list ap;
@@ -370,7 +370,7 @@ NTSTATUS ndr_push_error(struct ndr_push *ndr, enum ndr_err_code err, const char
handle subcontext buffers, which in midl land are user-marshalled, but
we use magic in pidl to make them easier to cope with
*/
-NTSTATUS ndr_pull_subcontext_start(struct ndr_pull *ndr,
+_PUBLIC_ NTSTATUS ndr_pull_subcontext_start(struct ndr_pull *ndr,
struct ndr_pull **_subndr,
size_t header_size,
ssize_t size_is)
@@ -429,7 +429,7 @@ NTSTATUS ndr_pull_subcontext_start(struct ndr_pull *ndr,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_subcontext_end(struct ndr_pull *ndr,
+_PUBLIC_ NTSTATUS ndr_pull_subcontext_end(struct ndr_pull *ndr,
struct ndr_pull *subndr,
size_t header_size,
ssize_t size_is)
@@ -446,7 +446,7 @@ NTSTATUS ndr_pull_subcontext_end(struct ndr_pull *ndr,
return NT_STATUS_OK;
}
-NTSTATUS ndr_push_subcontext_start(struct ndr_push *ndr,
+_PUBLIC_ NTSTATUS ndr_push_subcontext_start(struct ndr_push *ndr,
struct ndr_push **_subndr,
size_t header_size,
ssize_t size_is)
@@ -464,7 +464,7 @@ NTSTATUS ndr_push_subcontext_start(struct ndr_push *ndr,
/*
push a subcontext header
*/
-NTSTATUS ndr_push_subcontext_end(struct ndr_push *ndr,
+_PUBLIC_ NTSTATUS ndr_push_subcontext_end(struct ndr_push *ndr,
struct ndr_push *subndr,
size_t header_size,
ssize_t size_is)
@@ -503,7 +503,7 @@ NTSTATUS ndr_push_subcontext_end(struct ndr_push *ndr,
/*
store a token in the ndr context, for later retrieval
*/
-NTSTATUS ndr_token_store(TALLOC_CTX *mem_ctx,
+_PUBLIC_ NTSTATUS ndr_token_store(TALLOC_CTX *mem_ctx,
struct ndr_token_list **list,
const void *key,
uint32_t value)
@@ -522,7 +522,7 @@ NTSTATUS ndr_token_store(TALLOC_CTX *mem_ctx,
/*
retrieve a token from a ndr context, using cmp_fn to match the tokens
*/
-NTSTATUS ndr_token_retrieve_cmp_fn(struct ndr_token_list **list, const void *key, uint32_t *v,
+_PUBLIC_ NTSTATUS ndr_token_retrieve_cmp_fn(struct ndr_token_list **list, const void *key, uint32_t *v,
comparison_fn_t _cmp_fn, BOOL _remove_tok)
{
struct ndr_token_list *tok;
@@ -543,7 +543,7 @@ found:
/*
retrieve a token from a ndr context
*/
-NTSTATUS ndr_token_retrieve(struct ndr_token_list **list, const void *key, uint32_t *v)
+_PUBLIC_ NTSTATUS ndr_token_retrieve(struct ndr_token_list **list, const void *key, uint32_t *v)
{
return ndr_token_retrieve_cmp_fn(list, key, v, NULL, True);
}
@@ -551,7 +551,7 @@ NTSTATUS ndr_token_retrieve(struct ndr_token_list **list, const void *key, uint3
/*
peek at but don't removed a token from a ndr context
*/
-uint32_t ndr_token_peek(struct ndr_token_list **list, const void *key)
+_PUBLIC_ uint32_t ndr_token_peek(struct ndr_token_list **list, const void *key)
{
NTSTATUS status;
uint32_t v;
@@ -563,7 +563,7 @@ uint32_t ndr_token_peek(struct ndr_token_list **list, const void *key)
/*
pull an array size field and add it to the array_size_list token list
*/
-NTSTATUS ndr_pull_array_size(struct ndr_pull *ndr, const void *p)
+_PUBLIC_ NTSTATUS ndr_pull_array_size(struct ndr_pull *ndr, const void *p)
{
uint32_t size;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &size));
@@ -573,7 +573,7 @@ NTSTATUS ndr_pull_array_size(struct ndr_pull *ndr, const void *p)
/*
get the stored array size field
*/
-uint32_t ndr_get_array_size(struct ndr_pull *ndr, const void *p)
+_PUBLIC_ uint32_t ndr_get_array_size(struct ndr_pull *ndr, const void *p)
{
return ndr_token_peek(&ndr->array_size_list, p);
}
@@ -581,7 +581,7 @@ uint32_t ndr_get_array_size(struct ndr_pull *ndr, const void *p)
/*
check the stored array size field
*/
-NTSTATUS ndr_check_array_size(struct ndr_pull *ndr, void *p, uint32_t size)
+_PUBLIC_ NTSTATUS ndr_check_array_size(struct ndr_pull *ndr, void *p, uint32_t size)
{
uint32_t stored;
stored = ndr_token_peek(&ndr->array_size_list, p);
@@ -596,7 +596,7 @@ NTSTATUS ndr_check_array_size(struct ndr_pull *ndr, void *p, uint32_t size)
/*
pull an array length field and add it to the array_length_list token list
*/
-NTSTATUS ndr_pull_array_length(struct ndr_pull *ndr, const void *p)
+_PUBLIC_ NTSTATUS ndr_pull_array_length(struct ndr_pull *ndr, const void *p)
{
uint32_t length, offset;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &offset));
@@ -611,7 +611,7 @@ NTSTATUS ndr_pull_array_length(struct ndr_pull *ndr, const void *p)
/*
get the stored array length field
*/
-uint32_t ndr_get_array_length(struct ndr_pull *ndr, const void *p)
+_PUBLIC_ uint32_t ndr_get_array_length(struct ndr_pull *ndr, const void *p)
{
return ndr_token_peek(&ndr->array_length_list, p);
}
@@ -619,7 +619,7 @@ uint32_t ndr_get_array_length(struct ndr_pull *ndr, const void *p)
/*
check the stored array length field
*/
-NTSTATUS ndr_check_array_length(struct ndr_pull *ndr, void *p, uint32_t length)
+_PUBLIC_ NTSTATUS ndr_check_array_length(struct ndr_pull *ndr, void *p, uint32_t length)
{
uint32_t stored;
stored = ndr_token_peek(&ndr->array_length_list, p);
@@ -634,17 +634,17 @@ NTSTATUS ndr_check_array_length(struct ndr_pull *ndr, void *p, uint32_t length)
/*
store a switch value
*/
-NTSTATUS ndr_push_set_switch_value(struct ndr_push *ndr, const void *p, uint32_t val)
+_PUBLIC_ NTSTATUS ndr_push_set_switch_value(struct ndr_push *ndr, const void *p, uint32_t val)
{
return ndr_token_store(ndr, &ndr->switch_list, p, val);
}
-NTSTATUS ndr_pull_set_switch_value(struct ndr_pull *ndr, const void *p, uint32_t val)
+_PUBLIC_ NTSTATUS ndr_pull_set_switch_value(struct ndr_pull *ndr, const void *p, uint32_t val)
{
return ndr_token_store(ndr, &ndr->switch_list, p, val);
}
-NTSTATUS ndr_print_set_switch_value(struct ndr_print *ndr, const void *p, uint32_t val)
+_PUBLIC_ NTSTATUS ndr_print_set_switch_value(struct ndr_print *ndr, const void *p, uint32_t val)
{
return ndr_token_store(ndr, &ndr->switch_list, p, val);
}
@@ -652,17 +652,17 @@ NTSTATUS ndr_print_set_switch_value(struct ndr_print *ndr, const void *p, uint32
/*
retrieve a switch value
*/
-uint32_t ndr_push_get_switch_value(struct ndr_push *ndr, const void *p)
+_PUBLIC_ uint32_t ndr_push_get_switch_value(struct ndr_push *ndr, const void *p)
{
return ndr_token_peek(&ndr->switch_list, p);
}
-uint32_t ndr_pull_get_switch_value(struct ndr_pull *ndr, const void *p)
+_PUBLIC_ uint32_t ndr_pull_get_switch_value(struct ndr_pull *ndr, const void *p)
{
return ndr_token_peek(&ndr->switch_list, p);
}
-uint32_t ndr_print_get_switch_value(struct ndr_print *ndr, const void *p)
+_PUBLIC_ uint32_t ndr_print_get_switch_value(struct ndr_print *ndr, const void *p)
{
return ndr_token_peek(&ndr->switch_list, p);
}
@@ -670,7 +670,7 @@ uint32_t ndr_print_get_switch_value(struct ndr_print *ndr, const void *p)
/*
pull a struct from a blob using NDR
*/
-NTSTATUS ndr_pull_struct_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
+_PUBLIC_ NTSTATUS ndr_pull_struct_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
ndr_pull_flags_fn_t fn)
{
struct ndr_pull *ndr;
@@ -684,7 +684,7 @@ NTSTATUS ndr_pull_struct_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *
/*
pull a struct from a blob using NDR - failing if all bytes are not consumed
*/
-NTSTATUS ndr_pull_struct_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
+_PUBLIC_ NTSTATUS ndr_pull_struct_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
ndr_pull_flags_fn_t fn)
{
struct ndr_pull *ndr;
@@ -705,7 +705,7 @@ NTSTATUS ndr_pull_struct_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, vo
/*
pull a union from a blob using NDR, given the union discriminator
*/
-NTSTATUS ndr_pull_union_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
+_PUBLIC_ NTSTATUS ndr_pull_union_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
uint32_t level, ndr_pull_flags_fn_t fn)
{
struct ndr_pull *ndr;
@@ -727,7 +727,7 @@ NTSTATUS ndr_pull_union_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p
/*
push a struct to a blob using NDR
*/
-NTSTATUS ndr_push_struct_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, const void *p,
+_PUBLIC_ NTSTATUS ndr_push_struct_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, const void *p,
ndr_push_flags_fn_t fn)
{
NTSTATUS status;
@@ -749,7 +749,7 @@ NTSTATUS ndr_push_struct_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, const void *
/*
push a union to a blob using NDR
*/
-NTSTATUS ndr_push_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
+_PUBLIC_ NTSTATUS ndr_push_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
uint32_t level, ndr_push_flags_fn_t fn)
{
NTSTATUS status;
@@ -772,7 +772,7 @@ NTSTATUS ndr_push_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
/*
generic ndr_size_*() handler for structures
*/
-size_t ndr_size_struct(const void *p, int flags, ndr_push_flags_fn_t push)
+_PUBLIC_ size_t ndr_size_struct(const void *p, int flags, ndr_push_flags_fn_t push)
{
struct ndr_push *ndr;
NTSTATUS status;
@@ -796,7 +796,7 @@ size_t ndr_size_struct(const void *p, int flags, ndr_push_flags_fn_t push)
/*
generic ndr_size_*() handler for unions
*/
-size_t ndr_size_union(const void *p, int flags, uint32_t level, ndr_push_flags_fn_t push)
+_PUBLIC_ size_t ndr_size_union(const void *p, int flags, uint32_t level, ndr_push_flags_fn_t push)
{
struct ndr_push *ndr;
NTSTATUS status;
@@ -821,7 +821,7 @@ size_t ndr_size_union(const void *p, int flags, uint32_t level, ndr_push_flags_f
/*
get the current base for relative pointers for the push
*/
-uint32_t ndr_push_get_relative_base_offset(struct ndr_push *ndr)
+_PUBLIC_ uint32_t ndr_push_get_relative_base_offset(struct ndr_push *ndr)
{
return ndr->relative_base_offset;
}
@@ -829,7 +829,7 @@ uint32_t ndr_push_get_relative_base_offset(struct ndr_push *ndr)
/*
restore the old base for relative pointers for the push
*/
-void ndr_push_restore_relative_base_offset(struct ndr_push *ndr, uint32_t offset)
+_PUBLIC_ void ndr_push_restore_relative_base_offset(struct ndr_push *ndr, uint32_t offset)
{
ndr->relative_base_offset = offset;
}
@@ -838,7 +838,7 @@ void ndr_push_restore_relative_base_offset(struct ndr_push *ndr, uint32_t offset
setup the current base for relative pointers for the push
called in the NDR_SCALAR stage
*/
-NTSTATUS ndr_push_setup_relative_base_offset1(struct ndr_push *ndr, const void *p, uint32_t offset)
+_PUBLIC_ NTSTATUS ndr_push_setup_relative_base_offset1(struct ndr_push *ndr, const void *p, uint32_t offset)
{
ndr->relative_base_offset = offset;
return ndr_token_store(ndr, &ndr->relative_base_list, p, offset);
@@ -848,7 +848,7 @@ NTSTATUS ndr_push_setup_relative_base_offset1(struct ndr_push *ndr, const void *
setup the current base for relative pointers for the push
called in the NDR_BUFFERS stage
*/
-NTSTATUS ndr_push_setup_relative_base_offset2(struct ndr_push *ndr, const void *p)
+_PUBLIC_ NTSTATUS ndr_push_setup_relative_base_offset2(struct ndr_push *ndr, const void *p)
{
return ndr_token_retrieve(&ndr->relative_base_list, p, &ndr->relative_base_offset);
}
@@ -857,7 +857,7 @@ NTSTATUS ndr_push_setup_relative_base_offset2(struct ndr_push *ndr, const void *
push a relative object - stage1
this is called during SCALARS processing
*/
-NTSTATUS ndr_push_relative_ptr1(struct ndr_push *ndr, const void *p)
+_PUBLIC_ NTSTATUS ndr_push_relative_ptr1(struct ndr_push *ndr, const void *p)
{
if (p == NULL) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
@@ -872,7 +872,7 @@ NTSTATUS ndr_push_relative_ptr1(struct ndr_push *ndr, const void *p)
push a relative object - stage2
this is called during buffers processing
*/
-NTSTATUS ndr_push_relative_ptr2(struct ndr_push *ndr, const void *p)
+_PUBLIC_ NTSTATUS ndr_push_relative_ptr2(struct ndr_push *ndr, const void *p)
{
struct ndr_push_save save;
uint32_t ptr_offset = 0xFFFFFFFF;
@@ -900,7 +900,7 @@ NTSTATUS ndr_push_relative_ptr2(struct ndr_push *ndr, const void *p)
/*
get the current base for relative pointers for the pull
*/
-uint32_t ndr_pull_get_relative_base_offset(struct ndr_pull *ndr)
+_PUBLIC_ uint32_t ndr_pull_get_relative_base_offset(struct ndr_pull *ndr)
{
return ndr->relative_base_offset;
}
@@ -908,7 +908,7 @@ uint32_t ndr_pull_get_relative_base_offset(struct ndr_pull *ndr)
/*
restore the old base for relative pointers for the pull
*/
-void ndr_pull_restore_relative_base_offset(struct ndr_pull *ndr, uint32_t offset)
+_PUBLIC_ void ndr_pull_restore_relative_base_offset(struct ndr_pull *ndr, uint32_t offset)
{
ndr->relative_base_offset = offset;
}
@@ -917,7 +917,7 @@ void ndr_pull_restore_relative_base_offset(struct ndr_pull *ndr, uint32_t offset
setup the current base for relative pointers for the pull
called in the NDR_SCALAR stage
*/
-NTSTATUS ndr_pull_setup_relative_base_offset1(struct ndr_pull *ndr, const void *p, uint32_t offset)
+_PUBLIC_ NTSTATUS ndr_pull_setup_relative_base_offset1(struct ndr_pull *ndr, const void *p, uint32_t offset)
{
ndr->relative_base_offset = offset;
return ndr_token_store(ndr, &ndr->relative_base_list, p, offset);
@@ -927,7 +927,7 @@ NTSTATUS ndr_pull_setup_relative_base_offset1(struct ndr_pull *ndr, const void *
setup the current base for relative pointers for the pull
called in the NDR_BUFFERS stage
*/
-NTSTATUS ndr_pull_setup_relative_base_offset2(struct ndr_pull *ndr, const void *p)
+_PUBLIC_ NTSTATUS ndr_pull_setup_relative_base_offset2(struct ndr_pull *ndr, const void *p)
{
return ndr_token_retrieve(&ndr->relative_base_list, p, &ndr->relative_base_offset);
}
@@ -936,7 +936,7 @@ NTSTATUS ndr_pull_setup_relative_base_offset2(struct ndr_pull *ndr, const void *
pull a relative object - stage1
called during SCALARS processing
*/
-NTSTATUS ndr_pull_relative_ptr1(struct ndr_pull *ndr, const void *p, uint32_t rel_offset)
+_PUBLIC_ NTSTATUS ndr_pull_relative_ptr1(struct ndr_pull *ndr, const void *p, uint32_t rel_offset)
{
rel_offset += ndr->relative_base_offset;
if (rel_offset > ndr->data_size) {
@@ -951,7 +951,7 @@ NTSTATUS ndr_pull_relative_ptr1(struct ndr_pull *ndr, const void *p, uint32_t re
pull a relative object - stage2
called during BUFFERS processing
*/
-NTSTATUS ndr_pull_relative_ptr2(struct ndr_pull *ndr, const void *p)
+_PUBLIC_ NTSTATUS ndr_pull_relative_ptr2(struct ndr_pull *ndr, const void *p)
{
uint32_t rel_offset;
NDR_CHECK(ndr_token_retrieve(&ndr->relative_list, p, &rel_offset));
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;
}