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