r18068: This splits the handling of multiple SASL packets between the GENSEC
[bbaumbach/samba-autobuild/.git] / source4 / auth / gensec / socket.h
1 /* 
2    Unix SMB/CIFS implementation.
3  
4    Generic Authentication Interface (socket wrapper)
5
6    Copyright (C) Andrew Bartlett <abartlet@samba.org> 2006
7    
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 2 of the License, or
11    (at your option) any later version.
12    
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17    
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23 NTSTATUS gensec_socket_init(struct gensec_security *gensec_security,
24                             struct socket_context *current_socket,
25                             struct event_context *ev,
26                             void (*recv_handler)(void *, uint16_t),
27                             void *recv_private,
28                             struct socket_context **new_socket);
29 /* These functions are for use here only (public because SPNEGO must
30  * use them for recursion) */
31 NTSTATUS gensec_wrap_packets(struct gensec_security *gensec_security, 
32                              TALLOC_CTX *mem_ctx, 
33                              const DATA_BLOB *in, 
34                              DATA_BLOB *out,
35                              size_t *len_processed);
36 /* These functions are for use here only (public because SPNEGO must
37  * use them for recursion) */
38 NTSTATUS gensec_unwrap_packets(struct gensec_security *gensec_security, 
39                                TALLOC_CTX *mem_ctx, 
40                                const DATA_BLOB *in, 
41                                DATA_BLOB *out,
42                                size_t *len_processed);
43
44 /* These functions are for use here only (public because SPNEGO must
45  * use them for recursion) */
46 NTSTATUS gensec_packet_full_request(struct gensec_security *gensec_security,
47                                     DATA_BLOB blob, size_t *size);
48