1 /* source: sysincludes.h */
2 /* Copyright Gerhard Rieger 2001-2009 */
3 /* Published under the GNU General Public License V.2, see file COPYING */
5 #ifndef __sysincludes_h_included
6 #define __sysincludes_h_included 1
9 #include <limits.h> /* USHRT_MAX */
11 #include <math.h> /* HUGE_VAL */
13 #include <stdarg.h> /* for msg() */
14 #include <string.h> /* strerror(), strchr() */
16 #include <strings.h> /* strcasecmp(), bzero() for FD_ZERO */
18 #include <stdlib.h> /* malloc(), free() */
19 #include <ctype.h> /* isdigit() */
20 #include <stdio.h> /* FILE */
21 #include <errno.h> /* errno */
23 #include <syslog.h> /* openlog(), syslog(), closelog() */
25 #include <signal.h> /* signal(), SIGPIPE, SIG_IGN */
26 #include <time.h> /* struct timeval, strftime() */
28 #include <sys/timeb.h> /* struct timeb */
31 #include <unistd.h> /* select(), read(), write(), stat(), fork() */
34 #include <pwd.h> /* getpwnam() */
37 #include <grp.h> /* getgrnam() */
39 #if HAVE_PTY_H && (_WITH_TERMIOS || HAVE_OPENPTY)
43 #include <sys/param.h> /* Linux 2.4 NGROUPS */
46 #include <sys/time.h> /* select(); OpenBSD: struct timespec */
49 #include <stdint.h> /* uint8_t */
52 #include <sys/types.h> /* pid_t, select(), socket(), connect(), open(), u_short */
55 #include <sys/poll.h> /* poll() */
58 #include <sys/socket.h> /* struct sockaddr, struct linger, socket(), connect() */
61 #include <sys/uio.h> /* struct iovec */
64 #include <sys/stat.h> /* struct stat, stat(), open() */
67 #include <sys/wait.h> /* WNOHANG */
70 #include <fcntl.h> /* open(), O_RDWR */
72 #if HAVE_NETDB_H && (_WITH_IP4 || _WITH_IP6)
73 #include <netdb.h> /* struct hostent, gethostbyname() */
75 #if HAVE_SYS_UN_H && WITH_UNIX
76 #include <sys/un.h> /* struct sockaddr_un, unix domain sockets */
79 #include <sys/ioctl.h> /* ioctl() */
82 #include <sys/select.h> /* select(), fdset on AIX 4.1 */
85 #include <sys/file.h> /* LOCK_EX, on AIX directly included */
88 # if HAVE_NETINET_IN_H
89 #include <netinet/in.h> /* struct sockaddr_in, htonl() */
91 #endif /* _WITH_SOCKET */
92 #if _WITH_SOCKET && (_WITH_IP4 || _WITH_IP6)
93 # if HAVE_NETINET_IN_SYSTM_H
94 #include <netinet/in_systm.h> /* Solaris, FreeBSD: n_long */
96 # if HAVE_NETINET_IP_H
97 #include <netinet/ip.h> /* struct ip - past netinet/in.h on AIX! */
99 # if HAVE_NETINET_TCP_H
100 #include <netinet/tcp.h> /* TCP_RFC1323 */
102 # if HAVE_NETINET_IP6_H && _WITH_IP6
103 #include <netinet/ip6.h>
105 # if HAVE_NETINET6_IN6_H && _WITH_IP6
106 #include <netinet6/in6.h>
108 #include <arpa/inet.h> /* Linux: inet_aton() */
109 #if HAVE_ARPA_NAMESER_H
110 #include <arpa/nameser.h> /* req for resolv.h (esp. on MacOSX) */
114 #include <net/if_dl.h> /* FreeBSD: struct sockaddr_dl */
117 #include <resolv.h> /* _res */
119 #endif /* _WITH_IP4 || _WITH_IP6 */
120 /*#include <linux/sockios.h>*/
123 #endif /* HAVE_NET_IF_H */
124 #if HAVE_LINUX_TYPES_H
125 #include <linux/types.h> /* __u32 for linux/errqueue.h */
127 #if HAVE_LINUX_ERRQUEUE_H
128 #include <linux/errqueue.h> /* struct sock_extended_err */
130 #if HAVE_NETPACKET_PACKET_H
131 #include <netpacket/packet.h>
133 #if HAVE_NETINET_IF_ETHER_H
134 #include <netinet/if_ether.h>
136 #if HAVE_LINUX_IF_TUN_H
137 #include <linux/if_tun.h>
140 #if HAVE_TERMIOS_H && _WITH_TERMIOS
143 #if HAVE_SYS_UTSNAME_H
144 #include <sys/utsname.h> /* uname(), struct utsname */
147 #include <util.h> /* NetBSD, OpenBSD openpty() */
150 #include <libutil.h> /* FreeBSD openpty() */
152 #if HAVE_SYS_STROPTS_H
153 #include <sys/stropts.h> /* SunOS I_PUSH ... */
159 #include <linux/fs.h> /* somewhere required for ext2_fs.h */
161 #if HAVE_LINUX_EXT2_FS_H
162 #include <linux/ext2_fs.h> /* Linux ext2 filesystem definitions */
165 # if HAVE_READLINE_READLINE_H
166 #include <readline/readline.h>
168 # if HAVE_READLINE_HISTORY_H
169 #include <readline/history.h>
171 #endif /* WITH_READLINE */
173 #include <openssl/ssl.h>
174 #include <openssl/err.h>
175 #include <openssl/rand.h>
178 #endif /* !defined(__sysincludes_h_included) */