]> git.sur5r.net Git - openldap/blob - servers/ldapd/common.h
Add missing ')' when HAVE_TCPD
[openldap] / servers / ldapd / common.h
1 /* $OpenLDAP$ */
2 /*
3  * Copyright (c) 1990 Regents of the University of Michigan.
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms are permitted
7  * provided that this notice is preserved and that due credit is given
8  * to the University of Michigan at Ann Arbor. The name of the University
9  * may not be used to endorse or promote products derived from this
10  * software without specific prior written permission. This software
11  * is provided ``as is'' without express or implied warranty.
12  */
13
14 #ifndef _LDAPD_COMMON_H
15 #define _LDAPD_COMMON_H 1
16
17 /*
18  * This structure represents an association to a dsa.  There is one of
19  * these for each association open (a new association is made for each
20  * new dsa, and for each dn).
21  */
22
23 struct conn {
24         int             c_ad;           /* association descriptor */
25         char            *c_dn;          /* the dn this asoc is bound as */
26         char            *c_cred;        /* corresponding pw */
27         long            c_credlen;
28         unsigned long   c_method;
29         struct PSAPaddr *c_paddr;       /* the dsa address */
30         int             c_time;         /* time this association inited */
31         int             c_refcnt;       /* number of ops referencing this ad */
32         struct conn     *c_next;
33 };
34
35 /*
36  * This structure represents a sequence of LDAPMod elements.
37  */
38 typedef struct LDAPModList {
39         LDAPMod                 m;
40         struct LDAPModList      *mod_next;
41 } LDAPModList;
42
43
44 /*
45  * This structure represents an outstanding request.  There is one of
46  * these for each client request for which we have not yet received a
47  * response from a dsa.
48  */
49
50 struct msg {
51         int             m_msgid;        /* the message id */
52         int             m_uniqid;       /* unique id for this message */
53         int             m_msgtype;      /* the ldap operation type */
54         LDAPModList     *m_mods;        /* for modify operations only */
55         BerElement      *m_ber;         /* the unparsed ber for the op */
56         struct conn     *m_conn;        /* connection structure */
57 #ifdef LDAP_CONNECTIONLESS
58         int             m_cldap;        /* connectionless transport? (CLDAP) */
59         struct sockaddr m_clientaddr;   /* client address (if using CLDAP) */
60         DN              m_searchbase;   /* base used in search */
61 #endif /* LDAP_CONNECTIONLESS */
62         struct msg      *m_next;
63 };
64
65 #define DEFAULT_TIMEOUT                 3600    /* idle client connections */
66 #define DEFAULT_REFERRAL_TIMEOUT        900     /* DSA connections */
67
68 #include "proto-ldapd.h"
69 #include "ldap_log.h"
70
71 /* from ISODE */
72 extern char     *dsa_address;
73 extern char     *bound_dn, *bound_pw;
74 struct PSAPaddr *psap_cpy(struct PSAPaddr *);
75
76 /* in association.c */
77 extern struct conn      *conns;
78
79 /* in main.c */
80 #ifdef LDAP_DEBUG
81 extern int      ldap_debug;
82 #endif
83 extern int      version;
84 #ifdef LDAP_COMPAT
85 extern int      ldap_compat;
86 #endif
87 extern int      dosyslog;
88 extern int      do_tcp;
89 #ifdef LDAP_CONNECTIONLESS
90 extern int      do_udp;
91 #endif
92 extern int      idletime;
93 extern int      referral_connection_timeout;
94 extern struct timeval   conn_start_tv;
95 #ifdef HAVE_KERBEROS
96 extern char     *krb_ldap_service;
97 extern char     *krb_x500_service;
98 extern char     *krb_x500_instance;
99 extern char     *krb_x500_nonce;
100 extern char     *kerberos_keyfile;
101 #endif
102
103 /* syntax.c */
104 extern short    ldap_photo_syntax;
105 extern short    ldap_jpeg_syntax;
106 extern short    ldap_jpeg_nonfile_syntax;
107 extern short    ldap_audio_syntax;
108 extern short    ldap_dn_syntax;
109 extern short    ldap_postaladdress_syntax;
110 extern short    ldap_acl_syntax;
111 extern short    ldap_mtai_syntax;
112 extern short    ldap_rts_cred_syntax;
113 extern short    ldap_rtl_syntax;
114 extern short    ldap_mailbox_syntax;
115 extern short    ldap_caseignorelist_syntax;
116 extern short    ldap_caseexactstring_syntax;
117 extern short    ldap_certif_syntax;
118 extern short    ldap_iattr_syntax;
119 extern short    ldap_telex_syntax;
120 extern short    ldap_octetstring_syntax;
121 extern short    ldap_deliverymethod_syntax;
122 extern short    ldap_facsimileTelephoneNumber_syntax;
123 extern short    ldap_presentationAddress_syntax;
124 extern short    ldap_teletexTerminalIdentifier_syntax;
125 extern short    ldap_searchGuide_syntax;
126 extern short    ldap_dLSubmitPermission_syntax;
127
128 /* Version.c */
129 extern char     Versionstr[];
130
131 #endif