r23792: convert Samba4 to GPLv3
[kai/samba-autobuild/.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 3 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, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include "libcli/ldap/ldap.h"
22 #include "lib/socket/socket.h"
23 #include "lib/stream/packet.h"
24
25 struct ldapsrv_connection {
26         struct stream_connection *connection;
27         struct gensec_security *gensec;
28         struct auth_session_info *session_info;
29         struct ldapsrv_service *service;
30         struct cli_credentials *server_credentials;
31         struct ldb_context *ldb;
32
33         struct {
34                 struct socket_context *raw;
35                 struct socket_context *tls;
36                 struct socket_context *sasl;
37         } sockets;
38
39         BOOL global_catalog;
40
41         struct packet_context *packet;
42
43         struct {
44                 int initial_timeout;
45                 int conn_idle_time;
46                 int max_page_size;
47                 int search_timeout;
48                 
49                 struct timed_event *ite;
50                 struct timed_event *te;
51         } limits;
52 };
53
54 struct ldapsrv_call {
55         struct ldapsrv_connection *conn;
56         struct ldap_message *request;
57         struct ldapsrv_reply {
58                 struct ldapsrv_reply *prev, *next;
59                 struct ldap_message *msg;
60         } *replies;
61         packet_send_callback_fn_t send_callback;
62         void *send_private;
63 };
64
65 struct ldapsrv_service {
66         struct tls_params *tls_params;
67 };
68
69 #include "ldap_server/proto.h"