X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fldap.h;h=b4f1127e2a3cc859cb8b1152cf59046fce8d0ef8;hb=492619eac0a972353c62e43e3e8dcffee71d12a9;hp=50b5c821d1625a8edc5bbd48fbca31e7365d0a55;hpb=5a2909c06494d84d47e5c4584c6e589ad4b1a24d;p=openldap diff --git a/include/ldap.h b/include/ldap.h index 50b5c821d1..b4f1127e2a 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * 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 @@ -42,6 +42,11 @@ LDAP_BEGIN_DECL #define LDAP_VERSION LDAP_VERSION2 #define LDAP_VERSION_MAX LDAP_VERSION3 +/* Use -DLDAP_DEPRECATED=0 to hide deprecated interfaces */ +#ifndef LDAP_DEPRECATED +#define LDAP_DEPRECATED 1 +#endif + /* * We use 3000+n here because it is above 1823 (for RFC 1823), * above 2000+rev of IETF LDAPEXT draft (now quite dated), @@ -196,17 +201,30 @@ typedef struct ldapcontrol { #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 */ +/* standard track - not implemented in slapd(8) */ +#define LDAP_CONTROL_SORTREQUEST "1.2.840.113556.1.4.473" /* RFC 2891 */ +#define LDAP_CONTROL_SORTRESPONSE "1.2.840.113556.1.4.474" /* RFC 2891 */ + +/* 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.1.10.2" +#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_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" -#define LDAP_CONTROL_SYNC_DONE "1.3.6.1.4.1.4203.666.5.8" -#define LDAP_SYNC_INFO "1.3.6.1.4.1.4203.666.10.2" +/* 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" + +/* LDAP Sync -- draft-zeilenga-ldup-sync *//* submitted for publication */ +#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" +#define LDAP_CONTROL_SYNC_DONE LDAP_SYNC_OID ".3" +#define LDAP_SYNC_INFO LDAP_SYNC_OID ".4" #define LDAP_SYNC_NONE 0x00 #define LDAP_SYNC_REFRESH_ONLY 0x01 @@ -231,25 +249,10 @@ typedef struct ldapcontrol { #define LDAP_SYNC_MODIFY 2 #define LDAP_SYNC_DELETE 3 -#if 0 -#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 - -/* controls for MSAD compatibility */ -#define LDAP_CONTROL_X_DOMAIN_SCOPE "1.2.840.113556.1.4.1339" +/* 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" -/* not implemented in slapd(8) */ -#define LDAP_CONTROL_SORTREQUEST "1.2.840.113556.1.4.473" /* RFC 2891 */ -#define LDAP_CONTROL_SORTRESPONSE "1.2.840.113556.1.4.474" /* RFC 2891 */ - -/* 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" - /* LDAP Unsolicited Notifications */ #define LDAP_NOTICE_OF_DISCONNECTION "1.3.6.1.4.1.1466.20036" /* RFC 2251 */ #define LDAP_NOTICE_DISCONNECT LDAP_NOTICE_OF_DISCONNECTION @@ -316,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 */ @@ -330,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 */ @@ -401,12 +404,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 @@ -469,12 +472,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 @@ -634,6 +640,11 @@ ldap_create_control LDAP_P(( int iscritical, LDAPControl **ctrlp )); +LDAP_F( LDAPControl * ) +ldap_find_control LDAP_P(( + LDAP_CONST char *oid, + LDAPControl **ctrls )); + LDAP_F( void ) ldap_control_free LDAP_P(( LDAPControl *ctrl )); @@ -709,7 +720,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, @@ -737,7 +748,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, @@ -812,7 +823,7 @@ ldap_parse_sasl_bind_result LDAP_P(( struct berval **servercredp, int freeit )); -#ifdef LDAP_DEPRECATED +#if LDAP_DEPRECATED /* * in bind.c: * (deprecated) @@ -900,7 +911,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, @@ -935,7 +946,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, @@ -966,7 +977,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, @@ -1000,7 +1011,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, @@ -1039,7 +1050,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, @@ -1087,7 +1098,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, @@ -1312,7 +1323,8 @@ ldap_explode_rdn LDAP_P(( /* deprecated */ LDAP_CONST char *rdn, int notypes )); -typedef int LDAPDN_rewrite_func LDAP_P(( LDAPDN dn, unsigned flags, void *ctx )); +typedef int LDAPDN_rewrite_func + LDAP_P(( LDAPDN dn, unsigned flags, void *ctx )); LDAP_F( int ) ldap_X509dn2bv LDAP_P(( void *x509_name, struct berval *dn, @@ -1369,7 +1381,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, @@ -1445,7 +1457,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, @@ -1492,7 +1504,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 )); @@ -1546,7 +1558,7 @@ ldap_mods_free LDAP_P(( int freemods )); -#ifdef LDAP_DEPRECATED +#if LDAP_DEPRECATED /* * in sort.c (deprecated) */ @@ -1695,6 +1707,7 @@ ldap_parse_vlv_control LDAP_P(( struct berval **contextp, int *errcodep )); + /* * LDAP Who Am I? * in whoami.c @@ -1751,6 +1764,5 @@ ldap_passwd_s LDAP_P(( LDAPControl **sctrls, LDAPControl **cctrls )); - LDAP_END_DECL #endif /* _LDAP_H */