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