]> git.sur5r.net Git - openldap/blobdiff - include/ldap.h
Revert to original code
[openldap] / include / ldap.h
index 4a7548e84bc8d91b56018c3d59cc776eca5daed7..571cbe7fa0f291d375029f0ca6a8853077f3a6ff 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  * 
- * Copyright 1998-2003 The OpenLDAP Foundation.
+ * Copyright 1998-2004 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -191,18 +191,17 @@ typedef struct ldapcontrol {
 } LDAPControl;
 
 /* LDAP Controls */
+/*     standard track controls */
 #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_NOOP                              "1.3.6.1.4.1.4203.1.10.2"
-#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"
-
 #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.1.10.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_MODIFY_INCREMENT  "1.3.6.1.4.1.4203.666.5.11"
+#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"
 
 #define LDAP_CONTROL_SYNC              "1.3.6.1.4.1.4203.666.5.6"
 #define LDAP_CONTROL_SYNC_STATE        "1.3.6.1.4.1.4203.666.5.7"
@@ -320,7 +319,7 @@ typedef struct ldapcontrol {
 
 #define LDAP_TAG_SASL_RES_CREDS        ((ber_tag_t) 0x87U)     /* context specific + primitive */
 
-/* possible operations a client can invoke */
+/* LDAP Request Messages */
 #define LDAP_REQ_BIND          ((ber_tag_t) 0x60U)     /* application + constructed */
 #define LDAP_REQ_UNBIND                ((ber_tag_t) 0x42U)     /* application + primitive   */
 #define LDAP_REQ_SEARCH                ((ber_tag_t) 0x63U)     /* application + constructed */
@@ -334,7 +333,7 @@ typedef struct ldapcontrol {
 #define LDAP_REQ_ABANDON       ((ber_tag_t) 0x50U)     /* application + primitive   */
 #define LDAP_REQ_EXTENDED      ((ber_tag_t) 0x77U)     /* application + constructed */
 
-/* possible result types a server can return */
+/* LDAP Response Messages */
 #define LDAP_RES_BIND          ((ber_tag_t) 0x61U)     /* application + constructed */
 #define LDAP_RES_SEARCH_ENTRY  ((ber_tag_t) 0x64U)     /* application + constructed */
 #define LDAP_RES_SEARCH_REFERENCE      ((ber_tag_t) 0x73U)     /* V3: application + constructed */
@@ -407,12 +406,12 @@ typedef struct ldapcontrol {
 #define LDAP_SUBSTRING_FINAL   ((ber_tag_t) 0x82U)     /* context specific */
 
 /*
- * possible error codes we can return
+ * LDAP Result Codes
  */
+#define LDAP_SUCCESS                           0x00
 
 #define LDAP_RANGE(n,x,y)      (((x) <= (n)) && ((n) <= (y)))
 
-#define LDAP_SUCCESS                           0x00
 #define LDAP_OPERATIONS_ERROR          0x01
 #define LDAP_PROTOCOL_ERROR                    0x02
 #define LDAP_TIMELIMIT_EXCEEDED                0x03
@@ -475,12 +474,15 @@ typedef struct ldapcontrol {
 #define LDAP_OTHER                             0x50
 
 /* Experimental result codes */
-#define LDAP_X_ERROR(n)                LDAP_RANGE((n),0x1000,0x3FFF) /* experimental */
-#define LDAP_PVT_ERROR(n)      LDAP_RANGE((n),0x4000,0xFFFF) /* private use */
+#define LDAP_E_ERROR(n)        LDAP_RANGE((n),0x1000,0x3FFF) /* experimental */
+#define LDAP_X_ERROR(n)        LDAP_RANGE((n),0x4000,0xFFFF) /* private use */
 
 /* for the LDAP Sync operation */
 #define LDAP_SYNC_REFRESH_REQUIRED             0x4100
 
+/* for the LDAP No-Op control */
+#define LDAP_NO_OPERATION                              0x410e
+
 /* for the Assertion control */
 #define LDAP_ASSERTION_FAILED                  0x410f
 
@@ -715,7 +717,7 @@ ldap_abandon_ext LDAP_P((
        LDAPControl             **serverctrls,
        LDAPControl             **clientctrls ));
 
-#ifdef LDAP_DEPRECATED
+#if LDAP_DEPRECATED
 LDAP_F( int )
 ldap_abandon LDAP_P((  /* deprecated */
        LDAP *ld,
@@ -743,7 +745,7 @@ ldap_add_ext_s LDAP_P((
        LDAPControl             **serverctrls,
        LDAPControl             **clientctrls ));
 
-#ifdef LDAP_DEPRECATED
+#if LDAP_DEPRECATED
 LDAP_F( int )
 ldap_add LDAP_P((      /* deprecated */
        LDAP *ld,
@@ -818,7 +820,7 @@ ldap_parse_sasl_bind_result LDAP_P((
        struct berval   **servercredp,
        int                             freeit ));
 
-#ifdef LDAP_DEPRECATED
+#if LDAP_DEPRECATED
 /*
  * in bind.c:
  *     (deprecated)
@@ -906,7 +908,7 @@ ldap_compare_ext_s LDAP_P((
        LDAPControl             **serverctrls,
        LDAPControl             **clientctrls ));
 
-#ifdef LDAP_DEPRECATED
+#if LDAP_DEPRECATED
 LDAP_F( int )
 ldap_compare LDAP_P((  /* deprecated */
        LDAP *ld,
@@ -941,7 +943,7 @@ ldap_delete_ext_s LDAP_P((
        LDAPControl             **serverctrls,
        LDAPControl             **clientctrls ));
 
-#ifdef LDAP_DEPRECATED
+#if LDAP_DEPRECATED
 LDAP_F( int )
 ldap_delete LDAP_P((   /* deprecated */
        LDAP *ld,
@@ -972,7 +974,7 @@ LDAP_F( char * )
 ldap_err2string LDAP_P((
        int err ));
 
-#ifdef LDAP_DEPRECATED
+#if LDAP_DEPRECATED
 LDAP_F( int )
 ldap_result2error LDAP_P((     /* deprecated */
        LDAP *ld,
@@ -1006,7 +1008,7 @@ ldap_modify_ext_s LDAP_P((
        LDAPControl             **serverctrls,
        LDAPControl             **clientctrls ));
 
-#ifdef LDAP_DEPRECATED
+#if LDAP_DEPRECATED
 LDAP_F( int )
 ldap_modify LDAP_P((   /* deprecated */
        LDAP *ld,
@@ -1045,7 +1047,7 @@ ldap_rename_s LDAP_P((
        LDAPControl **sctrls,
        LDAPControl **cctrls ));
 
-#ifdef LDAP_DEPRECATED
+#if LDAP_DEPRECATED
 LDAP_F( int )
 ldap_rename2 LDAP_P((  /* deprecated */
        LDAP *ld,
@@ -1093,7 +1095,7 @@ ldap_modrdn2_s LDAP_P((   /* deprecated */
 /*
  * in open.c:
  */
-#ifdef LDAP_DEPRECATED
+#if LDAP_DEPRECATED
 LDAP_F( LDAP * )
 ldap_init LDAP_P(( /* deprecated */
        LDAP_CONST char *host,
@@ -1375,7 +1377,7 @@ LDAP_F( void )
 ldap_value_free_len LDAP_P((
        struct berval **vals ));
 
-#ifdef LDAP_DEPRECATED
+#if LDAP_DEPRECATED
 LDAP_F( char ** )
 ldap_get_values LDAP_P((       /* deprecated */
        LDAP *ld,
@@ -1451,7 +1453,7 @@ ldap_search_ext_s LDAP_P((
        int                             sizelimit,
        LDAPMessage             **res ));
 
-#ifdef LDAP_DEPRECATED
+#if LDAP_DEPRECATED
 LDAP_F( int )
 ldap_search LDAP_P((   /* deprecated */
        LDAP *ld,
@@ -1498,7 +1500,7 @@ ldap_unbind_ext_s LDAP_P((
        LDAPControl             **serverctrls,
        LDAPControl             **clientctrls));
 
-#ifdef LDAP_DEPRECATED
+#if LDAP_DEPRECATED
 LDAP_F( int )
 ldap_unbind LDAP_P(( /* deprecated */
        LDAP *ld ));
@@ -1552,7 +1554,7 @@ ldap_mods_free LDAP_P((
        int freemods ));
 
 
-#ifdef LDAP_DEPRECATED
+#if LDAP_DEPRECATED
 /*
  * in sort.c (deprecated)
  */