s4-kdc: Move KDC socket structs to krb5-server.h
[Samba.git] / source4 / kdc / kdc-server.h
blob284a4ec8b40a47edb803eda49508b5e52662fc18
1 /*
2 Unix SMB/CIFS implementation.
4 KDC related functions
6 Copyright (c) 2005-2008 Andrew Bartlett <abartlet@samba.org>
7 Copyright (c) 2005 Andrew Tridgell <tridge@samba.org>
8 Copyright (c) 2005 Stefan Metzmacher <metze@samba.org>
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>.
24 #ifndef _KDC_SERVER_H
25 #define _KDC_SERVER_H
27 #include "system/kerberos.h"
29 struct tsocket_address;
32 * Context structure for the kdc server
34 struct kdc_server {
35 struct task_server *task;
36 struct smb_krb5_context *smb_krb5_context;
37 struct samba_kdc_base_context *base_ctx;
38 struct ldb_context *samdb;
39 bool am_rodc;
40 uint32_t proxy_timeout;
41 void *private_data;
44 typedef enum kdc_code_e {
45 KDC_OK = 0,
46 KDC_ERROR,
47 KDC_PROXY_REQUEST
48 } kdc_code;
50 typedef kdc_code (*kdc_process_fn_t)(struct kdc_server *kdc,
51 TALLOC_CTX *mem_ctx,
52 DATA_BLOB *request,
53 DATA_BLOB *reply,
54 struct tsocket_address *remote_address,
55 struct tsocket_address *local_address,
56 int datagram);
58 /* Information about one kdc socket */
59 struct kdc_socket {
60 struct kdc_server *kdc;
61 struct tsocket_address *local_address;
62 kdc_process_fn_t process;
65 /* Information about one kdc/kpasswd udp socket */
66 struct kdc_udp_socket {
67 struct kdc_socket *kdc_socket;
68 struct tdgram_context *dgram;
69 struct tevent_queue *send_queue;
72 #endif /* _KDC_SERVER_H */