3 System dependencies for Linux.
5 Based on a configuration originally supplied by Jonathan Stone. */
8 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
9 * Copyright (c) 1996-2003 by Internet Software Consortium
11 * Permission to use, copy, modify, and distribute this software for any
12 * purpose with or without fee is hereby granted, provided that the above
13 * copyright notice and this permission notice appear in all copies.
15 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
16 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
17 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
18 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
21 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 * Internet Systems Consortium, Inc.
25 * Redwood City, CA 94063
29 * This software has been written for Internet Systems Consortium
30 * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
31 * To learn more about Internet Systems Consortium, see
32 * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
33 * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
34 * ``http://www.nominum.com''.
38 #ifndef __BIT_TYPES_DEFINED__
39 #define __BIT_TYPES_DEFINED__
42 typedef short int16_t;
45 typedef unsigned char u_int8_t
;
46 typedef unsigned short u_int16_t
;
47 typedef unsigned long u_int32_t
;
48 #endif /* __BIT_TYPES_DEFINED__ */
51 typedef u_int16_t u16
;
52 typedef u_int32_t u32
;
55 #include <sys/types.h>
67 #include <net/route.h>
70 # include <linux/if_arp.h>
71 # include <linux/time.h> /* also necessary */
73 # include <net/if_arp.h>
76 #include <sys/time.h> /* gettimeofday()*/
78 /* Databases go in /var/state/dhcp. It would also be valid to put them
79 in /var/state/misc - indeed, given that there's only one lease file, it
80 would probably be better. However, I have some ideas for optimizing
81 the lease database that may result in a _lot_ of smaller files being
82 created, so in that context it makes more sense to have a seperate
85 #ifndef _PATH_DHCPD_DB
86 #define _PATH_DHCPD_DB "/var/state/dhcp/dhcpd.leases"
89 #ifndef _PATH_DHCLIENT_DB
90 #define _PATH_DHCLIENT_DB "/var/state/dhcp/dhclient.leases"
93 /* Varargs stuff... */
95 #define VA_DOTDOTDOT ...
96 #define VA_start(list, last) va_start (list, last)
99 #define VOIDPTR void *
108 #define GET_TIME(x) time ((x))
110 #if (LINUX_MAJOR >= 2)
111 # if (LINUX_MINOR >= 1)
112 # if defined (USE_DEFAULT_NETWORK)
115 # if !defined (__sparc__) /* XXX hopefully this will be fixed someday */
116 # define SIOCGIFCONF_ZERO_PROBE
118 # define LINUX_SLASHPROC_DISCOVERY
119 # define PROCDEV_DEVICE "/proc/net/dev"
120 # define HAVE_ARPHRD_TUNNEL
121 # define HAVE_TR_SUPPORT
123 # define HAVE_ARPHRD_METRICOM
124 # define HAVE_ARPHRD_IEEE802
125 # define HAVE_ARPHRD_LOOPBACK
126 # define HAVE_SO_BINDTODEVICE
127 # define HAVE_SIOCGIFHWADDR
131 #if defined (SIOCGIFHWADDR) && !defined (HAVE_SIOCGIFHWADDR)
132 # define HAVE_SIOCGIFHWADDR
135 #if !defined (USE_LPF)
136 # if defined (USE_DEFAULT_NETWORK)
138 # define SOCKET_CAN_RECEIVE_UNICAST_UNCONFIGURED
140 # define IGNORE_HOSTUNREACH
143 #define ALIAS_NAMES_PERMUTED
144 #define SKIP_DUMMY_INTERFACES
146 #ifdef NEED_PRAND_CONF
147 #ifndef HAVE_DEV_RANDOM
148 # define HAVE_DEV_RANDOM 1
149 #endif /* HAVE_DEV_RANDOM */
151 const char *cmds
[] = {
152 "/bin/ps -axlw 2>&1",
153 "/sbin/arp -an 2>&1",
154 "/bin/netstat -an 2>&1",
156 "/usr/bin/dig com. soa +ti=1 +retry=0 2>&1",
157 "/usr/bin/uptime 2>&1",
158 "/bin/netstat -s 2>&1",
159 "/usr/bin/dig . soa +ti=1 +retry=0 2>&1",
160 "/usr/bin/vmstat 2>&1",
165 const char *dirs
[] = {
178 const char *files
[] = {
189 #endif /* NEED_PRAND_CONF */