]> git.ipfire.org Git - thirdparty/dhcp.git/blame - includes/cf/nextstep.h
DHCPv6 branch merged to HEAD.
[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
98bd7ca0
DH
82#if !defined (_PATH_DHCLIENT6_PID)
83# define _PATH_DHCLIENT6_PID "/etc/dhclient6.pid"
84#endif
85
2c51668a
TL
86#if !defined (_PATH_DHCRELAY_PID)
87# define _PATH_DHCRELAY_PID "/etc/dhcrelay.pid"
88#endif
89
1276d9e5
TL
90/* Stdarg definitions for ANSI-compliant C compilers. */
91#import <stdarg.h>
92#define VA_DOTDOTDOT ...
93#define VA_start(list, last) va_start (list, last)
94#define va_dcl
98311e4b 95
1276d9e5 96/* NeXT lacks snprintf */
1276d9e5 97#define NO_SNPRINTF
98311e4b 98
1276d9e5
TL
99/* Porting::
100 You must define the default network API for your port. This
101 will depend on whether one of the existing APIs will work for
102 you, or whether you need to implement support for a new API.
103 Currently, the following APIs are supported:
104 The BSD socket API: define USE_SOCKETS.
105 The Berkeley Packet Filter: define USE_BPF.
106 The Streams Network Interface Tap (NIT): define USE_NIT.
107 Raw sockets: define USE_RAW_SOCKETS
108 If your system supports the BSD socket API and doesn't provide
109 one of the supported interfaces to the physical packet layer,
110 you can either provide support for the low-level API that your
111 system does support (if any) or just use the BSD socket interface.
112 The BSD socket interface doesn't support multiple network interfaces,
113 and on many systems, it does not support the all-ones broadcast
114 address, which can cause problems with some DHCP clients (e.g.
115 Microsoft Windows 95). */
116#define USE_BPF
117#if 0
118#if defined (USE_DEFAULT_NETWORK)
119# define USE_SOCKETS
120#endif
121#endif
122#define EOL '\n'
123#define VOIDPTR void *
124#import <time.h>
125#define TIME time_t
126#define GET_TIME(x) time ((x))
32e99078
TL
127
128#ifdef NEED_PRAND_CONF
129const char *cmds[] = {
130 "/bin/ps -axlw 2>&1",
131 "/usr/etc/arp -a 2>&1",
132 "/usr/ucb/netstat -an 2>&1",
133 "/bin/df 2>&1",
134 "/usr/local/bin/dig com. soa +ti=1 2>&1",
135 "/usr/ucb/uptime 2>&1",
136 "/usr/ucb/printenv 2>&1",
137 "/usr/ucb/netstat -s 2>&1",
138 "/usr/local/bin/dig . soa +ti=1 2>&1",
139 "/usr/bin/iostat 2>&1",
140 "/usr/bin/vm_stat 2>&1",
141 "/usr/ucb/w 2>&1",
142 NULL
143};
144
145const char *dirs[] = {
146 "/tmp",
147 "/usr/tmp",
148 ".",
149 "/",
150 "/usr/spool",
151 "/dev",
152 NULL
153};
154
155const char *files[] = {
156 "/usr/adm/messages",
157 "/usr/adm/wtmp",
158 "/usr/adm/lastlog",
159 NULL
160};
161#endif /* NEED_PRAND_CONF */