1999-08-31 09:17:01 +08:00
|
|
|
/* $OpenLDAP$ */
|
1998-08-09 08:43:13 +08:00
|
|
|
/*
|
2002-01-05 04:40:29 +08:00
|
|
|
* Copyright 1998-2002 The OpenLDAP Foundation, Redwood City, California, USA
|
1998-12-29 03:51:35 +08:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
2001-05-29 11:29:53 +08:00
|
|
|
* 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.
|
1998-12-29 03:51:35 +08:00
|
|
|
*/
|
|
|
|
/* Portions
|
1998-08-09 08:43:13 +08:00
|
|
|
* Copyright (c) 1990 Regents of the University of Michigan.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms are permitted
|
|
|
|
* provided that this notice is preserved and that due credit is given
|
|
|
|
* to the University of Michigan at Ann Arbor. The name of the University
|
|
|
|
* may not be used to endorse or promote products derived from this
|
|
|
|
* software without specific prior written permission. This software
|
|
|
|
* is provided ``as is'' without express or implied warranty.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _LDAP_H
|
|
|
|
#define _LDAP_H
|
|
|
|
|
1999-12-19 03:50:38 +08:00
|
|
|
/* pull in lber */
|
1999-06-04 06:54:51 +08:00
|
|
|
#include <lber.h>
|
|
|
|
|
2000-09-15 11:27:20 +08:00
|
|
|
/* include version and API feature defines */
|
|
|
|
#include <ldap_features.h>
|
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
LDAP_BEGIN_DECL
|
1998-08-09 08:43:13 +08:00
|
|
|
|
2002-09-04 10:00:42 +08:00
|
|
|
#define LDAP_CLIENT_UPDATE 1
|
|
|
|
#undef LDAP_CLIENT_UPDATE
|
|
|
|
|
1998-08-09 08:43:13 +08:00
|
|
|
#define LDAP_VERSION1 1
|
|
|
|
#define LDAP_VERSION2 2
|
1998-10-25 09:41:42 +08:00
|
|
|
#define LDAP_VERSION3 3
|
1998-11-05 04:09:57 +08:00
|
|
|
|
|
|
|
#define LDAP_VERSION_MIN LDAP_VERSION2
|
1999-06-06 04:12:53 +08:00
|
|
|
#define LDAP_VERSION LDAP_VERSION2
|
|
|
|
#define LDAP_VERSION_MAX LDAP_VERSION3
|
1998-08-09 08:43:13 +08:00
|
|
|
|
1998-11-04 09:41:00 +08:00
|
|
|
/*
|
|
|
|
* We'll use 2000+draft revision for our API version number
|
2001-12-24 11:49:54 +08:00
|
|
|
* As such, the number will be above the old RFC but below
|
1998-11-04 09:41:00 +08:00
|
|
|
* whatever number does finally get assigned
|
|
|
|
*/
|
1999-10-20 02:57:38 +08:00
|
|
|
#define LDAP_API_VERSION 2004
|
1998-11-05 04:09:57 +08:00
|
|
|
#define LDAP_VENDOR_NAME "OpenLDAP"
|
1998-11-04 09:41:00 +08:00
|
|
|
|
1999-01-23 11:39:06 +08:00
|
|
|
/* OpenLDAP API Features */
|
1999-05-19 09:12:33 +08:00
|
|
|
#define LDAP_API_FEATURE_X_OPENLDAP LDAP_VENDOR_VERSION
|
1999-01-23 11:39:06 +08:00
|
|
|
|
1998-12-20 08:58:55 +08:00
|
|
|
#if defined( LDAP_API_FEATURE_X_OPENLDAP_REENTRANT ) || \
|
|
|
|
( defined( LDAP_THREAD_SAFE ) && \
|
|
|
|
defined( LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE ) )
|
|
|
|
/* -lldap may or may not be thread safe */
|
|
|
|
/* -lldap_r, if available, is always thread safe */
|
|
|
|
# define LDAP_API_FEATURE_THREAD_SAFE 1
|
|
|
|
#endif
|
|
|
|
#if defined( LDAP_THREAD_SAFE ) && \
|
|
|
|
defined( LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE )
|
|
|
|
/* #define LDAP_API_FEATURE_SESSION_SAFE 1 */
|
|
|
|
/* #define LDAP_API_OPERATION_SESSION_SAFE 1 */
|
|
|
|
#endif
|
|
|
|
|
1999-07-20 03:32:47 +08:00
|
|
|
#define LDAP_PORT 389 /* ldap:/// default LDAP port */
|
|
|
|
#define LDAPS_PORT 636 /* ldaps:/// default LDAP over TLS port */
|
1998-12-21 09:44:58 +08:00
|
|
|
|
|
|
|
#define LDAP_ROOT_DSE ""
|
|
|
|
#define LDAP_NO_ATTRS "1.1"
|
|
|
|
#define LDAP_ALL_USER_ATTRIBUTES "*"
|
1999-10-20 02:57:38 +08:00
|
|
|
#define LDAP_ALL_OPERATIONAL_ATTRIBUTES "+" /* OpenLDAP extension */
|
1998-12-21 09:44:58 +08:00
|
|
|
|
1999-05-22 14:11:48 +08:00
|
|
|
/*
|
|
|
|
* LDAP_OPTions defined by draft-ldapext-ldap-c-api-02
|
|
|
|
* 0x0000 - 0x0fff reserved for api options
|
|
|
|
* 0x1000 - 0x3fff reserved for api extended options
|
|
|
|
* 0x4000 - 0x7fff reserved for private and experimental options
|
|
|
|
*/
|
1998-11-04 09:41:00 +08:00
|
|
|
#define LDAP_OPT_API_INFO 0x0000
|
1999-10-20 02:57:38 +08:00
|
|
|
#define LDAP_OPT_DESC 0x0001 /* deprecated */
|
1998-11-04 09:41:00 +08:00
|
|
|
#define LDAP_OPT_DEREF 0x0002
|
|
|
|
#define LDAP_OPT_SIZELIMIT 0x0003
|
|
|
|
#define LDAP_OPT_TIMELIMIT 0x0004
|
1998-12-21 08:21:58 +08:00
|
|
|
/* 0x05 - 0x07 not defined by current draft */
|
1998-11-04 09:41:00 +08:00
|
|
|
#define LDAP_OPT_REFERRALS 0x0008
|
|
|
|
#define LDAP_OPT_RESTART 0x0009
|
1998-12-21 08:21:58 +08:00
|
|
|
/* 0x0a - 0x10 not defined by current draft */
|
1998-11-04 09:41:00 +08:00
|
|
|
#define LDAP_OPT_PROTOCOL_VERSION 0x0011
|
|
|
|
#define LDAP_OPT_SERVER_CONTROLS 0x0012
|
|
|
|
#define LDAP_OPT_CLIENT_CONTROLS 0x0013
|
1999-05-19 09:12:33 +08:00
|
|
|
/* 0x14 not defined by current draft */
|
|
|
|
#define LDAP_OPT_API_FEATURE_INFO 0x0015
|
|
|
|
|
|
|
|
/* 0x16 - 0x2f not defined by current draft */
|
1998-11-04 09:41:00 +08:00
|
|
|
#define LDAP_OPT_HOST_NAME 0x0030
|
|
|
|
#define LDAP_OPT_ERROR_NUMBER 0x0031
|
|
|
|
#define LDAP_OPT_ERROR_STRING 0x0032
|
1999-10-20 02:57:38 +08:00
|
|
|
#define LDAP_OPT_MATCHED_DN 0x0033
|
1998-10-26 09:18:41 +08:00
|
|
|
|
1999-10-20 02:57:38 +08:00
|
|
|
/* 0x34 - 0x0fff not defined by current draft */
|
1999-05-22 14:11:48 +08:00
|
|
|
|
2000-05-04 02:59:58 +08:00
|
|
|
#define LDAP_OPT_PRIVATE_EXTENSION_BASE 0x4000 /* to 0x7FFF inclusive */
|
|
|
|
|
1999-05-22 14:11:48 +08:00
|
|
|
/* private and experimental options */
|
1998-12-22 09:34:01 +08:00
|
|
|
/* OpenLDAP specific options */
|
1999-05-22 14:11:48 +08:00
|
|
|
#define LDAP_OPT_DEBUG_LEVEL 0x5001 /* debug level */
|
|
|
|
#define LDAP_OPT_TIMEOUT 0x5002 /* default timeout */
|
|
|
|
#define LDAP_OPT_REFHOPLIMIT 0x5003 /* ref hop limit */
|
1999-08-04 03:27:22 +08:00
|
|
|
#define LDAP_OPT_NETWORK_TIMEOUT 0x5005 /* socket level timeout */
|
1999-12-08 02:42:25 +08:00
|
|
|
#define LDAP_OPT_URI 0x5006
|
1998-12-22 09:34:01 +08:00
|
|
|
|
2000-05-04 02:59:58 +08:00
|
|
|
/* OpenLDAP TLS options */
|
2001-06-25 15:33:42 +08:00
|
|
|
#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
|
1999-07-14 03:23:41 +08:00
|
|
|
#define LDAP_OPT_X_TLS_CERTFILE 0x6004
|
|
|
|
#define LDAP_OPT_X_TLS_KEYFILE 0x6005
|
|
|
|
#define LDAP_OPT_X_TLS_REQUIRE_CERT 0x6006
|
2001-09-01 00:48:30 +08:00
|
|
|
/* #define LDAP_OPT_X_TLS_PROTOCOL 0x6007 */
|
2001-06-25 15:33:42 +08:00
|
|
|
#define LDAP_OPT_X_TLS_CIPHER_SUITE 0x6008
|
|
|
|
#define LDAP_OPT_X_TLS_RANDOM_FILE 0x6009
|
2002-03-11 11:39:08 +08:00
|
|
|
#define LDAP_OPT_X_TLS_SSL_CTX 0x600a
|
1999-07-14 03:23:41 +08:00
|
|
|
|
|
|
|
#define LDAP_OPT_X_TLS_NEVER 0
|
|
|
|
#define LDAP_OPT_X_TLS_HARD 1
|
|
|
|
#define LDAP_OPT_X_TLS_DEMAND 2
|
|
|
|
#define LDAP_OPT_X_TLS_ALLOW 3
|
|
|
|
#define LDAP_OPT_X_TLS_TRY 4
|
|
|
|
|
2000-05-04 02:59:58 +08:00
|
|
|
/* OpenLDAP SASL options */
|
2000-07-17 08:56:29 +08:00
|
|
|
#define LDAP_OPT_X_SASL_MECH 0x6100
|
|
|
|
#define LDAP_OPT_X_SASL_REALM 0x6101
|
|
|
|
#define LDAP_OPT_X_SASL_AUTHCID 0x6102
|
|
|
|
#define LDAP_OPT_X_SASL_AUTHZID 0x6103
|
|
|
|
#define LDAP_OPT_X_SASL_SSF 0x6104 /* read-only */
|
|
|
|
#define LDAP_OPT_X_SASL_SSF_EXTERNAL 0x6105 /* write-only */
|
|
|
|
#define LDAP_OPT_X_SASL_SECPROPS 0x6106 /* write-only */
|
|
|
|
#define LDAP_OPT_X_SASL_SSF_MIN 0x6107
|
|
|
|
#define LDAP_OPT_X_SASL_SSF_MAX 0x6108
|
|
|
|
#define LDAP_OPT_X_SASL_MAXBUFSIZE 0x6109
|
2000-07-14 06:54:38 +08:00
|
|
|
|
2000-04-20 17:23:51 +08:00
|
|
|
|
1998-10-26 09:18:41 +08:00
|
|
|
/* on/off values */
|
|
|
|
#define LDAP_OPT_ON ((void *) 1)
|
1998-11-04 09:41:00 +08:00
|
|
|
#define LDAP_OPT_OFF ((void *) 0)
|
1998-10-26 09:18:41 +08:00
|
|
|
|
2000-06-26 01:57:47 +08:00
|
|
|
/*
|
|
|
|
* ldap_get_option() and ldap_set_option() return values.
|
|
|
|
* As later versions may return other values indicating
|
|
|
|
* failure, current applications should only compare returned
|
|
|
|
* value against LDAP_OPT_SUCCESS.
|
|
|
|
*/
|
1998-10-26 09:18:41 +08:00
|
|
|
#define LDAP_OPT_SUCCESS 0
|
|
|
|
#define LDAP_OPT_ERROR (-1)
|
|
|
|
|
1999-06-06 04:12:53 +08:00
|
|
|
#define LDAP_API_INFO_VERSION (1)
|
1998-10-26 09:18:41 +08:00
|
|
|
typedef struct ldapapiinfo {
|
|
|
|
int ldapai_info_version; /* version of LDAPAPIInfo (1) */
|
|
|
|
int ldapai_api_version; /* revision of API supported */
|
|
|
|
int ldapai_protocol_version; /* highest LDAP version supported */
|
|
|
|
char **ldapai_extensions; /* names of API extensions */
|
1998-11-04 09:41:00 +08:00
|
|
|
char *ldapai_vendor_name; /* name of supplier */
|
1998-11-05 04:09:57 +08:00
|
|
|
int ldapai_vendor_version; /* supplier-specific version * 100 */
|
1998-10-26 09:18:41 +08:00
|
|
|
} LDAPAPIInfo;
|
|
|
|
|
1999-05-22 14:11:48 +08:00
|
|
|
#define LDAP_FEATURE_INFO_VERSION (1) /* version of api feature structure */
|
1999-05-19 09:12:33 +08:00
|
|
|
typedef struct ldap_apifeature_info {
|
|
|
|
int ldapaif_info_version; /* version of this struct (1) */
|
|
|
|
char* ldapaif_name; /* matches LDAP_API_FEATURE_... less the prefix */
|
|
|
|
int ldapaif_version; /* matches the value LDAP_API_FEATURE_... */
|
|
|
|
} LDAPAPIFeatureInfo;
|
|
|
|
|
1998-10-26 09:18:41 +08:00
|
|
|
typedef struct ldapcontrol {
|
1999-05-19 09:12:33 +08:00
|
|
|
char * ldctl_oid;
|
1998-10-26 09:18:41 +08:00
|
|
|
struct berval ldctl_value;
|
|
|
|
char ldctl_iscritical;
|
1999-05-25 04:55:47 +08:00
|
|
|
} LDAPControl;
|
1998-10-26 09:18:41 +08:00
|
|
|
|
1999-07-02 05:20:45 +08:00
|
|
|
/* LDAP Controls */
|
2001-07-06 10:17:18 +08:00
|
|
|
|
2002-01-29 04:25:30 +08:00
|
|
|
#if 0
|
2001-07-06 10:17:18 +08:00
|
|
|
/* chase referrals client control (not yet implemented) */
|
1999-05-22 14:11:48 +08:00
|
|
|
#define LDAP_CONTROL_REFERRALS "1.2.840.113666.1.4.616"
|
1999-10-20 02:57:38 +08:00
|
|
|
#define LDAP_CHASE_SUBORDINATE_REFERRALS 0x0020U
|
|
|
|
#define LDAP_CHASE_EXTERNAL_REFERRALS 0x0040U
|
2001-07-06 10:17:18 +08:00
|
|
|
#endif
|
1999-05-22 14:11:48 +08:00
|
|
|
|
2002-01-29 04:25:30 +08:00
|
|
|
#define LDAP_CONTROL_MANAGEDSAIT "2.16.840.1.113730.3.4.2"
|
2002-03-02 03:06:57 +08:00
|
|
|
#define LDAP_CONTROL_SUBENTRIES "1.3.6.1.4.1.4203.1.10.1"
|
2002-08-30 13:32:51 +08:00
|
|
|
#define LDAP_CONTROL_NOOP "1.3.6.1.4.1.4203.1.10.2"
|
1999-07-16 10:45:46 +08:00
|
|
|
|
2002-08-30 14:17:25 +08:00
|
|
|
#if 0
|
2001-03-15 11:08:44 +08:00
|
|
|
#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"
|
2002-01-09 08:05:49 +08:00
|
|
|
#define LDAP_CONTROL_DUPENT LDAP_CONTROL_DUPENT_REQUEST
|
2001-03-15 11:08:44 +08:00
|
|
|
|
2002-08-13 03:49:20 +08:00
|
|
|
#define LDAP_CONTROL_PAGEDRESULTS "1.2.840.113556.1.4.319"
|
2002-07-24 02:37:22 +08:00
|
|
|
#endif
|
|
|
|
|
2002-09-04 10:00:42 +08:00
|
|
|
#if LDAP_CLIENT_UPDATE
|
|
|
|
#define LDAP_CONTROL_CLIENT_UPDATE "1.3.6.1.4.1.4203.666.7.1"
|
|
|
|
#define LDAP_CONTROL_ENTRY_UPDATE "1.3.6.1.4.1.4203.666.7.2"
|
|
|
|
#define LDAP_CONTROL_CLIENT_UPDATE_DONE "1.3.6.1.4.1.4203.666.7.3"
|
|
|
|
#endif
|
|
|
|
|
2000-06-08 03:39:49 +08:00
|
|
|
#define LDAP_CONTROL_SORTREQUEST "1.2.840.113556.1.4.473"
|
|
|
|
#define LDAP_CONTROL_SORTRESPONSE "1.2.840.113556.1.4.474"
|
|
|
|
#define LDAP_CONTROL_VLVREQUEST "2.16.840.1.113730.3.4.9"
|
|
|
|
#define LDAP_CONTROL_VLVRESPONSE "2.16.840.1.113730.3.4.10"
|
|
|
|
|
2002-05-03 02:56:56 +08:00
|
|
|
#define LDAP_CONTROL_VALUESRETURNFILTER "1.2.826.0.1.334810.2.3"
|
|
|
|
|
1999-07-02 05:20:45 +08:00
|
|
|
/* LDAP Unsolicited Notifications */
|
1999-10-20 02:57:38 +08:00
|
|
|
#define LDAP_NOTICE_OF_DISCONNECTION "1.3.6.1.4.1.1466.20036"
|
|
|
|
#define LDAP_NOTICE_DISCONNECT LDAP_NOTICE_OF_DISCONNECTION
|
1999-05-22 14:11:48 +08:00
|
|
|
|
1999-07-02 05:20:45 +08:00
|
|
|
/* LDAP Extended Operations */
|
2002-01-29 04:25:30 +08:00
|
|
|
#define LDAP_EXOP_START_TLS "1.3.6.1.4.1.1466.20037"
|
|
|
|
|
|
|
|
#define LDAP_EXOP_MODIFY_PASSWD "1.3.6.1.4.1.4203.1.11.1"
|
|
|
|
#define LDAP_TAG_EXOP_MODIFY_PASSWD_ID ((ber_tag_t) 0x80U)
|
|
|
|
#define LDAP_TAG_EXOP_MODIFY_PASSWD_OLD ((ber_tag_t) 0x81U)
|
|
|
|
#define LDAP_TAG_EXOP_MODIFY_PASSWD_NEW ((ber_tag_t) 0x82U)
|
|
|
|
#define LDAP_TAG_EXOP_MODIFY_PASSWD_GEN ((ber_tag_t) 0x80U)
|
1999-05-22 14:11:48 +08:00
|
|
|
|
2002-02-19 02:22:07 +08:00
|
|
|
#define LDAP_EXOP_X_WHO_AM_I "1.3.6.1.4.1.4203.1.11.3"
|
1998-08-09 08:43:13 +08:00
|
|
|
|
2002-07-24 02:37:22 +08:00
|
|
|
/* LDAP Features */
|
|
|
|
#define LDAP_FEATURE_ALL_OPERATIONAL_ATTRS "1.3.6.1.4.1.4203.1.5.1" /* + */
|
|
|
|
#define LDAP_FEATURE_OBJECTCLASS_ATTRS "1.3.6.1.4.1.4203.1.5.2"
|
|
|
|
#define LDAP_FEATURE_ABSOLUTE_FILTERS "1.3.6.1.4.1.4203.1.5.3" /* (&) (|) */
|
|
|
|
#define LDAP_FEATURE_LANGUAGE_TAG_OPTIONS "1.3.6.1.4.1.4203.1.5.4"
|
|
|
|
#define LDAP_FEATURE_LANGUAGE_RANGE_OPTIONS "1.3.6.1.4.1.4203.1.5.5"
|
|
|
|
|
2001-12-24 11:49:54 +08:00
|
|
|
/*
|
1998-08-09 08:43:13 +08:00
|
|
|
* specific LDAP instantiations of BER types we know about
|
|
|
|
*/
|
|
|
|
|
1999-05-19 09:12:33 +08:00
|
|
|
/* Overview of LBER tag construction
|
|
|
|
*
|
|
|
|
* Bits
|
|
|
|
* ______
|
|
|
|
* 8 7 | CLASS
|
|
|
|
* 0 0 = UNIVERSAL
|
|
|
|
* 0 1 = APPLICATION
|
|
|
|
* 1 0 = CONTEXT-SPECIFIC
|
|
|
|
* 1 1 = PRIVATE
|
1999-03-04 06:51:43 +08:00
|
|
|
* _____
|
1999-05-19 09:12:33 +08:00
|
|
|
* | 6 | DATA-TYPE
|
|
|
|
* 0 = PRIMITIVE
|
|
|
|
* 1 = CONSTRUCTED
|
|
|
|
* ___________
|
|
|
|
* | 5 ... 1 | TAG-NUMBER
|
1999-03-04 06:51:43 +08:00
|
|
|
*/
|
1999-05-19 09:12:33 +08:00
|
|
|
|
|
|
|
/* general stuff */
|
1999-11-08 23:38:59 +08:00
|
|
|
#define LDAP_TAG_MESSAGE ((ber_tag_t) 0x30U) /* constructed + 16 */
|
|
|
|
#define LDAP_TAG_MSGID ((ber_tag_t) 0x02U) /* integer */
|
2002-09-04 10:00:42 +08:00
|
|
|
|
|
|
|
#ifdef LDAP_CLIENT_UPDATE
|
|
|
|
#define LDAP_TAG_INTERVAL ((ber_tag_t) 0x02U) /* integer */
|
|
|
|
#endif /* LDAP_CLIENT_UPDATE */
|
|
|
|
|
2000-09-15 08:08:51 +08:00
|
|
|
#define LDAP_TAG_LDAPDN ((ber_tag_t) 0x04U) /* octet string */
|
|
|
|
#define LDAP_TAG_LDAPCRED ((ber_tag_t) 0x04U) /* octet string */
|
2002-09-04 10:00:42 +08:00
|
|
|
|
|
|
|
#ifdef LDAP_CLIENT_UPDATE
|
|
|
|
#define LDAP_TAG_COOKIE ((ber_tag_t) 0x30U) /* sequence */
|
|
|
|
#endif /* LDAP_CLIENT_UPDATE */
|
|
|
|
|
1999-11-08 23:38:59 +08:00
|
|
|
#define LDAP_TAG_CONTROLS ((ber_tag_t) 0xa0U) /* context specific + constructed + 0 */
|
|
|
|
#define LDAP_TAG_REFERRAL ((ber_tag_t) 0xa3U) /* context specific + constructed + 3 */
|
1999-06-04 06:54:51 +08:00
|
|
|
|
1999-11-08 23:38:59 +08:00
|
|
|
#define LDAP_TAG_NEWSUPERIOR ((ber_tag_t) 0x80U) /* context-specific + primitive + 0 */
|
1999-05-19 09:12:33 +08:00
|
|
|
|
1999-11-08 23:38:59 +08:00
|
|
|
#define LDAP_TAG_EXOP_REQ_OID ((ber_tag_t) 0x80U) /* context specific + primitive */
|
|
|
|
#define LDAP_TAG_EXOP_REQ_VALUE ((ber_tag_t) 0x81U) /* context specific + primitive */
|
|
|
|
#define LDAP_TAG_EXOP_RES_OID ((ber_tag_t) 0x8aU) /* context specific + primitive */
|
|
|
|
#define LDAP_TAG_EXOP_RES_VALUE ((ber_tag_t) 0x8bU) /* context specific + primitive */
|
1999-06-04 06:54:51 +08:00
|
|
|
|
1999-11-08 23:38:59 +08:00
|
|
|
#define LDAP_TAG_SASL_RES_CREDS ((ber_tag_t) 0x87U) /* context specific + primitive */
|
1999-03-04 06:51:43 +08:00
|
|
|
|
1999-06-04 06:54:51 +08:00
|
|
|
|
1998-08-09 08:43:13 +08:00
|
|
|
/* possible operations a client can invoke */
|
1999-11-08 23:38:59 +08:00
|
|
|
#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 */
|
|
|
|
#define LDAP_REQ_MODIFY ((ber_tag_t) 0x66U) /* application + constructed */
|
|
|
|
#define LDAP_REQ_ADD ((ber_tag_t) 0x68U) /* application + constructed */
|
|
|
|
#define LDAP_REQ_DELETE ((ber_tag_t) 0x4aU) /* application + primitive */
|
2000-07-21 10:08:36 +08:00
|
|
|
#define LDAP_REQ_MODDN ((ber_tag_t) 0x6cU) /* application + constructed */
|
2001-12-24 11:49:54 +08:00
|
|
|
#define LDAP_REQ_MODRDN LDAP_REQ_MODDN
|
|
|
|
#define LDAP_REQ_RENAME LDAP_REQ_MODDN
|
1999-11-08 23:38:59 +08:00
|
|
|
#define LDAP_REQ_COMPARE ((ber_tag_t) 0x6eU) /* application + constructed */
|
|
|
|
#define LDAP_REQ_ABANDON ((ber_tag_t) 0x50U) /* application + primitive */
|
|
|
|
#define LDAP_REQ_EXTENDED ((ber_tag_t) 0x77U) /* application + constructed */
|
1998-08-09 08:43:13 +08:00
|
|
|
|
|
|
|
/* possible result types a server can return */
|
1999-11-08 23:38:59 +08:00
|
|
|
#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 */
|
|
|
|
#define LDAP_RES_SEARCH_RESULT ((ber_tag_t) 0x65U) /* application + constructed */
|
|
|
|
#define LDAP_RES_MODIFY ((ber_tag_t) 0x67U) /* application + constructed */
|
|
|
|
#define LDAP_RES_ADD ((ber_tag_t) 0x69U) /* application + constructed */
|
|
|
|
#define LDAP_RES_DELETE ((ber_tag_t) 0x6bU) /* application + constructed */
|
2000-07-21 10:08:36 +08:00
|
|
|
#define LDAP_RES_MODDN ((ber_tag_t) 0x6dU) /* application + constructed */
|
|
|
|
#define LDAP_RES_MODRDN LDAP_RES_MODDN /* application + constructed */
|
|
|
|
#define LDAP_RES_RENAME LDAP_RES_MODDN /* application + constructed */
|
1999-11-08 23:38:59 +08:00
|
|
|
#define LDAP_RES_COMPARE ((ber_tag_t) 0x6fU) /* application + constructed */
|
|
|
|
#define LDAP_RES_EXTENDED ((ber_tag_t) 0x78U) /* V3: application + constructed */
|
1999-12-14 08:47:20 +08:00
|
|
|
#define LDAP_RES_EXTENDED_PARTIAL ((ber_tag_t) 0x79U) /* V3+: application + constructed */
|
1999-10-20 02:57:38 +08:00
|
|
|
|
2000-07-05 05:49:00 +08:00
|
|
|
#define LDAP_RES_ANY (-1)
|
|
|
|
#define LDAP_RES_UNSOLICITED (0)
|
1998-08-09 08:43:13 +08:00
|
|
|
|
|
|
|
|
1998-12-29 03:37:02 +08:00
|
|
|
/* sasl methods */
|
2000-07-21 10:08:36 +08:00
|
|
|
#define LDAP_SASL_SIMPLE ((char*)0)
|
2001-05-05 05:15:09 +08:00
|
|
|
#define LDAP_SASL_NULL ("")
|
2000-07-21 10:08:36 +08:00
|
|
|
|
1998-12-29 03:37:02 +08:00
|
|
|
|
1998-08-09 08:43:13 +08:00
|
|
|
/* authentication methods available */
|
1999-11-08 23:38:59 +08:00
|
|
|
#define LDAP_AUTH_NONE ((ber_tag_t) 0x00U) /* no authentication */
|
|
|
|
#define LDAP_AUTH_SIMPLE ((ber_tag_t) 0x80U) /* context specific + primitive */
|
2001-09-01 00:48:30 +08:00
|
|
|
#define LDAP_AUTH_SASL ((ber_tag_t) 0xa3U) /* context specific + constructed */
|
1999-11-08 23:38:59 +08:00
|
|
|
#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 */
|
1998-08-09 08:43:13 +08:00
|
|
|
|
|
|
|
|
|
|
|
/* filter types */
|
1999-11-08 23:38:59 +08:00
|
|
|
#define LDAP_FILTER_AND ((ber_tag_t) 0xa0U) /* context specific + constructed */
|
|
|
|
#define LDAP_FILTER_OR ((ber_tag_t) 0xa1U) /* context specific + constructed */
|
|
|
|
#define LDAP_FILTER_NOT ((ber_tag_t) 0xa2U) /* context specific + constructed */
|
|
|
|
#define LDAP_FILTER_EQUALITY ((ber_tag_t) 0xa3U) /* context specific + constructed */
|
|
|
|
#define LDAP_FILTER_SUBSTRINGS ((ber_tag_t) 0xa4U) /* context specific + constructed */
|
|
|
|
#define LDAP_FILTER_GE ((ber_tag_t) 0xa5U) /* context specific + constructed */
|
|
|
|
#define LDAP_FILTER_LE ((ber_tag_t) 0xa6U) /* context specific + constructed */
|
|
|
|
#define LDAP_FILTER_PRESENT ((ber_tag_t) 0x87U) /* context specific + primitive */
|
|
|
|
#define LDAP_FILTER_APPROX ((ber_tag_t) 0xa8U) /* context specific + constructed */
|
|
|
|
#define LDAP_FILTER_EXT ((ber_tag_t) 0xa9U) /* context specific + constructed */
|
1998-08-09 08:43:13 +08:00
|
|
|
|
1998-12-21 09:44:58 +08:00
|
|
|
/* extended filter component types */
|
1999-11-08 23:38:59 +08:00
|
|
|
#define LDAP_FILTER_EXT_OID ((ber_tag_t) 0x81U) /* context specific */
|
|
|
|
#define LDAP_FILTER_EXT_TYPE ((ber_tag_t) 0x82U) /* context specific */
|
|
|
|
#define LDAP_FILTER_EXT_VALUE ((ber_tag_t) 0x83U) /* context specific */
|
|
|
|
#define LDAP_FILTER_EXT_DNATTRS ((ber_tag_t) 0x84U) /* context specific */
|
1998-12-21 09:44:58 +08:00
|
|
|
|
1998-08-09 08:43:13 +08:00
|
|
|
/* substring filter component types */
|
1999-11-08 23:38:59 +08:00
|
|
|
#define LDAP_SUBSTRING_INITIAL ((ber_tag_t) 0x80U) /* context specific */
|
|
|
|
#define LDAP_SUBSTRING_ANY ((ber_tag_t) 0x81U) /* context specific */
|
|
|
|
#define LDAP_SUBSTRING_FINAL ((ber_tag_t) 0x82U) /* context specific */
|
1998-08-09 08:43:13 +08:00
|
|
|
|
|
|
|
/* search scopes */
|
2000-11-29 03:56:55 +08:00
|
|
|
#define LDAP_SCOPE_DEFAULT ((ber_int_t) -1)
|
1999-11-08 23:38:59 +08:00
|
|
|
#define LDAP_SCOPE_BASE ((ber_int_t) 0x0000)
|
|
|
|
#define LDAP_SCOPE_ONELEVEL ((ber_int_t) 0x0001)
|
|
|
|
#define LDAP_SCOPE_SUBTREE ((ber_int_t) 0x0002)
|
1998-08-09 08:43:13 +08:00
|
|
|
|
1999-12-10 01:00:54 +08:00
|
|
|
/* substring filter component types */
|
|
|
|
#define LDAP_SUBSTRING_INITIAL ((ber_tag_t) 0x80U) /* context specific */
|
|
|
|
#define LDAP_SUBSTRING_ANY ((ber_tag_t) 0x81U) /* context specific */
|
|
|
|
#define LDAP_SUBSTRING_FINAL ((ber_tag_t) 0x82U) /* context specific */
|
1998-08-09 08:43:13 +08:00
|
|
|
|
2001-12-24 11:49:54 +08:00
|
|
|
/*
|
1998-08-09 08:43:13 +08:00
|
|
|
* possible error codes we can return
|
|
|
|
*/
|
|
|
|
|
1999-07-02 05:56:53 +08:00
|
|
|
#define LDAP_RANGE(n,x,y) (((x) <= (n)) && ((n) <= (y)))
|
1999-07-02 05:20:45 +08:00
|
|
|
|
1998-08-09 08:43:13 +08:00
|
|
|
#define LDAP_SUCCESS 0x00
|
|
|
|
#define LDAP_OPERATIONS_ERROR 0x01
|
|
|
|
#define LDAP_PROTOCOL_ERROR 0x02
|
|
|
|
#define LDAP_TIMELIMIT_EXCEEDED 0x03
|
|
|
|
#define LDAP_SIZELIMIT_EXCEEDED 0x04
|
|
|
|
#define LDAP_COMPARE_FALSE 0x05
|
|
|
|
#define LDAP_COMPARE_TRUE 0x06
|
1999-07-01 12:37:46 +08:00
|
|
|
#define LDAP_AUTH_METHOD_NOT_SUPPORTED 0x07
|
|
|
|
#define LDAP_STRONG_AUTH_NOT_SUPPORTED LDAP_AUTH_METHOD_NOT_SUPPORTED
|
1998-08-09 08:43:13 +08:00
|
|
|
#define LDAP_STRONG_AUTH_REQUIRED 0x08
|
2001-07-06 10:17:18 +08:00
|
|
|
#define LDAP_PARTIAL_RESULTS 0x09 /* LDAPv2+ (not LDAPv3) */
|
1998-12-21 10:09:44 +08:00
|
|
|
|
|
|
|
#define LDAP_REFERRAL 0x0a /* LDAPv3 */
|
1998-10-26 09:18:41 +08:00
|
|
|
#define LDAP_ADMINLIMIT_EXCEEDED 0x0b /* LDAPv3 */
|
1999-07-08 01:49:15 +08:00
|
|
|
#define LDAP_UNAVAILABLE_CRITICAL_EXTENSION 0x0c /* LDAPv3 */
|
1998-10-26 09:18:41 +08:00
|
|
|
#define LDAP_CONFIDENTIALITY_REQUIRED 0x0d /* LDAPv3 */
|
2001-12-24 11:49:54 +08:00
|
|
|
#define LDAP_SASL_BIND_IN_PROGRESS 0x0e /* LDAPv3 */
|
1998-08-09 08:43:13 +08:00
|
|
|
|
1999-07-02 05:20:45 +08:00
|
|
|
#define LDAP_ATTR_ERROR(n) LDAP_RANGE((n),0x10,0x15) /* 16-21 */
|
|
|
|
|
1998-08-09 08:43:13 +08:00
|
|
|
#define LDAP_NO_SUCH_ATTRIBUTE 0x10
|
|
|
|
#define LDAP_UNDEFINED_TYPE 0x11
|
|
|
|
#define LDAP_INAPPROPRIATE_MATCHING 0x12
|
|
|
|
#define LDAP_CONSTRAINT_VIOLATION 0x13
|
|
|
|
#define LDAP_TYPE_OR_VALUE_EXISTS 0x14
|
|
|
|
#define LDAP_INVALID_SYNTAX 0x15
|
|
|
|
|
1999-07-02 05:20:45 +08:00
|
|
|
#define LDAP_NAME_ERROR(n) LDAP_RANGE((n),0x20,0x24) /* 32-34,36 */
|
|
|
|
|
1998-08-09 08:43:13 +08:00
|
|
|
#define LDAP_NO_SUCH_OBJECT 0x20
|
|
|
|
#define LDAP_ALIAS_PROBLEM 0x21
|
|
|
|
#define LDAP_INVALID_DN_SYNTAX 0x22
|
1998-10-26 09:18:41 +08:00
|
|
|
#define LDAP_IS_LEAF 0x23 /* not LDAPv3 */
|
1998-08-09 08:43:13 +08:00
|
|
|
#define LDAP_ALIAS_DEREF_PROBLEM 0x24
|
|
|
|
|
1999-07-02 05:20:45 +08:00
|
|
|
#define LDAP_SECURITY_ERROR(n) LDAP_RANGE((n),0x30,0x32) /* 48-50 */
|
1998-08-09 08:43:13 +08:00
|
|
|
|
|
|
|
#define LDAP_INAPPROPRIATE_AUTH 0x30
|
|
|
|
#define LDAP_INVALID_CREDENTIALS 0x31
|
|
|
|
#define LDAP_INSUFFICIENT_ACCESS 0x32
|
1999-07-02 05:20:45 +08:00
|
|
|
|
|
|
|
#define LDAP_SERVICE_ERROR(n) LDAP_RANGE((n),0x33,0x36) /* 51-54 */
|
|
|
|
|
1998-08-09 08:43:13 +08:00
|
|
|
#define LDAP_BUSY 0x33
|
|
|
|
#define LDAP_UNAVAILABLE 0x34
|
|
|
|
#define LDAP_UNWILLING_TO_PERFORM 0x35
|
|
|
|
#define LDAP_LOOP_DETECT 0x36
|
|
|
|
|
1999-07-02 05:20:45 +08:00
|
|
|
#define LDAP_UPDATE_ERROR(n) LDAP_RANGE((n),0x40,0x47) /* 64-69,71 */
|
|
|
|
|
1998-08-09 08:43:13 +08:00
|
|
|
#define LDAP_NAMING_VIOLATION 0x40
|
|
|
|
#define LDAP_OBJECT_CLASS_VIOLATION 0x41
|
|
|
|
#define LDAP_NOT_ALLOWED_ON_NONLEAF 0x42
|
|
|
|
#define LDAP_NOT_ALLOWED_ON_RDN 0x43
|
|
|
|
#define LDAP_ALREADY_EXISTS 0x44
|
|
|
|
#define LDAP_NO_OBJECT_CLASS_MODS 0x45
|
1998-10-26 09:18:41 +08:00
|
|
|
#define LDAP_RESULTS_TOO_LARGE 0x46 /* CLDAP */
|
|
|
|
#define LDAP_AFFECTS_MULTIPLE_DSAS 0x47 /* LDAPv3 */
|
1998-08-09 08:43:13 +08:00
|
|
|
|
|
|
|
#define LDAP_OTHER 0x50
|
1999-07-02 05:20:45 +08:00
|
|
|
|
2000-06-14 04:45:30 +08:00
|
|
|
#define LDAP_API_ERROR(n) LDAP_RANGE((n),0x51,0x61) /* 81-97 */
|
2001-07-06 10:17:18 +08:00
|
|
|
#define LDAP_API_RESULT(n) (((n) == LDAP_SUCCESS) || \
|
|
|
|
LDAP_RANGE((n),0x51,0x61)) /* 0,81-97 */
|
1999-07-02 05:20:45 +08:00
|
|
|
|
2001-02-02 03:39:12 +08:00
|
|
|
/* reserved for APIs */
|
1998-08-09 08:43:13 +08:00
|
|
|
#define LDAP_SERVER_DOWN 0x51
|
|
|
|
#define LDAP_LOCAL_ERROR 0x52
|
|
|
|
#define LDAP_ENCODING_ERROR 0x53
|
|
|
|
#define LDAP_DECODING_ERROR 0x54
|
|
|
|
#define LDAP_TIMEOUT 0x55
|
|
|
|
#define LDAP_AUTH_UNKNOWN 0x56
|
|
|
|
#define LDAP_FILTER_ERROR 0x57
|
|
|
|
#define LDAP_USER_CANCELLED 0x58
|
|
|
|
#define LDAP_PARAM_ERROR 0x59
|
|
|
|
#define LDAP_NO_MEMORY 0x5a
|
|
|
|
|
2001-02-02 03:39:12 +08:00
|
|
|
/* used but not reserved for APIs */
|
2000-06-14 04:45:30 +08:00
|
|
|
#define LDAP_CONNECT_ERROR 0x5b /* draft-ietf-ldap-c-api-xx */
|
|
|
|
#define LDAP_NOT_SUPPORTED 0x5c /* draft-ietf-ldap-c-api-xx */
|
|
|
|
#define LDAP_CONTROL_NOT_FOUND 0x5d /* draft-ietf-ldap-c-api-xx */
|
|
|
|
#define LDAP_NO_RESULTS_RETURNED 0x5e /* draft-ietf-ldap-c-api-xx */
|
|
|
|
#define LDAP_MORE_RESULTS_TO_RETURN 0x5f /* draft-ietf-ldap-c-api-xx */
|
|
|
|
#define LDAP_CLIENT_LOOP 0x60 /* draft-ietf-ldap-c-api-xx */
|
|
|
|
#define LDAP_REFERRAL_LIMIT_EXCEEDED 0x61 /* draft-ietf-ldap-c-api-xx */
|
1998-08-09 08:43:13 +08:00
|
|
|
|
2002-09-04 10:00:42 +08:00
|
|
|
#ifdef LDAP_CLIENT_UPDATE
|
|
|
|
/* resultCode for LCUP */
|
|
|
|
#define LCUP_RESOURCES_EXHAUSTED 0x62
|
|
|
|
#define LCUP_SECURITY_VIOLATION 0x63
|
|
|
|
#define LCUP_INVALID_COOKIE 0x64
|
|
|
|
#define LCUP_UNSUPPORTED_SCHEME 0x65
|
|
|
|
#define LCUP_CLIENT_DISCONNECT 0x66
|
|
|
|
#define LCUP_RELOAD_REQUIRED 0x67
|
|
|
|
#endif /* LDAP_CLIENT_UPDATE */
|
|
|
|
|
|
|
|
#ifdef LDAP_CLIENT_UPDATE
|
|
|
|
#define SYNCHRONIZE_ONLY 0x00
|
|
|
|
#define SYNCHRONIZE_AND_PERSIST 0x01
|
|
|
|
#define PERSIST_ONLY 0x02
|
|
|
|
#endif /* LDAP_CLIENT_UPDATE */
|
|
|
|
|
|
|
|
#ifdef LDAP_CLIENT_UPDATE
|
|
|
|
#define LDAP_LCUP_DEFAULT_SEND_COOKIE_INTERVAL 0x01
|
|
|
|
#endif /* LDAP_CLIENT_UPDATE */
|
|
|
|
|
1998-08-09 08:43:13 +08:00
|
|
|
/*
|
|
|
|
* This structure represents both ldap messages and ldap responses.
|
|
|
|
* These are really the same, except in the case of search responses,
|
|
|
|
* where a response has multiple messages.
|
|
|
|
*/
|
|
|
|
|
1998-10-26 09:18:41 +08:00
|
|
|
typedef struct ldapmsg LDAPMessage;
|
1998-08-09 08:43:13 +08:00
|
|
|
|
1999-12-10 01:00:54 +08:00
|
|
|
/* for modifications */
|
|
|
|
typedef struct ldapmod {
|
|
|
|
int mod_op;
|
|
|
|
|
|
|
|
#define LDAP_MOD_ADD ((ber_int_t) 0x0000)
|
|
|
|
#define LDAP_MOD_DELETE ((ber_int_t) 0x0001)
|
|
|
|
#define LDAP_MOD_REPLACE ((ber_int_t) 0x0002)
|
|
|
|
#define LDAP_MOD_BVALUES ((ber_int_t) 0x0080)
|
|
|
|
/* IMPORTANT: do not use code 0x1000 (or above),
|
|
|
|
* it is used internally by the backends!
|
|
|
|
* (see ldap/servers/slapd/slap.h)
|
|
|
|
*/
|
|
|
|
|
|
|
|
char *mod_type;
|
|
|
|
union mod_vals_u {
|
|
|
|
char **modv_strvals;
|
|
|
|
struct berval **modv_bvals;
|
|
|
|
} mod_vals;
|
|
|
|
#define mod_values mod_vals.modv_strvals
|
|
|
|
#define mod_bvalues mod_vals.modv_bvals
|
|
|
|
} LDAPMod;
|
|
|
|
|
1998-08-09 08:43:13 +08:00
|
|
|
/*
|
1999-11-17 09:55:29 +08:00
|
|
|
* structure representing an ldap session which can
|
|
|
|
* encompass connections to multiple servers (in the
|
|
|
|
* face of referrals).
|
1998-08-09 08:43:13 +08:00
|
|
|
*/
|
1998-10-26 09:18:41 +08:00
|
|
|
typedef struct ldap LDAP;
|
1998-08-09 08:43:13 +08:00
|
|
|
|
1998-10-26 09:18:41 +08:00
|
|
|
#define LDAP_DEREF_NEVER 0x00
|
|
|
|
#define LDAP_DEREF_SEARCHING 0x01
|
|
|
|
#define LDAP_DEREF_FINDING 0x02
|
|
|
|
#define LDAP_DEREF_ALWAYS 0x03
|
1998-08-09 08:43:13 +08:00
|
|
|
|
1998-10-26 09:18:41 +08:00
|
|
|
#define LDAP_NO_LIMIT 0
|
1998-08-09 08:43:13 +08:00
|
|
|
|
1998-12-21 09:44:58 +08:00
|
|
|
/* how many messages to retrieve results for */
|
|
|
|
#define LDAP_MSG_ONE 0x00
|
|
|
|
#define LDAP_MSG_ALL 0x01
|
|
|
|
#define LDAP_MSG_RECEIVED 0x02
|
1998-08-09 08:43:13 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* types for ldap URL handling
|
|
|
|
*/
|
|
|
|
typedef struct ldap_url_desc {
|
2000-10-31 01:19:52 +08:00
|
|
|
struct ldap_url_desc *lud_next;
|
|
|
|
char *lud_scheme;
|
|
|
|
char *lud_host;
|
|
|
|
int lud_port;
|
|
|
|
char *lud_dn;
|
|
|
|
char **lud_attrs;
|
|
|
|
int lud_scope;
|
|
|
|
char *lud_filter;
|
|
|
|
char **lud_exts;
|
2000-10-26 14:17:14 +08:00
|
|
|
int lud_crit_exts;
|
1998-08-09 08:43:13 +08:00
|
|
|
} LDAPURLDesc;
|
|
|
|
|
1999-07-20 03:32:47 +08:00
|
|
|
#define LDAP_URL_SUCCESS 0x00 /* Success */
|
|
|
|
#define LDAP_URL_ERR_MEM 0x01 /* can't allocate memory space */
|
|
|
|
#define LDAP_URL_ERR_PARAM 0x02 /* parameter is bad */
|
|
|
|
|
2000-06-07 09:09:40 +08:00
|
|
|
#define LDAP_URL_ERR_BADSCHEME 0x03 /* URL doesn't begin with "ldap[si]://" */
|
1999-07-20 03:32:47 +08:00
|
|
|
#define LDAP_URL_ERR_BADENCLOSURE 0x04 /* URL is missing trailing ">" */
|
|
|
|
#define LDAP_URL_ERR_BADURL 0x05 /* URL is bad */
|
|
|
|
#define LDAP_URL_ERR_BADHOST 0x06 /* host port is bad */
|
|
|
|
#define LDAP_URL_ERR_BADATTRS 0x07 /* bad (or missing) attributes */
|
|
|
|
#define LDAP_URL_ERR_BADSCOPE 0x08 /* scope string is invalid (or missing) */
|
|
|
|
#define LDAP_URL_ERR_BADFILTER 0x09 /* bad or missing filter */
|
|
|
|
#define LDAP_URL_ERR_BADEXTS 0x0a /* bad or missing extensions */
|
1998-08-09 08:43:13 +08:00
|
|
|
|
1999-05-22 14:11:48 +08:00
|
|
|
/*
|
|
|
|
* The API draft spec says we should declare (or cause to be declared)
|
1999-10-20 02:57:38 +08:00
|
|
|
* 'struct timeval'. We don't. See IETF LDAPext discussions.
|
1999-05-22 14:11:48 +08:00
|
|
|
*/
|
1998-11-04 09:41:00 +08:00
|
|
|
struct timeval;
|
1998-08-09 08:43:13 +08:00
|
|
|
|
Protoized, moved extern definitions to .h files, fixed related bugs.
Most function and variable definitions are now preceded by its extern
definition, for error checking. Retyped a number of functions, usually
to return void. Fixed a number of printf format errors.
API changes (in ldap/include):
Added avl_dup_ok, avl_prefixapply, removed ber_fatten (probably typo
for ber_flatten), retyped ldap_sort_strcasecmp, grew lutil.h.
A number of `extern' declarations are left (some added by protoize), to
be cleaned away later. Mostly strdup(), strcasecmp(), mktemp(), optind,
optarg, errno.
1998-11-16 06:40:11 +08:00
|
|
|
/*
|
|
|
|
* in options.c:
|
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_get_option LDAP_P((
|
1999-10-20 02:57:38 +08:00
|
|
|
LDAP *ld,
|
1999-05-19 09:12:33 +08:00
|
|
|
int option,
|
|
|
|
void *outvalue));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_set_option LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
int option,
|
|
|
|
LDAP_CONST void *invalue));
|
1998-10-26 09:49:56 +08:00
|
|
|
|
2000-06-01 01:34:43 +08:00
|
|
|
/* V3 REBIND Function Callback Prototype */
|
2000-06-11 01:31:56 +08:00
|
|
|
typedef int (LDAP_REBIND_PROC) LDAP_P((
|
2001-06-15 12:31:55 +08:00
|
|
|
LDAP *ld, LDAP_CONST char *url,
|
|
|
|
ber_tag_t request, ber_int_t msgid,
|
2001-06-15 12:28:58 +08:00
|
|
|
void *params ));
|
2000-06-01 01:34:43 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-06-01 01:34:43 +08:00
|
|
|
ldap_set_rebind_proc LDAP_P((
|
|
|
|
LDAP *ld,
|
2001-06-15 12:49:38 +08:00
|
|
|
LDAP_REBIND_PROC *rebind_proc,
|
2001-06-15 12:28:58 +08:00
|
|
|
void *params ));
|
1998-12-24 11:55:41 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* in controls.c:
|
|
|
|
*/
|
2001-12-24 11:49:54 +08:00
|
|
|
LDAP_F( int )
|
|
|
|
ldap_create_control LDAP_P((
|
2002-01-09 04:24:56 +08:00
|
|
|
LDAP_CONST char *requestOID,
|
2001-12-24 11:49:54 +08:00
|
|
|
BerElement *ber,
|
2000-07-23 01:28:06 +08:00
|
|
|
int iscritical,
|
|
|
|
LDAPControl **ctrlp ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_control_free LDAP_P((
|
|
|
|
LDAPControl *ctrl ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_controls_free LDAP_P((
|
|
|
|
LDAPControl **ctrls ));
|
1998-12-29 03:37:02 +08:00
|
|
|
|
2000-01-03 10:33:22 +08:00
|
|
|
/*
|
|
|
|
* in dnssrv.c:
|
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-04-25 18:38:03 +08:00
|
|
|
ldap_domain2dn LDAP_P((
|
|
|
|
LDAP_CONST char* domain,
|
|
|
|
char** dn ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-04-25 18:38:03 +08:00
|
|
|
ldap_dn2domain LDAP_P((
|
|
|
|
LDAP_CONST char* dn,
|
|
|
|
char** domain ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-04-25 18:38:03 +08:00
|
|
|
ldap_domain2hostlist LDAP_P((
|
|
|
|
LDAP_CONST char *domain,
|
|
|
|
char** hostlist ));
|
2000-01-03 10:33:22 +08:00
|
|
|
|
1998-12-24 11:55:41 +08:00
|
|
|
/*
|
|
|
|
* in extended.c:
|
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_extended_operation LDAP_P((
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAP *ld,
|
1999-06-04 08:34:04 +08:00
|
|
|
LDAP_CONST char *reqoid,
|
|
|
|
struct berval *reqdata,
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAPControl **serverctrls,
|
|
|
|
LDAPControl **clientctrls,
|
|
|
|
int *msgidp ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_extended_operation_s LDAP_P((
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAP *ld,
|
1999-06-04 08:34:04 +08:00
|
|
|
LDAP_CONST char *reqoid,
|
|
|
|
struct berval *reqdata,
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAPControl **serverctrls,
|
|
|
|
LDAPControl **clientctrls,
|
|
|
|
char **retoidp,
|
|
|
|
struct berval **retdatap ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-22 04:46:48 +08:00
|
|
|
ldap_parse_extended_result LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *res,
|
|
|
|
char **retoidp,
|
|
|
|
struct berval **retdatap,
|
|
|
|
int freeit ));
|
|
|
|
|
2000-06-24 09:40:39 +08:00
|
|
|
LDAP_F( int )
|
|
|
|
ldap_parse_extended_partial LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *res,
|
|
|
|
char **retoidp,
|
|
|
|
struct berval **retdatap,
|
|
|
|
LDAPControl ***serverctrls,
|
|
|
|
int freeit ));
|
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/*
|
|
|
|
* in abandon.c:
|
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_abandon_ext LDAP_P((
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAP *ld,
|
|
|
|
int msgid,
|
|
|
|
LDAPControl **serverctrls,
|
|
|
|
LDAPControl **clientctrls ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-06-14 04:45:30 +08:00
|
|
|
ldap_abandon LDAP_P(( /* deprecated */
|
|
|
|
LDAP *ld,
|
|
|
|
int msgid ));
|
|
|
|
|
1998-08-09 08:43:13 +08:00
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/*
|
|
|
|
* in add.c:
|
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_add_ext LDAP_P((
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAP *ld,
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP_CONST char *dn,
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAPMod **attrs,
|
|
|
|
LDAPControl **serverctrls,
|
|
|
|
LDAPControl **clientctrls,
|
|
|
|
int *msgidp ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_add_ext_s LDAP_P((
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAP *ld,
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP_CONST char *dn,
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAPMod **attrs,
|
|
|
|
LDAPControl **serverctrls,
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAPControl **clientctrls ));
|
1998-12-24 11:55:41 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_add LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *dn,
|
|
|
|
LDAPMod **attrs ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_add_s LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *dn,
|
|
|
|
LDAPMod **attrs ));
|
1998-08-09 08:43:13 +08:00
|
|
|
|
1998-12-24 11:55:41 +08:00
|
|
|
|
|
|
|
/*
|
1999-06-29 06:13:56 +08:00
|
|
|
* in sasl.c:
|
1998-12-24 11:55:41 +08:00
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_sasl_bind LDAP_P((
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAP *ld,
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP_CONST char *dn,
|
|
|
|
LDAP_CONST char *mechanism,
|
|
|
|
struct berval *cred,
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAPControl **serverctrls,
|
|
|
|
LDAPControl **clientctrls,
|
1999-06-29 06:13:56 +08:00
|
|
|
int *msgidp ));
|
1998-12-24 11:55:41 +08:00
|
|
|
|
2000-07-18 05:23:59 +08:00
|
|
|
/* Interaction flags (should be passed about in a control)
|
|
|
|
* Automatic (default): use defaults, prompt otherwise
|
|
|
|
* Interactive: prompt always
|
|
|
|
* Quiet: never prompt
|
|
|
|
*/
|
|
|
|
#define LDAP_SASL_AUTOMATIC 0U
|
|
|
|
#define LDAP_SASL_INTERACTIVE 1U
|
|
|
|
#define LDAP_SASL_QUIET 2U
|
|
|
|
|
|
|
|
/*
|
|
|
|
* V3 SASL Interaction Function Callback Prototype
|
|
|
|
* when using Cyrus SASL, interact is pointer to sasl_interact_t
|
|
|
|
* should likely passed in a control (and provided controls)
|
|
|
|
*/
|
2000-07-16 07:25:46 +08:00
|
|
|
typedef int (LDAP_SASL_INTERACT_PROC) LDAP_P((
|
2000-07-18 05:23:59 +08:00
|
|
|
LDAP *ld, unsigned flags, void* defaults, void *interact ));
|
2000-07-16 07:25:46 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-07-14 06:54:38 +08:00
|
|
|
ldap_sasl_interactive_bind_s LDAP_P((
|
2000-01-02 09:21:25 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *dn, /* usually NULL */
|
|
|
|
LDAP_CONST char *saslMechanism,
|
|
|
|
LDAPControl **serverControls,
|
2000-07-16 07:25:46 +08:00
|
|
|
LDAPControl **clientControls,
|
2000-07-18 05:23:59 +08:00
|
|
|
|
|
|
|
/* should be client controls */
|
|
|
|
unsigned flags,
|
2000-07-17 08:56:29 +08:00
|
|
|
LDAP_SASL_INTERACT_PROC *proc,
|
2000-07-17 09:08:15 +08:00
|
|
|
void *defaults ));
|
2000-01-02 09:21:25 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_sasl_bind_s LDAP_P((
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAP *ld,
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP_CONST char *dn,
|
|
|
|
LDAP_CONST char *mechanism,
|
1998-12-24 11:55:41 +08:00
|
|
|
struct berval *cred,
|
|
|
|
LDAPControl **serverctrls,
|
|
|
|
LDAPControl **clientctrls,
|
|
|
|
struct berval **servercredp ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-22 04:46:48 +08:00
|
|
|
ldap_parse_sasl_bind_result LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *res,
|
|
|
|
struct berval **servercredp,
|
|
|
|
int freeit ));
|
1998-12-24 11:55:41 +08:00
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/*
|
|
|
|
* in bind.c:
|
1999-05-19 09:12:33 +08:00
|
|
|
* (deprecated)
|
1998-10-25 09:41:42 +08:00
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_bind LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *who,
|
|
|
|
LDAP_CONST char *passwd,
|
|
|
|
int authmethod ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_bind_s LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *who,
|
|
|
|
LDAP_CONST char *cred,
|
|
|
|
int authmethod ));
|
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/*
|
|
|
|
* in sbind.c:
|
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_simple_bind LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *who,
|
|
|
|
LDAP_CONST char *passwd ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_simple_bind_s LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *who,
|
|
|
|
LDAP_CONST char *passwd ));
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1998-12-24 11:55:41 +08:00
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/*
|
|
|
|
* in kbind.c:
|
1999-05-19 09:12:33 +08:00
|
|
|
* (deprecated)
|
1998-10-25 09:41:42 +08:00
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_kerberos_bind_s LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *who ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_kerberos_bind1 LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *who ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_kerberos_bind1_s LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *who ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_kerberos_bind2 LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *who ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_kerberos_bind2_s LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *who ));
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* in cache.c
|
1999-05-25 04:55:47 +08:00
|
|
|
* (deprecated)
|
1998-10-25 09:41:42 +08:00
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-06-19 07:53:05 +08:00
|
|
|
ldap_enable_cache LDAP_P(( LDAP *ld, long timeout, ber_len_t maxmem ));
|
1999-05-19 09:12:33 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_disable_cache LDAP_P(( LDAP *ld ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_set_cache_options LDAP_P(( LDAP *ld, unsigned long opts ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_destroy_cache LDAP_P(( LDAP *ld ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_flush_cache LDAP_P(( LDAP *ld ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_uncache_entry LDAP_P(( LDAP *ld, LDAP_CONST char *dn ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_uncache_request LDAP_P(( LDAP *ld, int msgid ));
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1998-12-24 11:55:41 +08:00
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/*
|
|
|
|
* in compare.c:
|
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_compare_ext LDAP_P((
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAP *ld,
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP_CONST char *dn,
|
|
|
|
LDAP_CONST char *attr,
|
1998-12-24 11:55:41 +08:00
|
|
|
struct berval *bvalue,
|
|
|
|
LDAPControl **serverctrls,
|
|
|
|
LDAPControl **clientctrls,
|
|
|
|
int *msgidp ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_compare_ext_s LDAP_P((
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAP *ld,
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP_CONST char *dn,
|
|
|
|
LDAP_CONST char *attr,
|
1998-12-24 11:55:41 +08:00
|
|
|
struct berval *bvalue,
|
|
|
|
LDAPControl **serverctrls,
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAPControl **clientctrls ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_compare LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *dn,
|
|
|
|
LDAP_CONST char *attr,
|
|
|
|
LDAP_CONST char *value ));
|
1998-12-24 11:55:41 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_compare_s LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *dn,
|
|
|
|
LDAP_CONST char *attr,
|
|
|
|
LDAP_CONST char *value ));
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1998-12-24 11:55:41 +08:00
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/*
|
|
|
|
* in delete.c:
|
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_delete_ext LDAP_P((
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAP *ld,
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP_CONST char *dn,
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAPControl **serverctrls,
|
|
|
|
LDAPControl **clientctrls,
|
|
|
|
int *msgidp ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_delete_ext_s LDAP_P((
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAP *ld,
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP_CONST char *dn,
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAPControl **serverctrls,
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAPControl **clientctrls ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_delete LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *dn ));
|
1998-12-24 11:55:41 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_delete_s LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *dn ));
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1998-12-24 11:55:41 +08:00
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/*
|
|
|
|
* in error.c:
|
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-06-29 06:13:56 +08:00
|
|
|
ldap_parse_result LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *res,
|
|
|
|
int *errcodep,
|
|
|
|
char **matcheddnp,
|
|
|
|
char **errmsgp,
|
|
|
|
char ***referralsp,
|
|
|
|
LDAPControl ***serverctrls,
|
|
|
|
int freeit ));
|
1999-05-22 14:11:48 +08:00
|
|
|
|
2001-07-22 08:14:42 +08:00
|
|
|
LDAP_F( char * )
|
1999-05-22 14:11:48 +08:00
|
|
|
ldap_err2string LDAP_P((
|
|
|
|
int err ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-06-29 06:13:56 +08:00
|
|
|
ldap_result2error LDAP_P(( /* deprecated */
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *r,
|
|
|
|
int freeit ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void )
|
1999-05-22 14:11:48 +08:00
|
|
|
ldap_perror LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *s ));
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1998-12-24 11:55:41 +08:00
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/*
|
|
|
|
* in modify.c:
|
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_modify_ext LDAP_P((
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAP *ld,
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP_CONST char *dn,
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAPMod **mods,
|
|
|
|
LDAPControl **serverctrls,
|
|
|
|
LDAPControl **clientctrls,
|
|
|
|
int *msgidp ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_modify_ext_s LDAP_P((
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAP *ld,
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP_CONST char *dn,
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAPMod **mods,
|
|
|
|
LDAPControl **serverctrls,
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAPControl **clientctrls ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_modify LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *dn,
|
|
|
|
LDAPMod **mods ));
|
1998-12-24 11:55:41 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_modify_s LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *dn,
|
|
|
|
LDAPMod **mods ));
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1998-12-24 11:55:41 +08:00
|
|
|
|
|
|
|
/*
|
1999-05-25 04:55:47 +08:00
|
|
|
* in modrdn.c:
|
1998-12-24 11:55:41 +08:00
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-09-02 15:38:06 +08:00
|
|
|
ldap_rename LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *dn,
|
|
|
|
LDAP_CONST char *newrdn,
|
|
|
|
LDAP_CONST char *newSuperior,
|
1999-12-05 01:19:11 +08:00
|
|
|
int deleteoldrdn,
|
1999-09-02 15:38:06 +08:00
|
|
|
LDAPControl **sctrls,
|
|
|
|
LDAPControl **cctrls,
|
|
|
|
int *msgidp ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-09-02 15:38:06 +08:00
|
|
|
ldap_rename_s LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *dn,
|
|
|
|
LDAP_CONST char *newrdn,
|
|
|
|
LDAP_CONST char *newSuperior,
|
1999-12-05 01:19:11 +08:00
|
|
|
int deleteoldrdn,
|
1999-09-02 15:38:06 +08:00
|
|
|
LDAPControl **sctrls,
|
|
|
|
LDAPControl **cctrls ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_rename2 LDAP_P(( /* deprecated */
|
1999-05-25 04:55:47 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *dn,
|
|
|
|
LDAP_CONST char *newrdn,
|
1999-12-05 01:19:11 +08:00
|
|
|
LDAP_CONST char *newSuperior,
|
|
|
|
int deleteoldrdn ));
|
1999-05-25 04:55:47 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_rename2_s LDAP_P(( /* deprecated */
|
1999-05-25 04:55:47 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *dn,
|
|
|
|
LDAP_CONST char *newrdn,
|
1999-12-05 01:19:11 +08:00
|
|
|
LDAP_CONST char *newSuperior,
|
|
|
|
int deleteoldrdn ));
|
1998-12-24 11:55:41 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_modrdn LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *dn,
|
|
|
|
LDAP_CONST char *newrdn ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_modrdn_s LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *dn,
|
|
|
|
LDAP_CONST char *newrdn ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_modrdn2 LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *dn,
|
|
|
|
LDAP_CONST char *newrdn,
|
1998-10-25 09:41:42 +08:00
|
|
|
int deleteoldrdn ));
|
1999-05-19 09:12:33 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_modrdn2_s LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *dn,
|
|
|
|
LDAP_CONST char *newrdn,
|
1998-10-25 09:41:42 +08:00
|
|
|
int deleteoldrdn));
|
1999-05-19 09:12:33 +08:00
|
|
|
|
1998-12-24 11:55:41 +08:00
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/*
|
|
|
|
* in open.c:
|
|
|
|
*/
|
2001-07-22 08:14:42 +08:00
|
|
|
LDAP_F( LDAP * )
|
2000-06-14 04:45:30 +08:00
|
|
|
ldap_init LDAP_P((
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP_CONST char *host,
|
|
|
|
int port ));
|
|
|
|
|
2001-07-22 08:14:42 +08:00
|
|
|
LDAP_F( LDAP * )
|
2000-06-14 04:45:30 +08:00
|
|
|
ldap_open LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP_CONST char *host,
|
|
|
|
int port ));
|
1998-12-24 11:55:41 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2001-12-24 11:49:54 +08:00
|
|
|
ldap_create LDAP_P((
|
1999-12-10 06:33:22 +08:00
|
|
|
LDAP **ldp ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-12-10 06:33:22 +08:00
|
|
|
ldap_initialize LDAP_P((
|
|
|
|
LDAP **ldp,
|
|
|
|
LDAP_CONST char *url ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-06-14 04:45:30 +08:00
|
|
|
ldap_start_tls_s LDAP_P((
|
1999-12-11 02:26:12 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAPControl **serverctrls,
|
|
|
|
LDAPControl **clientctrls ));
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1998-12-24 12:41:27 +08:00
|
|
|
/*
|
|
|
|
* in messages.c:
|
|
|
|
*/
|
2001-07-22 08:14:42 +08:00
|
|
|
LDAP_F( LDAPMessage * )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_first_message LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *chain ));
|
|
|
|
|
2001-07-22 08:14:42 +08:00
|
|
|
LDAP_F( LDAPMessage * )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_next_message LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *msg ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_count_messages LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *chain ));
|
1998-12-24 12:41:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* in references.c:
|
|
|
|
*/
|
2001-07-22 08:14:42 +08:00
|
|
|
LDAP_F( LDAPMessage * )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_first_reference LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *chain ));
|
|
|
|
|
2001-07-22 08:14:42 +08:00
|
|
|
LDAP_F( LDAPMessage * )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_next_reference LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *ref ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_count_references LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *chain ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_parse_reference LDAP_P((
|
1998-12-29 03:37:02 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *ref,
|
|
|
|
char ***referralsp,
|
|
|
|
LDAPControl ***serverctrls,
|
|
|
|
int freeit));
|
1998-12-24 12:41:27 +08:00
|
|
|
|
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/*
|
|
|
|
* in getentry.c:
|
|
|
|
*/
|
2001-07-22 08:14:42 +08:00
|
|
|
LDAP_F( LDAPMessage * )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_first_entry LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *chain ));
|
|
|
|
|
2001-07-22 08:14:42 +08:00
|
|
|
LDAP_F( LDAPMessage * )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_next_entry LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *entry ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_count_entries LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *chain ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_get_entry_controls LDAP_P((
|
1998-12-29 03:37:02 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *entry,
|
|
|
|
LDAPControl ***serverctrls));
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1998-12-24 11:55:41 +08:00
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/*
|
|
|
|
* in addentry.c
|
|
|
|
*/
|
2001-07-22 08:14:42 +08:00
|
|
|
LDAP_F( LDAPMessage * )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_delete_result_entry LDAP_P((
|
|
|
|
LDAPMessage **list,
|
|
|
|
LDAPMessage *e ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_add_result_entry LDAP_P((
|
|
|
|
LDAPMessage **list,
|
1998-10-25 09:41:42 +08:00
|
|
|
LDAPMessage *e ));
|
|
|
|
|
1998-12-24 11:55:41 +08:00
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/*
|
|
|
|
* in getdn.c
|
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( char * )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_get_dn LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *entry ));
|
|
|
|
|
2001-09-26 10:35:41 +08:00
|
|
|
typedef struct ldap_ava {
|
2001-12-29 18:35:24 +08:00
|
|
|
struct berval la_attr;
|
|
|
|
struct berval la_value;
|
2001-09-26 10:35:41 +08:00
|
|
|
unsigned la_flags;
|
2001-10-19 03:00:07 +08:00
|
|
|
#define LDAP_AVA_STRING 0x0000U
|
|
|
|
#define LDAP_AVA_BINARY 0x0001U
|
2001-10-29 16:05:23 +08:00
|
|
|
#define LDAP_AVA_NONPRINTABLE 0x0002U
|
2001-12-06 19:50:17 +08:00
|
|
|
|
|
|
|
void *la_private;
|
2001-09-26 10:35:41 +08:00
|
|
|
} LDAPAVA;
|
|
|
|
|
|
|
|
typedef LDAPAVA** LDAPRDN;
|
|
|
|
typedef LDAPRDN** LDAPDN;
|
|
|
|
|
|
|
|
/* DN formats */
|
2001-12-06 18:01:25 +08:00
|
|
|
#define LDAP_DN_FORMAT_LDAP 0x0000U
|
|
|
|
#define LDAP_DN_FORMAT_LDAPV3 0x0010U
|
|
|
|
#define LDAP_DN_FORMAT_LDAPV2 0x0020U
|
|
|
|
#define LDAP_DN_FORMAT_DCE 0x0030U
|
|
|
|
#define LDAP_DN_FORMAT_UFN 0x0040U /* dn2str only */
|
|
|
|
#define LDAP_DN_FORMAT_AD_CANONICAL 0x0050U /* dn2str only */
|
2002-01-04 04:06:29 +08:00
|
|
|
#define LDAP_DN_FORMAT_LBER 0x00F0U /* for testing only */
|
2001-12-05 04:22:26 +08:00
|
|
|
#define LDAP_DN_FORMAT_MASK 0x00F0U
|
2001-09-26 10:35:41 +08:00
|
|
|
|
2001-12-24 06:46:37 +08:00
|
|
|
/* DN flags */
|
2001-12-05 04:22:26 +08:00
|
|
|
#define LDAP_DN_PRETTY 0x0100U
|
2001-12-28 20:50:48 +08:00
|
|
|
#define LDAP_DN_SKIP 0x0200U
|
2001-10-29 16:05:23 +08:00
|
|
|
#define LDAP_DN_P_NOLEADTRAILSPACES 0x1000U
|
|
|
|
#define LDAP_DN_P_NOSPACEAFTERRDN 0x2000U
|
2001-10-19 03:00:07 +08:00
|
|
|
#define LDAP_DN_PEDANTIC 0xF000U
|
2001-09-26 10:35:41 +08:00
|
|
|
|
2001-12-24 06:46:37 +08:00
|
|
|
LDAP_F( void )
|
|
|
|
ldap_avafree LDAP_P(( LDAPAVA *ava ));
|
|
|
|
LDAP_F( void )
|
|
|
|
ldap_rdnfree LDAP_P(( LDAPRDN *rdn ));
|
|
|
|
LDAP_F( void )
|
|
|
|
ldap_dnfree LDAP_P(( LDAPDN *dn ));
|
|
|
|
|
2002-02-13 18:05:22 +08:00
|
|
|
LDAP_F( int )
|
|
|
|
ldap_bv2dn LDAP_P((
|
|
|
|
struct berval *bv,
|
|
|
|
LDAPDN **dn,
|
|
|
|
unsigned flags ));
|
|
|
|
|
2001-09-26 10:35:41 +08:00
|
|
|
LDAP_F( int )
|
|
|
|
ldap_str2dn LDAP_P((
|
|
|
|
LDAP_CONST char *str,
|
|
|
|
LDAPDN **dn,
|
|
|
|
unsigned flags ));
|
|
|
|
|
2001-12-28 18:03:39 +08:00
|
|
|
LDAP_F( int )
|
|
|
|
ldap_dn2bv LDAP_P((
|
|
|
|
LDAPDN *dn,
|
|
|
|
struct berval *bv,
|
|
|
|
unsigned flags ));
|
|
|
|
|
2001-09-26 10:35:41 +08:00
|
|
|
LDAP_F( int )
|
|
|
|
ldap_dn2str LDAP_P((
|
|
|
|
LDAPDN *dn,
|
|
|
|
char **str,
|
|
|
|
unsigned flags ));
|
|
|
|
|
2002-02-13 19:46:33 +08:00
|
|
|
LDAP_F( int )
|
|
|
|
ldap_bv2rdn LDAP_P((
|
|
|
|
struct berval *bv,
|
|
|
|
LDAPRDN **rdn,
|
|
|
|
char **next,
|
|
|
|
unsigned flags ));
|
|
|
|
|
2001-10-30 18:04:24 +08:00
|
|
|
LDAP_F( int )
|
2001-12-24 11:49:54 +08:00
|
|
|
ldap_str2rdn LDAP_P((
|
2002-01-09 04:24:56 +08:00
|
|
|
LDAP_CONST char *str,
|
2001-12-24 11:49:54 +08:00
|
|
|
LDAPRDN **rdn,
|
2002-01-09 04:24:56 +08:00
|
|
|
char **next,
|
2001-10-30 18:04:24 +08:00
|
|
|
unsigned flags ));
|
|
|
|
|
2001-12-28 18:03:39 +08:00
|
|
|
LDAP_F( int )
|
|
|
|
ldap_rdn2bv LDAP_P((
|
|
|
|
LDAPRDN *rdn,
|
|
|
|
struct berval *bv,
|
|
|
|
unsigned flags ));
|
|
|
|
|
2001-10-30 18:04:24 +08:00
|
|
|
LDAP_F( int )
|
2001-12-24 11:49:54 +08:00
|
|
|
ldap_rdn2str LDAP_P((
|
|
|
|
LDAPRDN *rdn,
|
|
|
|
char **str,
|
2001-10-30 18:04:24 +08:00
|
|
|
unsigned flags ));
|
|
|
|
|
2001-10-02 08:22:40 +08:00
|
|
|
LDAP_F( int )
|
|
|
|
ldap_dn_normalize LDAP_P((
|
|
|
|
LDAP_CONST char *in, unsigned iflags,
|
|
|
|
char **out, unsigned oflags ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( char * )
|
2001-09-26 10:35:41 +08:00
|
|
|
ldap_dn2ufn LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP_CONST char *dn ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( char ** )
|
2001-09-26 10:35:41 +08:00
|
|
|
ldap_explode_dn LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP_CONST char *dn,
|
|
|
|
int notypes ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( char ** )
|
2001-09-26 10:35:41 +08:00
|
|
|
ldap_explode_rdn LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP_CONST char *rdn,
|
|
|
|
int notypes ));
|
|
|
|
|
2002-04-18 20:29:30 +08:00
|
|
|
typedef int LDAPDN_rewrite_func LDAP_P(( LDAPDN *dn, unsigned flags ));
|
|
|
|
|
|
|
|
LDAP_F( int )
|
|
|
|
ldap_X509dn2bv LDAP_P(( void *x509_name, struct berval *dn,
|
|
|
|
LDAPDN_rewrite_func *func, unsigned flags ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( char * )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_dn2dcedn LDAP_P(( LDAP_CONST char *dn )); /* deprecated */
|
2000-01-02 09:21:25 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( char * )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_dcedn2dn LDAP_P(( LDAP_CONST char *dce )); /* deprecated */
|
2001-10-29 16:05:23 +08:00
|
|
|
|
|
|
|
LDAP_F( char * )
|
|
|
|
ldap_dn2ad_canonical LDAP_P(( LDAP_CONST char *dn )); /* deprecated */
|
1998-12-24 11:55:41 +08:00
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/*
|
|
|
|
* in getattr.c
|
|
|
|
*/
|
2001-07-22 08:14:42 +08:00
|
|
|
LDAP_F( char * )
|
2001-12-24 11:49:54 +08:00
|
|
|
ldap_first_attribute LDAP_P((
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *entry,
|
1998-10-25 09:41:42 +08:00
|
|
|
BerElement **ber ));
|
1999-05-19 09:12:33 +08:00
|
|
|
|
2001-07-22 08:14:42 +08:00
|
|
|
LDAP_F( char * )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_next_attribute LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *entry,
|
1998-10-25 09:41:42 +08:00
|
|
|
BerElement *ber ));
|
|
|
|
|
1998-12-24 11:55:41 +08:00
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/*
|
|
|
|
* in getvalues.c
|
|
|
|
*/
|
2001-07-22 08:14:42 +08:00
|
|
|
LDAP_F( struct berval ** )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_get_values_len LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *entry,
|
|
|
|
LDAP_CONST char *target ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_count_values_len LDAP_P((
|
|
|
|
struct berval **vals ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void )
|
2001-12-28 07:01:17 +08:00
|
|
|
ldap_value_free_len LDAP_P((
|
|
|
|
struct berval **vals ));
|
|
|
|
|
|
|
|
LDAP_F( char ** )
|
|
|
|
ldap_get_values LDAP_P(( /* deprecated */
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPMessage *entry,
|
|
|
|
LDAP_CONST char *target ));
|
|
|
|
|
|
|
|
LDAP_F( int )
|
|
|
|
ldap_count_values LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
char **vals ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void )
|
2001-12-28 07:01:17 +08:00
|
|
|
ldap_value_free LDAP_P(( /* deprecated */
|
|
|
|
char **vals ));
|
1998-12-24 11:55:41 +08:00
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/*
|
|
|
|
* in result.c:
|
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_result LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
int msgid,
|
|
|
|
int all,
|
|
|
|
struct timeval *timeout,
|
|
|
|
LDAPMessage **result ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_msgtype LDAP_P((
|
|
|
|
LDAPMessage *lm ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_msgid LDAP_P((
|
|
|
|
LDAPMessage *lm ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_msgfree LDAP_P((
|
|
|
|
LDAPMessage *lm ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_msgdelete LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
int msgid ));
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1998-12-24 11:55:41 +08:00
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/*
|
|
|
|
* in search.c:
|
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_search_ext LDAP_P((
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAP *ld,
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP_CONST char *base,
|
1998-12-24 11:55:41 +08:00
|
|
|
int scope,
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP_CONST char *filter,
|
1998-12-24 11:55:41 +08:00
|
|
|
char **attrs,
|
1999-05-22 03:20:25 +08:00
|
|
|
int attrsonly,
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAPControl **serverctrls,
|
|
|
|
LDAPControl **clientctrls,
|
|
|
|
struct timeval *timeout,
|
|
|
|
int sizelimit,
|
|
|
|
int *msgidp ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_search_ext_s LDAP_P((
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAP *ld,
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP_CONST char *base,
|
1998-12-24 11:55:41 +08:00
|
|
|
int scope,
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP_CONST char *filter,
|
1998-12-24 11:55:41 +08:00
|
|
|
char **attrs,
|
1999-05-22 03:20:25 +08:00
|
|
|
int attrsonly,
|
1998-12-24 11:55:41 +08:00
|
|
|
LDAPControl **serverctrls,
|
|
|
|
LDAPControl **clientctrls,
|
|
|
|
struct timeval *timeout,
|
|
|
|
int sizelimit,
|
|
|
|
LDAPMessage **res ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_search LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *base,
|
|
|
|
int scope,
|
|
|
|
LDAP_CONST char *filter,
|
|
|
|
char **attrs,
|
|
|
|
int attrsonly ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_search_s LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *base,
|
|
|
|
int scope,
|
|
|
|
LDAP_CONST char *filter,
|
|
|
|
char **attrs,
|
|
|
|
int attrsonly,
|
|
|
|
LDAPMessage **res ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_search_st LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAP_CONST char *base,
|
|
|
|
int scope,
|
|
|
|
LDAP_CONST char *filter,
|
|
|
|
char **attrs,
|
|
|
|
int attrsonly,
|
|
|
|
struct timeval *timeout,
|
|
|
|
LDAPMessage **res ));
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* in unbind.c
|
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_unbind LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-05-30 01:42:49 +08:00
|
|
|
ldap_unbind_s LDAP_P(( /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
LDAP *ld ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_unbind_ext LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPControl **serverctrls,
|
|
|
|
LDAPControl **clientctrls));
|
1998-10-25 09:41:42 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_unbind_ext_s LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
LDAPControl **serverctrls,
|
|
|
|
LDAPControl **clientctrls));
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
/*
|
2002-08-08 11:01:14 +08:00
|
|
|
* in filter.c
|
1998-10-25 09:41:42 +08:00
|
|
|
*/
|
2002-06-09 14:12:24 +08:00
|
|
|
LDAP_F( int )
|
|
|
|
ldap_put_vrFilter LDAP_P((
|
|
|
|
BerElement *ber,
|
|
|
|
const char *vrf ));
|
1998-12-24 11:55:41 +08:00
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/*
|
|
|
|
* in free.c
|
|
|
|
*/
|
1999-05-25 04:55:47 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void * )
|
1999-05-29 09:19:14 +08:00
|
|
|
ldap_memalloc LDAP_P((
|
1999-06-19 07:53:05 +08:00
|
|
|
ber_len_t s ));
|
1999-05-29 09:19:14 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void * )
|
1999-05-29 09:19:14 +08:00
|
|
|
ldap_memrealloc LDAP_P((
|
|
|
|
void* p,
|
1999-06-19 07:53:05 +08:00
|
|
|
ber_len_t s ));
|
1999-05-29 09:19:14 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void * )
|
1999-05-29 09:19:14 +08:00
|
|
|
ldap_memcalloc LDAP_P((
|
1999-06-19 07:53:05 +08:00
|
|
|
ber_len_t n,
|
|
|
|
ber_len_t s ));
|
1999-05-29 09:19:14 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_memfree LDAP_P((
|
1999-05-29 09:19:14 +08:00
|
|
|
void* p ));
|
1999-05-19 09:12:33 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void )
|
1999-06-02 03:02:10 +08:00
|
|
|
ldap_memvfree LDAP_P((
|
|
|
|
void** v ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( char * )
|
1999-06-04 02:24:22 +08:00
|
|
|
ldap_strdup LDAP_P((
|
|
|
|
LDAP_CONST char * ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_mods_free LDAP_P((
|
|
|
|
LDAPMod **mods,
|
|
|
|
int freemods ));
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1998-12-24 11:55:41 +08:00
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
/*
|
|
|
|
* in sort.c
|
2001-12-28 07:01:17 +08:00
|
|
|
* (deprecated)
|
1998-10-25 09:41:42 +08:00
|
|
|
*/
|
2001-12-28 07:01:17 +08:00
|
|
|
typedef int (LDAP_SORT_AD_CMP_PROC) LDAP_P(( /* deprecated */
|
2000-06-11 01:31:56 +08:00
|
|
|
LDAP_CONST char *left,
|
|
|
|
LDAP_CONST char *right ));
|
|
|
|
|
2001-12-28 07:01:17 +08:00
|
|
|
typedef int (LDAP_SORT_AV_CMP_PROC) LDAP_P(( /* deprecated */
|
2000-06-11 01:31:56 +08:00
|
|
|
LDAP_CONST void *left,
|
|
|
|
LDAP_CONST void *right ));
|
|
|
|
|
2001-12-28 07:01:17 +08:00
|
|
|
LDAP_F( int ) /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_sort_entries LDAP_P(( LDAP *ld,
|
|
|
|
LDAPMessage **chain,
|
|
|
|
LDAP_CONST char *attr,
|
2000-06-11 01:31:56 +08:00
|
|
|
LDAP_SORT_AD_CMP_PROC *cmp ));
|
1999-05-19 09:12:33 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int ) /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_sort_values LDAP_P((
|
|
|
|
LDAP *ld,
|
|
|
|
char **vals,
|
2000-06-11 01:31:56 +08:00
|
|
|
LDAP_SORT_AV_CMP_PROC *cmp ));
|
1999-05-19 09:12:33 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int ) /* deprecated */
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_sort_strcasecmp LDAP_P((
|
|
|
|
LDAP_CONST void *a,
|
|
|
|
LDAP_CONST void *b ));
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* in url.c
|
|
|
|
*/
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_is_ldap_url LDAP_P((
|
|
|
|
LDAP_CONST char *url ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-07-20 03:32:47 +08:00
|
|
|
ldap_is_ldaps_url LDAP_P((
|
|
|
|
LDAP_CONST char *url ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-06-11 01:31:56 +08:00
|
|
|
ldap_is_ldapi_url LDAP_P((
|
|
|
|
LDAP_CONST char *url ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_url_parse LDAP_P((
|
|
|
|
LDAP_CONST char *url,
|
|
|
|
LDAPURLDesc **ludpp ));
|
|
|
|
|
2001-09-25 02:32:16 +08:00
|
|
|
LDAP_F( char * )
|
|
|
|
ldap_url_desc2str LDAP_P((
|
|
|
|
LDAPURLDesc *ludp ));
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void )
|
1999-05-19 09:12:33 +08:00
|
|
|
ldap_free_urldesc LDAP_P((
|
|
|
|
LDAPURLDesc *ludp ));
|
|
|
|
|
2001-12-24 11:49:54 +08:00
|
|
|
/*
|
|
|
|
* in sortctrl.c
|
2000-06-08 03:39:49 +08:00
|
|
|
*/
|
|
|
|
/*
|
2001-12-24 11:49:54 +08:00
|
|
|
* structure for a sort-key
|
2000-06-08 03:39:49 +08:00
|
|
|
*/
|
|
|
|
typedef struct ldapsortkey {
|
|
|
|
char * attributeType;
|
|
|
|
char * orderingRule;
|
|
|
|
int reverseOrder;
|
|
|
|
} LDAPSortKey;
|
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-06-11 01:31:56 +08:00
|
|
|
ldap_create_sort_keylist LDAP_P((
|
|
|
|
LDAPSortKey ***sortKeyList,
|
|
|
|
char *keyString ));
|
2000-06-08 03:39:49 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( void )
|
2000-06-08 03:39:49 +08:00
|
|
|
ldap_free_sort_keylist LDAP_P((
|
2000-06-11 01:31:56 +08:00
|
|
|
LDAPSortKey **sortkeylist ));
|
2000-06-08 03:39:49 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2001-12-24 11:49:54 +08:00
|
|
|
ldap_create_sort_control LDAP_P((
|
|
|
|
LDAP *ld,
|
2000-06-11 01:31:56 +08:00
|
|
|
LDAPSortKey **keyList,
|
|
|
|
int ctl_iscritical,
|
|
|
|
LDAPControl **ctrlp ));
|
2000-06-08 03:39:49 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2000-06-11 01:31:56 +08:00
|
|
|
ldap_parse_sort_control LDAP_P((
|
2001-12-24 11:49:54 +08:00
|
|
|
LDAP *ld,
|
|
|
|
LDAPControl **ctrlp,
|
2000-06-11 01:31:56 +08:00
|
|
|
unsigned long *result,
|
|
|
|
char **attribute ));
|
2000-06-08 03:39:49 +08:00
|
|
|
|
|
|
|
|
2001-12-24 11:49:54 +08:00
|
|
|
/*
|
|
|
|
* in vlvctrl.c
|
2000-06-08 03:39:49 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2002-06-09 14:12:24 +08:00
|
|
|
* structure for virtual list.
|
2000-06-08 03:39:49 +08:00
|
|
|
*/
|
|
|
|
typedef struct ldapvlvinfo {
|
2000-06-11 01:31:56 +08:00
|
|
|
int ldvlv_version;
|
2001-12-24 11:49:54 +08:00
|
|
|
unsigned long ldvlv_before_count;
|
|
|
|
unsigned long ldvlv_after_count;
|
|
|
|
unsigned long ldvlv_offset;
|
2000-06-08 03:39:49 +08:00
|
|
|
unsigned long ldvlv_count;
|
|
|
|
struct berval *ldvlv_attrvalue;
|
|
|
|
struct berval *ldvlv_context;
|
|
|
|
void *ldvlv_extradata;
|
|
|
|
} LDAPVLVInfo;
|
|
|
|
|
2001-12-24 11:49:54 +08:00
|
|
|
LDAP_F( int )
|
2000-06-11 01:31:56 +08:00
|
|
|
ldap_create_vlv_control LDAP_P((
|
2001-12-24 11:49:54 +08:00
|
|
|
LDAP *ld,
|
2000-06-11 01:31:56 +08:00
|
|
|
LDAPVLVInfo *ldvlistp,
|
|
|
|
LDAPControl **ctrlp ));
|
2000-06-08 03:39:49 +08:00
|
|
|
|
2000-06-19 03:48:07 +08:00
|
|
|
LDAP_F( int )
|
2001-12-24 11:49:54 +08:00
|
|
|
ldap_parse_vlv_control LDAP_P((
|
|
|
|
LDAP *ld,
|
2000-06-11 01:31:56 +08:00
|
|
|
LDAPControl **ctrls,
|
2001-12-24 11:49:54 +08:00
|
|
|
unsigned long *target_posp,
|
|
|
|
unsigned long *list_countp,
|
2000-06-11 01:31:56 +08:00
|
|
|
struct berval **contextp,
|
|
|
|
int *errcodep ));
|
|
|
|
|
2000-06-08 03:39:49 +08:00
|
|
|
|
2000-06-11 01:31:56 +08:00
|
|
|
LDAP_END_DECL
|
1998-08-09 08:43:13 +08:00
|
|
|
#endif /* _LDAP_H */
|