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
36       servers that support virtual hosting, and the data will be a null  ter‐
37       minated UTF-8 string.
38
39       If    data   has   not   enough   size   to   hold   the   server  name
40       GNUTLS_E_SHORT_MEMORY_BUFFER is returned, and   data_length  will  hold
41       the required size.
42
43        index  is  used to retrieve more than one server names (if sent by the
44       client).  The first server name has an index of 0, the second 1 and  so
45       on.      If     no     name     with    the    given    index    exists
46       GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE is returned.
47

RETURNS

49       On success, GNUTLS_E_SUCCESS (0)  is  returned,  otherwise  a  negative
50       error code is returned.
51

REPORTING BUGS

53       Report bugs to <bugs@gnutls.org>.
54       Home page: http://www.gnutls.org
55
56
58       Copyright © 2001-2014 Free Software Foundation, Inc..
59       Copying  and  distribution  of this file, with or without modification,
60       are permitted in any medium  without  royalty  provided  the  copyright
61       notice and this notice are preserved.
62

SEE ALSO

64       The  full  documentation  for gnutls is maintained as a Texinfo manual.
65       If the /usr/share/doc/gnutls/ directory does not contain the HTML  form
66       visit
67
68       http://www.gnutls.org/manual/
69
70gnutls                              3.3.29           gnutls_server_name_get(3)
Impressum