Mercurial > dropbear
comparison includes.h @ 285:1b9e69c058d2
propagate from branch 'au.asn.ucc.matt.ltc.dropbear' (head 20dccfc09627970a312d77fb41dc2970b62689c3)
to branch 'au.asn.ucc.matt.dropbear' (head fdf4a7a3b97ae5046139915de7e40399cceb2c01)
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 08 Mar 2006 13:23:58 +0000 |
parents | a3a68c25035e |
children | 740e782679be e17f0333c21e 1bfa65fed772 |
comparison
equal
deleted
inserted
replaced
281:997e6f7dc01e | 285:1b9e69c058d2 |
---|---|
1 /* | |
2 * Dropbear - a SSH2 server | |
3 * | |
4 * Copyright (c) 2002,2003 Matt Johnston | |
5 * All rights reserved. | |
6 * | |
7 * Permission is hereby granted, free of charge, to any person obtaining a copy | |
8 * of this software and associated documentation files (the "Software"), to deal | |
9 * in the Software without restriction, including without limitation the rights | |
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
11 * copies of the Software, and to permit persons to whom the Software is | |
12 * furnished to do so, subject to the following conditions: | |
13 * | |
14 * The above copyright notice and this permission notice shall be included in | |
15 * all copies or substantial portions of the Software. | |
16 * | |
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
23 * SOFTWARE. */ | |
24 | |
25 #ifndef _INCLUDES_H_ | |
26 #define _INCLUDES_H_ | |
27 | |
28 | |
29 #include "config.h" | |
30 #include "options.h" | |
31 #include "debug.h" | |
32 | |
33 #include <sys/types.h> | |
34 #include <sys/ioctl.h> | |
35 #include <sys/param.h> /* required for BSD4_4 define */ | |
36 #include <sys/socket.h> | |
37 #include <sys/stat.h> | |
38 #include <sys/time.h> | |
39 #include <sys/un.h> | |
40 #include <sys/wait.h> | |
41 | |
42 #include <stdio.h> | |
43 #include <errno.h> | |
44 #include <fcntl.h> | |
45 #include <grp.h> | |
46 #include <limits.h> | |
47 #include <pwd.h> | |
48 #include <signal.h> | |
49 #include <stdlib.h> | |
50 #include <string.h> | |
51 #include <termios.h> | |
52 #include <unistd.h> | |
53 #include <syslog.h> | |
54 #include <netdb.h> | |
55 #include <ctype.h> | |
56 #include <stdarg.h> | |
57 #include <dirent.h> | |
58 | |
59 #ifdef HAVE_UTMP_H | |
60 #include <utmp.h> | |
61 #endif | |
62 | |
63 #ifdef HAVE_UTMPX_H | |
64 #include <utmpx.h> | |
65 #endif | |
66 | |
67 #ifdef HAVE_PATHS_H | |
68 #include <paths.h> | |
69 #endif | |
70 | |
71 #ifdef HAVE_LASTLOG_H | |
72 #include <lastlog.h> | |
73 #endif | |
74 | |
75 #include <arpa/inet.h> | |
76 | |
77 #ifdef HAVE_NETINET_IN_H | |
78 #include <netinet/in.h> | |
79 #endif | |
80 | |
81 /* netbsd 1.6 needs this to be included before netinet/ip.h for some | |
82 * undocumented reason */ | |
83 #ifdef HAVE_NETINET_IN_SYSTM_H | |
84 #include <netinet/in_systm.h> | |
85 #endif | |
86 | |
87 #include <netinet/ip.h> | |
88 | |
89 #ifdef HAVE_NETINET_TCP_H | |
90 #include <netinet/tcp.h> | |
91 #endif | |
92 | |
93 #ifdef HAVE_INTTYPES_H | |
94 #include <inttypes.h> | |
95 #endif | |
96 | |
97 #ifdef HAVE_LIBUTIL_H | |
98 #include <libutil.h> | |
99 #endif | |
100 | |
101 #ifdef HAVE_CRYPT_H | |
102 #include <crypt.h> | |
103 #endif | |
104 | |
105 #ifndef DISABLE_ZLIB | |
106 #include <zlib.h> | |
107 #endif | |
108 | |
109 #ifdef HAVE_UTIL_H | |
110 #include <util.h> | |
111 #endif | |
112 | |
113 #ifdef HAVE_SHADOW_H | |
114 #include <shadow.h> | |
115 #endif | |
116 | |
117 #ifdef HAVE_LIBGEN_H | |
118 #include <libgen.h> | |
119 #endif | |
120 | |
121 #include "libtomcrypt/src/headers/tomcrypt.h" | |
122 #include "libtommath/tommath.h" | |
123 | |
124 #include "compat.h" | |
125 #include "fake-rfc2553.h" | |
126 | |
127 #ifndef HAVE_UINT16_T | |
128 #ifndef HAVE_U_INT16_T | |
129 typedef unsigned short u_int16_t; | |
130 #endif /* HAVE_U_INT16_T */ | |
131 typedef u_int16_t uint16_t; | |
132 #endif /* HAVE_UINT16_T */ | |
133 | |
134 #ifndef LOG_AUTHPRIV | |
135 #define LOG_AUTHPRIV LOG_AUTH | |
136 #endif | |
137 | |
138 /* glibc 2.1.3 systems have sockaddr_storage.__ss_family rather than | |
139 * sockaddr_storage.ss_family */ | |
140 #if !defined(HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY) \ | |
141 && defined(HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY) | |
142 #define ss_family __ss_family | |
143 #endif | |
144 | |
145 /* so we can avoid warnings about unused params (ie in signal handlers etc) */ | |
146 #ifdef UNUSED | |
147 #elif defined(__GNUC__) | |
148 # define UNUSED(x) UNUSED_ ## x __attribute__((unused)) | |
149 #elif defined(__LCLINT__) | |
150 # define UNUSED(x) /*@unused@*/ x | |
151 #else | |
152 # define UNUSED(x) x | |
153 #endif | |
154 | |
155 #endif /* _INCLUDES_H_ */ |