4 * $Id: staticopen.h,v 1.8 2005/02/16 20:52:09 shadow Exp $
7 * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in
18 * the documentation and/or other materials provided with the
21 * 3. The name "Carnegie Mellon University" must not be used to
22 * endorse or promote products derived from this software without
23 * prior written permission. For permission or any other legal
24 * details, please contact
25 * Office of Technology Transfer
26 * Carnegie Mellon University
28 * Pittsburgh, PA 15213-3890
29 * (412) 268-4387, fax: (412) 268-7395
30 * tech-transfer@andrew.cmu.edu
32 * 4. Redistributions of any form whatsoever must retain the following
34 * "This product includes software developed by Computing Services
35 * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
37 * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
38 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
39 * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
40 * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
41 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
42 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
43 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
47 UNKNOWN = 0, SERVER = 1, CLIENT = 2, AUXPROP = 3, CANONUSER = 4
53 sasl_client_plug_init_t *plug;
56 /* For static linking */
57 #define SPECIFIC_CLIENT_PLUG_INIT_PROTO( x ) \
58 sasl_client_plug_init_t x##_client_plug_init
60 #define SPECIFIC_SERVER_PLUG_INIT_PROTO( x ) \
61 sasl_server_plug_init_t x##_server_plug_init
63 #define SPECIFIC_AUXPROP_PLUG_INIT_PROTO( x ) \
64 sasl_auxprop_init_t x##_auxprop_plug_init
66 #define SPECIFIC_CANONUSER_PLUG_INIT_PROTO( x ) \
67 sasl_canonuser_init_t x##_canonuser_plug_init
69 /* Static Compillation Foo */
70 #define SPECIFIC_CLIENT_PLUG_INIT( x, n )\
71 { CLIENT, n, x##_client_plug_init }
72 #define SPECIFIC_SERVER_PLUG_INIT( x, n )\
73 { SERVER, n, (sasl_client_plug_init_t *)x##_server_plug_init }
74 #define SPECIFIC_AUXPROP_PLUG_INIT( x, n )\
75 { AUXPROP, n, (sasl_client_plug_init_t *)x##_auxprop_plug_init }
76 #define SPECIFIC_CANONUSER_PLUG_INIT( x, n )\
77 { CANONUSER, n, (sasl_client_plug_init_t *)x##_canonuser_plug_init }
79 #ifdef STATIC_ANONYMOUS
80 extern SPECIFIC_SERVER_PLUG_INIT_PROTO( anonymous );
81 extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( anonymous );
84 extern SPECIFIC_SERVER_PLUG_INIT_PROTO( crammd5 );
85 extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( crammd5 );
87 #ifdef STATIC_DIGESTMD5
88 extern SPECIFIC_SERVER_PLUG_INIT_PROTO( digestmd5 );
89 extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( digestmd5 );
91 #ifdef STATIC_GSSAPIV2
92 extern SPECIFIC_SERVER_PLUG_INIT_PROTO( gssapiv2 );
93 extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( gssapiv2 );
95 #ifdef STATIC_KERBEROS4
96 extern SPECIFIC_SERVER_PLUG_INIT_PROTO( kerberos4 );
97 extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( kerberos4 );
100 extern SPECIFIC_SERVER_PLUG_INIT_PROTO( login );
101 extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( login );
104 extern SPECIFIC_SERVER_PLUG_INIT_PROTO( ntlm );
105 extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( ntlm );
108 extern SPECIFIC_SERVER_PLUG_INIT_PROTO( otp );
109 extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( otp );
112 extern SPECIFIC_SERVER_PLUG_INIT_PROTO( plain );
113 extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( plain );
116 extern SPECIFIC_SERVER_PLUG_INIT_PROTO( srp );
117 extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( srp );
120 extern SPECIFIC_AUXPROP_PLUG_INIT_PROTO( sasldb );
123 extern SPECIFIC_AUXPROP_PLUG_INIT_PROTO( sql );
126 extern SPECIFIC_AUXPROP_PLUG_INIT_PROTO( ldapdb );
129 _sasl_plug_rec _sasl_static_plugins[] = {
130 #ifdef STATIC_ANONYMOUS
131 SPECIFIC_SERVER_PLUG_INIT( anonymous, "ANONYMOUS" ),
132 SPECIFIC_CLIENT_PLUG_INIT( anonymous, "ANONYMOUS" ),
134 #ifdef STATIC_CRAMMD5
135 SPECIFIC_SERVER_PLUG_INIT( crammd5, "CRAM-MD5" ),
136 SPECIFIC_CLIENT_PLUG_INIT( crammd5, "CRAM-MD5" ),
138 #ifdef STATIC_DIGESTMD5
139 SPECIFIC_SERVER_PLUG_INIT( digestmd5, "DIGEST-MD5" ),
140 SPECIFIC_CLIENT_PLUG_INIT( digestmd5, "DIGEST-MD5" ),
142 #ifdef STATIC_GSSAPIV2
143 SPECIFIC_SERVER_PLUG_INIT( gssapiv2, "GSSAPI" ),
144 SPECIFIC_CLIENT_PLUG_INIT( gssapiv2, "GSSAPI" ),
146 #ifdef STATIC_KERBEROS4
147 SPECIFIC_SERVER_PLUG_INIT( kerberos4, "KERBEROS_V4" ),
148 SPECIFIC_CLIENT_PLUG_INIT( kerberos4, "KERBEROS_V4" ),
151 SPECIFIC_SERVER_PLUG_INIT( login, "LOGIN" ),
152 SPECIFIC_CLIENT_PLUG_INIT( login, "LOGIN" ),
155 SPECIFIC_SERVER_PLUG_INIT( ntlm, "NTLM" ),
156 SPECIFIC_CLIENT_PLUG_INIT( ntlm, "NTLM" ),
159 SPECIFIC_SERVER_PLUG_INIT( otp, "OTP" ),
160 SPECIFIC_CLIENT_PLUG_INIT( otp, "OTP" ),
163 SPECIFIC_SERVER_PLUG_INIT( plain, "PLAIN" ),
164 SPECIFIC_CLIENT_PLUG_INIT( plain, "PLAIN" ),
167 SPECIFIC_SERVER_PLUG_INIT( srp, "SRP" ),
168 SPECIFIC_CLIENT_PLUG_INIT( srp, "SRP" ),
171 SPECIFIC_AUXPROP_PLUG_INIT( sasldb, "SASLDB" ),
174 SPECIFIC_AUXPROP_PLUG_INIT( sql, "SQL" ),
177 SPECIFIC_AUXPROP_PLUG_INIT( ldapdb, "LDAPDB" ),
179 { UNKNOWN, NULL, NULL }