Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / dhcp / includes / cf / sunos4.h
blobf6fa5578862b30266ed055fc9538e46ce92de519
1 /* sunos4.h
3 System dependencies for SunOS 4 (tested on 4.1.4)... */
5 /*
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.
22 * 950 Charter Street
23 * Redwood City, CA 94063
24 * <info@isc.org>
25 * http://www.isc.org/
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... */
37 #define int8_t char
38 #define int16_t short
39 #define int32_t int
41 #define u_int8_t unsigned char
42 #define u_int16_t unsigned short
43 #define u_int32_t unsigned int
45 #define ssize_t int
47 #define SOCKLEN_T int
49 #define fpos_t long
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
56 * address to high.
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
67 #define jref(x) (x)
68 #define jdref(x) (x)
69 #define jrefproto jmp_buf
71 #include <syslog.h>
72 #include <sys/types.h>
74 #include <string.h>
75 #include <errno.h>
76 #include <unistd.h>
77 #include <sys/wait.h>
78 #include <signal.h>
79 #include <setjmp.h>
80 #include <limits.h>
81 #include <poll.h>
83 extern int h_errno;
85 #include <net/if.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
98 in site.h. */
99 #ifndef _PATH_DHCPD_PID
100 #define _PATH_DHCPD_PID "/etc/dhcpd.pid"
101 #endif
102 #ifndef _PATH_DHCLIENT_PID
103 #define _PATH_DHCLIENT_PID "/etc/dhclient.pid"
104 #endif
105 #ifndef _PATH_DHCRELAY_PID
106 #define _PATH_DHCRELAY_PID "/etc/dhcrelay.pid"
107 #endif
109 #ifdef __GNUC__
110 /* Varargs stuff: use stdarg.h instead ... */
111 #include <stdarg.h>
112 #define VA_DOTDOTDOT ...
113 #define VA_start(list, last) va_start (list, last)
114 #define va_dcl
115 #else /* !__GNUC__*/
116 /* Varargs stuff... */
117 #include <varargs.h>
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. */
123 #define NO_SNPRINTF
125 /* SunOS doesn't supply strerror... */
126 #define NO_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)
133 # define USE_NIT
134 #endif
136 #define EOL '\n'
137 #define VOIDPTR void *
139 #include <time.h>
140 #include <sys/time.h>
142 #define TIME time_t
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",
149 "/bin/df 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",
153 "/bin/iostat 2>&1",
154 NULL
157 const char *dirs[] = {
158 "/tmp",
159 "/var/tmp",
160 ".",
161 "/",
162 "/var/spool",
163 "/var/adm",
164 "/dev",
165 "/var/mail",
166 "/home",
167 NULL
170 const char *files[] = {
171 "/var/adm/messages",
172 "/var/adm/wtmp",
173 "/var/adm/lastlog",
174 NULL
176 #endif /* NEED_PRAND_CONF */