summaryrefslogtreecommitdiff
path: root/source4/libcli/resolve
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/resolve')
-rw-r--r--source4/libcli/resolve/resolve.c41
1 files changed, 33 insertions, 8 deletions
diff --git a/source4/libcli/resolve/resolve.c b/source4/libcli/resolve/resolve.c
index 9359b8f582..d9352b4226 100644
--- a/source4/libcli/resolve/resolve.c
+++ b/source4/libcli/resolve/resolve.c
@@ -139,7 +139,7 @@ static struct composite_context *setup_next_method(struct composite_context *c)
*/
struct composite_context *resolve_name_all_send(struct resolve_context *ctx,
TALLOC_CTX *mem_ctx,
- uint32_t flags,
+ uint32_t flags, /* RESOLVE_NAME_FLAG_* */
uint16_t port,
struct nbt_name *name,
struct tevent_context *event_ctx)
@@ -223,12 +223,22 @@ NTSTATUS resolve_name_all_recv(struct composite_context *c,
return status;
}
+struct composite_context *resolve_name_ex_send(struct resolve_context *ctx,
+ TALLOC_CTX *mem_ctx,
+ uint32_t flags, /* RESOLVE_NAME_FLAG_* */
+ uint16_t port,
+ struct nbt_name *name,
+ struct tevent_context *event_ctx)
+{
+ return resolve_name_all_send(ctx, mem_ctx, flags, port, name, event_ctx);
+}
+
struct composite_context *resolve_name_send(struct resolve_context *ctx,
TALLOC_CTX *mem_ctx,
struct nbt_name *name,
struct tevent_context *event_ctx)
{
- return resolve_name_all_send(ctx, mem_ctx, 0, 0, name, event_ctx);
+ return resolve_name_ex_send(ctx, mem_ctx, 0, 0, name, event_ctx);
}
NTSTATUS resolve_name_recv(struct composite_context *c,
@@ -259,16 +269,31 @@ NTSTATUS resolve_name_recv(struct composite_context *c,
/*
general name resolution - sync call
*/
-NTSTATUS resolve_name(struct resolve_context *ctx,
- struct nbt_name *name,
- TALLOC_CTX *mem_ctx,
- const char **reply_addr,
- struct tevent_context *ev)
+NTSTATUS resolve_name_ex(struct resolve_context *ctx,
+ uint32_t flags, /* RESOLVE_NAME_FLAG_* */
+ uint16_t port,
+ struct nbt_name *name,
+ TALLOC_CTX *mem_ctx,
+ const char **reply_addr,
+ struct tevent_context *ev)
{
- struct composite_context *c = resolve_name_send(ctx, mem_ctx, name, ev);
+ struct composite_context *c = resolve_name_ex_send(ctx, mem_ctx, flags, port, name, ev);
return resolve_name_recv(c, mem_ctx, reply_addr);
}
+
+/*
+ general name resolution - sync call
+ */
+NTSTATUS resolve_name(struct resolve_context *ctx,
+ struct nbt_name *name,
+ TALLOC_CTX *mem_ctx,
+ const char **reply_addr,
+ struct tevent_context *ev)
+{
+ return resolve_name_ex(ctx, 0, 0, name, mem_ctx, reply_addr, ev);
+}
+
/* Initialise a struct nbt_name with a NULL scope */
void make_nbt_name(struct nbt_name *nbt, const char *name, int type)