1@deftypefn Prototype int (*Gsasl_server_callback_service) (Gsasl_session_ctx * @var{ctx}, char * @var{service}, size_t * @var{servicelen}, char * @var{hostname}, size_t * @var{hostnamelen})
2
3@var{ctx}:  libgsasl handle.
4
5@var{service}:  output array with name of service.
6
7@var{servicelen}: on input the maximum size of the service output array,
8on output contains the actual size of the service output array.
9
10@var{hostname}:  output array with hostname of server.
11
12@var{hostnamelen}: on input the maximum size of the hostname output
13array, on output contains the actual size of the hostname output
14array.
15
16Type of callback function the application implements.  It should
17retrieve the service (which should be a registered GSSAPI host based
18service name, such as ``imap'') the server provides and hostname of
19server (usually canoncial DNS hostname).  It should return GSASL_OK,
20or an error such as GSASL_AUTHENTICATION_ERROR if it fails.
21
22If SERVICE or HOSTNAME is NULL, the function should only populate
23SERVICELEN or HOSTNAMELEN with the output length of the respective
24field, and return GSASL_OK.  This usage may be used by the caller to
25allocate the proper buffer size.
26
27@end deftypefn
28