From af30a32b6924b0f2b701186e435defbca2ebd1aa Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 5 Mar 2006 17:15:19 +0000 Subject: r13840: Mark some functions as public. (This used to be commit 9a188eb1f48a50d92a67a4fc2b3899b90074059a) --- source4/libcli/composite/composite.c | 20 +++++++-------- source4/libcli/nbt/nbtname.c | 50 ++++++++++++++++++------------------ 2 files changed, 35 insertions(+), 35 deletions(-) (limited to 'source4/libcli') diff --git a/source4/libcli/composite/composite.c b/source4/libcli/composite/composite.c index 33b5b77c06..d0d2bc3886 100644 --- a/source4/libcli/composite/composite.c +++ b/source4/libcli/composite/composite.c @@ -30,7 +30,7 @@ /* block until a composite function has completed, then return the status */ -NTSTATUS composite_wait(struct composite_context *c) +_PUBLIC_ NTSTATUS composite_wait(struct composite_context *c) { if (c == NULL) return NT_STATUS_NO_MEMORY; @@ -50,7 +50,7 @@ NTSTATUS composite_wait(struct composite_context *c) * Some composite helpers that are handy if you write larger composite * functions. */ -BOOL composite_is_ok(struct composite_context *ctx) +_PUBLIC_ BOOL composite_is_ok(struct composite_context *ctx) { if (NT_STATUS_IS_OK(ctx->status)) { return True; @@ -85,7 +85,7 @@ static void composite_trigger(struct event_context *ev, struct timed_event *te, } -void composite_error(struct composite_context *ctx, NTSTATUS status) +_PUBLIC_ void composite_error(struct composite_context *ctx, NTSTATUS status) { if (!ctx->used_wait && !ctx->async.fn) { event_add_timed(ctx->event_ctx, ctx, timeval_zero(), composite_trigger, ctx); @@ -94,7 +94,7 @@ void composite_error(struct composite_context *ctx, NTSTATUS status) SMB_ASSERT(!composite_is_ok(ctx)); } -BOOL composite_nomem(const void *p, struct composite_context *ctx) +_PUBLIC_ BOOL composite_nomem(const void *p, struct composite_context *ctx) { if (p != NULL) { return False; @@ -103,7 +103,7 @@ BOOL composite_nomem(const void *p, struct composite_context *ctx) return True; } -void composite_done(struct composite_context *ctx) +_PUBLIC_ void composite_done(struct composite_context *ctx) { if (!ctx->used_wait && !ctx->async.fn) { event_add_timed(ctx->event_ctx, ctx, timeval_zero(), composite_trigger, ctx); @@ -114,7 +114,7 @@ void composite_done(struct composite_context *ctx) } } -void composite_continue(struct composite_context *ctx, +_PUBLIC_ void composite_continue(struct composite_context *ctx, struct composite_context *new_ctx, void (*continuation)(struct composite_context *), void *private_data) @@ -124,7 +124,7 @@ void composite_continue(struct composite_context *ctx, new_ctx->async.private_data = private_data; } -void composite_continue_rpc(struct composite_context *ctx, +_PUBLIC_ void composite_continue_rpc(struct composite_context *ctx, struct rpc_request *new_req, void (*continuation)(struct rpc_request *), void *private_data) @@ -134,7 +134,7 @@ void composite_continue_rpc(struct composite_context *ctx, new_req->async.private = private_data; } -void composite_continue_irpc(struct composite_context *ctx, +_PUBLIC_ void composite_continue_irpc(struct composite_context *ctx, struct irpc_request *new_req, void (*continuation)(struct irpc_request *), void *private_data) @@ -144,7 +144,7 @@ void composite_continue_irpc(struct composite_context *ctx, new_req->async.private = private_data; } -void composite_continue_smb(struct composite_context *ctx, +_PUBLIC_ void composite_continue_smb(struct composite_context *ctx, struct smbcli_request *new_req, void (*continuation)(struct smbcli_request *), void *private_data) @@ -154,7 +154,7 @@ void composite_continue_smb(struct composite_context *ctx, new_req->async.private = private_data; } -void composite_continue_nbt(struct composite_context *ctx, +_PUBLIC_ void composite_continue_nbt(struct composite_context *ctx, struct nbt_name_request *new_req, void (*continuation)(struct nbt_name_request *), void *private_data) diff --git a/source4/libcli/nbt/nbtname.c b/source4/libcli/nbt/nbtname.c index c6fc18f55a..25fd669789 100644 --- a/source4/libcli/nbt/nbtname.c +++ b/source4/libcli/nbt/nbtname.c @@ -32,10 +32,10 @@ /* don't allow an unlimited number of name components */ #define MAX_COMPONENTS 10 -/* +/** print a nbt string */ -void ndr_print_nbt_string(struct ndr_print *ndr, const char *name, const char *s) +_PUBLIC_ void ndr_print_nbt_string(struct ndr_print *ndr, const char *name, const char *s) { ndr_print_string(ndr, name, s); } @@ -88,10 +88,10 @@ static NTSTATUS ndr_pull_component(struct ndr_pull *ndr, uint8_t **component, return NT_STATUS_BAD_NETWORK_NAME; } -/* +/** pull a nbt_string from the wire */ -NTSTATUS ndr_pull_nbt_string(struct ndr_pull *ndr, int ndr_flags, const char **s) +_PUBLIC_ NTSTATUS ndr_pull_nbt_string(struct ndr_pull *ndr, int ndr_flags, const char **s) { NTSTATUS status; uint32_t offset = ndr->offset; @@ -132,10 +132,10 @@ NTSTATUS ndr_pull_nbt_string(struct ndr_pull *ndr, int ndr_flags, const char **s return NT_STATUS_OK; } -/* +/** push a nbt string to the wire */ -NTSTATUS ndr_push_nbt_string(struct ndr_push *ndr, int ndr_flags, const char *s) +_PUBLIC_ NTSTATUS ndr_push_nbt_string(struct ndr_push *ndr, int ndr_flags, const char *s) { if (!(ndr_flags & NDR_SCALARS)) { return NT_STATUS_OK; @@ -274,10 +274,10 @@ static uint8_t *compress_name(TALLOC_CTX *mem_ctx, } -/* +/** pull a nbt name from the wire */ -NTSTATUS ndr_pull_nbt_name(struct ndr_pull *ndr, int ndr_flags, struct nbt_name *r) +_PUBLIC_ NTSTATUS ndr_pull_nbt_name(struct ndr_pull *ndr, int ndr_flags, struct nbt_name *r) { NTSTATUS status; uint8_t *scope; @@ -320,10 +320,10 @@ NTSTATUS ndr_pull_nbt_name(struct ndr_pull *ndr, int ndr_flags, struct nbt_name return NT_STATUS_OK; } -/* +/** push a nbt name to the wire */ -NTSTATUS ndr_push_nbt_name(struct ndr_push *ndr, int ndr_flags, const struct nbt_name *r) +_PUBLIC_ NTSTATUS ndr_push_nbt_name(struct ndr_push *ndr, int ndr_flags, const struct nbt_name *r) { uint8_t *cname, *fullname; NTSTATUS status; @@ -349,10 +349,10 @@ NTSTATUS ndr_push_nbt_name(struct ndr_push *ndr, int ndr_flags, const struct nbt } -/* +/** copy a nbt name structure */ -NTSTATUS nbt_name_dup(TALLOC_CTX *mem_ctx, struct nbt_name *name, struct nbt_name *newname) +_PUBLIC_ NTSTATUS nbt_name_dup(TALLOC_CTX *mem_ctx, struct nbt_name *name, struct nbt_name *newname) { *newname = *name; newname->name = talloc_strdup(mem_ctx, newname->name); @@ -364,33 +364,33 @@ NTSTATUS nbt_name_dup(TALLOC_CTX *mem_ctx, struct nbt_name *name, struct nbt_nam return NT_STATUS_OK; } -/* +/** push a nbt name into a blob */ -NTSTATUS nbt_name_to_blob(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, struct nbt_name *name) +_PUBLIC_ NTSTATUS nbt_name_to_blob(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, struct nbt_name *name) { return ndr_push_struct_blob(blob, mem_ctx, name, (ndr_push_flags_fn_t)ndr_push_nbt_name); } -/* +/** pull a nbt name from a blob */ -NTSTATUS nbt_name_from_blob(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, struct nbt_name *name) +_PUBLIC_ NTSTATUS nbt_name_from_blob(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, struct nbt_name *name) { return ndr_pull_struct_blob(blob, mem_ctx, name, (ndr_pull_flags_fn_t)ndr_pull_nbt_name); } -/* +/** choose a name to use when calling a server in a NBT session request. we use heuristics to see if the name we have been given is a IP address, or a too-long name. If it is then use *SMBSERVER, or a truncated name */ -void nbt_choose_called_name(TALLOC_CTX *mem_ctx, +_PUBLIC_ void nbt_choose_called_name(TALLOC_CTX *mem_ctx, struct nbt_name *n, const char *name, int type) { n->scope = NULL; @@ -450,10 +450,10 @@ static const char *nbt_hex_encode(TALLOC_CTX *mem_ctx, const char *s) } -/* +/** form a string for a NBT name */ -char *nbt_name_string(TALLOC_CTX *mem_ctx, const struct nbt_name *name) +_PUBLIC_ char *nbt_name_string(TALLOC_CTX *mem_ctx, const struct nbt_name *name) { TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx); char *ret; @@ -471,10 +471,10 @@ char *nbt_name_string(TALLOC_CTX *mem_ctx, const struct nbt_name *name) return ret; } -/* +/** pull a nbt name, WINS Replication uses another on wire format for nbt name */ -NTSTATUS ndr_pull_wrepl_nbt_name(struct ndr_pull *ndr, int ndr_flags, struct nbt_name **_r) +_PUBLIC_ NTSTATUS ndr_pull_wrepl_nbt_name(struct ndr_pull *ndr, int ndr_flags, struct nbt_name **_r) { struct nbt_name *r; uint8_t *namebuf; @@ -532,10 +532,10 @@ NTSTATUS ndr_pull_wrepl_nbt_name(struct ndr_pull *ndr, int ndr_flags, struct nbt return NT_STATUS_OK; } -/* +/** push a nbt name, WINS Replication uses another on wire format for nbt name */ -NTSTATUS ndr_push_wrepl_nbt_name(struct ndr_push *ndr, int ndr_flags, const struct nbt_name *r) +_PUBLIC_ NTSTATUS ndr_push_wrepl_nbt_name(struct ndr_push *ndr, int ndr_flags, const struct nbt_name *r) { uint8_t *namebuf; uint32_t namebuf_len; @@ -587,7 +587,7 @@ NTSTATUS ndr_push_wrepl_nbt_name(struct ndr_push *ndr, int ndr_flags, const stru return NT_STATUS_OK; } -void ndr_print_wrepl_nbt_name(struct ndr_print *ndr, const char *name, const struct nbt_name *r) +_PUBLIC_ void ndr_print_wrepl_nbt_name(struct ndr_print *ndr, const char *name, const struct nbt_name *r) { char *s = nbt_name_string(ndr, r); ndr_print_string(ndr, name, s); -- cgit