X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fldap.h;h=b4f1127e2a3cc859cb8b1152cf59046fce8d0ef8;hb=492619eac0a972353c62e43e3e8dcffee71d12a9;hp=46b3d5a8d9f6e269b86a495f2d85f445f188ab45;hpb=7e13a8bc6dd9e24277861b884612ad29d0203586;p=openldap diff --git a/include/ldap.h b/include/ldap.h index 46b3d5a8d9..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 @@ -201,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 @@ -236,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 @@ -321,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 */ @@ -335,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 */ @@ -406,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 @@ -480,6 +478,9 @@ typedef struct ldapcontrol { /* 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 @@ -639,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 )); @@ -1317,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, @@ -1700,6 +1707,7 @@ ldap_parse_vlv_control LDAP_P(( struct berval **contextp, int *errcodep )); + /* * LDAP Who Am I? * in whoami.c @@ -1756,6 +1764,5 @@ ldap_passwd_s LDAP_P(( LDAPControl **sctrls, LDAPControl **cctrls )); - LDAP_END_DECL #endif /* _LDAP_H */