From bab977dad76e9204278c7afe0bb905cda064f488 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 16 Jun 2005 05:39:40 +0000 Subject: 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) --- source4/include/nt_status.h | 5 +++++ source4/include/structs.h | 3 +++ 2 files changed, 8 insertions(+) (limited to 'source4/include') diff --git a/source4/include/nt_status.h b/source4/include/nt_status.h index 0ef443d355..e427257aa9 100644 --- a/source4/include/nt_status.h +++ b/source4/include/nt_status.h @@ -117,4 +117,9 @@ typedef uint32_t WERROR; #define NT_STATUS_DOS_CLASS(status) ((NT_STATUS_V(status) >> 16) & 0xFF) #define NT_STATUS_DOS_CODE(status) (NT_STATUS_V(status) & 0xFFFF) +/* define ldap error codes as NTSTATUS codes */ +#define NT_STATUS_LDAP(code) NT_STATUS(0xF2000000 | code) +#define NT_STATUS_IS_LDAP(status) ((NT_STATUS_V(status) & 0xFF000000) == 0xF2000000) +#define NT_STATUS_LDAP_CODE(status) (NT_STATUS_V(status) & ~0xFF000000) + #endif diff --git a/source4/include/structs.h b/source4/include/structs.h index 04fdaaba15..944f79225b 100644 --- a/source4/include/structs.h +++ b/source4/include/structs.h @@ -92,6 +92,7 @@ struct ldapsrv_call; struct ldapsrv_connection; struct ldap_connection; struct ldap_message; +struct ldap_Result; struct rw_buffer; struct registry_context; struct registry_key; @@ -158,6 +159,8 @@ struct ldb_val; struct ldb_message; struct ldb_context; struct ldb_parse_tree; +struct ldb_message_element; +struct ldap_mod; struct dom_sid; struct security_token; -- cgit