summaryrefslogtreecommitdiffstats
path: root/src/providers/dp_backend.h
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2010-04-16 17:58:52 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-05-07 17:14:32 -0400
commit66da80489c0114878043b40592c5f47d41eb0ffd (patch)
treea69750b3275692fd6dd370da90cce74ad2615e2a /src/providers/dp_backend.h
parentdd025b4cbd501e2f34461f9d8359a829b81f5c2f (diff)
downloadsssd-66da80489c0114878043b40592c5f47d41eb0ffd.tar.gz
sssd-66da80489c0114878043b40592c5f47d41eb0ffd.tar.xz
sssd-66da80489c0114878043b40592c5f47d41eb0ffd.zip
Use service discovery in backends
Integrate the failover improvements with our back ends. The DNS domain used in the SRV query is always the SSSD domain name. Please note that this patch changes the default value of ldap_uri from "ldap://localhost" to "NULL" in order to use service discovery with no server set.
Diffstat (limited to 'src/providers/dp_backend.h')
-rw-r--r--src/providers/dp_backend.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/providers/dp_backend.h b/src/providers/dp_backend.h
index 496c80700..ec0510e39 100644
--- a/src/providers/dp_backend.h
+++ b/src/providers/dp_backend.h
@@ -26,6 +26,11 @@
#include "providers/fail_over.h"
#include "db/sysdb.h"
+/* a special token, if used in place of the hostname, denotes that real
+ * hostnames should be looked up from DNS using SRV requests
+ */
+#define BE_SRV_IDENTIFIER "_srv_"
+
struct be_ctx;
struct bet_ops;
struct be_req;
@@ -147,10 +152,14 @@ void be_run_online_cb(struct be_ctx *be);
typedef void (be_svc_callback_fn_t)(void *, struct fo_server *);
int be_init_failover(struct be_ctx *ctx);
+int be_fo_is_srv_identifier(const char *server);
int be_fo_add_service(struct be_ctx *ctx, const char *service_name);
int be_fo_service_add_callback(TALLOC_CTX *memctx,
struct be_ctx *ctx, const char *service_name,
be_svc_callback_fn_t *fn, void *private_data);
+int be_fo_add_srv_server(struct be_ctx *ctx, const char *service_name,
+ const char *query_service, const char *proto,
+ const char *domain, void *user_data);
int be_fo_add_server(struct be_ctx *ctx, const char *service_name,
const char *server, int port, void *user_data);