]> git.ipfire.org Git - thirdparty/dhcp.git/blame - includes/cf/netbsd.h
MASSIVE merge from V3-RELEASE-BRANCH into HEAD. HEAD and V3-RELEASE are
[thirdparty/dhcp.git] / includes / cf / netbsd.h
CommitLineData
d7837182
TL
1/* netbsd.h
2
3 System dependencies for NetBSD... */
4
5/*
98311e4b
DH
6 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
7 * Copyright (c) 1996-2003 by Internet Software Consortium
d7837182 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.
d7837182 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.
d7837182 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''.
d7837182
TL
33 */
34
3060073a 35#include <syslog.h>
d7837182
TL
36#include <sys/types.h>
37#include <string.h>
38#include <paths.h>
39#include <errno.h>
5f39769e 40#include <malloc.h>
d7837182
TL
41#include <unistd.h>
42#include <setjmp.h>
43#include <limits.h>
44
45#include <sys/wait.h>
46#include <signal.h>
47
d7837182
TL
48extern int h_errno;
49
50#include <net/if.h>
e7f31404 51#include <net/if_dl.h>
469cf3a4
TL
52#include <net/route.h>
53#include <sys/sockio.h>
54
55#define ifr_netmask ifr_addr
d7837182
TL
56
57/* Varargs stuff... */
58#include <stdarg.h>
59#define VA_DOTDOTDOT ...
60#define va_dcl
61#define VA_start(list, last) va_start (list, last)
62
911af7a5 63#ifndef _PATH_DHCPD_PID
d7837182 64#define _PATH_DHCPD_PID "/var/run/dhcpd.pid"
911af7a5
TL
65#endif
66#ifndef _PATH_DHCPD_DB
ad49f094 67#define _PATH_DHCPD_DB "/var/db/dhcpd.leases"
911af7a5 68#endif
d432c972
TL
69#ifndef _PATH_DHCLIENT_PID
70#define _PATH_DHCLIENT_PID "/var/run/dhclient.pid"
71#endif
72#ifndef _PATH_DHCLIENT_DB
73#define _PATH_DHCLIENT_DB "/var/db/dhclient.leases"
74#endif
d7837182
TL
75
76#define EOL '\n'
77#define VOIDPTR void *
78
79/* Time stuff... */
80#include <sys/time.h>
81#define TIME time_t
82#define GET_TIME(x) time ((x))
5f39769e 83
8eb4771e 84#define HAVE_SA_LEN
e24ff983 85#define HAVE_MKSTEMP
60b60a2b
TL
86
87#if defined (USE_DEFAULT_NETWORK)
88# define USE_BPF
89#endif
e6ba52d4 90
98311e4b 91#if defined (__alpha__) || defined (__sparc64__)
e6ba52d4
TL
92#define PTRSIZE_64BIT
93#endif
32e99078 94
488b9286 95/* NetBSD added socklen_t in 1.3J, just prior to the 1.4 release. */
504d9311 96#if __NetBSD_Version__ < 103090000
488b9286
TL
97#define SOCKLEN_T int
98#endif
99
32e99078
TL
100#ifdef NEED_PRAND_CONF
101/* prand_conf.h goop - remove when BIND 9 comes around. */
102#ifndef HAVE_DEV_RANDOM
103 # define HAVE_DEV_RANDOM 1
104 #endif /* HAVE_DEV_RANDOM */
105
106const char *cmds[] = {
107 "/bin/ps -axlw 2>&1",
108 "/usr/sbin/arp -an 2>&1",
109 "/usr/bin/netstat -an 2>&1",
110 "/bin/df 2>&1",
111 "/usr/bin/dig com. soa +ti=1 +retry=0 2>&1",
112 "/usr/bin/netstat -an 2>&1",
113 "/usr/bin/dig . soa +ti=1 +retry=0 2>&1",
114 "/usr/sbin/iostat 2>&1",
115 "/usr/bin/vmstat 2>&1",
116 "/usr/bin/w 2>&1",
117 NULL
118};
119
120const char *dirs[] = {
121 "/tmp",
122 "/var/tmp",
123 ".",
124 "/",
125 "/var/spool",
126 "/dev",
127 "/var/mail",
128 "/home",
129 "/usr/home",
130 NULL
131};
132
133const char *files[] = {
134 "/var/log/messages",
135 "/var/log/wtmp",
136 "/var/log/lastlog",
137 NULL
138};
139#endif /* NEED_PRAND_CONF */