GSS_S_PROMPTING_NEEDED is a bit
[cyrus-sasl.git] / man / sasl_listmech.3
1 .\" -*- nroff -*-
2 .\" 
3 .\" Copyright (c) 2001 Carnegie Mellon University.  All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\"
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer. 
11 .\"
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in
14 .\"    the documentation and/or other materials provided with the
15 .\"    distribution.
16 .\"
17 .\" 3. The name "Carnegie Mellon University" must not be used to
18 .\"    endorse or promote products derived from this software without
19 .\"    prior written permission. For permission or any other legal
20 .\"    details, please contact  
21 .\"      Office of Technology Transfer
22 .\"      Carnegie Mellon University
23 .\"      5000 Forbes Avenue
24 .\"      Pittsburgh, PA  15213-3890
25 .\"      (412) 268-4387, fax: (412) 268-7395
26 .\"      tech-transfer@andrew.cmu.edu
27 .\"
28 .\" 4. Redistributions of any form whatsoever must retain the following
29 .\"    acknowledgment:
30 .\"    "This product includes software developed by Computing Services
31 .\"     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
32 .\"
33 .\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
34 .\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
35 .\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
36 .\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
37 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
38 .\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
39 .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
40 .\" 
41 .TH sasl_listmech "10 July 2001" SASL "SASL man pages"
42 .SH NAME
43 sasl_listmech \- Retrieve a list of the supported SASL mechanisms
44 .SH SYNOPSIS
45 .nf
46 .B #include <sasl/sasl.h>
47 .sp
48
49 .BI "int sasl_listmech(sasl_conn_t *" conn ", "
50 .BI "                  const char *" user ", "
51 .BI "                  const char *" prefix ", "
52 .BI "                  const char *" sep ", "
53 .BI "                  const char *" suffix ", "
54 .BI "                  const char **" result ", "
55 .BI "                  unsigned *" plen ", "
56 .BI "                  int *" pcount ");"
57
58 .fi
59 .SH DESCRIPTION
60
61 .B sasl_listmech()
62 returns a string listing the SASL names of all the mechanisms available to the specified user. This is typically given to the client through a capability command or initial server response. Client applications need this list so that they know what mechanisms the server supports.
63
64 .I conn
65 the SASL context for this connection
66 .I user
67 (optional) restricts the mechanism list to only those available to the user.
68 .I prefix
69 appended to beginning of result
70 .I sep
71 appended between mechanisms
72 .I suffix
73 appended to end of result
74 .I result
75 NULL terminated result string (allocated/freed by library)
76 .I plen
77 length of result filled in by library. May be NULL
78 .I pcount
79 Number of mechanisms available (filled in by library). May be NULL
80
81 .nf
82 Example:
83
84 sasl_listmech(conn,NULL,"(",",",")",&mechlist,NULL,NULL);
85
86 may give the string 
87 .BI (ANONYMOUS,KERBEROS_V4,DIGEST-MD5)
88 as a result
89 .PP
90
91 .SH "RETURN VALUE"
92 Returns SASL_OK on success. SASL error code on failure.
93
94 .SH "CONFORMING TO"
95 RFC 2222
96 .SH "SEE ALSO"
97 sasl(3), sasl_errors(3), sasl_server_new(3), sasl_client_new(3)