]> git.ipfire.org Git - thirdparty/dhcp.git/blame - includes/cf/nextstep.h
MASSIVE merge from V3-RELEASE-BRANCH into HEAD. HEAD and V3-RELEASE are
[thirdparty/dhcp.git] / includes / cf / nextstep.h
CommitLineData
49733f31
TL
1/* nextstep.h
2
1276d9e5 3 System dependencies for NEXTSTEP 3 & 4 (tested on 4.2PR2)... */
49733f31 4
1276d9e5 5/*
98311e4b
DH
6 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
7 * Copyright (c) 1996-2003 by Internet Software Consortium
1276d9e5 8 *
98311e4b
DH
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.
1276d9e5 12 *
98311e4b
DH
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.
1276d9e5 20 *
98311e4b
DH
21 * Internet Systems Consortium, Inc.
22 * 950 Charter Street
23 * Redwood City, CA 94063
24 * <info@isc.org>
25 * http://www.isc.org/
49733f31 26 *
98311e4b 27 * This software has been written for Internet Systems Consortium
49733f31 28 * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
98311e4b 29 * To learn more about Internet Systems Consortium, see
49733f31
TL
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''.
1276d9e5 33 */
49733f31 34
1276d9e5
TL
35/* NeXT needs BSD44 ssize_t */
36typedef int ssize_t;
37/* NeXT doesn't have BSD setsid() */
38#define setsid getpid
39#import <sys/types.h>
40/* Porting::
41 The jmp_buf type as declared in <setjmp.h> is sometimes a structure
42 and sometimes an array. By default, we assume it's a structure.
43 If it's an array on your system, you may get compile warnings or errors
44 as a result in confpars.c. If so, try including the following definitions,
45 which treat jmp_buf as an array: */
46#if 0
47#define jbp_decl(x) jmp_buf x
48#define jref(x) (x)
49#define jdref(x) (x)
50#define jrefproto jmp_buf
51#endif
52#import <syslog.h>
53#import <string.h>
54#import <errno.h>
55#import <unistd.h>
56#import <sys/wait.h>
57#import <signal.h>
58#import <setjmp.h>
59#import <limits.h>
60extern int h_errno;
61#import <net/if.h>
62#import <net/if_arp.h>
63/* Porting::
64 Some older systems do not have defines for IP type-of-service,
65 or don't define them the way we expect. If you get undefined
66 symbol errors on the following symbols, they probably need to be
67 defined here. */
68#if 0
69#define IPTOS_LOWDELAY 0x10
70#define IPTOS_THROUGHPUT 0x08
71#define IPTOS_RELIABILITY 0x04
72#endif
2c51668a
TL
73
74#if !defined (_PATH_DHCPD_PID)
75# define _PATH_DHCPD_PID "/etc/dhcpd.pid"
76#endif
77
78#if !defined (_PATH_DHCLIENT_PID)
79# define _PATH_DHCLIENT_PID "/etc/dhclient.pid"
80#endif
81
82#if !defined (_PATH_DHCRELAY_PID)
83# define _PATH_DHCRELAY_PID "/etc/dhcrelay.pid"
84#endif
85
1276d9e5
TL
86/* Stdarg definitions for ANSI-compliant C compilers. */
87#import <stdarg.h>
88#define VA_DOTDOTDOT ...
89#define VA_start(list, last) va_start (list, last)
90#define va_dcl
98311e4b 91
1276d9e5 92/* NeXT lacks snprintf */
1276d9e5 93#define NO_SNPRINTF
98311e4b 94
1276d9e5
TL
95/* Porting::
96 You must define the default network API for your port. This
97 will depend on whether one of the existing APIs will work for
98 you, or whether you need to implement support for a new API.
99 Currently, the following APIs are supported:
100 The BSD socket API: define USE_SOCKETS.
101 The Berkeley Packet Filter: define USE_BPF.
102 The Streams Network Interface Tap (NIT): define USE_NIT.
103 Raw sockets: define USE_RAW_SOCKETS
104 If your system supports the BSD socket API and doesn't provide
105 one of the supported interfaces to the physical packet layer,
106 you can either provide support for the low-level API that your
107 system does support (if any) or just use the BSD socket interface.
108 The BSD socket interface doesn't support multiple network interfaces,
109 and on many systems, it does not support the all-ones broadcast
110 address, which can cause problems with some DHCP clients (e.g.
111 Microsoft Windows 95). */
112#define USE_BPF
113#if 0
114#if defined (USE_DEFAULT_NETWORK)
115# define USE_SOCKETS
116#endif
117#endif
118#define EOL '\n'
119#define VOIDPTR void *
120#import <time.h>
121#define TIME time_t
122#define GET_TIME(x) time ((x))
32e99078
TL
123
124#ifdef NEED_PRAND_CONF
125const char *cmds[] = {
126 "/bin/ps -axlw 2>&1",
127 "/usr/etc/arp -a 2>&1",
128 "/usr/ucb/netstat -an 2>&1",
129 "/bin/df 2>&1",
130 "/usr/local/bin/dig com. soa +ti=1 2>&1",
131 "/usr/ucb/uptime 2>&1",
132 "/usr/ucb/printenv 2>&1",
133 "/usr/ucb/netstat -s 2>&1",
134 "/usr/local/bin/dig . soa +ti=1 2>&1",
135 "/usr/bin/iostat 2>&1",
136 "/usr/bin/vm_stat 2>&1",
137 "/usr/ucb/w 2>&1",
138 NULL
139};
140
141const char *dirs[] = {
142 "/tmp",
143 "/usr/tmp",
144 ".",
145 "/",
146 "/usr/spool",
147 "/dev",
148 NULL
149};
150
151const char *files[] = {
152 "/usr/adm/messages",
153 "/usr/adm/wtmp",
154 "/usr/adm/lastlog",
155 NULL
156};
157#endif /* NEED_PRAND_CONF */