Tizen 2.0 Release
[external/libgnutls26.git] / doc / manpages / gnutls_server_name_get.3
1 .\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
2 .TH "gnutls_server_name_get" 3 "2.12.6.1" "gnutls" "gnutls"
3 .SH NAME
4 gnutls_server_name_get \- API function
5 .SH SYNOPSIS
6 .B #include <gnutls/gnutls.h>
7 .sp
8 .BI "int gnutls_server_name_get(gnutls_session_t " session ", void * " data ", size_t * " data_length ", unsigned int * " type ", unsigned int " indx ");"
9 .SH ARGUMENTS
10 .IP "gnutls_session_t session" 12
11 is a \fBgnutls_session_t\fP structure.
12 .IP "void * data" 12
13 will hold the data
14 .IP "size_t * data_length" 12
15 will hold the data length. Must hold the maximum size of data.
16 .IP "unsigned int * type" 12
17 will hold the server name indicator type
18 .IP "unsigned int indx" 12
19 is the index of the server_name
20 .SH "DESCRIPTION"
21 This function will allow you to get the name indication (if any), a
22 client has sent.  The name indication may be any of the enumeration
23 gnutls_server_name_type_t.
24
25 If \fItype\fP is GNUTLS_NAME_DNS, then this function is to be used by
26 servers that support virtual hosting, and the data will be a null
27 terminated UTF\-8 string.
28
29 If \fIdata\fP has not enough size to hold the server name
30 GNUTLS_E_SHORT_MEMORY_BUFFER is returned, and \fIdata_length\fP will
31 hold the required size.
32
33 \fIindex\fP is used to retrieve more than one server names (if sent by
34 the client).  The first server name has an index of 0, the second 1
35 and so on.  If no name with the given index exists
36 GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE is returned.
37 .SH "RETURNS"
38 On success, \fBGNUTLS_E_SUCCESS\fP (zero) is returned,
39 otherwise an error code is returned.
40 .SH "REPORTING BUGS"
41 Report bugs to <bug-gnutls@gnu.org>.
42 GnuTLS home page: http://www.gnu.org/software/gnutls/
43 General help using GNU software: http://www.gnu.org/gethelp/
44 .SH COPYRIGHT
45 Copyright \(co 2008 Free Software Foundation.
46 .br
47 Copying and distribution of this file, with or without modification,
48 are permitted in any medium without royalty provided the copyright
49 notice and this notice are preserved.
50 .SH "SEE ALSO"
51 The full documentation for
52 .B gnutls
53 is maintained as a Texinfo manual.  If the
54 .B info
55 and
56 .B gnutls
57 programs are properly installed at your site, the command
58 .IP
59 .B info gnutls
60 .PP
61 should give you access to the complete manual.