]> git.ipfire.org Git - thirdparty/dhcp.git/blame - includes/cf/bsdos.h
DHCPv6 branch merged to HEAD.
[thirdparty/dhcp.git] / includes / cf / bsdos.h
CommitLineData
a8b53b42 1/* bsdos.h
d7837182 2
a8b53b42 3 System dependencies for BSDI BSD/OS... */
d7837182
TL
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 36#include <sys/types.h>
054f18b8 37#include <sys/param.h>
d7837182
TL
38#include <string.h>
39#include <paths.h>
40#include <errno.h>
41#include <unistd.h>
d7837182
TL
42#include <setjmp.h>
43#include <limits.h>
44
fd0072c9
TL
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>
bc858d06 52#define INADDR_LOOPBACK ((u_int32_t)0x7f000001)
d7837182
TL
53
54/* Varargs stuff... */
55#include <stdarg.h>
56#define VA_DOTDOTDOT ...
57#define va_dcl
58#define VA_start(list, last) va_start (list, last)
59
911af7a5 60#ifndef _PATH_DHCPD_PID
fd0072c9 61#define _PATH_DHCPD_PID "/var/run/dhcpd.pid"
911af7a5
TL
62#endif
63#ifndef _PATH_DHCPD_DB
ad49f094 64#define _PATH_DHCPD_DB "/var/db/dhcpd.leases"
911af7a5 65#endif
d432c972
TL
66#ifndef _PATH_DHCLIENT_PID
67#define _PATH_DHCLIENT_PID "/var/run/dhclient.pid"
68#endif
98bd7ca0
DH
69#ifndef _PATH_DHCLIENT6_PID
70#define _PATH_DHCLIENT6_PID "/var/run/dhclient6.pid"
71#endif
d432c972
TL
72#ifndef _PATH_DHCLIENT_DB
73#define _PATH_DHCLIENT_DB "/var/db/dhclient.leases"
74#endif
98bd7ca0
DH
75#ifndef _PATH_DHCLIENT6_DB
76#define _PATH_DHCLIENT6_DB "/var/db/dhclient6.leases"
77#endif
d7837182
TL
78
79#define EOL '\n'
fd0072c9 80#define VOIDPTR void *
d7837182
TL
81
82/* Time stuff... */
83#include <sys/time.h>
fd0072c9
TL
84#define TIME time_t
85#define GET_TIME(x) time ((x))
60b60a2b 86
32ec8d45 87#define HAVE_SA_LEN
d2fd62bf 88
60b60a2b
TL
89#if defined (USE_DEFAULT_NETWORK)
90# define USE_BPF
91#endif
054f18b8
TL
92
93#if _BSDI_VERSION < 199802
94typedef int socklen_t;
95#endif
32e99078
TL
96
97#ifdef NEED_PRAND_CONF
98const char *cmds[] = {
99 "/bin/ps -axlw 2>&1",
100 "/usr/sbin/arp -an 2>&1",
101 "/usr/sbin/netstat -an 2>&1",
102 "/bin/df 2>&1",
103 "/usr/bin/dig com. soa +ti=1 +retry=0 2>&1",
104 "/usr/ucb/uptime 2>&1",
105 "/usr/sbin/netstat -an 2>&1",
106 "/usr/sbin/iostat 2>&1",
107 "/usr/sbin/vmstat 2>&1",
108 NULL
109};
110
111const char *dirs[] = {
112 "/tmp",
113 "/var/tmp",
114 ".",
115 "/",
116 "/var/spool",
117 "/dev",
118 "/var/mail",
119 "/usr/home",
120 NULL
121};
122
123const char *files[] = {
124 "/var/log/messages",
125 "/var/log/wtmp",
126 "/var/log/lastlog",
127 NULL
128};
129#endif /* NEED_PRAND_CONF */