Commit 43f29c3c authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

More header work toward draft-ietf-ldapext-ldap-c-api-01.

parent 70210970
......@@ -30,6 +30,12 @@
#include "lber.h"
#include "ldap.h"
#if LDAP_VERSION < LDAP_VERSION3
/* quick fix until we have ldap_set_options */
#include "../libraries/libldap/ldap-int.h"
#endif
#include <ldapconfig.h>
#define USER 0
......
......@@ -26,6 +26,11 @@
#include <lber.h>
#include <ldap.h>
#if LDAP_VERSION < LDAP_VERSION3
/* quick fix until we have ldap_set_options */
#include "../libraries/libldap/ldap-int.h"
#endif
#include <ldapconfig.h>
#define DEFAULT_PORT 79
......
......@@ -27,6 +27,12 @@
#include "lber.h"
#include "ldap.h"
#if LDAP_VERSION < LDAP_VERSION3
/* quick fix until we have ldap_set_options */
#include "../libraries/libldap/ldap-int.h"
#endif
#include "disptmpl.h"
#include "ldapconfig.h"
......
......@@ -32,6 +32,12 @@
#include "ldapconfig.h"
#include "lber.h"
#include "ldap.h"
#if LDAP_VERSION < LDAP_VERSION3
/* quick fix until we have ldap_set_options */
#include "../libraries/libldap/ldap-int.h"
#endif
#include "disptmpl.h"
int debug;
......
......@@ -31,6 +31,12 @@
#include "lber.h"
#include "ldap.h"
#if LDAP_VERSION < LDAP_VERSION3
/* quick fix until we have ldap_set_options */
#include "../libraries/libldap/ldap-int.h"
#endif
#include "disptmpl.h"
#include "ldapconfig.h"
......
......@@ -30,6 +30,12 @@
#include "lber.h"
#include "ldap.h"
#if LDAP_VERSION < LDAP_VERSION3
/* quick fix until we have ldap_set_options */
#include "../libraries/libldap/ldap-int.h"
#endif
#include "ldapconfig.h"
#define USER 0x01
......
......@@ -17,6 +17,12 @@
#include "lber.h"
#include "ldap.h"
#if LDAP_VERSION < LDAP_VERSION3
/* quick fix until we have ldap_set_options */
#include "../libraries/libldap/ldap-int.h"
#endif
#include "disptmpl.h"
#include "rcpt500.h"
......
......@@ -35,6 +35,7 @@
#include <lber.h>
#include <ldap.h>
#include <ldapconfig.h>
#include "ud.h"
......
......@@ -12,6 +12,11 @@
#include "portable.h"
#if LDAP_VERSION < LDAP_VERSION3
/* quick fix until we have ldap_set_options */
#include "../libraries/libldap/ldap-int.h"
#endif
#ifdef DOS
#define MAX_VALUES 8
#else
......
......@@ -83,6 +83,9 @@ typedef struct berelement BerElement;
typedef struct sockbuf Sockbuf;
#define READBUFSIZ 8192
typedef struct seqorset Seqorset;
#define NULLSEQORSET ((Seqorset *) 0)
/* structure for returning a sequence of octet strings + length */
struct berval {
unsigned long bv_len;
......
......@@ -54,8 +54,7 @@ LDAP_BEGIN_DECL
#define LDAP_OPT_SUCCESS 0
#define LDAP_OPT_ERROR (-1)
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));
extern int ldap_debug;
typedef struct ldapapiinfo {
int ldapai_info_version; /* version of LDAPAPIInfo (1) */
......@@ -72,10 +71,6 @@ typedef struct ldapcontrol {
char ldctl_iscritical;
} LDAPControl, *PLDAPControl;
LDAP_F void ldap_control_free LDAP_P(( LDAPControl *ctrl ));
LDAP_F void ldap_controls_free LDAP_P(( LDAPControl **ctrls ));
#define LDAP_MAX_ATTR_LEN 100
/*
......@@ -457,6 +452,12 @@ typedef struct ldap_url_desc {
in function param list warning */
typedef struct timeval LDAPtv;
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));
LDAP_F void ldap_control_free LDAP_P(( LDAPControl *ctrl ));
LDAP_F void ldap_controls_free LDAP_P(( LDAPControl **ctrls ));
/*
* in abandon.c:
*/
......
......@@ -63,4 +63,4 @@ extern void Debug( int level, char* fmt, ... );
LDAP_END_DECL
#endif /* _LDAP_H */
#endif /* _LDAP_LOG_H */
......@@ -17,7 +17,7 @@
LDAP_BEGIN_DECL
typedef struct berelement {
struct berelement {
char *ber_buf;
char *ber_ptr;
char *ber_end;
......@@ -32,10 +32,10 @@ typedef struct berelement {
char *ber_rwptr;
BERTranslateProc ber_encode_translate_proc;
BERTranslateProc ber_decode_translate_proc;
} BerElement;
};
#define NULLBER ((BerElement *) 0)
typedef struct sockbuf {
struct sockbuf {
#ifndef MACOS
int sb_sd;
#else /* MACOS */
......@@ -56,17 +56,17 @@ typedef struct sockbuf {
#define LBER_NO_READ_AHEAD 0x08 /* read only as much as requested */
int sb_fd;
long sb_max_incoming;
} Sockbuf;
};
#define READBUFSIZ 8192
typedef struct seqorset {
struct seqorset {
BerElement *sos_ber;
unsigned long sos_clen;
unsigned long sos_tag;
char *sos_first;
char *sos_ptr;
struct seqorset *sos_next;
} Seqorset;
};
#define NULLSEQORSET ((Seqorset *) 0)
#endif /* _LBER_INT_H */
......@@ -5,6 +5,8 @@
* ldap-int.h - defines & prototypes internal to the LDAP library
*/
#ifndef _LDAP_INT_H
#define _LDAP_INT_H 1
#include "../liblber/lber-int.h"
#include "ldap_log.h"
......@@ -34,20 +36,20 @@ LDAP_BEGIN_DECL
* where a response has multiple messages.
*/
typedef struct ldapmsg {
struct ldapmsg {
int lm_msgid; /* the message id */
int lm_msgtype; /* the message type */
BerElement *lm_ber; /* the ber encoded message contents */
struct ldapmsg *lm_chain; /* for search - next msg in the resp */
struct ldapmsg *lm_next; /* next response */
unsigned int lm_time; /* used to maintain cache */
} LDAPMessage;
};
/*
* structure representing an ldap connection
*/
typedef struct ldap {
struct ldap {
Sockbuf ld_sb; /* socket descriptor & buffer */
char *ld_host;
int ld_version;
......@@ -95,7 +97,7 @@ typedef struct ldap {
char **passwdp, int *authmethodp, int freeit );
/* routine to get info needed for re-bind */
#endif /* LDAP_REFERRALS */
} LDAP;
};
/*
* in cache.c
......@@ -210,3 +212,5 @@ int ldap_8859_to_t61( char **bufp, unsigned long *buflenp, int free_input );
LDAP_END_DECL
#endif /* STR_TRANSLATION && LDAP_DEFAULT_CHARSET */
#endif /* _LDAP_INT_H */
......@@ -20,9 +20,6 @@
#include <fcntl.h>
#include "lber.h"
#include "ldap.h"
/* including the "internal" defs is legit and nec. since this test routine has
* a-priori knowledge of libldap internal workings.
* hodges@stanford.edu 5-Feb-96
......
......@@ -8,9 +8,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/ctype.h>
#include <ac/string.h>
#include <ac/time.h>
#ifdef HAVE_SYS_FILE_H
......@@ -18,7 +17,8 @@
#endif
#include "lber.h"
#include "ldap.h"
#include "ldap-int.h"
#include "ldap_log.h"
#include "disptmpl.h"
#include "ldapconfig.h"
......
......@@ -17,6 +17,10 @@
#include "avl.h"
#include "lber.h"
#include "ldap.h"
#include "ldap_log.h"
#include "../libraries/libldap/ldap-int.h"
#include "lthread.h"
#include "lthread_rdwr.h"
#include "ldif.h"
......
......@@ -26,6 +26,8 @@
#include "lber.h"
#include "ldap.h"
#include "ldap_log.h"
#include "../libraries/libldap/ldap-int.h"
#include "lthread.h"
#include "ldapconfig.h"
#include "ldif.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment