6 Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
8 Copyright (C) 1997 - 2000 Pekka Riikonen
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
22 This file includes common definitions for SILC. This file MUST be included
23 by all files in SILC (directly or through other global include file).
26 #ifndef SILCINCLUDES_H
27 #define SILCINCLUDES_H
29 /* Automatically generated configuration header */
44 #include <sys/types.h>
52 #error signal.h not found in the system
58 #error fcntl.h not found in the system
64 #error errno.h not found in the system
70 #error assert.h not found in the system
77 #include <sys/times.h>
87 #include <sys/socket.h>
88 #ifdef HAVE_NETINET_IN_H
89 #include <netinet/in.h>
91 #error netinet/in.h not found in the system
94 #ifdef HAVE_NETINET_TCP_H
95 #include <netinet/tcp.h>
97 #error netinet/tcp.h not found in the system
103 #error netdb.h not found in the system
106 #ifdef HAVE_ARPA_INET_H
107 #include <arpa/inet.h>
109 #error arpa/inet.h not found in the system
112 #ifdef HAVE_SYS_MMAN_H
113 #include <sys/mman.h>
120 #endif /* !SILC_WIN32 */
122 #ifndef HAVE_GETOPT_LONG
123 #include "../lib/contrib/getopt.h"
127 #include "../lib/contrib/regex.h"
139 /* Define types. The types must be at least of the specified size */
149 typedef unsigned char uint8;
150 typedef signed char int8;
152 #if SILC_SIZEOF_SHORT > 2
153 #error "size of the short must be 2 bytes"
156 typedef unsigned short uint16;
157 typedef signed short int16;
159 #if SILC_SIZEOF_LONG == 4
160 typedef unsigned long uint32;
161 typedef signed long int32;
163 #if SILC_SIZEOF_INT == 4
164 typedef unsigned long uint32;
165 typedef signed long int32;
167 #if SILC_SIZEOF_LONG_LONG >= 4
168 typedef unsigned long long uint32;
169 typedef signed long long int32;
174 #if SILC_SIZEOF_LONG >= 8
175 typedef unsigned long uint64;
176 typedef signed long int64;
178 #if SILC_SIZEOF_LONG_LONG >= 8
179 typedef unsigned long long uint64;
180 typedef signed long long int64;
182 typedef uint32 uint64;
187 #if SILC_SIZEOF_VOID_P < 4
188 typedef uint32 * void *;
192 #define bool unsigned char
195 /* Generic global SILC includes */
198 /* Math library includes */
200 #include "silcmath.h"
202 /* Crypto library includes */
203 #include "silccipher.h"
204 #include "silchash.h"
205 #include "silchmac.h"
207 #include "silcpkcs.h"
209 /* SILC util library includes */
210 #include "silchashtable.h"
212 #include "silcmemory.h"
213 #include "silcbuffer.h"
214 #include "silcbufutil.h"
215 #include "silcbuffmt.h"
217 #include "silcutil.h"
218 #include "silcconfig.h"
219 #include "silctask.h"
220 #include "silcschedule.h"
222 /* SILC core library includes */
224 #include "silcidcache.h"
225 #include "silcprotocol.h"
226 #include "silcsockconn.h"
227 #include "silcpayload.h"
228 #include "silccommand.h"
229 #include "silcchannel.h"
230 #include "silcpacket.h"
231 #include "silcnotify.h"
232 #include "silcmode.h"
233 #include "silcauth.h"
234 #include "silcprivate.h"
236 /* TRQ (SilcList API and SilcDList API) */
237 #include "silclist.h"
238 #include "silcdlist.h"
241 /* SILC Module library includes */
243 #include "silcsimutil.h"
246 /* SILC Key Exchange library includes */