blob: da08722ec9074bd9f1caf4b134324532b3ae5751 [file] [log] [blame]
Damien Millerd4a8b7e1999-10-27 13:42:43 +10001/*
Damien Miller95def091999-11-25 00:26:21 +11002 * Author: Tatu Ylonen <ylo@cs.hut.fi>
Damien Miller95def091999-11-25 00:26:21 +11003 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved
Damien Miller95def091999-11-25 00:26:21 +11005 * This file includes most of the needed system headers.
Damien Miller4af51302000-04-16 11:18:38 +10006 *
Damien Millere4340be2000-09-16 13:29:08 +11007 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
Damien Miller95def091999-11-25 00:26:21 +110012 */
Damien Millerd4a8b7e1999-10-27 13:42:43 +100013
14#ifndef INCLUDES_H
15#define INCLUDES_H
16
17#define RCSID(msg) \
18static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
19
Damien Miller4874c791999-11-16 13:29:26 +110020#include "config.h"
21
Damien Miller0f91b4e2000-06-18 15:43:25 +100022#include "next-posix.h"
23
Damien Millerd4a8b7e1999-10-27 13:42:43 +100024#include <sys/types.h>
25#include <sys/socket.h>
Damien Millerd4a8b7e1999-10-27 13:42:43 +100026#include <sys/ioctl.h>
Damien Millerd4a8b7e1999-10-27 13:42:43 +100027#include <sys/wait.h>
Damien Millerd4a8b7e1999-10-27 13:42:43 +100028#include <sys/resource.h>
29
Damien Millerbac2d8a2000-09-05 16:13:06 +110030#ifndef HAVE_CYGWIN
Damien Millerd4a8b7e1999-10-27 13:42:43 +100031#include <netinet/tcp.h>
Damien Millerbac2d8a2000-09-05 16:13:06 +110032#endif
Damien Millerd4a8b7e1999-10-27 13:42:43 +100033#include <arpa/inet.h>
34#include <netdb.h>
35
Damien Millerd4a8b7e1999-10-27 13:42:43 +100036#include <stdio.h>
37#include <ctype.h>
38#include <errno.h>
39#include <fcntl.h>
Damien Millerd4a8b7e1999-10-27 13:42:43 +100040#include <signal.h>
41#include <termios.h>
42#include <stdlib.h>
43#include <string.h>
44#include <stdarg.h>
45#include <pwd.h>
46#include <grp.h>
Damien Millerd4a8b7e1999-10-27 13:42:43 +100047#include <time.h>
Damien Millerd4a8b7e1999-10-27 13:42:43 +100048#include <dirent.h>
Damien Millerbac2d8a2000-09-05 16:13:06 +110049#ifdef HAVE_CYGWIN
50#include <getopt.h>
51#endif
Damien Millerd4a8b7e1999-10-27 13:42:43 +100052
Damien Millerbeb4ba51999-12-28 15:09:35 +110053#ifdef HAVE_BSTRING_H
54# include <bstring.h>
55#endif
Damien Miller3bd49ec1999-11-15 15:40:55 +110056#ifdef HAVE_NETGROUP_H
57# include <netgroup.h>
58#endif
Damien Millerbc33bd42000-07-11 14:59:08 +100059#if defined(HAVE_NETDB_H) && !defined(HAVE_NEXT)
60/* Next includes this as part of another header */
Damien Millerbeb4ba51999-12-28 15:09:35 +110061# include <netdb.h>
62#endif
Damien Millerab18c411999-11-11 10:40:23 +110063#ifdef HAVE_ENDIAN_H
64# include <endian.h>
65#endif
Damien Miller4874c791999-11-16 13:29:26 +110066#ifdef HAVE_SYS_SELECT_H
67# include <sys/select.h>
68#endif
Damien Millerb3ca3aa1999-11-22 13:57:07 +110069#ifdef HAVE_SYS_TIME_H
70# include <sys/time.h>
71#endif
Damien Miller76112de1999-12-21 11:18:08 +110072#ifdef HAVE_SYS_BSDTTY_H
73# include <sys/bsdtty.h>
74#endif
Damien Miller348c9b72000-08-15 10:01:22 +100075#ifdef HAVE_TTYENT_H
76# include <ttyent.h>
77#endif
Damien Millerbeb4ba51999-12-28 15:09:35 +110078#ifdef USE_PAM
Damien Miller4874c791999-11-16 13:29:26 +110079# include <security/pam_appl.h>
Damien Miller04f80141999-11-19 15:32:34 +110080#endif
Damien Millere72b7af1999-12-30 15:08:44 +110081#ifdef HAVE_POLL_H
82# include <poll.h>
83#else
84# ifdef HAVE_SYS_POLL_H
85# include <sys/poll.h>
86# endif
87#endif
Damien Millereaf99942000-01-19 13:45:07 +110088#ifdef HAVE_SYS_SYSMACROS_H
89# include <sys/sysmacros.h>
90#endif
Damien Millerab18c411999-11-11 10:40:23 +110091
92#include "version.h"
Damien Miller34132e52000-01-14 15:45:46 +110093
Damien Miller16e519c2000-05-09 14:28:55 +100094/* OpenBSD function replacements */
95#include "openbsd-compat.h"
Damien Miller34132e52000-01-14 15:45:46 +110096
Damien Miller5f056372000-04-16 12:31:48 +100097/* Entropy collection */
98#include "entropy.h"
99
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000100/* Define this to be the path of the xauth program. */
101#ifndef XAUTH_PATH
102#define XAUTH_PATH "/usr/X11R6/bin/xauth"
103#endif /* XAUTH_PATH */
104
105/* Define this to be the path of the rsh program. */
106#ifndef _PATH_RSH
107#define _PATH_RSH "/usr/bin/rsh"
108#endif /* _PATH_RSH */
109
Damien Miller5428f641999-11-25 11:54:57 +1100110/*
111 * Define this to use pipes instead of socketpairs for communicating with the
112 * client program. Socketpairs do not seem to work on all systems.
113 */
Damien Miller9e53f352000-02-01 23:05:30 +1100114/* #define USE_PIPES 1 */
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000115
Damien Millerbac2d8a2000-09-05 16:13:06 +1100116#ifdef HAVE_CYGWIN
117#define open binary_open
118#define pipe binary_pipe
119extern int binary_open();
120extern int binary_pipe();
121#endif
122
Damien Miller95def091999-11-25 00:26:21 +1100123#endif /* INCLUDES_H */