| 1 |
/*
|
| 2 |
|
| 3 |
silc.h
|
| 4 |
|
| 5 |
Author: Pekka Riikonen <priikone@silcnet.org>
|
| 6 |
|
| 7 |
Copyright (C) 1997 - 2007 Pekka Riikonen
|
| 8 |
|
| 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; version 2 of the License.
|
| 12 |
|
| 13 |
This program is distributed in the hope that it will be useful,
|
| 14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 16 |
GNU General Public License for more details.
|
| 17 |
|
| 18 |
*/
|
| 19 |
/*
|
| 20 |
This file includes common definitions for SILC. This file MUST be included
|
| 21 |
by all files in SILC (directly or through other global include file).
|
| 22 |
*/
|
| 23 |
|
| 24 |
#ifndef SILCINCLUDES_H
|
| 25 |
#define SILCINCLUDES_H
|
| 26 |
|
| 27 |
#ifdef __cplusplus
|
| 28 |
extern "C" {
|
| 29 |
#endif
|
| 30 |
|
| 31 |
#define SILC_UNIX
|
| 32 |
|
| 33 |
#ifdef WIN32
|
| 34 |
#ifndef SILC_WIN32
|
| 35 |
#define SILC_WIN32
|
| 36 |
#undef SILC_UNIX
|
| 37 |
#endif
|
| 38 |
#endif
|
| 39 |
|
| 40 |
#if defined(__EPOC32__) || defined(__SYMBIAN32__)
|
| 41 |
#ifndef SILC_SYMBIAN
|
| 42 |
#define SILC_SYMBIAN
|
| 43 |
#undef SILC_UNIX
|
| 44 |
#undef SILC_WIN32
|
| 45 |
#endif
|
| 46 |
#endif
|
| 47 |
|
| 48 |
#if defined(__MACH__) && defined(__APPLE__)
|
| 49 |
#ifndef SILC_MACOSX
|
| 50 |
#define SILC_MACOSX
|
| 51 |
#undef SILC_WIN32
|
| 52 |
#undef SILC_SYMBIAN
|
| 53 |
#endif
|
| 54 |
#endif
|
| 55 |
|
| 56 |
/* Types */
|
| 57 |
#define SILC_SIZEOF_LONG_LONG @SILC_SIZEOF_LONG_LONG@
|
| 58 |
#define SILC_SIZEOF_LONG @SILC_SIZEOF_LONG@
|
| 59 |
#define SILC_SIZEOF_INT @SILC_SIZEOF_INT@
|
| 60 |
#define SILC_SIZEOF_SHORT @SILC_SIZEOF_SHORT@
|
| 61 |
#define SILC_SIZEOF_CHAR @SILC_SIZEOF_CHAR@
|
| 62 |
#define SILC_SIZEOF_VOID_P @SILC_SIZEOF_VOID_P@
|
| 63 |
|
| 64 |
/* Compilation time defines, for third-party software */
|
| 65 |
@__SILC_HAVE_PTHREAD@
|
| 66 |
@__SILC_HAVE_SIM@
|
| 67 |
@__SILC_ENABLE_DEBUG@
|
| 68 |
|
| 69 |
#if defined(HAVE_SILCDEFS_H)
|
| 70 |
/* Automatically generated configuration header */
|
| 71 |
#ifndef SILC_SYMBIAN
|
| 72 |
#include "silcdefs.h"
|
| 73 |
#else
|
| 74 |
#include "../symbian/silcdefs.h"
|
| 75 |
#endif /* SILC_SYMBIAN */
|
| 76 |
#include "silcdistdefs.h"
|
| 77 |
#endif /* HAVE_SILCDEFS_H */
|
| 78 |
|
| 79 |
/* Platform specific includes */
|
| 80 |
|
| 81 |
#if defined(SILC_WIN32)
|
| 82 |
#include "silcwin32.h"
|
| 83 |
#endif
|
| 84 |
|
| 85 |
#if defined(SILC_SYMBIAN)
|
| 86 |
#include "silcsymbian.h"
|
| 87 |
#endif
|
| 88 |
|
| 89 |
#ifndef DLLAPI
|
| 90 |
#define DLLAPI
|
| 91 |
#endif
|
| 92 |
|
| 93 |
#include <stdio.h>
|
| 94 |
#include <stdlib.h>
|
| 95 |
#include <string.h>
|
| 96 |
#include <stdarg.h>
|
| 97 |
#include <ctype.h>
|
| 98 |
#include <sys/types.h>
|
| 99 |
#include <sys/stat.h>
|
| 100 |
#include <time.h>
|
| 101 |
|
| 102 |
#ifdef HAVE_SIGNAL_H
|
| 103 |
#include <signal.h>
|
| 104 |
#endif
|
| 105 |
|
| 106 |
#ifdef HAVE_FCNTL_H
|
| 107 |
#include <fcntl.h>
|
| 108 |
#endif
|
| 109 |
|
| 110 |
#ifdef HAVE_ERRNO_H
|
| 111 |
#include <errno.h>
|
| 112 |
#endif
|
| 113 |
|
| 114 |
#ifdef HAVE_ASSERT_H
|
| 115 |
#include <assert.h>
|
| 116 |
#endif
|
| 117 |
|
| 118 |
#if !defined(SILC_WIN32)
|
| 119 |
|
| 120 |
#include <unistd.h>
|
| 121 |
#include <sys/time.h>
|
| 122 |
#include <pwd.h>
|
| 123 |
#include <sys/times.h>
|
| 124 |
|
| 125 |
#ifdef HAVE_GRP_H
|
| 126 |
#include <grp.h>
|
| 127 |
#endif
|
| 128 |
|
| 129 |
#if defined(HAVE_GETOPT_H) && defined(HAVE_GETOPT)
|
| 130 |
#include <getopt.h>
|
| 131 |
#else
|
| 132 |
#if defined(HAVE_SILCDEFS_H)
|
| 133 |
#include "getopti.h"
|
| 134 |
#endif /* HAVE_SILCDEFS_H */
|
| 135 |
#endif
|
| 136 |
|
| 137 |
#ifdef SOCKS5
|
| 138 |
#include "socks.h"
|
| 139 |
#endif
|
| 140 |
|
| 141 |
#include <sys/socket.h>
|
| 142 |
#ifdef HAVE_NETINET_IN_H
|
| 143 |
#include <netinet/in.h>
|
| 144 |
#endif
|
| 145 |
|
| 146 |
#ifdef HAVE_XTI_H
|
| 147 |
#include <xti.h>
|
| 148 |
#else
|
| 149 |
#ifdef HAVE_NETINET_TCP_H
|
| 150 |
#include <netinet/tcp.h>
|
| 151 |
#endif
|
| 152 |
#endif
|
| 153 |
|
| 154 |
#ifdef HAVE_NETDB_H
|
| 155 |
#include <netdb.h>
|
| 156 |
#endif
|
| 157 |
|
| 158 |
#ifdef HAVE_ARPA_INET_H
|
| 159 |
#include <arpa/inet.h>
|
| 160 |
#endif
|
| 161 |
|
| 162 |
#ifdef HAVE_SYS_MMAN_H
|
| 163 |
#include <sys/mman.h>
|
| 164 |
#endif
|
| 165 |
|
| 166 |
#ifdef HAVE_DLFCN_H
|
| 167 |
#include <dlfcn.h>
|
| 168 |
#endif
|
| 169 |
|
| 170 |
#ifdef HAVE_LIMITS_H
|
| 171 |
#include <limits.h>
|
| 172 |
#endif
|
| 173 |
|
| 174 |
#ifndef HAVE_REGEX_H
|
| 175 |
#if defined(HAVE_SILCDEFS_H)
|
| 176 |
#include "regexpr.h"
|
| 177 |
#endif /* HAVE_SILCDEFS_H */
|
| 178 |
#else
|
| 179 |
#include <regex.h>
|
| 180 |
#endif
|
| 181 |
|
| 182 |
#ifdef SILC_HAVE_PTHREAD
|
| 183 |
#include <pthread.h>
|
| 184 |
#endif
|
| 185 |
|
| 186 |
#ifdef HAVE_STDDEF_H
|
| 187 |
#include <stddef.h>
|
| 188 |
#endif
|
| 189 |
|
| 190 |
#ifdef HAVE_TERMIOS_H
|
| 191 |
#include <termios.h>
|
| 192 |
#endif
|
| 193 |
|
| 194 |
#ifdef HAVE_UTIME_H
|
| 195 |
#include <utime.h>
|
| 196 |
#endif
|
| 197 |
|
| 198 |
#ifdef HAVE_ICONV_H
|
| 199 |
#include <iconv.h>
|
| 200 |
#endif
|
| 201 |
|
| 202 |
#ifdef HAVE_LOCALE_H
|
| 203 |
#include <locale.h>
|
| 204 |
#endif
|
| 205 |
|
| 206 |
#ifdef HAVE_LANGINFO_H
|
| 207 |
#include <langinfo.h>
|
| 208 |
#endif
|
| 209 |
|
| 210 |
#ifdef HAVE_SYS_RESOURCE_H
|
| 211 |
#include <sys/resource.h>
|
| 212 |
#endif
|
| 213 |
|
| 214 |
#endif /* !SILC_WIN32 */
|
| 215 |
|
| 216 |
/* Include generic SILC type definitions */
|
| 217 |
#include "silctypes.h"
|
| 218 |
#include "silcmutex.h"
|
| 219 |
#include "silcatomic.h"
|
| 220 |
#include "silcversion.h"
|
| 221 |
|
| 222 |
/* SILC util library includes */
|
| 223 |
#include "silcstack.h"
|
| 224 |
#include "silcmemory.h"
|
| 225 |
#include "silcsnprintf.h"
|
| 226 |
|
| 227 |
/* Math library includes */
|
| 228 |
#include "silcmp.h"
|
| 229 |
#include "silcmath.h"
|
| 230 |
|
| 231 |
/* More SILC util library includes */
|
| 232 |
#include "silctime.h"
|
| 233 |
#include "silccond.h"
|
| 234 |
#include "silcthread.h"
|
| 235 |
#include "silcschedule.h"
|
| 236 |
#include "silclog.h"
|
| 237 |
#include "silcbuffer.h"
|
| 238 |
#include "silcbuffmt.h"
|
| 239 |
|
| 240 |
/* Crypto library includes */
|
| 241 |
#include "silccipher.h"
|
| 242 |
#include "silchash.h"
|
| 243 |
#include "silchmac.h"
|
| 244 |
#include "silcrng.h"
|
| 245 |
#include "silcpkcs.h"
|
| 246 |
#include "silcpk.h"
|
| 247 |
#include "silcpkcs1.h"
|
| 248 |
|
| 249 |
/* More SILC util library includes */
|
| 250 |
#include "silchashtable.h"
|
| 251 |
#include "silclist.h"
|
| 252 |
#include "silcdlist.h"
|
| 253 |
#include "silcasync.h"
|
| 254 |
#include "silcstream.h"
|
| 255 |
#include "silcnet.h"
|
| 256 |
#include "silcfileutil.h"
|
| 257 |
#include "silcstrutil.h"
|
| 258 |
#include "silcutf8.h"
|
| 259 |
#include "silcstringprep.h"
|
| 260 |
#include "silcutil.h"
|
| 261 |
#include "silcconfig.h"
|
| 262 |
#include "silcfsm.h"
|
| 263 |
#include "silcsocketstream.h"
|
| 264 |
#include "silcfdstream.h"
|
| 265 |
#include "silcvcard.h"
|
| 266 |
#include "silcmime.h"
|
| 267 |
|
| 268 |
#include "silcasn1.h"
|
| 269 |
#include "silcber.h"
|
| 270 |
|
| 271 |
/* SILC core library includes */
|
| 272 |
#include "silcargument.h"
|
| 273 |
#include "silcstatus.h"
|
| 274 |
#include "silcid.h"
|
| 275 |
#include "silccommand.h"
|
| 276 |
#include "silcauth.h"
|
| 277 |
#include "silcmessage.h"
|
| 278 |
#include "silcchannel.h"
|
| 279 |
#include "silcpacket.h"
|
| 280 |
#include "silcnotify.h"
|
| 281 |
#include "silcmode.h"
|
| 282 |
#include "silcattrs.h"
|
| 283 |
#include "silcpubkey.h"
|
| 284 |
|
| 285 |
/* Application utility includes */
|
| 286 |
#include "silcapputil.h"
|
| 287 |
#include "silcidcache.h"
|
| 288 |
|
| 289 |
#include "silcskr.h"
|
| 290 |
|
| 291 |
#if defined(SILC_SIM)
|
| 292 |
/* SILC Module library includes */
|
| 293 |
#include "silcsim.h"
|
| 294 |
#include "silcsimutil.h"
|
| 295 |
#endif
|
| 296 |
|
| 297 |
/* SILC Key Exchange library includes */
|
| 298 |
#include "silcske.h"
|
| 299 |
#include "silcske_payload.h"
|
| 300 |
#include "silcske_groups.h"
|
| 301 |
#include "silcconnauth.h"
|
| 302 |
|
| 303 |
|
| 304 |
/* SILC HTTP library */
|
| 305 |
#include "silchttpserver.h"
|
| 306 |
#include "silchttpphp.h"
|
| 307 |
|
| 308 |
#ifdef __cplusplus
|
| 309 |
}
|
| 310 |
#endif
|
| 311 |
|
| 312 |
#endif /* SILCINCLUDES_H */
|