1gnutls_server_name_get(3)           gnutls           gnutls_server_name_get(3)
2
3
4

NAME

6       gnutls_server_name_get - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int   gnutls_server_name_get(gnutls_session_t  session,  void  *  data,
12       size_t * data_length, unsigned int * type, unsigned int indx);
13

ARGUMENTS

15       gnutls_session_t session
16                   is a gnutls_session_t structure.
17
18       void * data will hold the data
19
20       size_t * data_length
21                   will hold the data length. Must hold the  maximum  size  of
22                   data.
23
24       unsigned int * type
25                   will hold the server name indicator type
26
27       unsigned int indx
28                   is the index of the server_name
29

DESCRIPTION

31       This  function  will  allow  you to get the name indication (if any), a
32       client has sent.  The name indication may be  any  of  the  enumeration
33       gnutls_server_name_type_t.
34
35       If type is GNUTLS_NAME_DNS, then this function is to be used by servers
36       that support virtual hosting, and the data will be  a  null  terminated
37       UTF-8 string.
38
39       If data has not enough size to hold the server name GNUTLS_E_SHORT_MEM‐
40       ORY_BUFFER is returned, and data_length will hold the required size.
41
42       index is used to retrieve more than one server names (if  sent  by  the
43       client).   The first server name has an index of 0, the second 1 and so
44       on.     If    no    name    with     the     given     index     exists
45       GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE is returned.
46

RETURNS

48       On  success,  GNUTLS_E_SUCCESS  (zero)  is returned, otherwise an error
49       code is returned.
50

REPORTING BUGS

52       Report   bugs   to    <bug-gnutls@gnu.org>.     GnuTLS    home    page:
53       http://www.gnu.org/software/gnutls/  General  help  using GNU software:
54       http://www.gnu.org/gethelp/
55
57       Copyright © 2008 Free Software Foundation.
58       Copying and distribution of this file, with  or  without  modification,
59       are  permitted  in  any  medium  without royalty provided the copyright
60       notice and this notice are preserved.
61

SEE ALSO

63       The full documentation for gnutls is maintained as  a  Texinfo  manual.
64       If  the  info  and gnutls programs are properly installed at your site,
65       the command
66
67              info gnutls
68
69       should give you access to the complete manual.
70
71
72
73gnutls                             2.12.6.1          gnutls_server_name_get(3)
Impressum