r17197: This patch moves the encryption of bulk data on SASL negotiated security
[ira/wip.git] / source4 / ldap_server / ldap_server.h
1 /* 
2    Unix SMB/CIFS implementation.
3    LDAP server
4    Copyright (C) Volker Lendecke 2004
5    Copyright (C) Stefan Metzmacher 2004
6    
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 2 of the License, or
10    (at your option) any later version.
11    
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16    
17    You should have received a copy of the GNU General Public License
18    along with this program; if not, write to the Free Software
19    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */
21
22 #include "libcli/ldap/ldap.h"
23 #include "lib/socket/socket.h"
24 #include "lib/stream/packet.h"
25
26 struct ldapsrv_connection {
27         struct stream_connection *connection;
28         struct gensec_security *gensec;
29         struct auth_session_info *session_info;
30         struct ldapsrv_service *service;
31         struct cli_credentials *server_credentials;
32         struct ldb_context *ldb;
33
34         BOOL global_catalog;
35
36         struct packet_context *packet;
37
38         struct {
39                 int initial_timeout;
40                 int conn_idle_time;
41                 int max_page_size;
42                 int search_timeout;
43                 
44                 struct timed_event *ite;
45                 struct timed_event *te;
46         } limits;
47 };
48
49 struct ldapsrv_call {
50         struct ldapsrv_connection *conn;
51         struct ldap_message *request;
52         struct ldapsrv_reply {
53                 struct ldapsrv_reply *prev, *next;
54                 struct ldap_message *msg;
55         } *replies;
56         packet_send_callback_fn_t send_callback;
57         void *send_private;
58 };
59
60 struct ldapsrv_service;
61
62 struct ldapsrv_service {
63         struct tls_params *tls_params;
64 };
65
66 #include "ldap_server/proto.h"