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 */
41 #include <sys/types.h>
44 #include <sys/times.h>
58 #error signal.h not found in the system
64 #error fcntl.h not found in the system
70 #error errno.h not found in the system
76 #error assert.h not found in the system
79 #include <sys/socket.h>
80 #ifdef HAVE_NETINET_IN_H
81 #include <netinet/in.h>
83 #error netinet/in.h not found in the system
86 #ifdef HAVE_NETINET_TCP_H
87 #include <netinet/tcp.h>
89 #error netinet/tcp.h not found in the system
95 #error netdb.h not found in the system
98 #ifdef HAVE_ARPA_INET_H
99 #include <arpa/inet.h>
101 #error arpa/inet.h not found in the system
104 #ifdef HAVE_SYS_MMAN_H
105 #include <sys/mman.h>
112 #ifndef HAVE_GETOPT_LONG
113 #include "../lib/contrib/getopt.h"
117 #include "../lib/contrib/regex.h"
129 /* Define types. The types must be at least of the specified size */
139 typedef unsigned char uint8;
140 typedef signed char int8;
142 #if SILC_SIZEOF_SHORT > 2
143 #error "size of the short must be 2 bytes"
146 typedef unsigned short uint16;
147 typedef signed short int16;
149 #if SILC_SIZEOF_LONG == 4
150 typedef unsigned long uint32;
151 typedef signed long int32;
153 #if SILC_SIZEOF_INT == 4
154 typedef unsigned long uint32;
155 typedef signed long int32;
157 #if SILC_SIZEOF_LONG_LONG >= 4
158 typedef unsigned long long uint32;
159 typedef signed long long int32;
164 #if SILC_SIZEOF_LONG >= 8
165 typedef unsigned long uint64;
166 typedef signed long int64;
168 #if SILC_SIZEOF_LONG_LONG >= 8
169 typedef unsigned long long uint64;
170 typedef signed long long int64;
172 typedef uint32 uint64;
177 #if SILC_SIZEOF_VOID_P < 4
178 typedef uint32 * void *;
182 #define bool unsigned char
185 /* Generic global SILC includes */
188 /* Math library includes */
190 #include "silcmath.h"
192 /* Crypto library includes */
193 #include "silccipher.h"
194 #include "silchash.h"
195 #include "silchmac.h"
197 #include "silcpkcs.h"
199 /* SILC util library includes */
200 #include "silchashtable.h"
202 #include "silcmemory.h"
203 #include "silcbuffer.h"
204 #include "silcbufutil.h"
205 #include "silcbuffmt.h"
207 #include "silcutil.h"
208 #include "silcconfig.h"
209 #include "silctask.h"
210 #include "silcschedule.h"
212 /* SILC core library includes */
214 #include "silcidcache.h"
215 #include "silcprotocol.h"
216 #include "silcsockconn.h"
217 #include "silcpayload.h"
218 #include "silccommand.h"
219 #include "silcchannel.h"
220 #include "silcpacket.h"
221 #include "silcnotify.h"
222 #include "silcmode.h"
223 #include "silcauth.h"
224 #include "silcprivate.h"
226 /* TRQ (SilcList API and SilcDList API) */
227 #include "silclist.h"
228 #include "silcdlist.h"
231 /* SILC Module library includes */
233 #include "silcsimutil.h"
236 /* SILC Key Exchange library includes */