]> git.sur5r.net Git - openldap/blobdiff - include/ldap.h
cleanup
[openldap] / include / ldap.h
index 5d7755522576223b5f04a570f2f7b88c4df85216..c567d6adcc0389b41f205d4b6d12286f1bf4dc33 100644 (file)
@@ -120,6 +120,7 @@ LDAP_BEGIN_DECL
 #define LDAP_OPT_URI                           0x5006
 #define LDAP_OPT_REFERRAL_URLS      0x5007  /* Referral URLs */
 #define LDAP_OPT_SOCKBUF            0x5008  /* sockbuf */
+#define LDAP_OPT_DEFBASE               0x5009  /* searchbase */
 
 /* OpenLDAP TLS options */
 #define LDAP_OPT_X_TLS                         0x6000
@@ -137,6 +138,7 @@ LDAP_BEGIN_DECL
 #define LDAP_OPT_X_TLS_CONNECT_CB      0x600c
 #define LDAP_OPT_X_TLS_CONNECT_ARG     0x600d
 #define LDAP_OPT_X_TLS_DHFILE          0x600e
+#define LDAP_OPT_X_TLS_NEWCTX          0x600f
 
 #define LDAP_OPT_X_TLS_NEVER   0
 #define LDAP_OPT_X_TLS_HARD            1
