ldap-int.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright 1995-2002 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Copyright (c) 1995 Regents of the University of Michigan.
* All rights reserved.
*
* ldap-int.h - defines & prototypes internal to the LDAP library
*/
#include <stdlib.h> /* rri */
#include <pthread.h> /* rri */
#define LDAP_URL_PREFIX "ldap://"
#define LDAP_URL_PREFIX_LEN 7
#define LDAP_URL_URLCOLON "URL:"
#define LDAP_URL_URLCOLON_LEN 4
#ifdef LDAP_REFERRALS
#define LDAP_REF_STR "Referral:\n"
#define LDAP_REF_STR_LEN 10
#define LDAP_LDAP_REF_STR LDAP_URL_PREFIX
#ifdef LDAP_DNS
#define LDAP_DX_REF_STR "dx://"
#define LDAP_DX_REF_STR_LEN 5
#endif /* LDAP_DNS */
#endif /* LDAP_REFERRALS */
/*
* in cache.c
*/
#ifdef NEEDPROTOS
BerElement *request );
#else /* NEEDPROTOS */
void add_request_to_cache();
void add_result_to_cache();
int check_cache();
#endif /* NEEDPROTOS */
#ifdef KERBEROS
/*
* in kerberos.c
*/
#ifdef NEEDPROTOS
int *len );
#else /* NEEDPROTOS */
char *get_kerberosv4_credentials();
#endif /* NEEDPROTOS */
#endif /* KERBEROS */
/*
* in notif.c
*/
/*
* in open.c
*/
int ldap_thr_index(); /* rri */
#ifdef NEEDPROTOS
char **krbinstancep, int async );
#else /* NEEDPROTOS */
int open_default_ldap_connection();
int open_ldap_connection();
#endif /* NEEDPROTOS */
/*
* in options.c
*/
/*
* in os-ip.c
*/
#ifdef NEEDPROTOS
int async, int bindTimeout);
#else /* NEEDPROTOS */
int connect_to_host();
void close_connection();
#endif /* NEEDPROTOS */
#ifdef KERBEROS
#ifdef NEEDPROTOS
#else /* NEEDPROTOS */
char *host_connected_to();
#endif /* NEEDPROTOS */
#endif /* KERBEROS */
#ifdef LDAP_REFERRALS
#ifdef NEEDPROTOS
void *new_select_info( void );
void free_select_info( void *sip );
#else /* NEEDPROTOS */
int do_ldap_select();
void *new_select_info();
void free_select_info();
void mark_select_write();
void mark_select_read();
void mark_select_clear();
long is_read_ready();
long is_write_ready();
#endif /* NEEDPROTOS */
#endif /* LDAP_REFERRALS */
/*
* in regex.c (rri)
*/
/*
* in request.c
*/
#ifdef NEEDPROTOS
#else /* NEEDPROTOS */
int send_initial_request();
void set_ber_options();
#endif /* NEEDPROTOS */
#if defined( LDAP_REFERRALS ) || defined( LDAP_DNS )
#ifdef NEEDPROTOS
int bind );
#else /* NEEDPROTOS */
int send_server_request();
void free_request();
void free_connection();
void dump_connection();
void dump_requests_and_responses();
#endif /* NEEDPROTOS */
#endif /* LDAP_REFERRALS || LDAP_DNS */
#ifdef LDAP_REFERRALS
#ifdef NEEDPROTOS
char ** ldap_errormsg2referrals(char *errmsg);
char *ldap_referral2error_msg(char ** refs);
#else /* NEEDPROTOS */
int chase_referrals();
char ** ldap_errormsg2referrals();
char *ldap_referral2error_msg();
int append_referral();
#endif /* NEEDPROTOS */
#endif /* LDAP_REFERRALS */
/*
* in search.c
*/
#ifdef NEEDPROTOS
#else /* NEEDPROTOS */
#endif /* NEEDPROTOS */
/*
* in unbind.c
*/
#ifdef NEEDPROTOS
#else /* NEEDPROTOS */
int ldap_ld_free();
int send_unbind();
#endif /* NEEDPROTOS */
#ifdef LDAP_DNS
/*
* in getdxbyname.c
*/
#ifdef NEEDPROTOS
char **getdxbyname( char *domain );
#else /* NEEDPROTOS */
char **getdxbyname();
#endif /* NEEDPROTOS */
#endif /* LDAP_DNS */
/*
*/
#ifdef NEEDPROTOS
#else
#endif
/* add.c */
#ifdef NEEDPROTOS
#else
#endif
/*
*/
#ifdef NEEDPROTOS
BerElement * ldap_build_compare_req(LDAP *ld, char *dn, char *attr, struct berval *bvalue, LDAPControl **serverctrls);
#else
#endif
/*
* delete.c
*/
#ifdef NEEDPROTOS
#else
#endif
/*
* extop.c
*/
#ifdef NEEDPROTOS
BerElement * ldap_build_extended_operation_req(LDAP *ld, char *exoid, struct berval *exdata, LDAPControl ** serverctrls);
#else
#endif
/*
* modify.c
*/
#ifdef NEEDPROTOS
#else
#endif
/*
* rename.c
*/
#ifdef NEEDPROTOS
BerElement * ldap_build_rename_req ( LDAP *ld, char *dn, char *newrdn, char *newparent, int deleteoldrdn, LDAPControl **serverctrls);
#else
#endif
/*
*/
#ifdef NEEDPROTOS
BerElement * ldap_build_sasl_bind_req( LDAP *ld, char *dn, char *mechanism, struct berval *creds, LDAPControl ** serverctrls);
#else
#endif
/*
* sbind.c
*/
#ifdef NEEDPROTOS
BerElement * ldap_build_simple_bind_req(LDAP *ld, char *dn, char *passwd, LDAPControl **serverctrls);
#else
#endif
/*
* utils.c
*/
#ifdef NEEDPROTOS
void free_strarray(char **sap);
#else
void free_strarray();
#endif
/*
*/
#ifdef NEEDPROTOS
#else
LDAPControl ** ldap_controls_dup();
int ldap_controls_code ();
int ldap_build_control();
#endif
/*
*/
#ifdef NEEDPROTOS
#else
int ber_flush();
unsigned int ber_get_next();
#endif