10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * Author: Tatu Ylonen <ylo@cs.hut.fi> 30Sstevel@tonic-gate * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 40Sstevel@tonic-gate * All rights reserved 50Sstevel@tonic-gate * This file includes most of the needed system headers. 60Sstevel@tonic-gate * 70Sstevel@tonic-gate * As far as I am concerned, the code I have written for this software 80Sstevel@tonic-gate * can be used freely for any purpose. Any derived versions of this 90Sstevel@tonic-gate * software must be clearly marked as such, and if the derived work is 100Sstevel@tonic-gate * incompatible with the protocol description in the RFC file, it must be 110Sstevel@tonic-gate * called by a name other than "ssh" or "Secure Shell". 120Sstevel@tonic-gate */ 132757Sjp161948 /* 145600Sjp161948 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 152757Sjp161948 * Use is subject to license terms. 162757Sjp161948 */ 172757Sjp161948 18*5685Sjp161948 #ifndef _INCLUDES_H 19*5685Sjp161948 #define _INCLUDES_H 20*5685Sjp161948 21*5685Sjp161948 /* $OpenBSD: includes.h,v 1.17 2002/01/26 16:44:22 stevesk Exp $ */ 22*5685Sjp161948 23*5685Sjp161948 #pragma ident "%Z%%M% %I% %E% SMI" 24*5685Sjp161948 25*5685Sjp161948 #ifdef __cplusplus 26*5685Sjp161948 extern "C" { 27*5685Sjp161948 #endif 28*5685Sjp161948 29*5685Sjp161948 #define RCSID(msg) \ 30*5685Sjp161948 static const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } 310Sstevel@tonic-gate 320Sstevel@tonic-gate #include "config.h" 330Sstevel@tonic-gate 340Sstevel@tonic-gate #include <stdio.h> 350Sstevel@tonic-gate #include <ctype.h> 360Sstevel@tonic-gate #include <errno.h> 370Sstevel@tonic-gate #include <fcntl.h> /* For O_NONBLOCK */ 380Sstevel@tonic-gate #include <signal.h> 390Sstevel@tonic-gate #include <stdlib.h> 400Sstevel@tonic-gate #include <string.h> 410Sstevel@tonic-gate #include <stdarg.h> 420Sstevel@tonic-gate #include <pwd.h> 430Sstevel@tonic-gate #include <grp.h> 440Sstevel@tonic-gate #include <time.h> 450Sstevel@tonic-gate #include <dirent.h> 460Sstevel@tonic-gate #include <libintl.h> 470Sstevel@tonic-gate #include <locale.h> 480Sstevel@tonic-gate 490Sstevel@tonic-gate #ifdef HAVE_LIMITS_H 50*5685Sjp161948 #include <limits.h> /* For PATH_MAX */ 510Sstevel@tonic-gate #endif 52*5685Sjp161948 530Sstevel@tonic-gate #ifdef HAVE_GETOPT_H 54*5685Sjp161948 #include <getopt.h> 550Sstevel@tonic-gate #endif 56*5685Sjp161948 570Sstevel@tonic-gate #ifdef HAVE_BSTRING_H 58*5685Sjp161948 #include <bstring.h> 590Sstevel@tonic-gate #endif 60*5685Sjp161948 610Sstevel@tonic-gate #if defined(HAVE_GLOB_H) && defined(GLOB_HAS_ALTDIRFUNC) && \ 620Sstevel@tonic-gate defined(GLOB_HAS_GL_MATCHC) 63*5685Sjp161948 #include <glob.h> 640Sstevel@tonic-gate #endif 65*5685Sjp161948 660Sstevel@tonic-gate #ifdef HAVE_NETGROUP_H 67*5685Sjp161948 #include <netgroup.h> 680Sstevel@tonic-gate #endif 69*5685Sjp161948 700Sstevel@tonic-gate #if defined(HAVE_NETDB_H) 71*5685Sjp161948 #include <netdb.h> 720Sstevel@tonic-gate #endif 73*5685Sjp161948 740Sstevel@tonic-gate #ifdef HAVE_ENDIAN_H 75*5685Sjp161948 #include <endian.h> 760Sstevel@tonic-gate #endif 77*5685Sjp161948 780Sstevel@tonic-gate #ifdef HAVE_TTYENT_H 79*5685Sjp161948 #include <ttyent.h> 800Sstevel@tonic-gate #endif 81*5685Sjp161948 820Sstevel@tonic-gate #ifdef HAVE_UTIME_H 83*5685Sjp161948 #include <utime.h> 840Sstevel@tonic-gate #endif 85*5685Sjp161948 860Sstevel@tonic-gate #ifdef HAVE_MAILLOCK_H 87*5685Sjp161948 #include <maillock.h> /* For _PATH_MAILDIR */ 880Sstevel@tonic-gate #endif 89*5685Sjp161948 900Sstevel@tonic-gate #include <unistd.h> /* For STDIN_FILENO, etc */ 910Sstevel@tonic-gate #include <termios.h> /* Struct winsize */ 920Sstevel@tonic-gate 930Sstevel@tonic-gate /* 94*5685Sjp161948 * *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE 95*5685Sjp161948 * respectively 960Sstevel@tonic-gate */ 970Sstevel@tonic-gate #ifdef HAVE_STRINGS_H 98*5685Sjp161948 #include <strings.h> 990Sstevel@tonic-gate #endif 100*5685Sjp161948 1010Sstevel@tonic-gate #ifdef HAVE_LOGIN_H 102*5685Sjp161948 #include <login.h> 1030Sstevel@tonic-gate #endif 1040Sstevel@tonic-gate 1052757Sjp161948 #ifdef HAVE_UCRED_H 106*5685Sjp161948 #include <ucred.h> 1072757Sjp161948 #endif 1082757Sjp161948 1090Sstevel@tonic-gate #ifdef HAVE_UTMP_H 110*5685Sjp161948 #include <utmp.h> 1110Sstevel@tonic-gate #endif 112*5685Sjp161948 1130Sstevel@tonic-gate #ifdef HAVE_UTMPX_H 114*5685Sjp161948 #ifdef HAVE_TV_IN_UTMPX 115*5685Sjp161948 #include <sys/time.h> 116*5685Sjp161948 #endif 117*5685Sjp161948 #include <utmpx.h> 1180Sstevel@tonic-gate #endif 119*5685Sjp161948 1200Sstevel@tonic-gate #ifdef HAVE_LASTLOG_H 121*5685Sjp161948 #include <lastlog.h> 1220Sstevel@tonic-gate #endif 123*5685Sjp161948 1240Sstevel@tonic-gate #ifdef HAVE_PATHS_H 125*5685Sjp161948 #include <paths.h> /* For _PATH_XXX */ 1260Sstevel@tonic-gate #endif 1270Sstevel@tonic-gate 1280Sstevel@tonic-gate #include <sys/types.h> 1290Sstevel@tonic-gate #include <sys/socket.h> 1300Sstevel@tonic-gate #include <sys/ioctl.h> 1310Sstevel@tonic-gate #include <sys/wait.h> 132*5685Sjp161948 1330Sstevel@tonic-gate #ifdef HAVE_SYS_TIME_H 134*5685Sjp161948 #include <sys/time.h> /* For timersub */ 1350Sstevel@tonic-gate #endif 136*5685Sjp161948 1370Sstevel@tonic-gate #include <sys/resource.h> 1380Sstevel@tonic-gate #ifdef HAVE_SYS_SELECT_H 139*5685Sjp161948 #include <sys/select.h> 1400Sstevel@tonic-gate #endif 141*5685Sjp161948 1420Sstevel@tonic-gate #ifdef HAVE_SYS_BSDTTY_H 143*5685Sjp161948 #include <sys/bsdtty.h> 1440Sstevel@tonic-gate #endif 145*5685Sjp161948 1460Sstevel@tonic-gate #include <sys/param.h> /* For MAXPATHLEN and roundup() */ 1470Sstevel@tonic-gate #ifdef HAVE_SYS_UN_H 148*5685Sjp161948 #include <sys/un.h> /* For sockaddr_un */ 1490Sstevel@tonic-gate #endif 150*5685Sjp161948 1510Sstevel@tonic-gate #ifdef HAVE_STDINT_H 152*5685Sjp161948 #include <stdint.h> 1530Sstevel@tonic-gate #endif 154*5685Sjp161948 1550Sstevel@tonic-gate #ifdef HAVE_SYS_BITYPES_H 156*5685Sjp161948 #include <sys/bitypes.h> /* For u_intXX_t */ 1570Sstevel@tonic-gate #endif 158*5685Sjp161948 1590Sstevel@tonic-gate #ifdef HAVE_SYS_CDEFS_H 160*5685Sjp161948 #include <sys/cdefs.h> /* For __P() */ 1610Sstevel@tonic-gate #endif 162*5685Sjp161948 1630Sstevel@tonic-gate #ifdef HAVE_SYS_STAT_H 164*5685Sjp161948 #include <sys/stat.h> /* For S_* constants and macros */ 1650Sstevel@tonic-gate #endif 166*5685Sjp161948 1670Sstevel@tonic-gate #ifdef HAVE_SYS_SYSMACROS_H 168*5685Sjp161948 #include <sys/sysmacros.h> /* For MIN, MAX, etc */ 1690Sstevel@tonic-gate #endif 170*5685Sjp161948 1710Sstevel@tonic-gate #ifdef HAVE_SYS_MMAN_H 1720Sstevel@tonic-gate #include <sys/mman.h> /* for MAP_ANONYMOUS */ 1730Sstevel@tonic-gate #endif 1740Sstevel@tonic-gate 1750Sstevel@tonic-gate #include <netinet/in_systm.h> /* For typedefs */ 1760Sstevel@tonic-gate #include <netinet/in.h> /* For IPv6 macros */ 1770Sstevel@tonic-gate #include <netinet/ip.h> /* For IPTOS macros */ 1780Sstevel@tonic-gate #include <netinet/tcp.h> 1790Sstevel@tonic-gate #include <arpa/inet.h> 180*5685Sjp161948 1810Sstevel@tonic-gate #ifdef HAVE_RPC_TYPES_H 182*5685Sjp161948 #include <rpc/types.h> /* For INADDR_LOOPBACK */ 1830Sstevel@tonic-gate #endif 184*5685Sjp161948 1850Sstevel@tonic-gate #ifdef USE_PAM 186*5685Sjp161948 #include <security/pam_appl.h> 1870Sstevel@tonic-gate #endif 188*5685Sjp161948 1890Sstevel@tonic-gate #ifdef HAVE_READPASSPHRASE_H 190*5685Sjp161948 #include <readpassphrase.h> 1910Sstevel@tonic-gate #endif 1920Sstevel@tonic-gate 1930Sstevel@tonic-gate #ifdef HAVE_IA_H 194*5685Sjp161948 #include <ia.h> 1950Sstevel@tonic-gate #endif 1960Sstevel@tonic-gate 1970Sstevel@tonic-gate #ifdef HAVE_TMPDIR_H 198*5685Sjp161948 #include <tmpdir.h> 1990Sstevel@tonic-gate #endif 2000Sstevel@tonic-gate 2010Sstevel@tonic-gate #include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */ 2020Sstevel@tonic-gate 2030Sstevel@tonic-gate #include "defines.h" 2040Sstevel@tonic-gate 2050Sstevel@tonic-gate #include "version.h" 2060Sstevel@tonic-gate #include "openbsd-compat.h" 2070Sstevel@tonic-gate #include "bsd-cygwin_util.h" 2080Sstevel@tonic-gate 2090Sstevel@tonic-gate #include "entropy.h" 2100Sstevel@tonic-gate #include "g11n.h" 2110Sstevel@tonic-gate 2120Sstevel@tonic-gate #ifdef __cplusplus 2130Sstevel@tonic-gate } 2140Sstevel@tonic-gate #endif 2150Sstevel@tonic-gate 2160Sstevel@tonic-gate #endif /* _INCLUDES_H */ 217