]> git.sur5r.net Git - openldap/blob - servers/ldapd/common.h
Wrap $CC with quotes.
[openldap] / servers / ldapd / common.h
1 /*
2  * Copyright (c) 1990 Regents of the University of Michigan.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms are permitted
6  * provided that this notice is preserved and that due credit is given
7  * to the University of Michigan at Ann Arbor. The name of the University
8  * may not be used to endorse or promote products derived from this
9  * software without specific prior written permission. This software
10  * is provided ``as is'' without express or implied warranty.
11  */
12
13 /*
14  * This structure represents an association to a dsa.  There is one of
15  * these for each association open (a new association is made for each
16  * new dsa, and for each dn).
17  */
18
19 struct conn {
20         int             c_ad;           /* association descriptor */
21         char            *c_dn;          /* the dn this asoc is bound as */
22         char            *c_cred;        /* corresponding pw */
23         long            c_credlen;
24         unsigned long   c_method;
25         struct PSAPaddr *c_paddr;       /* the dsa address */
26         int             c_time;         /* time this association inited */
27         int             c_refcnt;       /* number of ops referencing this ad */
28         struct conn     *c_next;
29 };
30
31 /*
32  * This structure represents an outstanding request.  There is one of
33  * these for each client request for which we have not yet received a
34  * response from a dsa.
35  */
36
37 struct msg {
38         int             m_msgid;        /* the message id */
39         int             m_uniqid;       /* unique id for this message */
40         int             m_msgtype;      /* the ldap operation type */
41         LDAPMod         *m_mods;        /* for modify operations only */
42         BerElement      *m_ber;         /* the unparsed ber for the op */
43         struct conn     *m_conn;        /* connection structure */
44 #ifdef CLDAP
45         int             m_cldap;        /* connectionless transport? (CLDAP) */
46         struct sockaddr m_clientaddr;   /* client address (if using CLDAP) */
47         DN              m_searchbase;   /* base used in search */
48 #endif /* CLDAP */
49         struct msg      *m_next;
50 };
51
52 #define DEFAULT_TIMEOUT                 3600    /* idle client connections */
53 #define DEFAULT_REFERRAL_TIMEOUT        900     /* DSA connections */
54
55 #ifdef NEEDPROTOS
56 #include "proto-ldapd.h"
57 #else
58 extern struct msg *add_msg();
59 extern struct msg *get_msg();
60 extern struct msg *get_cldap_msg();
61 extern int        del_msg();
62
63 extern struct conn *conn_getfd();
64 extern struct conn *conn_find();
65 extern struct conn *conn_dup();
66 extern void conn_del();
67
68 extern AttributeValue ldap_str2AttrV();
69 extern DN ldap_str2dn();
70 extern void ldap_str2alg();
71 extern void ldap_print_algid();
72 #endif /* don't need protos */