Initial release, version 0.0.0.
[gsasl.git] / doc / gsasl-callback-server-service.texi
blob23aea327de7b95137bdc3e0c9518baeb36a754c4
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})
3 @var{ctx}:  libgsasl handle.
5 @var{service}:  output array with name of service.
7 @var{servicelen}: on input the maximum size of the service output array,
8 on output contains the actual size of the service output array.
10 @var{hostname}:  output array with hostname of server.
12 @var{hostnamelen}: on input the maximum size of the hostname output
13 array, on output contains the actual size of the hostname output
14 array.
16 Type of callback function the application implements.  It should
17 retrieve the service (which should be a registered GSSAPI host based
18 service name, such as ``imap'') the server provides and hostname of
19 server (usually canoncial DNS hostname).  It should return GSASL_OK,
20 or an error such as GSASL_AUTHENTICATION_ERROR if it fails.
22 If SERVICE or HOSTNAME is NULL, the function should only populate
23 SERVICELEN or HOSTNAMELEN with the output length of the respective
24 field, and return GSASL_OK.  This usage may be used by the caller to
25 allocate the proper buffer size.
27 @end deftypefn