]>
git.ipfire.org Git - thirdparty/dhcp.git/blob - includes/cf/linux.h
571354e6302e4bcc62caff96d40648735f0f307c
3 System dependencies for Linux.
5 Based on a configuration originally supplied by Jonathan Stone. */
8 * Copyright (c) 1996, 1998, 1999 The Internet Software Consortium.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
20 * 3. Neither the name of The Internet Software Consortium nor the names of its
21 * contributors may be used to endorse or promote products derived
22 * from this software without specific prior written permission.
24 * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
25 * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
26 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
28 * THE INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
29 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
33 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
35 * OF THE POSSIBILITY OF SUCH DAMAGE.
39 #ifndef __BIT_TYPES_DEFINED__
40 #define __BIT_TYPES_DEFINED__
43 typedef short int16_t;
46 typedef unsigned char u_int8_t
;
47 typedef unsigned short u_int16_t
;
48 typedef unsigned long u_int32_t
;
49 #endif /* __BIT_TYPES_DEFINED__ */
52 typedef u_int16_t u16
;
53 typedef u_int32_t u32
;
56 #include <sys/types.h>
68 #include <net/route.h>
71 # include <linux/if_arp.h>
72 # include <linux/time.h> /* also necessary */
74 # include <net/if_arp.h>
77 #include <sys/time.h> /* gettimeofday()*/
79 /* Databases go in /var/state/dhcp. It would also be valid to put them
80 in /var/state/misc - indeed, given that there's only one lease file, it
81 would probably be better. However, I have some ideas for optimizing
82 the lease database that may result in a _lot_ of smaller files being
83 created, so in that context it makes more sense to have a seperate
86 #ifndef _PATH_DHCPD_DB
87 #define _PATH_DHCPD_DB "/var/state/dhcp/dhcpd.leases"
90 #ifndef _PATH_DHCLIENT_DB
91 #define _PATH_DHCLIENT_DB "/var/state/dhcp/dhclient.leases"
94 /* Varargs stuff... */
96 #define VA_DOTDOTDOT ...
97 #define VA_start(list, last) va_start (list, last)
100 #define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
103 #define VOIDPTR void *
112 #define GET_TIME(x) time ((x))
114 #if (LINUX_MAJOR >= 2)
115 # if (LINUX_MINOR >= 1)
116 # if defined (USE_DEFAULT_NETWORK)
119 # define LINUX_SLASHPROC_DISCOVERY
120 # define PROCDEV_DEVICE "/proc/net/dev"
121 # define HAVE_ARPHRD_TUNNEL
123 # define HAVE_ARPHRD_METRICOM
124 # define HAVE_ARPHRD_IEEE802
125 # define HAVE_ARPHRD_LOOPBACK
126 # define HAVE_SO_BINDTODEVICE
127 # define HAVE_SIOCGIFHWADDR
130 #if !defined (USE_LPF)
131 # if defined (USE_DEFAULT_NETWORK)
134 # define IGNORE_HOSTUNREACH
137 #define ALIAS_NAMES_PERMUTED
138 #define SKIP_DUMMY_INTERFACES