1 /* $Id: config.h,v 1.4 2004/03/08 16:57:27 rjs3 Exp $
2 * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in
13 * the documentation and/or other materials provided with the
16 * 3. The name "Carnegie Mellon University" must not be used to
17 * endorse or promote products derived from this software without
18 * prior written permission. For permission or any other legal
19 * details, please contact
20 * Office of Technology Transfer
21 * Carnegie Mellon University
23 * Pittsburgh, PA 15213-3890
24 * (412) 268-4387, fax: (412) 268-7395
25 * tech-transfer@andrew.cmu.edu
27 * 4. Redistributions of any form whatsoever must retain the following
29 * "This product includes software developed by Computing Services
30 * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
32 * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
33 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
34 * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
35 * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
36 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
37 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
38 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
45 //#include <windows.h>
51 * funky names for functions so we dont conflict with possible
52 * real ones in applications we load into
59 #define strdup xxx_sasl_strdup
60 #define strcasecmp xxx_sasl_strcasecmp
61 #define gethostname xxx_sasl_gethostname
62 #define inet_aton xxx_sasl_inetaton
65 #define PACKAGE "cyrus-sasl"
68 #define VERSION "2.0.4"
70 /* We only want minimal server functionality. Cripple the server functionality when necessary to get
73 * Currently only cripples PLAIN.
75 #define SASL_MINIMAL_SERVER 1
80 int strcasecmp(const char *s1,const char *s2);
81 int strncasecmp(const char *s1,const char *s2,int len);
83 int strcpy_truncate(char *dest,char *src,int len);
85 #define gethostname xxx_sasl_gethostname
86 int gethostname(char *dest,int destlen);
88 #define SASL_PATH_ENV_VAR "foo"
89 #define PLUGINDIR "make_me_a_function_to_get_that_info"
91 typedef unsigned char u_char;
92 typedef unsigned long u_long;
94 char *strdup(const char *str);
98 unsigned short sin_port;
100 unsigned long s_addr;
106 unsigned long s_addr;
109 #ifndef HAVE_SOCKLEN_T
110 typedef unsigned int socklen_t;
111 #endif /* HAVE_SOCKLEN_T */
120 int snprintf (char *str,size_t count,const char *fmt,...);
121 int snprintf (char *str,int count,const char *fmt,...);
131 extern int getsubopt(char **optionp, const char * const *tokens, char **valuep);
132 extern char* getpass(const char *prompt);
134 /* ------------------------------------------------------------ */
136 /* Things that are fetched via autoconf under Unix
138 #define HAVE_MEMCPY 1
140 #define MAXHOSTNAMELEN 1024
142 /* ------------------------------------------------------------ */
145 #define L_DEFAULT_GUARD (0)
146 #define I_DEFAULT_GUARD (0)
152 #define XXVL(foo) printf foo;
156 #define __attribute__(foo)
158 #include <netinet/in.h>
160 #define getservbyname(X,Y) NULL
166 u_char sa_len; /* total length */
167 u_char sa_family; /* address family */
168 char sa_data[14]; /* address value */
170 #define SOCK_MAXADDRLEN 255 /* longest possible addresses */
172 #ifndef HAVE_SOCKLEN_T
173 typedef unsigned int socklen_t;
174 #endif /* HAVE_SOCKLEN_T */
176 #ifndef HAVE_STRUCT_SOCKADDR_STORAGE
177 #define _SS_MAXSIZE 128 /* Implementation specific max size */
178 #define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
180 struct sockaddr_storage {
181 struct sockaddr ss_sa;
182 char __ss_pad2[_SS_PADSIZE];
184 #define ss_family ss_sa.sa_family
185 #endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
187 #define get_krb_err_txt(X) (krb_err_txt[(X)])
192 #define AF_UNSPEC 0 /* unspecified */
193 #define AF_UNIX 1 /* local to host (pipes, portals) */
194 #define AF_INET 2 /* internetwork: UDP, TCP, etc. */
195 #define AF_IMPLINK 3 /* arpanet imp addresses */
196 #define AF_PUP 4 /* pup protocols: e.g. BSP */
197 #define AF_CHAOS 5 /* mit CHAOS protocols */
198 #define AF_NS 6 /* XEROX NS protocols */
199 #define AF_NBS 7 /* nbs protocols */
200 #define AF_ECMA 8 /* european computer manufacturers */
201 #define AF_DATAKIT 9 /* datakit protocols */
202 #define AF_CCITT 10 /* CCITT protocols, X.25 etc */
203 #define AF_SNA 11 /* IBM SNA */
204 #define AF_DECnet 12 /* DECnet */
205 #define AF_DLI 13 /* Direct data link interface */
206 #define AF_LAT 14 /* LAT */
207 #define AF_HYLINK 15 /* NSC Hyperchannel */
208 #define AF_APPLETALK 16 /* Apple Talk */
209 #define AF_NIT 17 /* Network Interface Tap */
210 #define AF_802 18 /* IEEE 802.2, also ISO 8802 */
211 #define AF_OSI 19 /* umbrella for all families used */
212 #define AF_X25 20 /* CCITT X.25 in particular */
213 #define AF_OSINET 21 /* AFI = 47, IDI = 4 */
214 #define AF_GOSIP 22 /* U.S. Government OSI */
215 #define AF_IPX 23 /* Novell Internet Protocol */
216 #define AF_ROUTE 24 /* Internal Routing Protocol */
217 #define AF_LINK 25 /* Link-layer interface */
218 #define AF_INET6 26 /* Internet Protocol, Version 6 */
219 #define AF_KEY 27 /* Security Association DB socket */
224 * Protocol families, same as address families for now.
226 #define PF_UNSPEC AF_UNSPEC
227 #define PF_UNIX AF_UNIX
228 #define PF_INET AF_INET
229 #define PF_IMPLINK AF_IMPLINK
230 #define PF_PUP AF_PUP
231 #define PF_CHAOS AF_CHAOS
233 #define PF_NBS AF_NBS
234 #define PF_ECMA AF_ECMA
235 #define PF_DATAKIT AF_DATAKIT
236 #define PF_CCITT AF_CCITT
237 #define PF_SNA AF_SNA
238 #define PF_DECnet AF_DECnet
239 #define PF_DLI AF_DLI
240 #define PF_LAT AF_LAT
241 #define PF_HYLINK AF_HYLINK
242 #define PF_APPLETALK AF_APPLETALK
243 #define PF_NIT AF_NIT
244 #define PF_802 AF_802
245 #define PF_OSI AF_OSI
246 #define PF_X25 AF_X25
247 #define PF_OSINET AF_OSINET
248 #define PF_GOSIP AF_GOSIP
249 #define PF_IPX AF_IPX
250 #define PF_ROUTE AF_ROUTE
251 #define PF_LINK AF_LINK
252 #define PF_INET6 AF_INET6
253 #define PF_KEY AF_KEY
255 #define PF_MAX AF_MAX
257 #define SOCK_STREAM 1
265 #ifndef HAVE_GETADDRINFO
266 #define getaddrinfo sasl_getaddrinfo
267 #define freeaddrinfo sasl_freeaddrinfo
268 #define getnameinfo sasl_getnameinfo
269 #define gai_strerror sasl_gai_strerror
273 #endif /* CONFIG_H */