]> git.sur5r.net Git - openldap/blobdiff - include/ldap.h
Sync with HEAD
[openldap] / include / ldap.h
index df300b9ff3df52883941a713ee2e6475bb8dbdcf..a4f3ed2f3bf428d0cc4adef3b4959b7b4fdb8cff 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  * 
- * Copyright 1998-2004 The OpenLDAP Foundation.
+ * Copyright 1998-2005 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -206,6 +206,7 @@ typedef struct ldapcontrol {
 #define LDAP_CONTROL_MANAGEDSAIT               "2.16.840.1.113730.3.4.2" /* RFC 3296 */
 #define LDAP_CONTROL_SUBENTRIES                        "1.3.6.1.4.1.4203.1.10.1" /* RFC 3672 */
 #define LDAP_CONTROL_PAGEDRESULTS              "1.2.840.113556.1.4.319"  /* RFC 2696 */
+#define LDAP_CONTROL_VALUESRETURNFILTER        "1.2.826.0.1.334810.2.3"  /* RFC 3876 */
 
 /*  standard track - not implemented in slapd(8) */
 #define LDAP_CONTROL_SORTREQUEST    "1.2.840.113556.1.4.473" /* RFC 2891 */
@@ -213,31 +214,39 @@ typedef struct ldapcontrol {
 
 /* but not yet formalized controls */
 #define LDAP_CONTROL_PROXY_AUTHZ               "2.16.840.1.113730.3.4.18"
-#define LDAP_CONTROL_VALUESRETURNFILTER        "1.2.826.0.1.334810.2.3"
 
 /* various works in progress */
 #define LDAP_CONTROL_ASSERT                            "1.3.6.1.4.1.4203.666.5.9"
 #define LDAP_CONTROL_NOOP                              "1.3.6.1.4.1.4203.666.5.2"
 #define LDAP_CONTROL_PRE_READ                  "1.3.6.1.4.1.4203.666.5.10.1"
 #define LDAP_CONTROL_POST_READ                 "1.3.6.1.4.1.4203.666.5.10.2"
+#define LDAP_CONTROL_NO_SUBORDINATES   "1.3.6.1.4.1.4203.666.5.11"
+#define LDAP_CONTROL_MANAGEDIT                 "1.3.6.1.4.1.4203.666.5.12"
+#define LDAP_CONTROL_SLURP                             "1.3.6.1.4.1.4203.666.5.13"
 
-#if 0
 /* LDAP Duplicated Entry Control Extension *//* not implemented in slapd(8) */
 #define LDAP_CONTROL_DUPENT_REQUEST            "2.16.840.1.113719.1.27.101.1"
 #define LDAP_CONTROL_DUPENT_RESPONSE   "2.16.840.1.113719.1.27.101.2"
 #define LDAP_CONTROL_DUPENT_ENTRY              "2.16.840.1.113719.1.27.101.3"
 #define LDAP_CONTROL_DUPENT    LDAP_CONTROL_DUPENT_REQUEST
-#endif
+
+/* LDAP Persistent Search Control *//* not implemented in slapd(8) */
+/* draft-ietf-ldapext-psearch-03.txt (expired) */
+#define LDAP_CONTROL_PERSIST_REQUEST                           "2.16.840.1.113730.3.4.3"
+#define LDAP_CONTROL_PERSIST_ENTRY_CHANGE_NOTICE       "2.16.840.1.113730.3.4.7"
+#define LDAP_CONTROL_PERSSIT_ENTRY_CHANGE_ADD          0x1
+#define LDAP_CONTROL_PERSSIT_ENTRY_CHANGE_DELETE       0x2
+#define LDAP_CONTROL_PERSSIT_ENTRY_CHANGE_MODIFY       0x4
+#define LDAP_CONTROL_PERSSIT_ENTRY_CHANGE_RENAME       0x8
 
 /* LDAP VLV *//* not implemented in slapd(8) */
 #define LDAP_CONTROL_VLVREQUEST        "2.16.840.1.113730.3.4.9"
 #define LDAP_CONTROL_VLVRESPONSE    "2.16.840.1.113730.3.4.10"
 
 /* Password policy Controls *//* work in progress */
-#ifdef LDAP_DEVEL
+/* ITS#3458: released, but not to latest draft; disabled by default */
 #define LDAP_CONTROL_PASSWORDPOLICYREQUEST     "1.3.6.1.4.1.42.2.27.8.5.1"
 #define LDAP_CONTROL_PASSWORDPOLICYRESPONSE    "1.3.6.1.4.1.42.2.27.8.5.1"
-#endif
 
 /* LDAP Sync -- draft-zeilenga-ldup-sync *//* submitted for publication */
 #define LDAP_SYNC_OID                  "1.3.6.1.4.1.4203.1.9.1"
@@ -269,6 +278,18 @@ typedef struct ldapcontrol {
 #define LDAP_SYNC_MODIFY                               2
 #define LDAP_SYNC_DELETE                               3
 
+/* LDAP Chaining Behavior Control *//* work in progress */
+/* <draft-sermersheim-ldap-chaining>;
+ * see also LDAP_REQUIRES_CHAINING, LDAP_CANNOT_CHAIN */
+#ifdef LDAP_DEVEL
+#define LDAP_CONTROL_X_CHAINING_BEHAVIOR       "1.3.6.1.4.1.4203.666.11.3"
+
+#define        LDAP_CHAINING_PREFERRED                         0
+#define        LDAP_CHAINING_REQUIRED                          1
+#define LDAP_REFERRALS_PREFERRED                       2
+#define LDAP_REFERRALS_REQUIRED                                3
+#endif
+
 /* MS ActiveDirectory controls (for compatibility) */
 #define LDAP_CONTROL_X_DOMAIN_SCOPE            "1.2.840.113556.1.4.1339"
 #define LDAP_CONTROL_X_PERMISSIVE_MODIFY       "1.2.840.113556.1.4.1413"
@@ -291,8 +312,15 @@ typedef struct ldapcontrol {
 #define LDAP_TAG_EXOP_MODIFY_PASSWD_NEW        ((ber_tag_t) 0x82U)
 #define LDAP_TAG_EXOP_MODIFY_PASSWD_GEN        ((ber_tag_t) 0x80U)
 
-#define LDAP_EXOP_X_WHO_AM_I   "1.3.6.1.4.1.4203.1.11.3"
-#define LDAP_EXOP_X_CANCEL             "1.3.6.1.1.8"
+#define LDAP_EXOP_CANCEL               "1.3.6.1.1.8"                           /* RFC 3909 */
+#define LDAP_EXOP_X_CANCEL             LDAP_EXOP_CANCEL
+
+/* various works in progress */
+
+#define LDAP_EXOP_WHO_AM_I             "1.3.6.1.4.1.4203.1.11.3"
+#define LDAP_EXOP_X_WHO_AM_I   LDAP_EXOP_WHO_AM_I
+
+#define LDAP_EXOP_X_TURN               "1.3.6.1.4.1.4203.666.6.4"
 
 /* LDAP Grouping of Related Operations *//* a work in progress */
 #ifdef LDAP_DEVEL
@@ -317,9 +345,10 @@ typedef struct ldapcontrol {
 #define LDAP_FEATURE_ABSOLUTE_FILTERS "1.3.6.1.4.1.4203.1.5.3"  /* (&) (|) */
 #define LDAP_FEATURE_LANGUAGE_TAG_OPTIONS "1.3.6.1.4.1.4203.1.5.4"
 #define LDAP_FEATURE_LANGUAGE_RANGE_OPTIONS "1.3.6.1.4.1.4203.1.5.5"
-#define LDAP_FEATURE_MODIFY_INCREMENT "1.3.6.1.4.1.4203.666.8.2"
 
 #ifdef LDAP_DEVEL
+/* LDAP Experimental (works in progress) Features */
+#define LDAP_FEATURE_MODIFY_INCREMENT "1.3.6.1.4.1.4203.666.8.2"
 #define LDAP_FEATURE_SUBORDINATE_SCOPE \
        "1.3.6.1.4.1.4203.666.8.1" /* "children" */
 #define LDAP_FEATURE_CHILDREN_SCOPE LDAP_FEATURE_SUBORDINATE_SCOPE
@@ -446,10 +475,8 @@ typedef struct ldapcontrol {
 #define LDAP_SCOPE_ONE                 LDAP_SCOPE_ONELEVEL
 #define LDAP_SCOPE_SUBTREE             ((ber_int_t) 0x0002)
 #define LDAP_SCOPE_SUB                 LDAP_SCOPE_SUBTREE
-#ifdef LDAP_DEVEL
 #define LDAP_SCOPE_SUBORDINATE ((ber_int_t) 0x0003) /* OpenLDAP extension */
 #define LDAP_SCOPE_CHILDREN            LDAP_SCOPE_SUBORDINATE
-#endif
 
 /* substring filter component types */
 #define LDAP_SUBSTRING_INITIAL ((ber_tag_t) 0x80U)     /* context specific */
@@ -552,6 +579,13 @@ typedef struct ldapcontrol {
 /* for the Assertion control */
 #define LDAP_ASSERTION_FAILED                  0x410f
 
+/* for the Chaining Behavior control (consecutive result codes requested;
+ * see <draft-sermersheim-ldap-chaining> ) */
+#ifdef LDAP_CONTROL_X_CHAINING_BEHAVIOR
+#define        LDAP_REQUIRES_CHAINING                  0x4110
+#define LDAP_CANNOT_CHAIN                      0x4111
+#endif
+
 /* API Error Codes
  *
  * Based on draft-ietf-ldap-c-api-xx
@@ -1287,6 +1321,21 @@ ldap_initialize LDAP_P((
        LDAP **ldp,
        LDAP_CONST char *url ));
 
+/*
+ * in tls.c
+ */
+
+LDAP_F( int )
+ldap_start_tls LDAP_P((
+       LDAP *ld,
+       LDAPControl **serverctrls,
+       LDAPControl **clientctrls,
+       int *msgidp ));
+
+LDAP_F( int )
+ldap_install_tls LDAP_P((
+       LDAP *ld ));
+
 LDAP_F( int )
 ldap_start_tls_s LDAP_P((
        LDAP *ld,
@@ -1799,12 +1848,32 @@ ldap_cancel LDAP_P(( LDAP *ld,
        int                             *msgidp ));
 
 LDAP_F( int )
-ldap_cancel_s LDAP_P((
-       LDAP *ld,
+ldap_cancel_s LDAP_P(( LDAP *ld,
        int cancelid,
        LDAPControl **sctrl,
        LDAPControl **cctrl ));
 
+/*
+ * LDAP Turn Extended Operation <draft-zeilenga-ldap-turn-xx.txt>
+ *  in turn.c
+ */
+#define LDAP_API_FEATURE_TURN 1000
+
+LDAP_F( int )
+ldap_turn LDAP_P(( LDAP *ld,
+       int mutual,
+       LDAP_CONST char* identifier,
+       LDAPControl             **sctrls,
+       LDAPControl             **cctrls,
+       int                             *msgidp ));
+
+LDAP_F( int )
+ldap_turn_s LDAP_P(( LDAP *ld,
+       int mutual,
+       LDAP_CONST char* identifier,
+       LDAPControl **sctrl,
+       LDAPControl **cctrl ));
+
 /*
  * LDAP Server Side Sort
  *     in sortctrl.c