]> git.ipfire.org Git - thirdparty/dhcp.git/blob - includes/cf/bsdos.h
DHCPv6 branch merged to HEAD.
[thirdparty/dhcp.git] / includes / cf / bsdos.h
1 /* bsdos.h
2
3 System dependencies for BSDI BSD/OS... */
4
5 /*
6 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
7 * Copyright (c) 1996-2003 by Internet Software Consortium
8 *
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.
12 *
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.
20 *
21 * Internet Systems Consortium, Inc.
22 * 950 Charter Street
23 * Redwood City, CA 94063
24 * <info@isc.org>
25 * http://www.isc.org/
26 *
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''.
33 */
34
35 #include <syslog.h>
36 #include <sys/types.h>
37 #include <sys/param.h>
38 #include <string.h>
39 #include <paths.h>
40 #include <errno.h>
41 #include <unistd.h>
42 #include <setjmp.h>
43 #include <limits.h>
44
45 #include <sys/wait.h>
46 #include <signal.h>
47
48 extern int h_errno;
49
50 #include <net/if.h>
51 #include <net/if_dl.h>
52 #define INADDR_LOOPBACK ((u_int32_t)0x7f000001)
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
60 #ifndef _PATH_DHCPD_PID
61 #define _PATH_DHCPD_PID "/var/run/dhcpd.pid"
62 #endif
63 #ifndef _PATH_DHCPD_DB
64 #define _PATH_DHCPD_DB "/var/db/dhcpd.leases"
65 #endif
66 #ifndef _PATH_DHCLIENT_PID
67 #define _PATH_DHCLIENT_PID "/var/run/dhclient.pid"
68 #endif
69 #ifndef _PATH_DHCLIENT6_PID
70 #define _PATH_DHCLIENT6_PID "/var/run/dhclient6.pid"
71 #endif
72 #ifndef _PATH_DHCLIENT_DB
73 #define _PATH_DHCLIENT_DB "/var/db/dhclient.leases"
74 #endif
75 #ifndef _PATH_DHCLIENT6_DB
76 #define _PATH_DHCLIENT6_DB "/var/db/dhclient6.leases"
77 #endif
78
79 #define EOL '\n'
80 #define VOIDPTR void *
81
82 /* Time stuff... */
83 #include <sys/time.h>
84 #define TIME time_t
85 #define GET_TIME(x) time ((x))
86
87 #define HAVE_SA_LEN
88
89 #if defined (USE_DEFAULT_NETWORK)
90 # define USE_BPF
91 #endif
92
93 #if _BSDI_VERSION < 199802
94 typedef int socklen_t;
95 #endif
96
97 #ifdef NEED_PRAND_CONF
98 const 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
111 const char *dirs[] = {
112 "/tmp",
113 "/var/tmp",
114 ".",
115 "/",
116 "/var/spool",
117 "/dev",
118 "/var/mail",
119 "/usr/home",
120 NULL
121 };
122
123 const char *files[] = {
124 "/var/log/messages",
125 "/var/log/wtmp",
126 "/var/log/lastlog",
127 NULL
128 };
129 #endif /* NEED_PRAND_CONF */