4 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
5 * Copyright (c) 1996-2003 by Internet Software Consortium
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
11 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
17 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 * Internet Systems Consortium, Inc.
21 * Redwood City, CA 94063
30 #define u_int8_t unsigned char
31 #define u_int16_t unsigned short
32 #define u_int32_t unsigned long
34 #include <sys/types.h>
45 #include <net/if_dl.h>
50 #include <net/if_arp.h>
52 #define _PATH_DHCPD_CONF "/usr/local/etc/dhcpd.conf"
53 #define _PATH_DHCPD_DB "/usr/local/etc/dhcp/dhcpd.leases"
55 #ifndef _PATH_DHCPD_PID
56 #define _PATH_DHCPD_PID "/etc/dhcpd.pid"
58 #ifndef _PATH_DHCLIENT_PID
59 #define _PATH_DHCLIENT_PID "/etc/dhclient.pid"
61 #ifndef _PATH_DHCRELAY_PID
62 #define _PATH_DHCRELAY_PID "/etc/dhcrelay.pid"
66 #define VA_DOTDOTDOT ...
67 #define VA_start(list, last) va_start (list, last)
70 /* XXX: System is not believed to have snprintf/vsnprintf. Please verify. */
73 #if defined (USE_DEFAULT_NETWORK)
74 # define USE_RAW_SOCKETS
78 #define VOIDPTR void *
83 #define GET_TIME(x) time ((x))
86 #ifdef NEED_PRAND_CONF
87 const char *cmds
[] = {
89 "/usr/etc/arp -a 2>&1",
90 "/usr/etc/netstat -an 2>&1",
92 "/usr/bin/dig com. soa +ti=1 2>&1",
93 "/usr/bsd/uptime 2>&1",
94 "/usr/bin/printenv 2>&1",
95 "/usr/etc/netstat -s 2>&1",
96 "/usr/bin/dig . soa +ti=1 2>&1",
101 const char *dirs
[] = {
113 const char *files
[] = {
116 #endif /* NEED_PRAND_CONF */