1 .\" DO NOT MODIFY THIS FILE! It was generated by gdoc.
2 .TH "gnutls_server_name_get" 3 "2.12.6.1" "gnutls" "gnutls"
4 gnutls_server_name_get \- API function
6 .B #include <gnutls/gnutls.h>
8 .BI "int gnutls_server_name_get(gnutls_session_t " session ", void * " data ", size_t * " data_length ", unsigned int * " type ", unsigned int " indx ");"
10 .IP "gnutls_session_t session" 12
11 is a \fBgnutls_session_t\fP structure.
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
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.
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.
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.
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.
38 On success, \fBGNUTLS_E_SUCCESS\fP (zero) is returned,
39 otherwise an error code is returned.
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/
45 Copyright \(co 2008 Free Software Foundation.
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.
51 The full documentation for
53 is maintained as a Texinfo manual. If the
57 programs are properly installed at your site, the command
61 should give you access to the complete manual.