summaryrefslogtreecommitdiffstats
path: root/src/resolv/async_resolv.h
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2010-04-15 15:39:55 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-04-30 07:51:18 -0400
commitfbae85bcb4b3940024f8e3c127fac9da3671302d (patch)
tree69a7597ff9f81e90d50d52a135f25efdfeb0e186 /src/resolv/async_resolv.h
parentbd290f62727b8903d889705a9d129ee6c9d62bc9 (diff)
downloadsssd-fbae85bcb4b3940024f8e3c127fac9da3671302d.tar.gz
sssd-fbae85bcb4b3940024f8e3c127fac9da3671302d.tar.xz
sssd-fbae85bcb4b3940024f8e3c127fac9da3671302d.zip
Sort SRV replies according to RFC 2782
RFC 2782 defines a way to sort replies to a SRV query. In short, the algorithm sorts all replies by priority and then does a weight-based selection for every priority level. For details, please see the sections "Usage rules" for overview of the algorithm and section "The 'Weight' field" for description on the weight selection.
Diffstat (limited to 'src/resolv/async_resolv.h')
-rw-r--r--src/resolv/async_resolv.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/resolv/async_resolv.h b/src/resolv/async_resolv.h
index 5f87f12e3..b6a13d7fa 100644
--- a/src/resolv/async_resolv.h
+++ b/src/resolv/async_resolv.h
@@ -88,6 +88,10 @@ int resolv_getsrv_recv(TALLOC_CTX *mem_ctx,
int *timeouts,
struct ares_srv_reply **reply_list);
+/* This is an implementation of section "Usage rules" of RFC 2782 */
+int
+resolv_sort_srv_reply(TALLOC_CTX *mem_ctx, struct ares_srv_reply **reply);
+
/** Get TXT record **/
struct tevent_req *resolv_gettxt_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,