amd64 port: mainly on the pmap headers, identify_cpu and initcpu
[dragonfly/port-amd64.git] / contrib / dhcp-3.0 / includes / cf / freebsd.h
blob75804de742561f05bf64769af7de41f806f55f98
1 /* freebsd.h
3 System dependencies for FreeBSD... */
5 /*
6 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
7 * Copyright (c) 1996-2003 by Internet Software Consortium
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.
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.
21 * Internet Systems Consortium, Inc.
22 * 950 Charter Street
23 * Redwood City, CA 94063
24 * <info@isc.org>
25 * http://www.isc.org/
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''.
35 #include <syslog.h>
36 #include <sys/types.h>
37 #include <string.h>
38 #include <paths.h>
39 #include <errno.h>
40 #include <unistd.h>
41 #include <setjmp.h>
42 #include <limits.h>
44 #include <sys/wait.h>
45 #include <signal.h>
47 extern int h_errno;
49 #include <net/if.h>
50 #include <net/if_dl.h>
51 #include <net/if_arp.h>
52 #if !defined (INADDR_LOOPBACK)
53 # define INADDR_LOOPBACK ((u_int32_t)0x7f000001)
54 #endif
56 /* Varargs stuff... */
57 #include <stdarg.h>
58 #define VA_DOTDOTDOT ...
59 #define va_dcl
60 #define VA_start(list, last) va_start (list, last)
62 #if defined(__alpha__) || defined(__amd64__) || defined(__ia64__) || \
63 defined(__sparc64__)
64 # define PTRSIZE_64BIT
65 #endif
67 #ifndef _PATH_DHCPD_PID
68 #define _PATH_DHCPD_PID "/var/run/dhcpd.pid"
69 #endif
70 #ifndef _PATH_DHCPD_DB
71 #define _PATH_DHCPD_DB "/var/db/dhcpd.leases"
72 #endif
73 #ifndef _PATH_DHCLIENT_PID
74 #define _PATH_DHCLIENT_PID "/var/run/dhclient.pid"
75 #endif
76 #ifndef _PATH_DHCLIENT_DB
77 #define _PATH_DHCLIENT_DB "/var/db/dhclient.leases"
78 #endif
80 #define EOL '\n'
81 #define VOIDPTR void *
83 /* Time stuff... */
84 #include <sys/time.h>
85 #define TIME time_t
86 #define GET_TIME(x) time ((x))
88 #define HAVE_SA_LEN
90 /* socklen_t was first defined on November 24 in sys/socket.h, and
91 __FreeBSD_version was changed to 400013 on December 4, so if you
92 get a compile error on this, and you updated between those dates,
93 that's why. Also, it may be that some 3.x version after 3.4 will
94 have socklen_t, but no such change has been made so far. */
96 #if __FreeBSD_version < 400013
97 #define SOCKLEN_T int
98 #endif
100 #if defined (USE_DEFAULT_NETWORK)
101 # define USE_BPF
102 #endif
103 #define HAVE_MKSTEMP
104 #ifdef NEED_PRAND_CONF
105 #ifndef HAVE_DEV_RANDOM
106 # define HAVE_DEV_RANDOM 1
107 #endif /* HAVE_DEV_RANDOM */
109 const char *cmds[] = {
110 "/bin/ps -axlw 2>&1",
111 "/usr/sbin/arp -an 2>&1",
112 "/usr/bin/netstat -an 2>&1",
113 "/bin/df 2>&1",
114 "/usr/bin/dig com. soa +ti=1 +retry=0 2>&1",
115 "/usr/bin/netstat -an 2>&1",
116 "/usr/bin/dig . soa +ti=1 +retry=0 2>&1",
117 "/usr/sbin/iostat 2>&1",
118 "/usr/bin/vmstat 2>&1",
119 "/usr/bin/w 2>&1",
120 NULL
123 const char *dirs[] = {
124 "/tmp",
125 "/usr/tmp",
126 ".",
127 "/",
128 "/var/spool",
129 "/dev",
130 "/var/mail",
131 "/home",
132 "/usr/home",
133 NULL
136 const char *files[] = {
137 "/var/log/messages",
138 "/var/log/wtmp",
139 "/var/log/lastlog",
140 NULL
142 #endif /* NEED_PRAND_CONF */