@@ -205,10 +207,11 @@ typedef struct ldapcontrol {
 /* LDAP Controls */
 /*     standard track controls */
 #define LDAP_CONTROL_MANAGEDSAIT       "2.16.840.1.113730.3.4.2"  /* RFC 3296 */
-#define LDAP_CONTROL_PROXY_AUTHZ       "2.16.840.1.113730.3.4.18" /* RFC TBD  */
+#define LDAP_CONTROL_PROXY_AUTHZ       "2.16.840.1.113730.3.4.18" /* RFC 4370 */
 #define LDAP_CONTROL_SUBENTRIES                "1.3.6.1.4.1.4203.1.10.1"  /* RFC 3672 */
 
-#define LDAP_CONTROL_VALUESRETURNFILTER        "1.2.826.0.1.334810.2.3"/* RFC 3876 */
+#define LDAP_CONTROL_VALUESRETURNFILTER "1.2.826.0.1.3344810.2.3"/* RFC 3876 */
+
 #define LDAP_CONTROL_ASSERT                            "1.3.6.1.1.12"                  /* RFC TBD */
 #define LDAP_CONTROL_PRE_READ                  "1.3.6.1.1.13.1"                /* RFC TBD */
 #define LDAP_CONTROL_POST_READ                 "1.3.6.1.1.13.2"                /* RFC TBD */
@@ -220,20 +223,7 @@ typedef struct ldapcontrol {
 /*     non-standard track controls */
 #define LDAP_CONTROL_PAGEDRESULTS      "1.2.840.113556.1.4.319"   /* RFC 2696 */
 
-/* Password policy Controls *//* work in progress */
-/* ITS#3458: released; 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"
-
-/* various works in progress */
-#define LDAP_CONTROL_NOOP                              "1.3.6.1.4.1.4203.666.5.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"
-#define LDAP_CONTROL_VALSORT                   "1.3.6.1.4.1.4203.666.5.14"
-#define LDAP_CONTROL_DONTUSECOPY               "1.3.6.1.4.1.4203.666.5.15"
-
-/* LDAP Sync -- draft-zeilenga-ldup-sync *//* submitted for publication */
+/* LDAP Sync -- draft-zeilenga-ldup-sync *//* RFC TBD */
 #define LDAP_SYNC_OID                  "1.3.6.1.4.1.4203.1.9.1"
 #define LDAP_CONTROL_SYNC              LDAP_SYNC_OID ".1"
 #define LDAP_CONTROL_SYNC_STATE        LDAP_SYNC_OID ".2"
@@ -263,6 +253,21 @@ typedef struct ldapcontrol {
 #define LDAP_SYNC_MODIFY                               2
 #define LDAP_SYNC_DELETE                               3
 
+
+/* Password policy Controls *//* work in progress */
+/* ITS#3458: released; 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"
+
+/* various works in progress */
+#define LDAP_CONTROL_NOOP                              "1.3.6.1.4.1.4203.666.5.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"
+#define LDAP_CONTROL_VALSORT                   "1.3.6.1.4.1.4203.666.5.14"
+#define LDAP_CONTROL_DONTUSECOPY               "1.3.6.1.4.1.4203.666.5.15"
+
+
 /* LDAP Chaining Behavior Control *//* work in progress */
 /* <draft-sermersheim-ldap-chaining>;
  * see also LDAP_NO_REFERRALS_FOUND, LDAP_CANNOT_CHAIN */
@@ -328,16 +333,17 @@ typedef struct ldapcontrol {
 #define        LDAP_TAG_EXOP_REFRESH_REQ_TTL   ((ber_tag_t) 0x81U)
 #define        LDAP_TAG_EXOP_REFRESH_RES_TTL   ((ber_tag_t) 0x80U)
 
-/* 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
 
+/* various works in progress */
+#ifdef LDAP_DEVEL
 #define LDAP_EXOP_X_TURN               "1.3.6.1.4.1.4203.666.6.4"
+#endif
 
 /* LDAP Distributed Procedures <draft-sermersheim-ldap-distproc> */
 /* a work in progress */
 #ifdef LDAP_DEVEL
-/* FIXME: allocate an OID arc under OpenLDAP experimental arc */
 #define LDAP_X_DISTPROC_BASE           "1.3.6.1.4.1.4203.666.11.6"
 #define LDAP_EXOP_X_CHAINEDREQUEST     LDAP_X_DISTPROC_BASE ".1"
 #define LDAP_FEATURE_X_CANCHAINOPS     LDAP_X_DISTPROC_BASE ".2"
@@ -353,6 +359,14 @@ typedef struct ldapcontrol {
 #define LDAP_URLEXT_X_FAILEDNAME       "x-failedName"
 #endif
 
+#ifdef LDAP_DEVEL
+#define LDAP_X_TXN                                             "1.3.6.1.4.1.4203.666.11.7" /* temp */
+#define LDAP_EXOP_X_TXN_START                  LDAP_X_TXN ".1"
+#define LDAP_CONTROL_X_TXN_SPEC                        LDAP_X_TXN ".2"
+#define LDAP_EXOP_X_TXN_END                            LDAP_X_TXN ".3"
+#define LDAP_EXOP_X_TXN_ABORTED_NOTICE LDAP_X_TXN ".4"
+#endif
+
 /* LDAP Features */
 #define LDAP_FEATURE_ALL_OP_ATTRS      "1.3.6.1.4.1.4203.1.5.1"        /* RFC 3673 */
 #define LDAP_FEATURE_OBJECTCLASS_ATTRS \
@@ -542,7 +556,7 @@ typedef struct ldapcontrol {
 
 #define LDAP_SECURITY_ERROR(n) LDAP_RANGE((n),0x2F,0x32) /* 47-50 */
 
-#define LDAP_PROXY_AUTHZ_FAILURE       0x2F /* LDAPv3 proxy authorization */
+#define LDAP_X_PROXY_AUTHZ_FAILURE     0x2F /* LDAPv3 proxy authorization */
 #define LDAP_INAPPROPRIATE_AUTH                0x30
 #define LDAP_INVALID_CREDENTIALS       0x31
 #define LDAP_INSUFFICIENT_ACCESS       0x32
@@ -583,6 +597,8 @@ typedef struct ldapcontrol {
 /* Assertion control (122) */ 
 #define LDAP_ASSERTION_FAILED          0x7A
 
+/* Proxied Authorization Denied (123) */ 
+#define LDAP_PROXIED_AUTHORIZATION_DENIED              0x7B
 
 /* Experimental result codes */
 #define LDAP_E_ERROR(n)        LDAP_RANGE((n),0x1000,0x3FFF)
@@ -612,6 +628,11 @@ typedef struct ldapcontrol {
 #define LDAP_X_INVALIDREFERENCE                        0x4112
 #endif
 
+#ifdef LDAP_X_TXN
+#define LDAP_X_TXN_SPECIFY_OKAY                0x4120
+#define LDAP_X_TXN_ID_INVALID          0x4121
+#endif
+
 /* API Error Codes
  *
  * Based on draft-ietf-ldap-c-api-xx
@@ -763,6 +784,19 @@ ldap_set_nextref_proc LDAP_P((
        LDAP_NEXTREF_PROC *nextref_proc,
        void *params ));
 
+/* V3 URLLIST Function Callback Prototype */
+typedef int (LDAP_URLLIST_PROC) LDAP_P((
+       LDAP *ld, 
+       LDAPURLDesc **urllist,
+       LDAPURLDesc **url,
+       void *params ));
+
+LDAP_F( int )
+ldap_set_urllist_proc LDAP_P((
+       LDAP *ld,
+       LDAP_URLLIST_PROC *urllist_proc,
+       void *params ));
+
 /*
  * in controls.c:
  */
@@ -2054,5 +2088,38 @@ ldap_refresh_s LDAP_P((
        LDAPControl **sctrls,
        LDAPControl **cctrls ));
 
+/*
+ * LDAP Transactions
+ */
+#ifdef LDAP_X_TXN
+LDAP_F( int )
+ldap_txn_start LDAP_P(( LDAP *ld,
+       LDAPControl             **sctrls,
+       LDAPControl             **cctrls,
+       int                             *msgidp ));
+
+LDAP_F( int )
+ldap_txn_start_s LDAP_P(( LDAP *ld,
+       LDAPControl **sctrl,
+       LDAPControl **cctrl,
+       struct berval **rettxnid ));
+
+LDAP_F( int )
+ldap_txn_end LDAP_P(( LDAP *ld,
+       int     commit,
+       struct berval   *txnid,
+       LDAPControl             **sctrls,
+       LDAPControl             **cctrls,
+       int                             *msgidp ));
+
+LDAP_F( int )
+ldap_txn_end_s LDAP_P(( LDAP *ld,
+       int     commit,
+       struct berval *txnid,
+       LDAPControl **sctrl,
+       LDAPControl **cctrl,
+       int *retidp ));
+#endif
+
 LDAP_END_DECL
 #endif /* _LDAP_H */