LDAP_BEGIN_DECL
-/* boolean, enumerations, and integers */
+/* booleans, enumerations, and integers */
typedef LBER_INT_T ber_int_t;
/* signed and unsigned versions */
typedef unsigned LBER_INT_T ber_uint_t;
/* tags */
-typedef LBER_TAG_T ber_tag_t;
+typedef unsigned LBER_TAG_T ber_tag_t;
/* "socket" descriptors */
typedef LBER_SOCKET_T ber_socket_t;
typedef unsigned LBER_LEN_T ber_len_t;
/* signed lengths */
-typedef LBER_LEN_T ber_slen_t;
+typedef signed LBER_LEN_T ber_slen_t;
/* Overview of LBER tag construction
LDAP_F( void )
ber_dump LDAP_P((
- LDAP_CONST BerElement *ber, int inout ));
+ BerElement *ber, int inout ));
LDAP_F( void )
ber_sos_dump LDAP_P((
- LDAP_CONST Seqorset *sos ));
+ Seqorset *sos ));
/*
LDAP_F( ber_tag_t )
ber_peek_tag LDAP_P((
- LDAP_CONST BerElement *ber,
+ BerElement *ber,
ber_len_t *len ));
LDAP_F( ber_tag_t )
LDAP_F( BerElement * )
ber_dup LDAP_P((
- LDAP_CONST BerElement *ber ));
+ BerElement *ber ));
LDAP_F( ber_tag_t )
ber_get_next LDAP_P((
LDAP_F( int )
ber_flatten LDAP_P((
- LDAP_CONST BerElement *ber,
+ BerElement *ber,
struct berval **bvPtr ));
/*
LDAP_F( int )
ber_get_option LDAP_P((
- LDAP_CONST void *item,
+ void *item,
int option,
void *outvalue));
* As such, the number will be above the old RFC but below
* whatever number does finally get assigned
*/
-#define LDAP_API_VERSION 2003
+#define LDAP_API_VERSION 2004
#define LDAP_VENDOR_NAME "OpenLDAP"
/* We'll eventually release as 200 */
-#define LDAP_VENDOR_VERSION 192
+#define LDAP_VENDOR_VERSION 193
/* OpenLDAP API Features */
#define LDAP_API_FEATURE_X_OPENLDAP LDAP_VENDOR_VERSION
#define LDAP_ROOT_DSE ""
#define LDAP_NO_ATTRS "1.1"
#define LDAP_ALL_USER_ATTRIBUTES "*"
-#define LDAP_ALL_OPERATIONAL_ATTRIBUTES "+"
+#define LDAP_ALL_OPERATIONAL_ATTRIBUTES "+" /* OpenLDAP extension */
/*
* LDAP_OPTions defined by draft-ldapext-ldap-c-api-02
* 0x4000 - 0x7fff reserved for private and experimental options
*/
#define LDAP_OPT_API_INFO 0x0000
-#define LDAP_OPT_DESC 0x0001
+#define LDAP_OPT_DESC 0x0001 /* deprecated */
#define LDAP_OPT_DEREF 0x0002
#define LDAP_OPT_SIZELIMIT 0x0003
#define LDAP_OPT_TIMELIMIT 0x0004
#define LDAP_OPT_HOST_NAME 0x0030
#define LDAP_OPT_ERROR_NUMBER 0x0031
#define LDAP_OPT_ERROR_STRING 0x0032
+#define LDAP_OPT_MATCHED_DN 0x0033
-/* 0x33 - 0x0fff not defined by current draft */
+/* 0x34 - 0x0fff not defined by current draft */
/* extended options - none */
#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_MATCHED_DN 0x5004 /* should have been in draft */
#define LDAP_OPT_NETWORK_TIMEOUT 0x5005 /* socket level timeout */
/* TLS options */
/* LDAP Controls */
/* chase referrals controls */
#define LDAP_CONTROL_REFERRALS "1.2.840.113666.1.4.616"
-#define LDAP_CHASE_SUBORDINATE_REFERRALS 0x0020
-#define LDAP_CHASE_EXTERNAL_REFERRALS 0x0040
+#define LDAP_CHASE_SUBORDINATE_REFERRALS 0x0020U
+#define LDAP_CHASE_EXTERNAL_REFERRALS 0x0040U
#define LDAP_CONTROL_MANAGEDSAIT "2.16.840.1.113730.3.4.2"
/* LDAP Unsolicited Notifications */
-#define LDAP_NOTICE_DISCONNECT "1.3.6.1.4.1.1466.20036"
+#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_RES_RENAME LDAP_RES_MODRDN /* application + constructed */
#define LDAP_RES_COMPARE (ber_tag_t) 0x6fU /* application + constructed */
#define LDAP_RES_EXTENDED (ber_tag_t) 0x78U /* V3: application + constructed */
-#define LDAP_RES_ANY ((ber_tag_t)(~0))
+
+#define LDAP_RES_ANY ((ber_tag_t)(-1))
+#define LDAP_RES_UNSOLICITED ((ber_tag_t)(0))
/* sasl methods */
/* 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
/* IMPORTANT: do not use code 0x1000 (or above),
* it is used internally by the backends!
* (see ldap/servers/slapd/slap.h)
- * JCG 05/1999 (gomez@engr.sgi.com)
*/
+
char *mod_type;
union mod_vals_u {
char **modv_strvals;
/*
* The API draft spec says we should declare (or cause to be declared)
- * 'struct timeval'. We don't. See LDAPext discussions.
+ * 'struct timeval'. We don't. See IETF LDAPext discussions.
*/
struct timeval;
*/
LDAP_F( int )
ldap_get_option LDAP_P((
- LDAP_CONST LDAP *ld,
+ LDAP *ld,
int option,
void *outvalue));