]> git.sur5r.net Git - openldap/blobdiff - include/ldap.h
Prepare for release
[openldap] / include / ldap.h
index c906919a811c525e2f9d3a8e6b90a9761b9ad18a..874cff4e73446c22b29580386e80850ec552261e 100644 (file)
@@ -1,12 +1,13 @@
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-2000 The OpenLDAP Foundation, Redwood City, California, USA
+ * Copyright 1998-2001 The OpenLDAP Foundation, Redwood City, California, USA
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms are permitted only
- * as authorized by the OpenLDAP Public License.  A copy of this
- * license is available at http://www.OpenLDAP.org/license.html or
- * in file LICENSE in the top-level directory of the distribution.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.  A copy of this license is available at
+ * http://www.OpenLDAP.org/license.html or in file LICENSE in the
+ * top-level directory of the distribution.
  */
 /* Portions
  * Copyright (c) 1990 Regents of the University of Michigan.
@@ -43,12 +44,13 @@ LDAP_BEGIN_DECL
  */
 #define LDAP_API_VERSION       2004
 #define LDAP_VENDOR_NAME       "OpenLDAP"
+
 /*
  * vendor version number
  *     2.0.0  -> 20000
  *     2.3.16 -> 20316
  */
-#define LDAP_VENDOR_VERSION    20007
+#define LDAP_VENDOR_VERSION    20019
 
 /* OpenLDAP API Features */
 #define LDAP_API_FEATURE_X_OPENLDAP LDAP_VENDOR_VERSION
@@ -117,16 +119,16 @@ LDAP_BEGIN_DECL
 #define LDAP_OPT_URI                           0x5006
 
 /* OpenLDAP TLS options */
-#define LDAP_OPT_X_TLS_CACERTFILE      0x6001
-#define LDAP_OPT_X_TLS_CACERTDIR       0x6002
-#define LDAP_OPT_X_TLS_CERT            0x6003
+#define LDAP_OPT_X_TLS                         0x6000
+#define LDAP_OPT_X_TLS_CTX                     0x6001  /* SSL CTX */
+#define LDAP_OPT_X_TLS_CACERTFILE      0x6002
+#define LDAP_OPT_X_TLS_CACERTDIR       0x6003
 #define LDAP_OPT_X_TLS_CERTFILE                0x6004
 #define LDAP_OPT_X_TLS_KEYFILE         0x6005
 #define LDAP_OPT_X_TLS_REQUIRE_CERT    0x6006
-#define LDAP_OPT_X_TLS                 0x6007
-#define LDAP_OPT_X_TLS_PROTOCOL                0x6008
-#define LDAP_OPT_X_TLS_CIPHER_SUITE    0x6009
-#define LDAP_OPT_X_TLS_RANDOM_FILE     0x600a
+/* #define LDAP_OPT_X_TLS_PROTOCOL             0x6007 */
+#define LDAP_OPT_X_TLS_CIPHER_SUITE    0x6008
+#define LDAP_OPT_X_TLS_RANDOM_FILE     0x6009
 
 #define LDAP_OPT_X_TLS_NEVER           0
 #define LDAP_OPT_X_TLS_HARD            1
@@ -184,10 +186,13 @@ typedef struct ldapcontrol {
 } LDAPControl;
 
 /* LDAP Controls */
-       /* chase referrals controls */
+
+#ifdef undef
+       /* chase referrals client control (not yet implemented)  */
 #define LDAP_CONTROL_REFERRALS "1.2.840.113666.1.4.616"
 #define LDAP_CHASE_SUBORDINATE_REFERRALS       0x0020U
 #define LDAP_CHASE_EXTERNAL_REFERRALS  0x0040U
+#endif
 
 #define LDAP_CONTROL_MANAGEDSAIT "2.16.840.1.113730.3.4.2"
 
