1*7c478bd9Sstevel@tonic-gate /* $OpenBSD: includes.h,v 1.17 2002/01/26 16:44:22 stevesk Exp $ */ 2*7c478bd9Sstevel@tonic-gate 3*7c478bd9Sstevel@tonic-gate #ifndef _INCLUDES_H 4*7c478bd9Sstevel@tonic-gate #define _INCLUDES_H 5*7c478bd9Sstevel@tonic-gate 6*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 7*7c478bd9Sstevel@tonic-gate 8*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 9*7c478bd9Sstevel@tonic-gate extern "C" { 10*7c478bd9Sstevel@tonic-gate #endif 11*7c478bd9Sstevel@tonic-gate 12*7c478bd9Sstevel@tonic-gate 13*7c478bd9Sstevel@tonic-gate /* 14*7c478bd9Sstevel@tonic-gate * Author: Tatu Ylonen <ylo@cs.hut.fi> 15*7c478bd9Sstevel@tonic-gate * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 16*7c478bd9Sstevel@tonic-gate * All rights reserved 17*7c478bd9Sstevel@tonic-gate * This file includes most of the needed system headers. 18*7c478bd9Sstevel@tonic-gate * 19*7c478bd9Sstevel@tonic-gate * As far as I am concerned, the code I have written for this software 20*7c478bd9Sstevel@tonic-gate * can be used freely for any purpose. Any derived versions of this 21*7c478bd9Sstevel@tonic-gate * software must be clearly marked as such, and if the derived work is 22*7c478bd9Sstevel@tonic-gate * incompatible with the protocol description in the RFC file, it must be 23*7c478bd9Sstevel@tonic-gate * called by a name other than "ssh" or "Secure Shell". 24*7c478bd9Sstevel@tonic-gate */ 25*7c478bd9Sstevel@tonic-gate 26*7c478bd9Sstevel@tonic-gate #define RCSID(msg) \ 27*7c478bd9Sstevel@tonic-gate static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } 28*7c478bd9Sstevel@tonic-gate 29*7c478bd9Sstevel@tonic-gate #include "config.h" 30*7c478bd9Sstevel@tonic-gate 31*7c478bd9Sstevel@tonic-gate #include <stdio.h> 32*7c478bd9Sstevel@tonic-gate #include <ctype.h> 33*7c478bd9Sstevel@tonic-gate #include <errno.h> 34*7c478bd9Sstevel@tonic-gate #include <fcntl.h> /* For O_NONBLOCK */ 35*7c478bd9Sstevel@tonic-gate #include <signal.h> 36*7c478bd9Sstevel@tonic-gate #include <stdlib.h> 37*7c478bd9Sstevel@tonic-gate #include <string.h> 38*7c478bd9Sstevel@tonic-gate #include <stdarg.h> 39*7c478bd9Sstevel@tonic-gate #include <pwd.h> 40*7c478bd9Sstevel@tonic-gate #include <grp.h> 41*7c478bd9Sstevel@tonic-gate #include <time.h> 42*7c478bd9Sstevel@tonic-gate #include <dirent.h> 43*7c478bd9Sstevel@tonic-gate #include <libintl.h> 44*7c478bd9Sstevel@tonic-gate #include <locale.h> 45*7c478bd9Sstevel@tonic-gate 46*7c478bd9Sstevel@tonic-gate #ifdef HAVE_LIMITS_H 47*7c478bd9Sstevel@tonic-gate # include <limits.h> /* For PATH_MAX */ 48*7c478bd9Sstevel@tonic-gate #endif 49*7c478bd9Sstevel@tonic-gate #ifdef HAVE_GETOPT_H 50*7c478bd9Sstevel@tonic-gate # include <getopt.h> 51*7c478bd9Sstevel@tonic-gate #endif 52*7c478bd9Sstevel@tonic-gate #ifdef HAVE_BSTRING_H 53*7c478bd9Sstevel@tonic-gate # include <bstring.h> 54*7c478bd9Sstevel@tonic-gate #endif 55*7c478bd9Sstevel@tonic-gate #if defined(HAVE_GLOB_H) && defined(GLOB_HAS_ALTDIRFUNC) && \ 56*7c478bd9Sstevel@tonic-gate defined(GLOB_HAS_GL_MATCHC) 57*7c478bd9Sstevel@tonic-gate # include <glob.h> 58*7c478bd9Sstevel@tonic-gate #endif 59*7c478bd9Sstevel@tonic-gate #ifdef HAVE_NETGROUP_H 60*7c478bd9Sstevel@tonic-gate # include <netgroup.h> 61*7c478bd9Sstevel@tonic-gate #endif 62*7c478bd9Sstevel@tonic-gate #if defined(HAVE_NETDB_H) 63*7c478bd9Sstevel@tonic-gate # include <netdb.h> 64*7c478bd9Sstevel@tonic-gate #endif 65*7c478bd9Sstevel@tonic-gate #ifdef HAVE_ENDIAN_H 66*7c478bd9Sstevel@tonic-gate # include <endian.h> 67*7c478bd9Sstevel@tonic-gate #endif 68*7c478bd9Sstevel@tonic-gate #ifdef HAVE_TTYENT_H 69*7c478bd9Sstevel@tonic-gate # include <ttyent.h> 70*7c478bd9Sstevel@tonic-gate #endif 71*7c478bd9Sstevel@tonic-gate #ifdef HAVE_UTIME_H 72*7c478bd9Sstevel@tonic-gate # include <utime.h> 73*7c478bd9Sstevel@tonic-gate #endif 74*7c478bd9Sstevel@tonic-gate #ifdef HAVE_MAILLOCK_H 75*7c478bd9Sstevel@tonic-gate # include <maillock.h> /* For _PATH_MAILDIR */ 76*7c478bd9Sstevel@tonic-gate #endif 77*7c478bd9Sstevel@tonic-gate #ifdef HAVE_NEXT 78*7c478bd9Sstevel@tonic-gate # include <libc.h> 79*7c478bd9Sstevel@tonic-gate #endif 80*7c478bd9Sstevel@tonic-gate #include <unistd.h> /* For STDIN_FILENO, etc */ 81*7c478bd9Sstevel@tonic-gate #include <termios.h> /* Struct winsize */ 82*7c478bd9Sstevel@tonic-gate 83*7c478bd9Sstevel@tonic-gate /* 84*7c478bd9Sstevel@tonic-gate *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively 85*7c478bd9Sstevel@tonic-gate */ 86*7c478bd9Sstevel@tonic-gate #ifdef HAVE_STRINGS_H 87*7c478bd9Sstevel@tonic-gate # include <strings.h> 88*7c478bd9Sstevel@tonic-gate #endif 89*7c478bd9Sstevel@tonic-gate #ifdef HAVE_LOGIN_H 90*7c478bd9Sstevel@tonic-gate # include <login.h> 91*7c478bd9Sstevel@tonic-gate #endif 92*7c478bd9Sstevel@tonic-gate 93*7c478bd9Sstevel@tonic-gate #ifdef HAVE_UTMP_H 94*7c478bd9Sstevel@tonic-gate # include <utmp.h> 95*7c478bd9Sstevel@tonic-gate #endif 96*7c478bd9Sstevel@tonic-gate #ifdef HAVE_UTMPX_H 97*7c478bd9Sstevel@tonic-gate # ifdef HAVE_TV_IN_UTMPX 98*7c478bd9Sstevel@tonic-gate # include <sys/time.h> 99*7c478bd9Sstevel@tonic-gate # endif 100*7c478bd9Sstevel@tonic-gate # include <utmpx.h> 101*7c478bd9Sstevel@tonic-gate #endif 102*7c478bd9Sstevel@tonic-gate #ifdef HAVE_LASTLOG_H 103*7c478bd9Sstevel@tonic-gate # include <lastlog.h> 104*7c478bd9Sstevel@tonic-gate #endif 105*7c478bd9Sstevel@tonic-gate #ifdef HAVE_PATHS_H 106*7c478bd9Sstevel@tonic-gate # include <paths.h> /* For _PATH_XXX */ 107*7c478bd9Sstevel@tonic-gate #endif 108*7c478bd9Sstevel@tonic-gate 109*7c478bd9Sstevel@tonic-gate #include <sys/types.h> 110*7c478bd9Sstevel@tonic-gate #include <sys/socket.h> 111*7c478bd9Sstevel@tonic-gate #include <sys/ioctl.h> 112*7c478bd9Sstevel@tonic-gate #include <sys/wait.h> 113*7c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_TIME_H 114*7c478bd9Sstevel@tonic-gate # include <sys/time.h> /* For timersub */ 115*7c478bd9Sstevel@tonic-gate #endif 116*7c478bd9Sstevel@tonic-gate #include <sys/resource.h> 117*7c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_SELECT_H 118*7c478bd9Sstevel@tonic-gate # include <sys/select.h> 119*7c478bd9Sstevel@tonic-gate #endif 120*7c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_BSDTTY_H 121*7c478bd9Sstevel@tonic-gate # include <sys/bsdtty.h> 122*7c478bd9Sstevel@tonic-gate #endif 123*7c478bd9Sstevel@tonic-gate #include <sys/param.h> /* For MAXPATHLEN and roundup() */ 124*7c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_UN_H 125*7c478bd9Sstevel@tonic-gate # include <sys/un.h> /* For sockaddr_un */ 126*7c478bd9Sstevel@tonic-gate #endif 127*7c478bd9Sstevel@tonic-gate #ifdef HAVE_STDINT_H 128*7c478bd9Sstevel@tonic-gate # include <stdint.h> 129*7c478bd9Sstevel@tonic-gate #endif 130*7c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_BITYPES_H 131*7c478bd9Sstevel@tonic-gate # include <sys/bitypes.h> /* For u_intXX_t */ 132*7c478bd9Sstevel@tonic-gate #endif 133*7c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_CDEFS_H 134*7c478bd9Sstevel@tonic-gate # include <sys/cdefs.h> /* For __P() */ 135*7c478bd9Sstevel@tonic-gate #endif 136*7c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_STAT_H 137*7c478bd9Sstevel@tonic-gate # include <sys/stat.h> /* For S_* constants and macros */ 138*7c478bd9Sstevel@tonic-gate #endif 139*7c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_SYSMACROS_H 140*7c478bd9Sstevel@tonic-gate # include <sys/sysmacros.h> /* For MIN, MAX, etc */ 141*7c478bd9Sstevel@tonic-gate #endif 142*7c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_MMAN_H 143*7c478bd9Sstevel@tonic-gate #include <sys/mman.h> /* for MAP_ANONYMOUS */ 144*7c478bd9Sstevel@tonic-gate #endif 145*7c478bd9Sstevel@tonic-gate 146*7c478bd9Sstevel@tonic-gate #include <netinet/in_systm.h> /* For typedefs */ 147*7c478bd9Sstevel@tonic-gate #include <netinet/in.h> /* For IPv6 macros */ 148*7c478bd9Sstevel@tonic-gate #include <netinet/ip.h> /* For IPTOS macros */ 149*7c478bd9Sstevel@tonic-gate #include <netinet/tcp.h> 150*7c478bd9Sstevel@tonic-gate #include <arpa/inet.h> 151*7c478bd9Sstevel@tonic-gate #ifdef HAVE_RPC_TYPES_H 152*7c478bd9Sstevel@tonic-gate # include <rpc/types.h> /* For INADDR_LOOPBACK */ 153*7c478bd9Sstevel@tonic-gate #endif 154*7c478bd9Sstevel@tonic-gate #ifdef USE_PAM 155*7c478bd9Sstevel@tonic-gate # include <security/pam_appl.h> 156*7c478bd9Sstevel@tonic-gate #endif 157*7c478bd9Sstevel@tonic-gate #ifdef HAVE_READPASSPHRASE_H 158*7c478bd9Sstevel@tonic-gate # include <readpassphrase.h> 159*7c478bd9Sstevel@tonic-gate #endif 160*7c478bd9Sstevel@tonic-gate 161*7c478bd9Sstevel@tonic-gate #ifdef HAVE_IA_H 162*7c478bd9Sstevel@tonic-gate # include <ia.h> 163*7c478bd9Sstevel@tonic-gate #endif 164*7c478bd9Sstevel@tonic-gate 165*7c478bd9Sstevel@tonic-gate #ifdef HAVE_TMPDIR_H 166*7c478bd9Sstevel@tonic-gate # include <tmpdir.h> 167*7c478bd9Sstevel@tonic-gate #endif 168*7c478bd9Sstevel@tonic-gate 169*7c478bd9Sstevel@tonic-gate #include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */ 170*7c478bd9Sstevel@tonic-gate 171*7c478bd9Sstevel@tonic-gate #include "defines.h" 172*7c478bd9Sstevel@tonic-gate 173*7c478bd9Sstevel@tonic-gate #include "version.h" 174*7c478bd9Sstevel@tonic-gate #include "openbsd-compat.h" 175*7c478bd9Sstevel@tonic-gate #include "bsd-cygwin_util.h" 176*7c478bd9Sstevel@tonic-gate #include "bsd-nextstep.h" 177*7c478bd9Sstevel@tonic-gate 178*7c478bd9Sstevel@tonic-gate #include "entropy.h" 179*7c478bd9Sstevel@tonic-gate #include "g11n.h" 180*7c478bd9Sstevel@tonic-gate 181*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 182*7c478bd9Sstevel@tonic-gate } 183*7c478bd9Sstevel@tonic-gate #endif 184*7c478bd9Sstevel@tonic-gate 185*7c478bd9Sstevel@tonic-gate #endif /* _INCLUDES_H */ 186