LDAP_BEGIN_DECL
#define LDAP_PORT 389
+
#define LDAP_VERSION1 1
#define LDAP_VERSION2 2
#define LDAP_VERSION3 3
+
#define LDAP_VERSION LDAP_VERSION2
+#define LDAP_VERSION_MIN LDAP_VERSION2
#define LDAP_VERSION_MAX LDAP_VERSION2
/*
* whatever number does finally get assigned
*/
#define LDAP_API_VERSION 2001
-#define LDAP_VENDOR "OpenLDAP"
+#define LDAP_VENDOR_NAME "OpenLDAP"
/* We'll eventually release as 200 */
#define LDAP_VENDOR_VERSION 190
+/* include LDAP_API_FEATURE defines */
+#include <ldap_features.h>
+
#define LDAP_COMPAT20
#define LDAP_COMPAT30
#if defined(LDAP_COMPAT20) || defined(LDAP_COMPAT30)
#define LDAP_OPT_SUCCESS 0
#define LDAP_OPT_ERROR (-1)
+#ifdef LDAP_DEBUG
extern int ldap_debug;
+#endif
+#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 times 100 */
+ int ldapai_vendor_version; /* supplier-specific version * 100 */
} LDAPAPIInfo;
typedef struct ldapcontrol {
#define NULLMSG ((LDAPMessage *) NULL)
-#ifdef LDAP_REFERRALS
+#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
/*
* structure for tracking LDAP server host, ports, DNs, etc.
*/
struct ldapreq *lr_prev; /* previous request */
struct ldapreq *lr_next; /* next request */
} LDAPRequest;
-#endif /* LDAP_REFERRALS */
+#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS */
/*
/* avoid pulling in headers */
struct timeval;
+/*
+ * in options.c:
+ */
LDAP_F int ldap_get_option LDAP_P((LDAP *ld, int option, void *outvalue));
LDAP_F int ldap_set_option LDAP_P((LDAP *ld, int option, void *invalue));
+/* Not yet */
LDAP_F void ldap_control_free LDAP_P(( LDAPControl *ctrl ));
LDAP_F void ldap_controls_free LDAP_P(( LDAPControl **ctrls ));
LDAP_F char *ldap_get_dn LDAP_P(( LDAP *ld, LDAPMessage *entry ));
LDAP_F char *ldap_dn2ufn LDAP_P(( char *dn ));
LDAP_F char **ldap_explode_dn LDAP_P(( char *dn, int notypes ));
+LDAP_F char **ldap_explode_rdn LDAP_P(( char *rdn, int notypes ));
LDAP_F char **ldap_explode_dns LDAP_P(( char *dn ));
LDAP_F int ldap_is_dns_dn LDAP_P(( char *dn ));
*/
LDAP_F int ldap_result LDAP_P(( LDAP *ld, int msgid, int all,
struct timeval *timeout, LDAPMessage **result ));
+LDAP_F int ldap_msgtype LDAP_P(( LDAPMessage *lm ));
+LDAP_F int ldap_msgid LDAP_P(( LDAPMessage *lm ));
LDAP_F int ldap_msgfree LDAP_P(( LDAPMessage *lm ));
LDAP_F int ldap_msgdelete LDAP_P(( LDAP *ld, int msgid ));
* in sort.c
*/
LDAP_F int ldap_sort_entries LDAP_P(( LDAP *ld,
- LDAPMessage **chain, char *attr, int (*cmp) () ));
+ LDAPMessage **chain, char *attr,
+ int (*cmp) (const char *, const char *) ));
LDAP_F int ldap_sort_values LDAP_P(( LDAP *ld,
- char **vals, int (*cmp) LDAP_P((const void *, const void *)) ));
-LDAP_F int ldap_sort_strcasecmp LDAP_P(( char **a, char **b ));
+ char **vals, int (*cmp) (const void *, const void *) ));
+LDAP_F int ldap_sort_strcasecmp LDAP_P(( const void *a, const void *b ));
/*