@@ -285,12 +290,13 @@ typedef struct ldapcontrol {
 
 /* sasl methods */
 #define LDAP_SASL_SIMPLE               ((char*)0)
+#define LDAP_SASL_NULL                 ("")
 
 
 /* authentication methods available */
 #define LDAP_AUTH_NONE         ((ber_tag_t) 0x00U)     /* no authentication              */
 #define LDAP_AUTH_SIMPLE       ((ber_tag_t) 0x80U)     /* context specific + primitive   */
-#define LDAP_AUTH_SASL         ((ber_tag_t) 0xa3U)     /* context specific + primitive   */
+#define LDAP_AUTH_SASL         ((ber_tag_t) 0xa3U)     /* context specific + constructed */
 #define LDAP_AUTH_KRBV4                ((ber_tag_t) 0xffU)     /* means do both of the following */
 #define LDAP_AUTH_KRBV41       ((ber_tag_t) 0x81U)     /* context specific + primitive   */
 #define LDAP_AUTH_KRBV42       ((ber_tag_t) 0x82U)     /* context specific + primitive   */
@@ -320,6 +326,7 @@ typedef struct ldapcontrol {
 #define LDAP_SUBSTRING_FINAL   ((ber_tag_t) 0x82U)     /* context specific */
 
 /* search scopes */
+#define LDAP_SCOPE_DEFAULT     ((ber_int_t) -1)
 #define LDAP_SCOPE_BASE                ((ber_int_t) 0x0000)
 #define LDAP_SCOPE_ONELEVEL    ((ber_int_t) 0x0001)
 #define LDAP_SCOPE_SUBTREE     ((ber_int_t) 0x0002)
@@ -345,7 +352,7 @@ typedef struct ldapcontrol {
 #define LDAP_AUTH_METHOD_NOT_SUPPORTED 0x07
 #define LDAP_STRONG_AUTH_NOT_SUPPORTED LDAP_AUTH_METHOD_NOT_SUPPORTED
 #define LDAP_STRONG_AUTH_REQUIRED      0x08
-#define LDAP_PARTIAL_RESULTS           0x09    /* not listed in v3 */
+#define LDAP_PARTIAL_RESULTS           0x09    /* LDAPv2+ (not LDAPv3) */
 
 #define        LDAP_REFERRAL                           0x0a /* LDAPv3 */
 #define LDAP_ADMINLIMIT_EXCEEDED       0x0b /* LDAPv3 */
@@ -397,6 +404,8 @@ typedef struct ldapcontrol {
 #define LDAP_OTHER                     0x50
 
 #define LDAP_API_ERROR(n)              LDAP_RANGE((n),0x51,0x61) /* 81-97 */
+#define LDAP_API_RESULT(n)             (((n) == LDAP_SUCCESS) || \
+                                                                       LDAP_RANGE((n),0x51,0x61)) /* 0,81-97 */
 
 #define LDAP_SERVER_DOWN               0x51
 #define LDAP_LOCAL_ERROR               0x52
@@ -1318,57 +1327,6 @@ ldap_search_st LDAP_P((  /* deprecated */
        struct timeval *timeout,
        LDAPMessage **res ));
 
-
-/*
- * in ufn.c                                                    
- *     (deprecated)
- */
-LDAP_F( int )
-ldap_ufn_search_c LDAP_P(( /* deprecated */
-       LDAP *ld,
-       LDAP_CONST char *ufn,
-       char **attrs,
-       int attrsonly,
-       LDAPMessage **res,
-       int (*cancelproc)( void *cl ),
-       void *cancelparm ));
-
-LDAP_F( int )
-ldap_ufn_search_ct LDAP_P(( /* deprecated */
-       LDAP *ld,
-       LDAP_CONST char *ufn,
-       char **attrs,
-       int attrsonly,
-       LDAPMessage **res,
-       int (*cancelproc)( void *cl ),
-       void *cancelparm,
-       char *tag1,
-       char *tag2,
-       char *tag3 ));
-
-LDAP_F( int )
-ldap_ufn_search_s LDAP_P(( /* deprecated */
-       LDAP *ld,
-       LDAP_CONST char *ufn,
-       char **attrs,
-       int attrsonly,
-       LDAPMessage **res ));
-
-LDAP_F( LDAPFiltDesc *)
-ldap_ufn_setfilter LDAP_P(( /* deprecated */
-       LDAP *ld,
-       LDAP_CONST char *fname ));
-
-LDAP_F( void )
-ldap_ufn_setprefix LDAP_P(( /* deprecated */
-       LDAP *ld,
-       LDAP_CONST char *prefix ));
-
-LDAP_F( int )
-ldap_ufn_timeout LDAP_P(( /* deprecated */
-       void *tvparam ));
-
-
 /*
  * in unbind.c
  */