3 System dependencies for SunOS 4 (tested on 4.1.4)... */
6 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
7 * Copyright (c) 1996-2003 by Internet Software Consortium
9 * Permission to use, copy, modify, and distribute this software for any
10 * purpose with or without fee is hereby granted, provided that the above
11 * copyright notice and this permission notice appear in all copies.
13 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
14 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
16 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
19 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 * Internet Systems Consortium, Inc.
23 * Redwood City, CA 94063
27 * This software has been written for Internet Systems Consortium
28 * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
29 * To learn more about Internet Systems Consortium, see
30 * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
31 * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
32 * ``http://www.nominum.com''.
35 /* Basic Integer Types not defined in SunOS headers... */
41 #define u_int8_t unsigned char
42 #define u_int16_t unsigned short
43 #define u_int32_t unsigned int
50 #define fgetpos(f, p) (((*(p)) = ftell (f)) == -1 ? -1 : 0)
51 #define fsetpos(f, p) (fseek (f, p, SEEK_SET))
53 /* No endian.h either. */
55 * Definitions for byte order, according to byte significance from low
58 #define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
59 #define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
60 #define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */
62 #define BYTE_ORDER BIG_ENDIAN
64 /* The jmp_buf type is an array on SunOS, so we can't dereference it
65 and must declare it differently. */
66 #define jbp_decl(x) jmp_buf x
69 #define jrefproto jmp_buf
72 #include <sys/types.h>
86 #include <net/if_arp.h>
89 * Definitions for IP type of service (ip_tos)
91 #define IPTOS_LOWDELAY 0x10
92 #define IPTOS_THROUGHPUT 0x08
93 #define IPTOS_RELIABILITY 0x04
94 /* IPTOS_LOWCOST 0x02 XXX */
96 /* SunOS systems don't have /var/run, but some sites have added it.
97 If you want to put dhcpd.pid in /var/run, define _PATH_DHCPD_PID
99 #ifndef _PATH_DHCPD_PID
100 #define _PATH_DHCPD_PID "/etc/dhcpd.pid"
102 #ifndef _PATH_DHCLIENT_PID
103 #define _PATH_DHCLIENT_PID "/etc/dhclient.pid"
105 #ifndef _PATH_DHCRELAY_PID
106 #define _PATH_DHCRELAY_PID "/etc/dhcrelay.pid"
110 /* Varargs stuff: use stdarg.h instead ... */
112 #define VA_DOTDOTDOT ...
113 #define VA_start(list, last) va_start (list, last)
116 /* Varargs stuff... */
118 #define VA_DOTDOTDOT va_alist
119 #define VA_start(list, last) va_start (list)
120 #endif /* !__GNUC__*/
122 /* SunOS doesn't support limited sprintfs. */
125 /* SunOS doesn't supply strerror... */
127 char *strerror
PROTO ((int));
129 #define NEED_INET_ATON
131 /* By default, use NIT API for receiving and sending packets... */
132 #if defined (USE_DEFAULT_NETWORK)
137 #define VOIDPTR void *
140 #include <sys/time.h>
143 #define GET_TIME(x) time ((x))
145 #ifdef NEED_PRAND_CONF
146 const char *cmds
[] = {
147 "/bin/ps -axlw 2>&1",
148 "/usr/ucb/netstat -an 2>&1",
150 "/usr/bin/dig com. soa +ti=1 +retry=0 2>&1",
151 "/usr/ucb/uptime 2>&1",
152 "/usr/ucb/netstat -an 2>&1",
157 const char *dirs
[] = {
170 const char *files
[] = {
176 #endif /* NEED_PRAND_CONF */