xref: /titanic_44/usr/src/cmd/ssh/include/includes.h (revision 26ba198477055398633f319757f934b7ce73784e)
17c478bd9Sstevel@tonic-gate /*	$OpenBSD: includes.h,v 1.17 2002/01/26 16:44:22 stevesk Exp $	*/
27c478bd9Sstevel@tonic-gate 
37c478bd9Sstevel@tonic-gate #ifndef	_INCLUDES_H
47c478bd9Sstevel@tonic-gate #define	_INCLUDES_H
57c478bd9Sstevel@tonic-gate 
67c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
77c478bd9Sstevel@tonic-gate 
87c478bd9Sstevel@tonic-gate #ifdef __cplusplus
97c478bd9Sstevel@tonic-gate extern "C" {
107c478bd9Sstevel@tonic-gate #endif
117c478bd9Sstevel@tonic-gate 
127c478bd9Sstevel@tonic-gate 
137c478bd9Sstevel@tonic-gate /*
147c478bd9Sstevel@tonic-gate  * Author: Tatu Ylonen <ylo@cs.hut.fi>
157c478bd9Sstevel@tonic-gate  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
167c478bd9Sstevel@tonic-gate  *                    All rights reserved
177c478bd9Sstevel@tonic-gate  * This file includes most of the needed system headers.
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * As far as I am concerned, the code I have written for this software
207c478bd9Sstevel@tonic-gate  * can be used freely for any purpose.  Any derived versions of this
217c478bd9Sstevel@tonic-gate  * software must be clearly marked as such, and if the derived work is
227c478bd9Sstevel@tonic-gate  * incompatible with the protocol description in the RFC file, it must be
237c478bd9Sstevel@tonic-gate  * called by a name other than "ssh" or "Secure Shell".
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
26*26ba1984Sjp161948 /*
27*26ba1984Sjp161948  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
28*26ba1984Sjp161948  * Use is subject to license terms.
29*26ba1984Sjp161948  */
30*26ba1984Sjp161948 
317c478bd9Sstevel@tonic-gate #define RCSID(msg) \
327c478bd9Sstevel@tonic-gate static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
337c478bd9Sstevel@tonic-gate 
347c478bd9Sstevel@tonic-gate #include "config.h"
357c478bd9Sstevel@tonic-gate 
367c478bd9Sstevel@tonic-gate #include <stdio.h>
377c478bd9Sstevel@tonic-gate #include <ctype.h>
387c478bd9Sstevel@tonic-gate #include <errno.h>
397c478bd9Sstevel@tonic-gate #include <fcntl.h> /* For O_NONBLOCK */
407c478bd9Sstevel@tonic-gate #include <signal.h>
417c478bd9Sstevel@tonic-gate #include <stdlib.h>
427c478bd9Sstevel@tonic-gate #include <string.h>
437c478bd9Sstevel@tonic-gate #include <stdarg.h>
447c478bd9Sstevel@tonic-gate #include <pwd.h>
457c478bd9Sstevel@tonic-gate #include <grp.h>
467c478bd9Sstevel@tonic-gate #include <time.h>
477c478bd9Sstevel@tonic-gate #include <dirent.h>
487c478bd9Sstevel@tonic-gate #include <libintl.h>
497c478bd9Sstevel@tonic-gate #include <locale.h>
507c478bd9Sstevel@tonic-gate 
517c478bd9Sstevel@tonic-gate #ifdef HAVE_LIMITS_H
527c478bd9Sstevel@tonic-gate # include <limits.h> /* For PATH_MAX */
537c478bd9Sstevel@tonic-gate #endif
547c478bd9Sstevel@tonic-gate #ifdef HAVE_GETOPT_H
557c478bd9Sstevel@tonic-gate # include <getopt.h>
567c478bd9Sstevel@tonic-gate #endif
577c478bd9Sstevel@tonic-gate #ifdef HAVE_BSTRING_H
587c478bd9Sstevel@tonic-gate # include <bstring.h>
597c478bd9Sstevel@tonic-gate #endif
607c478bd9Sstevel@tonic-gate #if defined(HAVE_GLOB_H) && defined(GLOB_HAS_ALTDIRFUNC) && \
617c478bd9Sstevel@tonic-gate     defined(GLOB_HAS_GL_MATCHC)
627c478bd9Sstevel@tonic-gate # include <glob.h>
637c478bd9Sstevel@tonic-gate #endif
647c478bd9Sstevel@tonic-gate #ifdef HAVE_NETGROUP_H
657c478bd9Sstevel@tonic-gate # include <netgroup.h>
667c478bd9Sstevel@tonic-gate #endif
677c478bd9Sstevel@tonic-gate #if defined(HAVE_NETDB_H)
687c478bd9Sstevel@tonic-gate # include <netdb.h>
697c478bd9Sstevel@tonic-gate #endif
707c478bd9Sstevel@tonic-gate #ifdef HAVE_ENDIAN_H
717c478bd9Sstevel@tonic-gate # include <endian.h>
727c478bd9Sstevel@tonic-gate #endif
737c478bd9Sstevel@tonic-gate #ifdef HAVE_TTYENT_H
747c478bd9Sstevel@tonic-gate # include <ttyent.h>
757c478bd9Sstevel@tonic-gate #endif
767c478bd9Sstevel@tonic-gate #ifdef HAVE_UTIME_H
777c478bd9Sstevel@tonic-gate # include <utime.h>
787c478bd9Sstevel@tonic-gate #endif
797c478bd9Sstevel@tonic-gate #ifdef HAVE_MAILLOCK_H
807c478bd9Sstevel@tonic-gate # include <maillock.h> /* For _PATH_MAILDIR */
817c478bd9Sstevel@tonic-gate #endif
827c478bd9Sstevel@tonic-gate #ifdef HAVE_NEXT
837c478bd9Sstevel@tonic-gate #  include <libc.h>
847c478bd9Sstevel@tonic-gate #endif
857c478bd9Sstevel@tonic-gate #include <unistd.h> /* For STDIN_FILENO, etc */
867c478bd9Sstevel@tonic-gate #include <termios.h> /* Struct winsize */
877c478bd9Sstevel@tonic-gate 
887c478bd9Sstevel@tonic-gate /*
897c478bd9Sstevel@tonic-gate  *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively
907c478bd9Sstevel@tonic-gate  */
917c478bd9Sstevel@tonic-gate #ifdef HAVE_STRINGS_H
927c478bd9Sstevel@tonic-gate # include <strings.h>
937c478bd9Sstevel@tonic-gate #endif
947c478bd9Sstevel@tonic-gate #ifdef HAVE_LOGIN_H
957c478bd9Sstevel@tonic-gate # include <login.h>
967c478bd9Sstevel@tonic-gate #endif
977c478bd9Sstevel@tonic-gate 
98*26ba1984Sjp161948 #ifdef HAVE_UCRED_H
99*26ba1984Sjp161948 #  include <ucred.h>
100*26ba1984Sjp161948 #endif
101*26ba1984Sjp161948 
1027c478bd9Sstevel@tonic-gate #ifdef HAVE_UTMP_H
1037c478bd9Sstevel@tonic-gate #  include <utmp.h>
1047c478bd9Sstevel@tonic-gate #endif
1057c478bd9Sstevel@tonic-gate #ifdef HAVE_UTMPX_H
1067c478bd9Sstevel@tonic-gate #  ifdef HAVE_TV_IN_UTMPX
1077c478bd9Sstevel@tonic-gate #    include <sys/time.h>
1087c478bd9Sstevel@tonic-gate #  endif
1097c478bd9Sstevel@tonic-gate #  include <utmpx.h>
1107c478bd9Sstevel@tonic-gate #endif
1117c478bd9Sstevel@tonic-gate #ifdef HAVE_LASTLOG_H
1127c478bd9Sstevel@tonic-gate #  include <lastlog.h>
1137c478bd9Sstevel@tonic-gate #endif
1147c478bd9Sstevel@tonic-gate #ifdef HAVE_PATHS_H
1157c478bd9Sstevel@tonic-gate #  include <paths.h> /* For _PATH_XXX */
1167c478bd9Sstevel@tonic-gate #endif
1177c478bd9Sstevel@tonic-gate 
1187c478bd9Sstevel@tonic-gate #include <sys/types.h>
1197c478bd9Sstevel@tonic-gate #include <sys/socket.h>
1207c478bd9Sstevel@tonic-gate #include <sys/ioctl.h>
1217c478bd9Sstevel@tonic-gate #include <sys/wait.h>
1227c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_TIME_H
1237c478bd9Sstevel@tonic-gate # include <sys/time.h> /* For timersub */
1247c478bd9Sstevel@tonic-gate #endif
1257c478bd9Sstevel@tonic-gate #include <sys/resource.h>
1267c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_SELECT_H
1277c478bd9Sstevel@tonic-gate # include <sys/select.h>
1287c478bd9Sstevel@tonic-gate #endif
1297c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_BSDTTY_H
1307c478bd9Sstevel@tonic-gate # include <sys/bsdtty.h>
1317c478bd9Sstevel@tonic-gate #endif
1327c478bd9Sstevel@tonic-gate #include <sys/param.h> /* For MAXPATHLEN and roundup() */
1337c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_UN_H
1347c478bd9Sstevel@tonic-gate # include <sys/un.h> /* For sockaddr_un */
1357c478bd9Sstevel@tonic-gate #endif
1367c478bd9Sstevel@tonic-gate #ifdef HAVE_STDINT_H
1377c478bd9Sstevel@tonic-gate # include <stdint.h>
1387c478bd9Sstevel@tonic-gate #endif
1397c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_BITYPES_H
1407c478bd9Sstevel@tonic-gate # include <sys/bitypes.h> /* For u_intXX_t */
1417c478bd9Sstevel@tonic-gate #endif
1427c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_CDEFS_H
1437c478bd9Sstevel@tonic-gate # include <sys/cdefs.h> /* For __P() */
1447c478bd9Sstevel@tonic-gate #endif
1457c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_STAT_H
1467c478bd9Sstevel@tonic-gate # include <sys/stat.h> /* For S_* constants and macros */
1477c478bd9Sstevel@tonic-gate #endif
1487c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_SYSMACROS_H
1497c478bd9Sstevel@tonic-gate # include <sys/sysmacros.h> /* For MIN, MAX, etc */
1507c478bd9Sstevel@tonic-gate #endif
1517c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_MMAN_H
1527c478bd9Sstevel@tonic-gate #include <sys/mman.h> /* for MAP_ANONYMOUS */
1537c478bd9Sstevel@tonic-gate #endif
1547c478bd9Sstevel@tonic-gate 
1557c478bd9Sstevel@tonic-gate #include <netinet/in_systm.h> /* For typedefs */
1567c478bd9Sstevel@tonic-gate #include <netinet/in.h> /* For IPv6 macros */
1577c478bd9Sstevel@tonic-gate #include <netinet/ip.h> /* For IPTOS macros */
1587c478bd9Sstevel@tonic-gate #include <netinet/tcp.h>
1597c478bd9Sstevel@tonic-gate #include <arpa/inet.h>
1607c478bd9Sstevel@tonic-gate #ifdef HAVE_RPC_TYPES_H
1617c478bd9Sstevel@tonic-gate # include <rpc/types.h> /* For INADDR_LOOPBACK */
1627c478bd9Sstevel@tonic-gate #endif
1637c478bd9Sstevel@tonic-gate #ifdef USE_PAM
1647c478bd9Sstevel@tonic-gate # include <security/pam_appl.h>
1657c478bd9Sstevel@tonic-gate #endif
1667c478bd9Sstevel@tonic-gate #ifdef HAVE_READPASSPHRASE_H
1677c478bd9Sstevel@tonic-gate # include <readpassphrase.h>
1687c478bd9Sstevel@tonic-gate #endif
1697c478bd9Sstevel@tonic-gate 
1707c478bd9Sstevel@tonic-gate #ifdef HAVE_IA_H
1717c478bd9Sstevel@tonic-gate # include <ia.h>
1727c478bd9Sstevel@tonic-gate #endif
1737c478bd9Sstevel@tonic-gate 
1747c478bd9Sstevel@tonic-gate #ifdef HAVE_TMPDIR_H
1757c478bd9Sstevel@tonic-gate # include <tmpdir.h>
1767c478bd9Sstevel@tonic-gate #endif
1777c478bd9Sstevel@tonic-gate 
1787c478bd9Sstevel@tonic-gate #include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */
1797c478bd9Sstevel@tonic-gate 
1807c478bd9Sstevel@tonic-gate #include "defines.h"
1817c478bd9Sstevel@tonic-gate 
1827c478bd9Sstevel@tonic-gate #include "version.h"
1837c478bd9Sstevel@tonic-gate #include "openbsd-compat.h"
1847c478bd9Sstevel@tonic-gate #include "bsd-cygwin_util.h"
1857c478bd9Sstevel@tonic-gate #include "bsd-nextstep.h"
1867c478bd9Sstevel@tonic-gate 
1877c478bd9Sstevel@tonic-gate #include "entropy.h"
1887c478bd9Sstevel@tonic-gate #include "g11n.h"
1897c478bd9Sstevel@tonic-gate 
1907c478bd9Sstevel@tonic-gate #ifdef __cplusplus
1917c478bd9Sstevel@tonic-gate }
1927c478bd9Sstevel@tonic-gate #endif
1937c478bd9Sstevel@tonic-gate 
1947c478bd9Sstevel@tonic-gate #endif /* _INCLUDES_H */
195