summaryrefslogtreecommitdiff
path: root/source4/libcli/ldap/ldap.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-16 05:39:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:14 -0500
commitbab977dad76e9204278c7afe0bb905cda064f488 (patch)
treeff48dba24a28edb88ba6a5485688bf9f920a2928 /source4/libcli/ldap/ldap.h
parent9105bf4054b8ebac0c73b504bf38d49f81661176 (diff)
downloadsamba-bab977dad76e9204278c7afe0bb905cda064f488.tar.gz
samba-bab977dad76e9204278c7afe0bb905cda064f488.tar.bz2
samba-bab977dad76e9204278c7afe0bb905cda064f488.zip
r7626: a new ldap client library. Main features are:
- hooked into events system, so requests can be truly async and won't interfere with other processing happening at the same time - uses NTSTATUS codes for errors (previously errors were mostly ignored). In a similar fashion to the DOS error handling, I have reserved a range of the NTSTATUS code 32 bit space for LDAP error codes, so a function can return a LDAP error code in a NTSTATUS - much cleaner packet handling (This used to be commit 2e3c660b2fc20e046d82bf1cc296422b6e7dfad0)
Diffstat (limited to 'source4/libcli/ldap/ldap.h')
-rw-r--r--source4/libcli/ldap/ldap.h97
1 files changed, 0 insertions, 97 deletions
diff --git a/source4/libcli/ldap/ldap.h b/source4/libcli/ldap/ldap.h
index 577df1fc3d..072070f723 100644
--- a/source4/libcli/ldap/ldap.h
+++ b/source4/libcli/ldap/ldap.h
@@ -253,101 +253,4 @@ struct ldap_message {
struct ldap_Control *controls;
};
-struct ldap_queue_entry {
- struct ldap_queue_entry *next, *prev;
- int msgid;
- struct ldap_message *msg;
-};
-
-struct ldap_connection {
- int sock;
- int next_msgid;
- char *host;
- uint16_t port;
- BOOL ldaps;
-
- const char *auth_dn;
- const char *simple_pw;
-
- /* Current outstanding search entry */
- int searchid;
-
- /* List for incoming search entries */
- struct ldap_queue_entry *search_entries;
-
- /* Outstanding LDAP requests that have not yet been replied to */
- struct ldap_queue_entry *outstanding;
-
- /* Let's support SASL */
- struct gensec_security *gensec;
-};
-
-#define LDAP_CONNECTION_TIMEOUT 10000
-
-/* The following definitions come from libcli/ldap/ldap.c */
-
-BOOL ldap_encode(struct ldap_message *msg, DATA_BLOB *result);
-BOOL ldap_decode(struct asn1_data *data, struct ldap_message *msg);
-BOOL ldap_parse_basic_url(TALLOC_CTX *mem_ctx, const char *url,
- char **host, uint16_t *port, BOOL *ldaps);
-
-/* The following definitions come from libcli/ldap/ldap_client.c */
-
-struct ldap_connection *ldap_connect(TALLOC_CTX *mem_ctx, const char *url);
-struct ldap_message *new_ldap_message(TALLOC_CTX *mem_ctx);
-BOOL ldap_send_msg(struct ldap_connection *conn, struct ldap_message *msg,
- const struct timeval *endtime);
-BOOL ldap_receive_msg(struct ldap_connection *conn, struct ldap_message *msg,
- const struct timeval *endtime);
-struct ldap_message *ldap_receive(struct ldap_connection *conn, int msgid,
- const struct timeval *endtime);
-struct ldap_message *ldap_transaction(struct ldap_connection *conn,
- struct ldap_message *request);
-int ldap_bind_simple(struct ldap_connection *conn, const char *userdn, const char *password);
-int ldap_bind_sasl(struct ldap_connection *conn, struct cli_credentials *creds);
-struct ldap_connection *ldap_setup_connection(TALLOC_CTX *mem_ctx, const char *url,
- const char *userdn, const char *password);
-struct ldap_connection *ldap_setup_connection_with_sasl(TALLOC_CTX *mem_ctx, const char *url,
- struct cli_credentials *creds);
-BOOL ldap_abandon_message(struct ldap_connection *conn, int msgid,
- const struct timeval *endtime);
-BOOL ldap_setsearchent(struct ldap_connection *conn, struct ldap_message *msg,
- const struct timeval *endtime);
-struct ldap_message *ldap_getsearchent(struct ldap_connection *conn,
- const struct timeval *endtime);
-void ldap_endsearchent(struct ldap_connection *conn,
- const struct timeval *endtime);
-struct ldap_message *ldap_searchone(struct ldap_connection *conn,
- struct ldap_message *msg,
- const struct timeval *endtime);
-BOOL ldap_find_single_value(struct ldap_message *msg, const char *attr,
- DATA_BLOB *value);
-BOOL ldap_find_single_string(struct ldap_message *msg, const char *attr,
- TALLOC_CTX *mem_ctx, char **value);
-BOOL ldap_find_single_int(struct ldap_message *msg, const char *attr,
- int *value);
-int ldap_error(struct ldap_connection *conn);
-NTSTATUS ldap2nterror(int ldaperror);
-
-/* The following definitions come from libcli/ldap/ldap_ldif.c */
-
-BOOL add_value_to_attrib(TALLOC_CTX *mem_ctx, struct ldb_val *value,
- struct ldb_message_element *attrib);
-BOOL add_attrib_to_array_talloc(TALLOC_CTX *mem_ctx,
- const struct ldb_message_element *attrib,
- struct ldb_message_element **attribs,
- int *num_attribs);
-BOOL add_mod_to_array_talloc(TALLOC_CTX *mem_ctx,
- struct ldap_mod *mod,
- struct ldap_mod **mods,
- int *num_mods);
-struct ldap_message *ldap_ldif2msg(TALLOC_CTX *mem_ctx, const char *s);
-
-/* The following definitions come from libcli/ldap/ldap_ndr.c */
-
-const char *ldap_encode_ndr_uint32(TALLOC_CTX *mem_ctx, uint32_t value);
-const char *ldap_encode_ndr_dom_sid(TALLOC_CTX *mem_ctx, struct dom_sid *sid);
-const char *ldap_encode_ndr_GUID(TALLOC_CTX *mem_ctx, struct GUID *guid);
-NTSTATUS ldap_decode_ndr_GUID(TALLOC_CTX *mem_ctx, struct ldb_val val, struct GUID *guid);
-
#endif