5 Author: Pekka Riikonen <priikone@silcnet.org>
7 Copyright (C) 1997 - 2001 Pekka Riikonen
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
21 This file includes common definitions for SILC. This file MUST be included
22 by all files in SILC (directly or through other global include file).
25 #ifndef SILCINCLUDES_H
26 #define SILCINCLUDES_H
28 /* Automatically generated configuration header */
41 #if defined(__EPOC32__)
51 #elif defined(__BEOS__)
63 /* Platform specific includes */
66 #include "silcwin32.h"
90 #include <sys/types.h>
97 #error signal.h not found in the system
103 #error fcntl.h not found in the system
109 #error errno.h not found in the system
115 #error assert.h not found in the system
121 #include <sys/time.h>
124 #include <sys/times.h>
134 #include <sys/socket.h>
135 #ifdef HAVE_NETINET_IN_H
136 #include <netinet/in.h>
138 #error netinet/in.h not found in the system
144 #ifdef HAVE_NETINET_TCP_H
145 #include <netinet/tcp.h>
147 #error xti.h nor even netinet/tcp.h found in the system
154 #error netdb.h not found in the system
157 #ifdef HAVE_ARPA_INET_H
158 #include <arpa/inet.h>
160 #error arpa/inet.h not found in the system
163 #ifdef HAVE_SYS_MMAN_H
164 #include <sys/mman.h>
176 #include "../lib/contrib/regex.h"
181 #ifdef SILC_HAVE_PTHREAD
189 #endif /* !SILC_WIN32 */
191 #ifndef HAVE_GETOPT_LONG
192 #include "../lib/contrib/getopt.h"
202 /* Define offsetof */
204 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
207 /* Define types. The types must be at least of the specified size */
209 typedef unsigned char SilcUInt8;
210 typedef signed char SilcInt8;
212 #if SILC_SIZEOF_SHORT > 2
213 #error "size of the short must be 2 bytes"
216 typedef unsigned short SilcUInt16;
217 typedef signed short SilcInt16;
219 #if SILC_SIZEOF_LONG == 4
220 typedef unsigned long SilcUInt32;
221 typedef signed long SilcInt32;
223 #if SILC_SIZEOF_INT == 4
224 typedef unsigned int SilcUInt32;
225 typedef signed int SilcInt32;
227 #if SILC_SIZEOF_LONG_LONG >= 4
229 typedef unsigned long long SilcUInt32;
230 typedef signed long long SilcInt32;
236 #if SILC_SIZEOF_LONG >= 8
237 typedef unsigned long SilcUInt64;
238 typedef signed long SilcInt64;
240 #if SILC_SIZEOF_LONG_LONG >= 8
242 typedef unsigned long long SilcUInt64;
243 typedef signed long long SilcInt64;
245 typedef SilcUInt32 SilcUInt64; /* XXX Use Windows's own 64 bit types */
246 typedef SilcInt32 SilcInt64;
249 typedef SilcUInt32 SilcUInt64;
250 typedef SilcInt32 SilcInt64;
254 #if SILC_SIZEOF_VOID_P < 4
255 typedef SilcUInt32 * void *;
260 #define bool unsigned char
264 /* Generic global SILC includes */
267 /* Math library includes */
269 #include "silcmath.h"
271 /* Crypto library includes */
272 #include "silccipher.h"
273 #include "silchash.h"
274 #include "silchmac.h"
276 #include "silcpkcs.h"
278 /* SILC util library includes */
279 #include "silcmutex.h"
280 #include "silcthread.h"
281 #include "silcschedule.h"
282 #include "silchashtable.h"
284 #include "silcmemory.h"
285 #include "silclist.h"
286 #include "silcdlist.h"
287 #include "silcbuffer.h"
288 #include "silcbuffmt.h"
290 #include "silcfileutil.h"
291 #include "silcutil.h"
292 #include "silcconfig.h"
293 #include "silcprotocol.h"
294 #include "silcsockconn.h"
296 /* SILC core library includes */
298 #include "silcidcache.h"
299 #include "silcargument.h"
300 #include "silccommand.h"
301 #include "silcchannel.h"
302 #include "silcpacket.h"
303 #include "silcnotify.h"
304 #include "silcmode.h"
305 #include "silcauth.h"
306 #include "silcprivate.h"
309 /* SILC Module library includes */
311 #include "silcsimutil.h"
314 /* SILC Key Exchange library includes */
316 #include "silcske_payload.h"
317 #include "silcske_groups.h"
319 /* SILC SFTP library */
320 #include "silcsftp.h"
321 #include "silcsftp_fs.h"
327 #endif /* SILCINCLUDES_H */