tools/adflib: build only host variant which is used by Sam440 target
[AROS.git] / workbench / network / stacks / AROSTCP / dhcp / includes / cf / sco.h
blobce844e481b38969bb339708abfc410f7b908922a
1 /* sco.h
3 System dependencies for SCO ODT 3.0...
5 Based on changes contributed by Gerald Rosenberg. */
7 /*
8 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
9 * Copyright (c) 1996-2003 by Internet Software Consortium
11 * Permission to use, copy, modify, and distribute this software for any
12 * purpose with or without fee is hereby granted, provided that the above
13 * copyright notice and this permission notice appear in all copies.
15 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
16 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
17 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
18 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
21 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 * Internet Systems Consortium, Inc.
24 * 950 Charter Street
25 * Redwood City, CA 94063
26 * <info@isc.org>
27 * http://www.isc.org/
29 * This software has been written for Internet Systems Consortium
30 * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
31 * To learn more about Internet Systems Consortium, see
32 * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
33 * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
34 * ``http://www.nominum.com''.
37 #include <syslog.h>
38 #include <sys/types.h>
40 /* Basic Integer Types not defined in SCO headers... */
42 typedef char int8_t;
43 typedef short int16_t;
44 typedef long int32_t;
46 typedef unsigned char u_int8_t;
47 typedef unsigned short u_int16_t;
48 typedef unsigned long u_int32_t;
50 #include <string.h>
51 #include <errno.h>
52 #include <unistd.h>
53 #include <sys/wait.h>
54 #include <signal.h>
55 #include <setjmp.h>
56 #include <limits.h>
58 extern int h_errno;
60 #include <net/if.h>
61 #include <net/if_dl.h>
62 #include <net/if_arp.h>
63 #include <netinet/tcp.h>
64 #include <netinet/in.h>
65 #include <netinet/tcp.h>
67 /* XXX dunno if this is required for SCO... */
69 * Definitions for IP type of service (ip_tos)
71 #define IPTOS_LOWDELAY 0x10
72 #define IPTOS_THROUGHPUT 0x08
73 #define IPTOS_RELIABILITY 0x04
74 /* IPTOS_LOWCOST 0x02 XXX */
76 /* SCO doesn't have /var/run. */
77 #ifndef _PATH_DHCPD_CONF
78 #define _PATH_DHCPD_CONF "/etc/dhcpd.conf"
79 #endif
80 #ifndef _PATH_DHCPD_PID
81 #define _PATH_DHCPD_PID "/etc/dhcpd.pid"
82 #endif
83 #ifndef _PATH_DHCLIENT_PID
84 #define _PATH_DHCLIENT_PID "/etc/dhclient.pid"
85 #endif
86 #ifndef _PATH_DHCRELAY_PID
87 #define _PATH_DHCRELAY_PID "/etc/dhcrelay.pid"
88 #endif
89 #ifndef _PATH_DHCPD_DB
90 #define _PATH_DHCPD_DB "/etc/dhcpd.leases"
91 #endif
92 #ifndef _PATH_DHCLIENT_DB
93 #define _PATH_DHCLIENT_DB "/etc/dhclient.leases"
94 #endif
97 #if !defined (INADDR_LOOPBACK)
98 #define INADDR_LOOPBACK ((u_int32_t)0x7f000001)
99 #endif
101 /* Varargs stuff: use stdarg.h instead ... */
102 #include <stdarg.h>
103 #define VA_DOTDOTDOT ...
104 #define VA_start(list, last) va_start (list, last)
105 #define va_dcl
107 /* SCO doesn't support limited sprintfs. */
108 #define NO_SNPRINTF
110 /* By default, use BSD Socket API for receiving and sending packets.
111 This actually works pretty well on Solaris, which doesn't censor
112 the all-ones broadcast address. */
113 #if defined (USE_DEFAULT_NETWORK)
114 # define USE_SOCKETS
115 #endif
117 #define EOL '\n'
118 #define VOIDPTR void *
120 /* socklen_t */
121 typedef int socklen_t;
124 * Time stuff...
126 * Definitions for an ISC DHCPD system that uses time_t
127 * to represent time internally as opposed to, for example, struct timeval.)
130 #include <time.h>
131 #include <sys/time.h>
133 #define TIME time_t
134 #define GET_TIME(x) time ((x))
136 #ifdef NEED_PRAND_CONF
137 const char *cmds[] = {
138 "/bin/ps -ef 2>&1",
139 "/etc/arp -n -a 2>&1",
140 "/usr/bin/netstat -an 2>&1",
141 "/bin/df 2>&1",
142 "/usr/bin/uptime 2>&1",
143 "/usr/bin/netstat -s 2>&1",
144 "/usr/bin/vmstat 2>&1",
145 "/usr/bin/w 2>&1",
146 NULL
149 const char *dirs[] = {
150 "/tmp",
151 "/usr/tmp",
152 ".",
153 "/",
154 "/var/spool",
155 "/var/adm",
156 "/dev",
157 NULL
160 const char *files[] = {
161 NULL
163 #endif /* NEED_PRAND_CONF */