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 */
42 #include <sys/types.h>
50 #error signal.h not found in the system
56 #error fcntl.h not found in the system
62 #error errno.h not found in the system
68 #error assert.h not found in the system
75 #include <sys/times.h>
85 #include <sys/socket.h>
86 #ifdef HAVE_NETINET_IN_H
87 #include <netinet/in.h>
89 #error netinet/in.h not found in the system
92 #ifdef HAVE_NETINET_TCP_H
93 #include <netinet/tcp.h>
95 #error netinet/tcp.h not found in the system
101 #error netdb.h not found in the system
104 #ifdef HAVE_ARPA_INET_H
105 #include <arpa/inet.h>
107 #error arpa/inet.h not found in the system
110 #ifdef HAVE_SYS_MMAN_H
111 #include <sys/mman.h>
118 #endif /* !SILC_WIN32 */
120 #ifndef HAVE_GETOPT_LONG
121 #include "../lib/contrib/getopt.h"
125 #include "../lib/contrib/regex.h"
137 /* Define types. The types must be at least of the specified size */
147 typedef unsigned char uint8;
148 typedef signed char int8;
150 #if SILC_SIZEOF_SHORT > 2
151 #error "size of the short must be 2 bytes"
154 typedef unsigned short uint16;
155 typedef signed short int16;
157 #if SILC_SIZEOF_LONG == 4
158 typedef unsigned long uint32;
159 typedef signed long int32;
161 #if SILC_SIZEOF_INT == 4
162 typedef unsigned long uint32;
163 typedef signed long int32;
165 #if SILC_SIZEOF_LONG_LONG >= 4
166 typedef unsigned long long uint32;
167 typedef signed long long int32;
172 #if SILC_SIZEOF_LONG >= 8
173 typedef unsigned long uint64;
174 typedef signed long int64;
176 #if SILC_SIZEOF_LONG_LONG >= 8
177 typedef unsigned long long uint64;
178 typedef signed long long int64;
180 typedef uint32 uint64;
185 #if SILC_SIZEOF_VOID_P < 4
186 typedef uint32 * void *;
190 #define bool unsigned char
193 /* Generic global SILC includes */
196 /* Math library includes */
198 #include "silcmath.h"
200 /* Crypto library includes */
201 #include "silccipher.h"
202 #include "silchash.h"
203 #include "silchmac.h"
205 #include "silcpkcs.h"
207 /* SILC util library includes */
208 #include "silchashtable.h"
210 #include "silcmemory.h"
211 #include "silcbuffer.h"
212 #include "silcbufutil.h"
213 #include "silcbuffmt.h"
215 #include "silcutil.h"
216 #include "silcconfig.h"
217 #include "silctask.h"
218 #include "silcschedule.h"
220 /* SILC core library includes */
222 #include "silcidcache.h"
223 #include "silcprotocol.h"
224 #include "silcsockconn.h"
225 #include "silcpayload.h"
226 #include "silccommand.h"
227 #include "silcchannel.h"
228 #include "silcpacket.h"
229 #include "silcnotify.h"
230 #include "silcmode.h"
231 #include "silcauth.h"
232 #include "silcprivate.h"
234 /* TRQ (SilcList API and SilcDList API) */
235 #include "silclist.h"
236 #include "silcdlist.h"
239 /* SILC Module library includes */
241 #include "silcsimutil.h"
244 /* SILC Key Exchange library includes */