17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * Author: Tatu Ylonen <ylo@cs.hut.fi> 37c478bd9Sstevel@tonic-gate * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 47c478bd9Sstevel@tonic-gate * All rights reserved 57c478bd9Sstevel@tonic-gate * This file includes most of the needed system headers. 67c478bd9Sstevel@tonic-gate * 77c478bd9Sstevel@tonic-gate * As far as I am concerned, the code I have written for this software 87c478bd9Sstevel@tonic-gate * can be used freely for any purpose. Any derived versions of this 97c478bd9Sstevel@tonic-gate * software must be clearly marked as such, and if the derived work is 107c478bd9Sstevel@tonic-gate * incompatible with the protocol description in the RFC file, it must be 117c478bd9Sstevel@tonic-gate * called by a name other than "ssh" or "Secure Shell". 127c478bd9Sstevel@tonic-gate */ 1326ba1984Sjp161948 /* 14743541abSjp161948 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 1526ba1984Sjp161948 * Use is subject to license terms. 1626ba1984Sjp161948 */ 1726ba1984Sjp161948 18*6b82a780Sjp161948 #ifndef _INCLUDES_H 19*6b82a780Sjp161948 #define _INCLUDES_H 20*6b82a780Sjp161948 21*6b82a780Sjp161948 /* $OpenBSD: includes.h,v 1.17 2002/01/26 16:44:22 stevesk Exp $ */ 22*6b82a780Sjp161948 23*6b82a780Sjp161948 #pragma ident "%Z%%M% %I% %E% SMI" 24*6b82a780Sjp161948 25*6b82a780Sjp161948 #ifdef __cplusplus 26*6b82a780Sjp161948 extern "C" { 27*6b82a780Sjp161948 #endif 28*6b82a780Sjp161948 297c478bd9Sstevel@tonic-gate #define RCSID(msg) \ 30*6b82a780Sjp161948 static const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate #include "config.h" 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gate #include <stdio.h> 357c478bd9Sstevel@tonic-gate #include <ctype.h> 367c478bd9Sstevel@tonic-gate #include <errno.h> 377c478bd9Sstevel@tonic-gate #include <fcntl.h> /* For O_NONBLOCK */ 387c478bd9Sstevel@tonic-gate #include <signal.h> 397c478bd9Sstevel@tonic-gate #include <stdlib.h> 407c478bd9Sstevel@tonic-gate #include <string.h> 417c478bd9Sstevel@tonic-gate #include <stdarg.h> 427c478bd9Sstevel@tonic-gate #include <pwd.h> 437c478bd9Sstevel@tonic-gate #include <grp.h> 447c478bd9Sstevel@tonic-gate #include <time.h> 457c478bd9Sstevel@tonic-gate #include <dirent.h> 467c478bd9Sstevel@tonic-gate #include <libintl.h> 477c478bd9Sstevel@tonic-gate #include <locale.h> 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gate #ifdef HAVE_LIMITS_H 507c478bd9Sstevel@tonic-gate #include <limits.h> /* For PATH_MAX */ 517c478bd9Sstevel@tonic-gate #endif 52*6b82a780Sjp161948 537c478bd9Sstevel@tonic-gate #ifdef HAVE_GETOPT_H 547c478bd9Sstevel@tonic-gate #include <getopt.h> 557c478bd9Sstevel@tonic-gate #endif 56*6b82a780Sjp161948 577c478bd9Sstevel@tonic-gate #ifdef HAVE_BSTRING_H 587c478bd9Sstevel@tonic-gate #include <bstring.h> 597c478bd9Sstevel@tonic-gate #endif 60*6b82a780Sjp161948 617c478bd9Sstevel@tonic-gate #if defined(HAVE_GLOB_H) && defined(GLOB_HAS_ALTDIRFUNC) && \ 627c478bd9Sstevel@tonic-gate defined(GLOB_HAS_GL_MATCHC) 637c478bd9Sstevel@tonic-gate #include <glob.h> 647c478bd9Sstevel@tonic-gate #endif 65*6b82a780Sjp161948 667c478bd9Sstevel@tonic-gate #ifdef HAVE_NETGROUP_H 677c478bd9Sstevel@tonic-gate #include <netgroup.h> 687c478bd9Sstevel@tonic-gate #endif 69*6b82a780Sjp161948 707c478bd9Sstevel@tonic-gate #if defined(HAVE_NETDB_H) 717c478bd9Sstevel@tonic-gate #include <netdb.h> 727c478bd9Sstevel@tonic-gate #endif 73*6b82a780Sjp161948 747c478bd9Sstevel@tonic-gate #ifdef HAVE_ENDIAN_H 757c478bd9Sstevel@tonic-gate #include <endian.h> 767c478bd9Sstevel@tonic-gate #endif 77*6b82a780Sjp161948 787c478bd9Sstevel@tonic-gate #ifdef HAVE_TTYENT_H 797c478bd9Sstevel@tonic-gate #include <ttyent.h> 807c478bd9Sstevel@tonic-gate #endif 81*6b82a780Sjp161948 827c478bd9Sstevel@tonic-gate #ifdef HAVE_UTIME_H 837c478bd9Sstevel@tonic-gate #include <utime.h> 847c478bd9Sstevel@tonic-gate #endif 85*6b82a780Sjp161948 867c478bd9Sstevel@tonic-gate #ifdef HAVE_MAILLOCK_H 877c478bd9Sstevel@tonic-gate #include <maillock.h> /* For _PATH_MAILDIR */ 887c478bd9Sstevel@tonic-gate #endif 89*6b82a780Sjp161948 907c478bd9Sstevel@tonic-gate #include <unistd.h> /* For STDIN_FILENO, etc */ 917c478bd9Sstevel@tonic-gate #include <termios.h> /* Struct winsize */ 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gate /* 94*6b82a780Sjp161948 * *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE 95*6b82a780Sjp161948 * respectively 967c478bd9Sstevel@tonic-gate */ 977c478bd9Sstevel@tonic-gate #ifdef HAVE_STRINGS_H 987c478bd9Sstevel@tonic-gate #include <strings.h> 997c478bd9Sstevel@tonic-gate #endif 100*6b82a780Sjp161948 1017c478bd9Sstevel@tonic-gate #ifdef HAVE_LOGIN_H 1027c478bd9Sstevel@tonic-gate #include <login.h> 1037c478bd9Sstevel@tonic-gate #endif 1047c478bd9Sstevel@tonic-gate 10526ba1984Sjp161948 #ifdef HAVE_UCRED_H 10626ba1984Sjp161948 #include <ucred.h> 10726ba1984Sjp161948 #endif 10826ba1984Sjp161948 1097c478bd9Sstevel@tonic-gate #ifdef HAVE_UTMP_H 1107c478bd9Sstevel@tonic-gate #include <utmp.h> 1117c478bd9Sstevel@tonic-gate #endif 112*6b82a780Sjp161948 1137c478bd9Sstevel@tonic-gate #ifdef HAVE_UTMPX_H 1147c478bd9Sstevel@tonic-gate #ifdef HAVE_TV_IN_UTMPX 1157c478bd9Sstevel@tonic-gate #include <sys/time.h> 1167c478bd9Sstevel@tonic-gate #endif 1177c478bd9Sstevel@tonic-gate #include <utmpx.h> 1187c478bd9Sstevel@tonic-gate #endif 119*6b82a780Sjp161948 1207c478bd9Sstevel@tonic-gate #ifdef HAVE_LASTLOG_H 1217c478bd9Sstevel@tonic-gate #include <lastlog.h> 1227c478bd9Sstevel@tonic-gate #endif 123*6b82a780Sjp161948 1247c478bd9Sstevel@tonic-gate #ifdef HAVE_PATHS_H 1257c478bd9Sstevel@tonic-gate #include <paths.h> /* For _PATH_XXX */ 1267c478bd9Sstevel@tonic-gate #endif 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gate #include <sys/types.h> 1297c478bd9Sstevel@tonic-gate #include <sys/socket.h> 1307c478bd9Sstevel@tonic-gate #include <sys/ioctl.h> 1317c478bd9Sstevel@tonic-gate #include <sys/wait.h> 132*6b82a780Sjp161948 1337c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_TIME_H 1347c478bd9Sstevel@tonic-gate #include <sys/time.h> /* For timersub */ 1357c478bd9Sstevel@tonic-gate #endif 136*6b82a780Sjp161948 1377c478bd9Sstevel@tonic-gate #include <sys/resource.h> 1387c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_SELECT_H 1397c478bd9Sstevel@tonic-gate #include <sys/select.h> 1407c478bd9Sstevel@tonic-gate #endif 141*6b82a780Sjp161948 1427c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_BSDTTY_H 1437c478bd9Sstevel@tonic-gate #include <sys/bsdtty.h> 1447c478bd9Sstevel@tonic-gate #endif 145*6b82a780Sjp161948 1467c478bd9Sstevel@tonic-gate #include <sys/param.h> /* For MAXPATHLEN and roundup() */ 1477c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_UN_H 1487c478bd9Sstevel@tonic-gate #include <sys/un.h> /* For sockaddr_un */ 1497c478bd9Sstevel@tonic-gate #endif 150*6b82a780Sjp161948 1517c478bd9Sstevel@tonic-gate #ifdef HAVE_STDINT_H 1527c478bd9Sstevel@tonic-gate #include <stdint.h> 1537c478bd9Sstevel@tonic-gate #endif 154*6b82a780Sjp161948 1557c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_BITYPES_H 1567c478bd9Sstevel@tonic-gate #include <sys/bitypes.h> /* For u_intXX_t */ 1577c478bd9Sstevel@tonic-gate #endif 158*6b82a780Sjp161948 1597c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_CDEFS_H 1607c478bd9Sstevel@tonic-gate #include <sys/cdefs.h> /* For __P() */ 1617c478bd9Sstevel@tonic-gate #endif 162*6b82a780Sjp161948 1637c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_STAT_H 1647c478bd9Sstevel@tonic-gate #include <sys/stat.h> /* For S_* constants and macros */ 1657c478bd9Sstevel@tonic-gate #endif 166*6b82a780Sjp161948 1677c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_SYSMACROS_H 1687c478bd9Sstevel@tonic-gate #include <sys/sysmacros.h> /* For MIN, MAX, etc */ 1697c478bd9Sstevel@tonic-gate #endif 170*6b82a780Sjp161948 1717c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_MMAN_H 1727c478bd9Sstevel@tonic-gate #include <sys/mman.h> /* for MAP_ANONYMOUS */ 1737c478bd9Sstevel@tonic-gate #endif 1747c478bd9Sstevel@tonic-gate 1757c478bd9Sstevel@tonic-gate #include <netinet/in_systm.h> /* For typedefs */ 1767c478bd9Sstevel@tonic-gate #include <netinet/in.h> /* For IPv6 macros */ 1777c478bd9Sstevel@tonic-gate #include <netinet/ip.h> /* For IPTOS macros */ 1787c478bd9Sstevel@tonic-gate #include <netinet/tcp.h> 1797c478bd9Sstevel@tonic-gate #include <arpa/inet.h> 180*6b82a780Sjp161948 1817c478bd9Sstevel@tonic-gate #ifdef HAVE_RPC_TYPES_H 1827c478bd9Sstevel@tonic-gate #include <rpc/types.h> /* For INADDR_LOOPBACK */ 1837c478bd9Sstevel@tonic-gate #endif 184*6b82a780Sjp161948 1857c478bd9Sstevel@tonic-gate #ifdef USE_PAM 1867c478bd9Sstevel@tonic-gate #include <security/pam_appl.h> 1877c478bd9Sstevel@tonic-gate #endif 188*6b82a780Sjp161948 1897c478bd9Sstevel@tonic-gate #ifdef HAVE_READPASSPHRASE_H 1907c478bd9Sstevel@tonic-gate #include <readpassphrase.h> 1917c478bd9Sstevel@tonic-gate #endif 1927c478bd9Sstevel@tonic-gate 1937c478bd9Sstevel@tonic-gate #ifdef HAVE_IA_H 1947c478bd9Sstevel@tonic-gate #include <ia.h> 1957c478bd9Sstevel@tonic-gate #endif 1967c478bd9Sstevel@tonic-gate 1977c478bd9Sstevel@tonic-gate #ifdef HAVE_TMPDIR_H 1987c478bd9Sstevel@tonic-gate #include <tmpdir.h> 1997c478bd9Sstevel@tonic-gate #endif 2007c478bd9Sstevel@tonic-gate 2017c478bd9Sstevel@tonic-gate #include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */ 2027c478bd9Sstevel@tonic-gate 2037c478bd9Sstevel@tonic-gate #include "defines.h" 2047c478bd9Sstevel@tonic-gate 2057c478bd9Sstevel@tonic-gate #include "version.h" 2067c478bd9Sstevel@tonic-gate #include "openbsd-compat.h" 2077c478bd9Sstevel@tonic-gate #include "bsd-cygwin_util.h" 2087c478bd9Sstevel@tonic-gate 2097c478bd9Sstevel@tonic-gate #include "entropy.h" 2107c478bd9Sstevel@tonic-gate #include "g11n.h" 2117c478bd9Sstevel@tonic-gate 2127c478bd9Sstevel@tonic-gate #ifdef __cplusplus 2137c478bd9Sstevel@tonic-gate } 2147c478bd9Sstevel@tonic-gate #endif 2157c478bd9Sstevel@tonic-gate 2167c478bd9Sstevel@tonic-gate #endif /* _INCLUDES_H */ 217