2 * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2008 Free Software Foundation
4 * Author: Nikos Mavrogiannopoulos
6 * This file is part of GNUTLS.
8 * The GNUTLS library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 2.1 of
11 * the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
25 int _gnutls_record_buffer_put (content_type_t type
,
26 gnutls_session_t session
, opaque
* data
,
28 int _gnutls_record_buffer_get_size (content_type_t type
,
29 gnutls_session_t session
);
30 int _gnutls_record_buffer_get (content_type_t type
,
31 gnutls_session_t session
, opaque
* data
,
33 ssize_t
_gnutls_io_read_buffered (gnutls_session_t
, opaque
** iptr
,
34 size_t n
, content_type_t
);
35 void _gnutls_io_clear_read_buffer (gnutls_session_t
);
36 int _gnutls_io_clear_peeked_data (gnutls_session_t session
);
38 ssize_t
_gnutls_io_write_buffered (gnutls_session_t
, const void *iptr
,
40 ssize_t
_gnutls_io_write_buffered2 (gnutls_session_t
, const void *iptr
,
41 size_t n
, const void *iptr2
, size_t n2
);
43 int _gnutls_handshake_buffer_get_size (gnutls_session_t session
);
44 int _gnutls_handshake_buffer_put (gnutls_session_t session
, opaque
* data
,
46 int _gnutls_handshake_buffer_clear (gnutls_session_t session
);
47 int _gnutls_handshake_buffer_empty (gnutls_session_t session
);
48 int _gnutls_handshake_buffer_get_ptr (gnutls_session_t session
,
49 opaque
** data_ptr
, size_t * length
);
51 #define _gnutls_handshake_io_buffer_clear( session) \
52 _gnutls_buffer_clear( &session->internals.handshake_send_buffer); \
53 _gnutls_buffer_clear( &session->internals.handshake_recv_buffer); \
54 session->internals.handshake_send_buffer_prev_size = 0
56 ssize_t
_gnutls_handshake_io_recv_int (gnutls_session_t
, content_type_t
,
57 gnutls_handshake_description_t
, void *,
59 ssize_t
_gnutls_handshake_io_send_int (gnutls_session_t
, content_type_t
,
60 gnutls_handshake_description_t
,
61 const void *, size_t);
62 ssize_t
_gnutls_io_write_flush (gnutls_session_t session
);
63 ssize_t
_gnutls_handshake_io_write_flush (gnutls_session_t session
);