/* $OpenLDAP: pkg/ldap/include/ldap.h,v 1.168.2.16 2003/03/05 23:48:31 kurt Exp $ */
/*
* Copyright 1998-2003 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted only as authorized by the OpenLDAP
* Public License. A copy of this license is available at
* http://www.OpenLDAP.org/license.html or in file LICENSE in the
* top-level directory of the distribution.
*/
/* Portions
* Copyright (c) 1990 Regents of the University of Michigan.
* 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
/* pull in lber */
#include <lber.h>
/* include version and API feature defines */
#include <ldap_features.h>
LDAP_BEGIN_DECL
#define LDAP_VERSION1 1
#define LDAP_VERSION2 2
#define LDAP_VERSION3 3
#define LDAP_VERSION_MIN LDAP_VERSION2
#define LDAP_VERSION LDAP_VERSION2
#define LDAP_VERSION_MAX LDAP_VERSION3
/*
* We'll use 2000+draft revision for our API version number
* As such, the number will be above the old RFC but below
* whatever number does finally get assigned
*/
#define LDAP_API_VERSION 2004
#define LDAP_VENDOR_NAME "OpenLDAP"
/* OpenLDAP API Features */
#define LDAP_API_FEATURE_X_OPENLDAP LDAP_VENDOR_VERSION
#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
#define LDAP_PORT 389 /* ldap:/// default LDAP port */
#define LDAPS_PORT 636 /* ldaps:/// default LDAP over TLS port */
#define LDAP_ROOT_DSE ""
#define LDAP_NO_ATTRS "1.1"
#define LDAP_ALL_USER_ATTRIBUTES "*"
#define LDAP_ALL_OPERATIONAL_ATTRIBUTES "+" /* OpenLDAP extension */
/*
* 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
*/
#define LDAP_OPT_API_INFO 0x0000
#define LDAP_OPT_DESC 0x0001 /* deprecated */
#define LDAP_OPT_DEREF 0x0002
#define LDAP_OPT_SIZELIMIT 0x0003
#define LDAP_OPT_TIMELIMIT 0x0004
/* 0x05 - 0x07 not defined by current draft */
#define LDAP_OPT_REFERRALS 0x0008
#define LDAP_OPT_RESTART 0x0009
/* 0x0a - 0x10 not defined by current draft */
#define LDAP_OPT_PROTOCOL_VERSION 0x0011
#define LDAP_OPT_SERVER_CONTROLS 0x0012
#define LDAP_OPT_CLIENT_CONTROLS 0x0013
/* 0x14 not defined by current draft */
#define LDAP_OPT_API_FEATURE_INFO 0x0015
/* 0x16 - 0x2f not defined by current draft */
#define LDAP_OPT_HOST_NAME 0x0030
#define LDAP_OPT_ERROR_NUMBER 0x0031
#define LDAP_OPT_ERROR_STRING 0x0032
#define LDAP_OPT_MATCHED_DN 0x0033
/* 0x34 - 0x0fff not defined by current draft */
#define LDAP_OPT_PRIVATE_EXTENSION_BASE 0x4000 /* to 0x7FFF inclusive */
/* private and experimental options */
/* OpenLDAP specific options */
#define LDAP_OPT_DEBUG_LEVEL 0x5001 /* debug level */
#define LDAP_OPT_TIMEOUT 0x5002 /* default timeout */
#define LDAP_OPT_REFHOPLIMIT 0x5003 /* ref hop limit */
#define LDAP_OPT_NETWORK_TIMEOUT 0x5005 /* socket level timeout */
#define LDAP_OPT_URI 0x5006
#define LDAP_OPT_REFERRAL_URLS 0x5007 /* Referral URLs */
/* OpenLDAP TLS options */
#define LDAP_OPT_X_TLS 0x6000
#define LDAP_OPT_X_TLS_CTX 0x6001 /* SSL CTX */
#define LDAP_OPT_X_TLS_CACERTFILE 0x6002
#define LDAP_OPT_X_TLS_CACERTDIR 0x6003
#define LDAP_OPT_X_TLS_CERTFILE 0x6004
#define LDAP_OPT_X_TLS_KEYFILE 0x6005
#define LDAP_OPT_X_TLS_REQUIRE_CERT 0x6006
/* #define LDAP_OPT_X_TLS_PROTOCOL 0x6007 */
#define LDAP_OPT_X_TLS_CIPHER_SUITE 0x6008
#define LDAP_OPT_X_TLS_RANDOM_FILE 0x6009
#define LDAP_OPT_X_TLS_SSL_CTX 0x600a
#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
/* OpenLDAP SASL options */
#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
/* on/off values */
#define LDAP_OPT_ON ((void *) 1)
#define LDAP_OPT_OFF ((void *) 0)
/*
* 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.
*/
#define LDAP_OPT_SUCCESS 0
#define LDAP_OPT_ERROR (-1)
#define LDAP_API_INFO_VERSION (1)
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 */
char *ldapai_vendor_name; /* name of supplier */
int ldapai_vendor_version; /* supplier-specific version * 100 */
} LDAPAPIInfo;
#define LDAP_FEATURE_INFO_VERSION (1) /* version of api feature structure */
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;
typedef struct ldapcontrol {
char * ldctl_oid;
struct berval ldctl_value;
char ldctl_iscritical;
} LDAPControl;
/* LDAP Controls */
#define LDAP_CONTROL_VALUESRETURNFILTER "1.2.826.0.1.334810.2.3"
#define LDAP_CONTROL_SUBENTRIES "1.3.6.1.4.1.4203.1.10.1"
#define LDAP_CONTROL_NOOP "1.3.6.1.4.1.4203.1.10.2"
#define LDAP_CONTROL_MANAGEDSAIT "2.16.840.1.113730.3.4.2"
#define LDAP_CONTROL_PROXY_AUTHZ "2.16.840.1.113730.3.4.18"
#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"
/* LDAP Unsolicited Notifications */
#define LDAP_NOTICE_OF_DISCONNECTION "1.3.6.1.4.1.1466.20036"
#define LDAP_NOTICE_DISCONNECT LDAP_NOTICE_OF_DISCONNECTION
/* LDAP Extended Operations */
#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)
#define LDAP_EXOP_X_WHO_AM_I "1.3.6.1.4.1.4203.1.11.3"
/* 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
没有合适的资源?快使用搜索试试~ 我知道了~
openldap-2.1.17-DLL
共11个文件
h:5个
lib:2个
dll:2个
5星 · 超过95%的资源 需积分: 11 29 下载量 117 浏览量
2012-05-30
11:58:19
上传
评论
收藏 257KB RAR 举报
温馨提示
openldap-2.1.17以及cyrus-sasl的已编译dll和lib文件,cyrus-sasl的编译需要的是Berkeleydb-4.8.30(vs2008编译)和Win32OpenSSL-1_0_1c.exe。
资源推荐
资源详情
资源评论
收起资源包目录
openldap-2.1.17-DLLRelease.rar (11个子文件)
DLLRelease
openldap.dll 108KB
libsasl.lib 15KB
libsasl.dll 194KB
ldapCTest.ilk 453KB
openldap.lib 45KB
ldapCTest.exe 112KB
include
lber_types.h 2KB
ldap_features.h 2KB
lber.h 14KB
ldap_cdefs.h 9KB
ldap.h 41KB
共 11 条
- 1
资源评论
- sulphone2013-08-13好用,正式我所需要的。新版ldap确实改进了不少
- jxfengzi2013-10-12好用,正式我所需要的。新版ldap确实改进了不少
cxl20022002
- 粉丝: 1
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功