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 */
32 #include "silcwin32.h"
41 #include <sys/types.h>
49 #error signal.h not found in the system
55 #error fcntl.h not found in the system
61 #error errno.h not found in the system
67 #error assert.h not found in the system
74 #include <sys/times.h>
84 #include <sys/socket.h>
85 #ifdef HAVE_NETINET_IN_H
86 #include <netinet/in.h>
88 #error netinet/in.h not found in the system
91 #ifdef HAVE_NETINET_TCP_H
92 #include <netinet/tcp.h>
94 #error netinet/tcp.h not found in the system
100 #error netdb.h not found in the system
103 #ifdef HAVE_ARPA_INET_H
104 #include <arpa/inet.h>
106 #error arpa/inet.h not found in the system
109 #ifdef HAVE_SYS_MMAN_H
110 #include <sys/mman.h>
121 #endif /* !SILC_WIN32 */
123 #ifndef HAVE_GETOPT_LONG
124 #include "../lib/contrib/getopt.h"
128 #include "../lib/contrib/regex.h"
140 /* Define types. The types must be at least of the specified size */
150 typedef unsigned char uint8;
151 typedef signed char int8;
153 #if SILC_SIZEOF_SHORT > 2
154 #error "size of the short must be 2 bytes"
157 typedef unsigned short uint16;
158 typedef signed short int16;
160 #if SILC_SIZEOF_LONG == 4
161 typedef unsigned long uint32;
162 typedef signed long int32;
164 #if SILC_SIZEOF_INT == 4
165 typedef unsigned long uint32;
166 typedef signed long int32;
168 #if SILC_SIZEOF_LONG_LONG >= 4
169 typedef unsigned long long uint32;
170 typedef signed long long int32;
175 #if SILC_SIZEOF_LONG >= 8
176 typedef unsigned long uint64;
177 typedef signed long int64;
179 #if SILC_SIZEOF_LONG_LONG >= 8
180 typedef unsigned long long uint64;
181 typedef signed long long int64;
183 typedef uint32 uint64;
188 #if SILC_SIZEOF_VOID_P < 4
189 typedef uint32 * void *;
193 #define bool unsigned char
196 /* Generic global SILC includes */
199 /* Math library includes */
201 #include "silcmath.h"
203 /* Crypto library includes */
204 #include "silccipher.h"
205 #include "silchash.h"
206 #include "silchmac.h"
208 #include "silcpkcs.h"
210 /* SILC util library includes */
211 #include "silchashtable.h"
213 #include "silcmemory.h"
214 #include "silcbuffer.h"
215 #include "silcbufutil.h"
216 #include "silcbuffmt.h"
218 #include "silcutil.h"
219 #include "silcconfig.h"
220 #include "silctask.h"
221 #include "silcschedule.h"
223 /* SILC core library includes */
225 #include "silcidcache.h"
226 #include "silcprotocol.h"
227 #include "silcsockconn.h"
228 #include "silcpayload.h"
229 #include "silccommand.h"
230 #include "silcchannel.h"
231 #include "silcpacket.h"
232 #include "silcnotify.h"
233 #include "silcmode.h"
234 #include "silcauth.h"
235 #include "silcprivate.h"
237 /* TRQ (SilcList API and SilcDList API) */
238 #include "silclist.h"
239 #include "silcdlist.h"
242 /* SILC Module library includes */
244 #include "silcsimutil.h"
247 /* SILC Key Exchange library includes */