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 */
38 #include "silcwin32.h"
46 #include <sys/types.h>
53 #error signal.h not found in the system
59 #error fcntl.h not found in the system
65 #error errno.h not found in the system
71 #error assert.h not found in the system
80 #include <sys/times.h>
90 #include <sys/socket.h>
91 #ifdef HAVE_NETINET_IN_H
92 #include <netinet/in.h>
94 #error netinet/in.h not found in the system
97 #ifdef HAVE_NETINET_TCP_H
98 #include <netinet/tcp.h>
100 #error netinet/tcp.h not found in the system
106 #error netdb.h not found in the system
109 #ifdef HAVE_ARPA_INET_H
110 #include <arpa/inet.h>
112 #error arpa/inet.h not found in the system
115 #ifdef HAVE_SYS_MMAN_H
116 #include <sys/mman.h>
128 #include "../lib/contrib/regex.h"
133 #ifdef SILC_HAVE_PTHREAD
137 #endif /* !SILC_WIN32 */
139 #ifndef HAVE_GETOPT_LONG
140 #include "../lib/contrib/getopt.h"
150 /* Define types. The types must be at least of the specified size */
160 typedef unsigned char uint8;
161 typedef signed char int8;
163 #if SILC_SIZEOF_SHORT > 2
164 #error "size of the short must be 2 bytes"
167 typedef unsigned short uint16;
168 typedef signed short int16;
170 #if SILC_SIZEOF_LONG == 4
171 typedef unsigned long uint32;
172 typedef signed long int32;
174 #if SILC_SIZEOF_INT == 4
175 typedef unsigned long uint32;
176 typedef signed long int32;
178 #if SILC_SIZEOF_LONG_LONG >= 4
179 typedef unsigned long long uint32;
180 typedef signed long long int32;
185 #if SILC_SIZEOF_LONG >= 8
186 typedef unsigned long uint64;
187 typedef signed long int64;
189 #if SILC_SIZEOF_LONG_LONG >= 8
190 typedef unsigned long long uint64;
191 typedef signed long long int64;
193 typedef uint32 uint64;
198 #if SILC_SIZEOF_VOID_P < 4
199 typedef uint32 * void *;
203 #define bool unsigned char
206 /* Generic global SILC includes */
209 /* Math library includes */
211 #include "silcmath.h"
213 /* Crypto library includes */
214 #include "silccipher.h"
215 #include "silchash.h"
216 #include "silchmac.h"
218 #include "silcpkcs.h"
220 /* SILC util library includes */
221 #include "silcmutex.h"
222 #include "silcthread.h"
223 #include "silchashtable.h"
225 #include "silcmemory.h"
226 #include "silcbuffer.h"
227 #include "silcbufutil.h"
228 #include "silcbuffmt.h"
230 #include "silcutil.h"
231 #include "silcconfig.h"
232 #include "silctask.h"
233 #include "silcschedule.h"
235 /* SILC core library includes */
237 #include "silcidcache.h"
238 #include "silcprotocol.h"
239 #include "silcsockconn.h"
240 #include "silcpayload.h"
241 #include "silccommand.h"
242 #include "silcchannel.h"
243 #include "silcpacket.h"
244 #include "silcnotify.h"
245 #include "silcmode.h"
246 #include "silcauth.h"
247 #include "silcprivate.h"
249 /* TRQ (SilcList API and SilcDList API) */
250 #include "silclist.h"
251 #include "silcdlist.h"
254 /* SILC Module library includes */
256 #include "silcsimutil.h"
259 /* SILC Key Exchange library includes */