]> git.ipfire.org Git - thirdparty/dhcp.git/blame - includes/cf/openbsd.h
MASSIVE merge from V3-RELEASE-BRANCH into HEAD. HEAD and V3-RELEASE are
[thirdparty/dhcp.git] / includes / cf / openbsd.h
CommitLineData
4140ab7c
TL
1/* openbsd.h
2
3 System dependencies for OpenBSD... */
4
5/*
98311e4b
DH
6 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
7 * Copyright (c) 1996-2003 by Internet Software Consortium
4140ab7c 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.
4140ab7c 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.
4140ab7c 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''.
4140ab7c
TL
33 */
34
35#include <syslog.h>
36#include <sys/types.h>
37#include <string.h>
38#include <paths.h>
39#include <errno.h>
40#include <stdlib.h>
41#include <unistd.h>
42#include <setjmp.h>
43#include <limits.h>
44
45#include <sys/wait.h>
46#include <signal.h>
47
48extern int h_errno;
49
50#include <net/if.h>
51#include <net/if_dl.h>
52#include <net/route.h>
53#include <sys/sockio.h>
54
55#define ifr_netmask ifr_addr
56
57/* Varargs stuff... */
58#include <stdarg.h>
59#define VA_DOTDOTDOT ...
60#define va_dcl
61#define VA_start(list, last) va_start (list, last)
62
63#ifndef _PATH_DHCPD_PID
64#define _PATH_DHCPD_PID "/var/run/dhcpd.pid"
65#endif
66#ifndef _PATH_DHCPD_DB
67#define _PATH_DHCPD_DB "/var/db/dhcpd.leases"
68#endif
69#ifndef _PATH_DHCLIENT_PID
70#define _PATH_DHCLIENT_PID "/var/run/dhclient.pid"
71#endif
72#ifndef _PATH_DHCLIENT_DB
73#define _PATH_DHCLIENT_DB "/var/db/dhclient.leases"
74#endif
75
76#define EOL '\n'
77#define VOIDPTR void *
78
79/* Time stuff... */
80#include <sys/time.h>
81#define TIME time_t
82#define GET_TIME(x) time ((x))
83
84#define HAVE_SA_LEN
85#define HAVE_MKSTEMP
86
87#if defined (USE_DEFAULT_NETWORK)
88# define USE_BPF
89#endif
90
91#ifdef __alpha__
92#define PTRSIZE_64BIT
93#endif
32e99078 94
488b9286
TL
95/* socklen_t first used right around the time 2.5 branched, it looks like. */
96#if OpenBSD < 199905
97#define SOCKLEN_T int
98#endif
99
32e99078
TL
100#ifdef NEED_PRAND_CONF
101#ifndef HAVE_DEV_RANDOM
102 # define HAVE_DEV_RANDOM 1
103 #endif /* HAVE_DEV_RANDOM */
104
105const char *cmds[] = {
106 "/bin/ps -axlw 2>&1",
107 "/usr/sbin/arp -an 2>&1",
108 "/usr/bin/netstat -an 2>&1",
109 "/bin/df 2>&1",
110 "/usr/bin/netstat -an 2>&1",
111 "/usr/sbin/iostat 2>&1",
112 "/usr/bin/vmstat 2>&1",
113 "/usr/bin/w 2>&1",
114 NULL
115};
116
117const char *dirs[] = {
118 "/tmp",
119 "/var/tmp",
120 ".",
121 "/",
122 "/var/spool",
123 "/dev",
124 "/var/mail",
125 "/home",
126 NULL
127};
128
129const char *files[] = {
130 "/var/log/messages",
131 "/var/log/wtmp",
132 "/var/log/lastlog",
133 NULL
134};
135#endif /* NEED_PRAND_CONF */