diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-08-31 14:00:37 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-09-02 13:37:08 +1000 |
commit | f6a631bdec3ec2aba8a923136b66edf36273d9f2 (patch) | |
tree | e2a830f793e00d190c14d8585107a189f45ade29 /source4/libcli | |
parent | cecc58e0582a8574f239a26e354c00a6d570c3d5 (diff) | |
download | samba-f6a631bdec3ec2aba8a923136b66edf36273d9f2.tar.gz samba-f6a631bdec3ec2aba8a923136b66edf36273d9f2.tar.bz2 samba-f6a631bdec3ec2aba8a923136b66edf36273d9f2.zip |
s4-resolve: added resolve_name_ex_send()
this allows access to the flags that control name resolution
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/resolve/resolve.c | 41 |
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) |