r23792: convert Samba4 to GPLv3
[samba.git] / source / 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 3 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, see <http://www.gnu.org/licenses/>.
20 */
21
22 struct gensec_security;
23 struct socket_context;
24
25 NTSTATUS gensec_socket_init(struct gensec_security *gensec_security,
26                             struct socket_context *current_socket,
27                             struct event_context *ev,
28                             void (*recv_handler)(void *, uint16_t),
29                             void *recv_private,
30                             struct socket_context **new_socket);
31 /* These functions are for use here only (public because SPNEGO must
32  * use them for recursion) */
33 NTSTATUS gensec_wrap_packets(struct gensec_security *gensec_security, 
34                              TALLOC_CTX *mem_ctx, 
35                              const DATA_BLOB *in, 
36                              DATA_BLOB *out,
37                              size_t *len_processed);
38 /* These functions are for use here only (public because SPNEGO must
39  * use them for recursion) */
40 NTSTATUS gensec_unwrap_packets(struct gensec_security *gensec_security, 
41                                TALLOC_CTX *mem_ctx, 
42                                const DATA_BLOB *in, 
43                                DATA_BLOB *out,
44                                size_t *len_processed);
45
46 /* These functions are for use here only (public because SPNEGO must
47  * use them for recursion) */
48 NTSTATUS gensec_packet_full_request(struct gensec_security *gensec_security,
49                                     DATA_BLOB blob, size_t *size);
50