.\" DO NOT MODIFY THIS FILE! It was generated by gdoc. .TH "gnutls_init" 3 "3.1.4" "gnutls" "gnutls" .SH NAME gnutls_init \- API function .SH SYNOPSIS .B #include .sp .BI "int gnutls_init(gnutls_session_t * " session ", unsigned int " flags ");" .SH ARGUMENTS .IP "gnutls_session_t * session" 12 is a pointer to a \fBgnutls_session_t\fP structure. .IP "unsigned int flags" 12 indicate if this session is to be used for server or client. .SH "DESCRIPTION" This function initializes the current session to null. Every session must be initialized before use, so internal structures can be allocated. This function allocates structures which can only be free'd by calling \fBgnutls_deinit()\fP. Returns \fBGNUTLS_E_SUCCESS\fP (0) on success. \fIflags\fP can be one of \fBGNUTLS_CLIENT\fP and \fBGNUTLS_SERVER\fP. For a DTLS entity, the flags \fBGNUTLS_DATAGRAM\fP and \fBGNUTLS_NONBLOCK\fP are also available. The latter flag will enable a non\-blocking operation of the DTLS timers. Note that since version 3.1.2 this function enables some common TLS extensions such as session tickets and OCSP certificate status request in client side by default. To prevent that use the \fBGNUTLS_NO_EXTENSIONS\fP flag. .SH "RETURNS" \fBGNUTLS_E_SUCCESS\fP on success, or an error code. .SH "REPORTING BUGS" Report bugs to . .br General guidelines for reporting bugs: http://www.gnu.org/gethelp/ .br GnuTLS home page: http://www.gnu.org/software/gnutls/ .SH COPYRIGHT Copyright \(co 2012 Free Software Foundation, Inc.. .br Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. .SH "SEE ALSO" The full documentation for .B gnutls is maintained as a Texinfo manual. If the .B info and .B gnutls programs are properly installed at your site, the command .IP .B info gnutls .PP should give you access to the complete manual. As an alternative you may obtain the manual from: .IP .B http://www.gnu.org/software/gnutls/manual/ .PP