summaryrefslogtreecommitdiff
path: root/source4/include/nt_status.h
diff options
context:
space:
mode:
Diffstat (limited to 'source4/include/nt_status.h')
-rw-r--r--source4/include/nt_status.h5
1 files changed, 5 insertions, 0 deletions
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