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>
60 #error signal.h not found in the system
66 #error fcntl.h not found in the system
72 #error errno.h not found in the system
78 #error assert.h not found in the system
81 #include <sys/socket.h>
82 #ifdef HAVE_NETINET_IN_H
83 #include <netinet/in.h>
85 #error netinet/in.h not found in the system
88 #ifdef HAVE_NETINET_TCP_H
89 #include <netinet/tcp.h>
91 #error netinet/tcp.h not found in the system
97 #error netdb.h not found in the system
100 #ifdef HAVE_ARPA_INET_H
101 #include <arpa/inet.h>
103 #error arpa/inet.h not found in the system
106 #ifdef HAVE_SYS_MMAN_H
107 #include <sys/mman.h>
114 #ifndef HAVE_GETOPT_LONG
115 #include "../lib/contrib/getopt.h"
119 #include "../lib/contrib/regex.h"
131 /* Define types. The types must be at least of the specified size */
141 typedef unsigned char uint8;
142 typedef signed char int8;
144 #if SILC_SIZEOF_SHORT > 2
145 #error "size of the short must be 2 bytes"
148 typedef unsigned short uint16;
149 typedef signed short int16;
151 #if SILC_SIZEOF_LONG == 4
152 typedef unsigned long uint32;
153 typedef signed long int32;
155 #if SILC_SIZEOF_INT == 4
156 typedef unsigned long uint32;
157 typedef signed long int32;
159 #if SILC_SIZEOF_LONG_LONG >= 4
160 typedef unsigned long long uint32;
161 typedef signed long long int32;
166 #if SILC_SIZEOF_LONG >= 8
167 typedef unsigned long uint64;
168 typedef signed long int64;
170 #if SILC_SIZEOF_LONG_LONG >= 8
171 typedef unsigned long long uint64;
172 typedef signed long long int64;
174 typedef uint32 uint64;
179 #if SILC_SIZEOF_VOID_P < 4
180 typedef uint32 * void *;
184 #define bool unsigned char
187 /* Generic global SILC includes */
190 /* Math library includes */
192 #include "silcmath.h"
194 /* Crypto library includes */
195 #include "silccipher.h"
196 #include "silchash.h"
197 #include "silchmac.h"
199 #include "silcpkcs.h"
201 /* SILC util library includes */
202 #include "silchashtable.h"
204 #include "silcmemory.h"
205 #include "silcbuffer.h"
206 #include "silcbufutil.h"
207 #include "silcbuffmt.h"
209 #include "silcutil.h"
210 #include "silcconfig.h"
211 #include "silctask.h"
212 #include "silcschedule.h"
214 /* SILC core library includes */
216 #include "silcidcache.h"
217 #include "silcprotocol.h"
218 #include "silcsockconn.h"
219 #include "silcpayload.h"
220 #include "silccommand.h"
221 #include "silcchannel.h"
222 #include "silcpacket.h"
223 #include "silcnotify.h"
224 #include "silcmode.h"
225 #include "silcauth.h"
226 #include "silcprivate.h"
228 /* TRQ (SilcList API and SilcDList API) */
229 #include "silclist.h"
230 #include "silcdlist.h"
233 /* SILC Module library includes */
235 #include "silcsimutil.h"
238 /* SILC Key Exchange library includes */