summaryrefslogtreecommitdiff
path: root/src/resolv/async_resolv.h
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2010-02-22 10:28:26 +0100
committerStephen Gallagher <sgallagh@redhat.com>2010-02-22 12:54:53 -0500
commite0bb119bdc1549d731f371202428c0cb667d3388 (patch)
tree3c4edcfb90558ca95a36c6edafdf9a98f35474d0 /src/resolv/async_resolv.h
parent48dbc3c447449b9bb1a9b7c839b9471ef4f547bf (diff)
downloadsssd-e0bb119bdc1549d731f371202428c0cb667d3388.tar.gz
sssd-e0bb119bdc1549d731f371202428c0cb667d3388.tar.bz2
sssd-e0bb119bdc1549d731f371202428c0cb667d3388.zip
Restrict family lookups
Adds a new option that tells resolver which address family to prefer or use exclusively. Fixes: #404
Diffstat (limited to 'src/resolv/async_resolv.h')
-rw-r--r--src/resolv/async_resolv.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/resolv/async_resolv.h b/src/resolv/async_resolv.h
index 2ba6449b..5f87f12e 100644
--- a/src/resolv/async_resolv.h
+++ b/src/resolv/async_resolv.h
@@ -57,10 +57,18 @@ struct hostent *resolv_copy_hostent(TALLOC_CTX *mem_ctx,
struct hostent *src);
/** Get host by name **/
+enum restrict_family {
+ IPV4_ONLY,
+ IPV4_FIRST,
+ IPV6_ONLY,
+ IPV6_FIRST
+};
+
struct tevent_req *resolv_gethostbyname_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct resolv_ctx *ctx,
- const char *name);
+ const char *name,
+ enum restrict_family family_order);
int resolv_gethostbyname_recv(struct tevent_req *req,
TALLOC_CTX *mem_ctx,