Obsoleted by new dhcp/ tree
This commit is contained in:
parent
19fea7dfee
commit
89c5dd24ac
|
@ -1,98 +0,0 @@
|
|||
/* alphaosf.h
|
||||
|
||||
System dependencies for DEC Alpha/OSF1... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 The Internet Software Consortium. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of The Internet Software Consortium nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
|
||||
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software was written for the Internet Software Consortium by Ted Lemon
|
||||
* under a contract with Vixie Laboratories.
|
||||
*/
|
||||
|
||||
/* Define the basic integer types... */
|
||||
typedef char int8_t;
|
||||
typedef short int16_t;
|
||||
typedef int int32_t;
|
||||
|
||||
typedef unsigned char u_int8_t;
|
||||
typedef unsigned short u_int16_t;
|
||||
typedef unsigned int u_int32_t;
|
||||
|
||||
#include <syslog.h>
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <paths.h>
|
||||
#include <errno.h>
|
||||
#include <malloc.h>
|
||||
#include <unistd.h>
|
||||
#include <setjmp.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
|
||||
extern int h_errno;
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_dl.h>
|
||||
|
||||
/* Varargs stuff... */
|
||||
#include <varargs.h>
|
||||
#define VA_DOTDOTDOT va_alist
|
||||
#define VA_start(list, last) va_start (list)
|
||||
|
||||
#ifndef _PATH_DHCPD_PID
|
||||
#define _PATH_DHCPD_PID "/var/run/dhcpd.pid"
|
||||
#endif
|
||||
|
||||
#define EOL '\n'
|
||||
#define VOIDPTR void *
|
||||
|
||||
/* Time stuff... */
|
||||
#include <sys/time.h>
|
||||
#define TIME time_t
|
||||
#define GET_TIME(x) time ((x))
|
||||
|
||||
/* The jmp_buf type is an array on OSF/1, so we can't dereference it
|
||||
and must declare it differently. */
|
||||
#define jbp_decl(x) jmp_buf x
|
||||
#define jref(x) (x)
|
||||
#define jdref(x) (x)
|
||||
#define jrefproto jmp_buf
|
||||
|
||||
/* OSF/1 doesn't support limited sprintfs. */
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
#define NO_SNPRINTF
|
||||
|
||||
#define NEED_OSF_PFILT_HACKS
|
||||
#define BPF_FORMAT "/dev/pf/pfilt%d"
|
||||
|
||||
#if defined (USE_DEFAULT_NETWORK)
|
||||
# define USE_BPF
|
||||
#endif
|
|
@ -1,81 +0,0 @@
|
|||
/* bsdos.h
|
||||
|
||||
System dependencies for BSDI BSD/OS... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 The Internet Software Consortium. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of The Internet Software Consortium nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
|
||||
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software was written for the Internet Software Consortium by Ted Lemon
|
||||
* under a contract with Vixie Laboratories.
|
||||
*/
|
||||
|
||||
#include <syslog.h>
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <paths.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <setjmp.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
|
||||
extern int h_errno;
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_dl.h>
|
||||
#define INADDR_LOOPBACK ((u_int32_t)0x7f000001)
|
||||
|
||||
/* Varargs stuff... */
|
||||
#include <stdarg.h>
|
||||
#define VA_DOTDOTDOT ...
|
||||
#define va_dcl
|
||||
#define VA_start(list, last) va_start (list, last)
|
||||
|
||||
#ifndef _PATH_DHCPD_PID
|
||||
#define _PATH_DHCPD_PID "/var/run/dhcpd.pid"
|
||||
#endif
|
||||
#ifndef _PATH_DHCPD_DB
|
||||
#define _PATH_DHCPD_DB "/var/db/dhcpd.leases"
|
||||
#endif
|
||||
|
||||
#define EOL '\n'
|
||||
#define VOIDPTR void *
|
||||
|
||||
/* Time stuff... */
|
||||
#include <sys/time.h>
|
||||
#define TIME time_t
|
||||
#define GET_TIME(x) time ((x))
|
||||
|
||||
#define HAVE_SA_LEN
|
||||
|
||||
#if defined (USE_DEFAULT_NETWORK)
|
||||
# define USE_BPF
|
||||
#endif
|
|
@ -1,84 +0,0 @@
|
|||
/* freebsd.h
|
||||
|
||||
System dependencies for FreeBSD... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 The Internet Software Consortium. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of The Internet Software Consortium nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
|
||||
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software was written for the Internet Software Consortium by Ted Lemon
|
||||
* under a contract with Vixie Laboratories.
|
||||
*/
|
||||
|
||||
#define _ANSI_SOURCE
|
||||
|
||||
#include <syslog.h>
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <paths.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <setjmp.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
|
||||
extern int h_errno;
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_dl.h>
|
||||
#define INADDR_LOOPBACK ((u_int32_t)0x7f000001)
|
||||
|
||||
/* Varargs stuff... */
|
||||
#include <stdarg.h>
|
||||
#define VA_DOTDOTDOT ...
|
||||
#define va_dcl
|
||||
#define VA_start(list, last) va_start (list, last)
|
||||
|
||||
#ifndef _PATH_DHCPD_PID
|
||||
#define _PATH_DHCPD_PID "/var/run/dhcpd.pid"
|
||||
#endif
|
||||
#ifndef _PATH_DHCPD_DB
|
||||
#define _PATH_DHCPD_DB "/var/db/dhcpd.leases"
|
||||
#endif
|
||||
|
||||
#define EOL '\n'
|
||||
#define VOIDPTR void *
|
||||
|
||||
/* Time stuff... */
|
||||
#include <sys/time.h>
|
||||
#define TIME time_t
|
||||
#define GET_TIME(x) time ((x))
|
||||
|
||||
#define HAVE_SA_LEN
|
||||
|
||||
#if defined (USE_DEFAULT_NETWORK)
|
||||
# define USE_BPF
|
||||
# define BROKEN_FREEBSD_BPF /* Fixed in 2.2 */
|
||||
#endif
|
|
@ -1,78 +0,0 @@
|
|||
/* hpux.h */
|
||||
/*
|
||||
* Copyright (c) 1996 The Internet Software Consortium. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of The Internet Software Consortium nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
|
||||
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#define int8_t char
|
||||
#define int16_t short
|
||||
#define int32_t long
|
||||
|
||||
#define u_int8_t unsigned char
|
||||
#define u_int16_t unsigned short
|
||||
#define u_int32_t unsigned long
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <syslog.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
#include <limits.h>
|
||||
|
||||
extern int h_errno;
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_arp.h>
|
||||
|
||||
#ifndef _PATH_DHCPD_PID
|
||||
#define _PATH_DHCPD_PID "/etc/dhcpd.pid"
|
||||
#endif
|
||||
|
||||
#include <varargs.h>
|
||||
#define VA_DOTDOTDOT va_alist
|
||||
#define VA_start(list, last) va_start (list)
|
||||
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
#define NO_SNPRINTF
|
||||
|
||||
#define USE_SOCKETS 1
|
||||
#define EOL '\n'
|
||||
#define VOIDPTR void *
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define TIME time_t
|
||||
#define GET_TIME(x) time ((x))
|
||||
|
||||
#define random rand
|
|
@ -1,98 +0,0 @@
|
|||
/* linux.h
|
||||
|
||||
System dependencies for Linux.
|
||||
|
||||
Based on a configuration originally supplied by Jonathan Stone. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 The Internet Software Consortium. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of The Internet Software Consortium nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
|
||||
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <features.h>
|
||||
#ifndef __BIT_TYPES_DEFINED__
|
||||
#define __BIT_TYPES_DEFINED__
|
||||
#undef __USE_BSD
|
||||
typedef char int8_t;
|
||||
typedef short int16_t;
|
||||
typedef long int32_t;
|
||||
|
||||
typedef unsigned char u_int8_t;
|
||||
typedef unsigned short u_int16_t;
|
||||
typedef unsigned long u_int32_t;
|
||||
#endif /* __BIT_TYPES_DEFINED__ */
|
||||
|
||||
#include <syslog.h>
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
#include <limits.h>
|
||||
|
||||
extern int h_errno;
|
||||
|
||||
#include <net/if.h>
|
||||
|
||||
#define ARPHRD_ETHER 1
|
||||
#define ARPHRD_IEEE802 6
|
||||
|
||||
#include <sys/time.h> /* gettimeofday()*/
|
||||
#include <linux/time.h> /* also necessary */
|
||||
|
||||
#ifndef _PATH_DHCPD_PID
|
||||
#define _PATH_DHCPD_PID "/var/run/dhcpd.pid"
|
||||
#endif
|
||||
|
||||
/* Varargs stuff... */
|
||||
#include <stdarg.h>
|
||||
#define VA_DOTDOTDOT ...
|
||||
#define VA_start(list, last) va_start (list, last)
|
||||
#define va_dcl
|
||||
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
#define NO_SNPRINTF
|
||||
|
||||
#define VOIDPTR void *
|
||||
|
||||
#define EOL '\n'
|
||||
|
||||
/* Time stuff... */
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define TIME time_t
|
||||
#define GET_TIME(x) time ((x))
|
||||
|
||||
#if defined (USE_DEFAULT_NETWORK)
|
||||
# define USE_SOCKETS
|
||||
#endif
|
||||
|
||||
#define ALIAS_NAMES_PERMUTED
|
|
@ -1,81 +0,0 @@
|
|||
/* netbsd.h
|
||||
|
||||
System dependencies for NetBSD... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 The Internet Software Consortium. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of The Internet Software Consortium nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
|
||||
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software was written for the Internet Software Consortium by Ted Lemon
|
||||
* under a contract with Vixie Laboratories.
|
||||
*/
|
||||
|
||||
#include <syslog.h>
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <paths.h>
|
||||
#include <errno.h>
|
||||
#include <malloc.h>
|
||||
#include <unistd.h>
|
||||
#include <setjmp.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
|
||||
extern int h_errno;
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_dl.h>
|
||||
|
||||
/* Varargs stuff... */
|
||||
#include <stdarg.h>
|
||||
#define VA_DOTDOTDOT ...
|
||||
#define va_dcl
|
||||
#define VA_start(list, last) va_start (list, last)
|
||||
|
||||
#ifndef _PATH_DHCPD_PID
|
||||
#define _PATH_DHCPD_PID "/var/run/dhcpd.pid"
|
||||
#endif
|
||||
#ifndef _PATH_DHCPD_DB
|
||||
#define _PATH_DHCPD_DB "/var/db/dhcpd.leases"
|
||||
#endif
|
||||
|
||||
#define EOL '\n'
|
||||
#define VOIDPTR void *
|
||||
|
||||
/* Time stuff... */
|
||||
#include <sys/time.h>
|
||||
#define TIME time_t
|
||||
#define GET_TIME(x) time ((x))
|
||||
|
||||
#define HAVE_SA_LEN
|
||||
|
||||
#if defined (USE_DEFAULT_NETWORK)
|
||||
# define USE_BPF
|
||||
#endif
|
|
@ -1,106 +0,0 @@
|
|||
/* qnx.h
|
||||
|
||||
System dependencies for QNX...
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 The Internet Software Consortium. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of RadioMail Corporation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY RADIOMAIL CORPORATION AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* RADIOMAIL CORPORATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software was written for the Internet Software Consortium by Ted Lemon
|
||||
* under a contract with Vixie Labs.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <setjmp.h>
|
||||
#include <limits.h>
|
||||
#include <syslog.h>
|
||||
#include <sys/select.h>
|
||||
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <netdb.h>
|
||||
extern int h_errno;
|
||||
|
||||
#include <net/if.h>
|
||||
#define INADDR_LOOPBACK ((u_long)0x7f000001)
|
||||
|
||||
/* Varargs stuff... */
|
||||
#include <stdarg.h>
|
||||
#define VA_DOTDOTDOT ...
|
||||
#define va_dcl
|
||||
#define VA_start(list, last) va_start (list, last)
|
||||
|
||||
#ifndef _PATH_DHCPD_PID
|
||||
#define _PATH_DHCPD_PID "/etc/dhcpd.pid"
|
||||
#endif
|
||||
|
||||
#define EOL '\n'
|
||||
#define VOIDPTR void *
|
||||
|
||||
/* Time stuff... */
|
||||
#include <sys/time.h>
|
||||
#define TIME time_t
|
||||
#define GET_TIME(x) time ((x))
|
||||
#define TIME_DIFF(high, low) (*(high) - *(low))
|
||||
#define SET_TIME(x, y) (*(x) = (y))
|
||||
#define ADD_TIME(d, s1, s2) (*(d) = *(s1) + *(s2))
|
||||
#define SET_MAX_TIME(x) (*(x) = INT_MAX)
|
||||
|
||||
typedef unsigned char u_int8_t;
|
||||
typedef unsigned short u_int16_t;
|
||||
typedef unsigned long u_int32_t;
|
||||
typedef signed short int16_t;
|
||||
typedef signed long int32_t;
|
||||
|
||||
#define strcasecmp( s1, s2 ) stricmp( s1, s2 )
|
||||
#define strncasecmp( s1, s2, n ) strnicmp( s1, s2, n )
|
||||
#define vsnprintf( buf, size, fmt, list ) vsprintf( buf, fbuf, list )
|
||||
#define random() rand()
|
||||
|
||||
#define HAVE_SA_LEN
|
||||
#define BROKEN_TM_GMT
|
||||
#define USE_SOCKETS
|
||||
#define NO_SNPRINTF
|
||||
#undef AF_LINK
|
||||
|
||||
/*
|
||||
NOTE: to get the routing of the 255.255.255.255 broadcasts to work
|
||||
under QNX, you need to issue the following command before starting
|
||||
the daemon:
|
||||
|
||||
route add -interface 255.255.255.0 <hostname>
|
||||
|
||||
where <hostname> is replaced by the hostname or IP number of the
|
||||
machine that dhcpd is running on.
|
||||
*/
|
|
@ -1,292 +0,0 @@
|
|||
/* sample.h
|
||||
|
||||
Sample config file for clients.
|
||||
|
||||
This file is provided as a sample in case the system you want to run
|
||||
on is not currently supported. If that is the case, follow the Porting::
|
||||
comments here and in other files as guides for what to change. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 The Internet Software Consortium. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of The Internet Software Consortium nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
|
||||
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Porting::
|
||||
|
||||
Some systems do not define basic integer types as shown below.
|
||||
On some systems, you need to include <bitypes.h> or <sys/bitypes.h>.
|
||||
If you get parse errors in dhcpd.h while compiling dhcpd.conf, try
|
||||
including bitypes.h, and if that fails, use the hard-coded definitions
|
||||
shown below. */
|
||||
|
||||
#if 0
|
||||
#include <sys/bitypes.h>
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#define int8_t char
|
||||
#define int16_t short
|
||||
#define int32_t long
|
||||
|
||||
#define u_int8_t unsigned char
|
||||
#define u_int16_t unsigned short
|
||||
#define u_int32_t unsigned long
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/* Porting::
|
||||
|
||||
The jmp_buf type as declared in <setjmp.h> is sometimes a structure
|
||||
and sometimes an array. By default, we assume it's a structure.
|
||||
If it's an array on your system, you may get compile warnings or errors
|
||||
as a result in confpars.c. If so, try including the following definitions,
|
||||
which treat jmp_buf as an array: */
|
||||
|
||||
#if 0
|
||||
#define jbp_decl(x) jmp_buf x
|
||||
#define jref(x) (x)
|
||||
#define jdref(x) (x)
|
||||
#define jrefproto jmp_buf
|
||||
#endif
|
||||
|
||||
/* Porting::
|
||||
|
||||
Some older systems (e.g., Ultrix) still use the 4.2BSD-style syslog
|
||||
API. These differ from later versions of the syslog API in that the
|
||||
openlog system call takes two arguments instead of three, and the
|
||||
facility code (the third argument to modern versions of openlog())
|
||||
is ORed into the log priority in the syslog() call.
|
||||
|
||||
If you are running with the 4.2BSD-style syslog interface, define
|
||||
SYSLOG_4_2. */
|
||||
|
||||
/* #define SYSLOG_4_2 */
|
||||
|
||||
#include <syslog.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
#include <limits.h>
|
||||
|
||||
extern int h_errno;
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_arp.h>
|
||||
|
||||
/* Porting::
|
||||
|
||||
Some older systems do not have defines for IP type-of-service,
|
||||
or don't define them the way we expect. If you get undefined
|
||||
symbol errors on the following symbols, they probably need to be
|
||||
defined here. */
|
||||
|
||||
#if 0
|
||||
#define IPTOS_LOWDELAY 0x10
|
||||
#define IPTOS_THROUGHPUT 0x08
|
||||
#define IPTOS_RELIABILITY 0x04
|
||||
#endif
|
||||
|
||||
/* Porting::
|
||||
|
||||
Newer BSD derivatives store non-permanent daemon files in a
|
||||
directory called /var/run. If your system has a /var/run,
|
||||
use it; otherwise, use /etc. */
|
||||
|
||||
#ifndef _PATH_DHCPD_PID
|
||||
#define _PATH_DHCPD_PID "/etc/dhcpd.pid"
|
||||
#endif
|
||||
|
||||
/* Porting::
|
||||
|
||||
If your system supports standard ANSI C, it should provide the file
|
||||
/usr/include/stdarg.h. This contains the ANSI standard declarations
|
||||
for functions which take a variable number of arguments.
|
||||
|
||||
Older systems with non-ANSI compilers cannot support this interface,
|
||||
and generally use the older varargs interface, defined in <varargs.h>.
|
||||
Some systems only support varargs, but define the interface in
|
||||
<stdarg.h> anyway.
|
||||
|
||||
You must choose one of the two sets of definitions below. Try
|
||||
stdarg.h first, unless you know it won't work. If you have
|
||||
trouble compiling errwarn.c, try switching to the varargs.h definitions.
|
||||
If that fails, try using stdarg.h with the varargs definitions. */
|
||||
|
||||
#if 0
|
||||
/* Stdarg definitions for ANSI-compliant C compilers. */
|
||||
#include <stdarg.h>
|
||||
#define VA_DOTDOTDOT ...
|
||||
#define VA_start(list, last) va_start (list, last)
|
||||
#define va_dcl
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* Varargs definitions, for non-ANSI-compliant C compilers. */
|
||||
#include <varargs.h>
|
||||
#define VA_DOTDOTDOT va_alist
|
||||
#define VA_start(list, last) va_start (list)
|
||||
#endif
|
||||
|
||||
/* Porting::
|
||||
|
||||
Some systems (notably 4.4BSD derivatives) support versions of the
|
||||
sprintf functions which will deposit a limited number of characters
|
||||
into the buffer; that limit is provided in an extra argument.
|
||||
If your system doesn't support this functionality, you must include
|
||||
the definitions below: */
|
||||
|
||||
#if 0
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
#define NO_SNPRINTF
|
||||
#endif
|
||||
|
||||
/* Porting::
|
||||
|
||||
Some systems provide a function, strerror(), which takes the unix
|
||||
error number (see errno) and returns a pointer to a static buffer
|
||||
containing the corresponding error message.
|
||||
|
||||
If your system doesn't provide strerror(), define NO_STRERROR
|
||||
as shown below: */
|
||||
|
||||
#if 0
|
||||
#define NO_STRERROR
|
||||
char *strerror PROTO ((int));
|
||||
#endif
|
||||
|
||||
/* Porting::
|
||||
|
||||
Once dhcpd has initialized itself, it loops forever waiting for
|
||||
packets to come in. Since we need to support multiple input streams
|
||||
in order to support multiple interfaces, dhcpd needs to be able to
|
||||
do a syscall to determine which descriptors have input waiting on
|
||||
them.
|
||||
|
||||
Normally, dhcpd uses the select() system call, which is a 4.2BSD
|
||||
syscall invented precisely for this purpose. Unfortunately, some
|
||||
System V-based systems do not support select() properly when it
|
||||
operates on streams. The System V interface which does (largely)
|
||||
the same thing as select is called poll(). In some cases, this may
|
||||
work better than select() - if you find that dhcpd is hanging and not
|
||||
responding to packets very consistently, you might try defining
|
||||
USE_POLL and including <poll.h>. */
|
||||
|
||||
#if 0
|
||||
#define USE_POLL
|
||||
#include <poll.h>
|
||||
#endif
|
||||
|
||||
/* Porting::
|
||||
|
||||
You must define the default network API for your port. This
|
||||
will depend on whether one of the existing APIs will work for
|
||||
you, or whether you need to implement support for a new API.
|
||||
Currently, the following APIs are supported:
|
||||
|
||||
The BSD socket API: define USE_SOCKETS.
|
||||
The Berkeley Packet Filter: define USE_BPF.
|
||||
The Streams Network Interface Tap (NIT): define USE_NIT.
|
||||
Raw sockets: define USE_RAW_SOCKETS
|
||||
|
||||
If your system supports the BSD socket API and doesn't provide
|
||||
one of the supported interfaces to the physical packet layer,
|
||||
you can either provide support for the low-level API that your
|
||||
system does support (if any) or just use the BSD socket interface.
|
||||
The BSD socket interface doesn't support multiple network interfaces,
|
||||
and on many systems, it does not support the all-ones broadcast
|
||||
address, which can cause problems with some DHCP clients (e.g.
|
||||
Microsoft Windows 95). */
|
||||
|
||||
#if defined (USE_DEFAULT_NETWORK)
|
||||
# define USE_SOCKETS
|
||||
#endif
|
||||
|
||||
/* Porting::
|
||||
|
||||
Recent versions of BSD added a new element to the sockaddr structure:
|
||||
sa_len. This indicates the length of the structure, and is used
|
||||
in a variety of places, not the least of which is the SIOCGIFCONF
|
||||
ioctl, which is used to figure out what interfaces are attached to
|
||||
the system.
|
||||
|
||||
You should be able to determine if your system has an sa_len element
|
||||
by looking at the struct sockaddr definition in /usr/include/sys/socket.h.
|
||||
If it does, you must define HAVE_SA_LEN. Otherwise, you must not.
|
||||
The most obvious symptom that you've got this wrong is either a compile
|
||||
error complaining about the use of the sa_len structure element, or
|
||||
the failure of dhcpd to find any interfaces. */
|
||||
|
||||
/* #define HAVE_SA_LEN */
|
||||
|
||||
/* Every operating system has its own way of seperating lines in a
|
||||
sequential text file. Most modern systems use a single character,
|
||||
either an ASCII Newline (10) or an ASCII Carriage Return (13).
|
||||
|
||||
The most notable exception is MS-DOS (and consequently, Windows),
|
||||
which uses an ASCII Carriage Return followed by a Newline to
|
||||
seperate each line. Fortunately, MS-DOS C compiler libraries
|
||||
typically hide this from the programmer, returning just a Newline.
|
||||
|
||||
Define EOL to be whatever getc() returns for a newline. */
|
||||
|
||||
#define EOL '\n'
|
||||
|
||||
/* Some older C compilers don't support the void pointer type.
|
||||
ANSI C defines void * to be a pointer type that matches
|
||||
any other pointer type. This is handy for returning a pointer
|
||||
which will always need to be cast to a different value. For
|
||||
example, malloc() on an ANSI C-compliant system returns void *.
|
||||
|
||||
If your compiler doesn't support void pointers, you may need to
|
||||
define VOIDPTR to be char *; otherwise, define it to be void *. */
|
||||
|
||||
#define VOIDPTR void *
|
||||
|
||||
/* Porting::
|
||||
|
||||
The following definitions for time should work on any unix machine.
|
||||
They may not work (or at least, may not work well) on a variety of
|
||||
non-unix machines. If you are porting to a non-unix machine, you
|
||||
probably need to change the definitions below and perhaps include
|
||||
different headers.
|
||||
|
||||
I should note that dhcpd is not yet entirely clean of unix-specific
|
||||
time references, so the list of defines shown below probably isn't
|
||||
good enough if you're porting to a system that really doesn't support
|
||||
unix time. It's probably a reasonable place to start, though. */
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define TIME time_t
|
||||
#define GET_TIME(x) time ((x))
|
|
@ -1,112 +0,0 @@
|
|||
/* sco.h
|
||||
|
||||
System dependencies for SCO ODT 3.0...
|
||||
|
||||
Based on changes contributed by Gerald Rosenberg. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 The Internet Software Consortium. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of The Internet Software Consortium nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
|
||||
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software was written for the Internet Software Consortium by Ted Lemon
|
||||
* under a contract with Vixie Laboratories.
|
||||
*/
|
||||
|
||||
#include <syslog.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/* Basic Integer Types not defined in SCO headers... */
|
||||
|
||||
typedef char int8_t;
|
||||
typedef short int16_t;
|
||||
typedef long int32_t;
|
||||
|
||||
typedef unsigned char u_int8_t;
|
||||
typedef unsigned short u_int16_t;
|
||||
typedef unsigned long u_int32_t;
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
#include <limits.h>
|
||||
|
||||
extern int h_errno;
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_arp.h>
|
||||
|
||||
/* XXX dunno if this is required for SCO... */
|
||||
/*
|
||||
* Definitions for IP type of service (ip_tos)
|
||||
*/
|
||||
#define IPTOS_LOWDELAY 0x10
|
||||
#define IPTOS_THROUGHPUT 0x08
|
||||
#define IPTOS_RELIABILITY 0x04
|
||||
/* IPTOS_LOWCOST 0x02 XXX */
|
||||
|
||||
/* SCO doesn't have /var/run. */
|
||||
#ifndef _PATH_DHCPD_PID
|
||||
#define _PATH_DHCPD_PID "/etc/dhcpd.pid"
|
||||
#endif
|
||||
|
||||
#define INADDR_LOOPBACK ((u_int32_t)0x7f000001)
|
||||
|
||||
/* Varargs stuff: use stdarg.h instead ... */
|
||||
#include <stdarg.h>
|
||||
#define VA_DOTDOTDOT ...
|
||||
#define VA_start(list, last) va_start (list, last)
|
||||
#define va_dcl
|
||||
|
||||
/* SCO doesn't support limited sprintfs. */
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
#define NO_SNPRINTF
|
||||
|
||||
/* By default, use BSD Socket API for receiving and sending packets.
|
||||
This actually works pretty well on Solaris, which doesn't censor
|
||||
the all-ones broadcast address. */
|
||||
#if defined (USE_DEFAULT_NETWORK)
|
||||
# define USE_SOCKETS
|
||||
#endif
|
||||
|
||||
#define EOL '\n'
|
||||
#define VOIDPTR void *
|
||||
|
||||
/*
|
||||
* Time stuff...
|
||||
*
|
||||
* Definitions for an ISC DHCPD system that uses time_t
|
||||
* to represent time internally as opposed to, for example, struct timeval.)
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define TIME time_t
|
||||
#define GET_TIME(x) time ((x))
|
|
@ -1,134 +0,0 @@
|
|||
/* sunos4.h
|
||||
|
||||
System dependencies for SunOS 4 (tested on 4.1.4)... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 The Internet Software Consortium. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of The Internet Software Consortium nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
|
||||
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software was written for the Internet Software Consortium by Ted Lemon
|
||||
* under a contract with Vixie Laboratories.
|
||||
*/
|
||||
|
||||
/* Basic Integer Types not defined in SunOS headers... */
|
||||
|
||||
#define int8_t char
|
||||
#define int16_t short
|
||||
#define int32_t int
|
||||
|
||||
#define u_int8_t unsigned char
|
||||
#define u_int16_t unsigned short
|
||||
#define u_int32_t unsigned int
|
||||
|
||||
/* No endian.h either. */
|
||||
/*
|
||||
* Definitions for byte order, according to byte significance from low
|
||||
* address to high.
|
||||
*/
|
||||
#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
|
||||
#define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
|
||||
#define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */
|
||||
|
||||
#define BYTE_ORDER BIG_ENDIAN
|
||||
|
||||
/* The jmp_buf type is an array on SunOS, so we can't dereference it
|
||||
and must declare it differently. */
|
||||
#define jbp_decl(x) jmp_buf x
|
||||
#define jref(x) (x)
|
||||
#define jdref(x) (x)
|
||||
#define jrefproto jmp_buf
|
||||
|
||||
#include <syslog.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
#include <limits.h>
|
||||
#include <poll.h>
|
||||
|
||||
extern int h_errno;
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_arp.h>
|
||||
|
||||
/*
|
||||
* Definitions for IP type of service (ip_tos)
|
||||
*/
|
||||
#define IPTOS_LOWDELAY 0x10
|
||||
#define IPTOS_THROUGHPUT 0x08
|
||||
#define IPTOS_RELIABILITY 0x04
|
||||
/* IPTOS_LOWCOST 0x02 XXX */
|
||||
|
||||
/* SunOS systems don't have /var/run, but some sites have added it.
|
||||
If you want to put dhcpd.pid in /var/run, define _PATH_DHCPD_PID
|
||||
in site.h. */
|
||||
#ifndef _PATH_DHCPD_PID
|
||||
#define _PATH_DHCPD_PID "/etc/dhcpd.pid"
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
/* Varargs stuff: use stdarg.h instead ... */
|
||||
#include <stdarg.h>
|
||||
#define VA_DOTDOTDOT ...
|
||||
#define VA_start(list, last) va_start (list, last)
|
||||
#define va_dcl
|
||||
#else /* !__GNUC__*/
|
||||
/* Varargs stuff... */
|
||||
#include <varargs.h>
|
||||
#define VA_DOTDOTDOT va_alist
|
||||
#define VA_start(list, last) va_start (list)
|
||||
#endif /* !__GNUC__*/
|
||||
|
||||
/* SunOS doesn't support limited sprintfs. */
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
#define NO_SNPRINTF
|
||||
|
||||
/* SunOS doesn't supply strerror... */
|
||||
#define NO_STRERROR
|
||||
char *strerror PROTO ((int));
|
||||
|
||||
/* SunOS select() doesn't work on streams, so we have to use poll -
|
||||
as usual, SysV can't do networking to save its life. */
|
||||
#define USE_POLL
|
||||
|
||||
/* By default, use NIT API for receiving and sending packets... */
|
||||
#if defined (USE_DEFAULT_NETWORK)
|
||||
# define USE_NIT
|
||||
#endif
|
||||
|
||||
#define EOL '\n'
|
||||
#define VOIDPTR void *
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define TIME time_t
|
||||
#define GET_TIME(x) time ((x))
|
|
@ -1,124 +0,0 @@
|
|||
/* sunos5-5.h
|
||||
|
||||
System dependencies for Solaris 2.x (tested on 2.5 with gcc)... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 The Internet Software Consortium. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of The Internet Software Consortium nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
|
||||
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software was written for the Internet Software Consortium by Ted Lemon
|
||||
* under a contract with Vixie Laboratories.
|
||||
*/
|
||||
|
||||
/* Basic Integer Types not defined in SunOS headers... */
|
||||
|
||||
#define int8_t char
|
||||
#define int16_t short
|
||||
#define int32_t long
|
||||
|
||||
#define u_int8_t unsigned char
|
||||
#define u_int16_t unsigned short
|
||||
#define u_int32_t unsigned long
|
||||
|
||||
/* The jmp_buf type is an array on Solaris, so we can't dereference it
|
||||
and must declare it differently. */
|
||||
|
||||
#define jbp_decl(x) jmp_buf x
|
||||
#define jref(x) (x)
|
||||
#define jdref(x) (x)
|
||||
#define jrefproto jmp_buf
|
||||
|
||||
#include <syslog.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/sockio.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
#include <limits.h>
|
||||
|
||||
extern int h_errno;
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_arp.h>
|
||||
|
||||
/*
|
||||
* Definitions for IP type of service (ip_tos)
|
||||
*/
|
||||
#define IPTOS_LOWDELAY 0x10
|
||||
#define IPTOS_THROUGHPUT 0x08
|
||||
#define IPTOS_RELIABILITY 0x04
|
||||
/* IPTOS_LOWCOST 0x02 XXX */
|
||||
|
||||
/* Solaris systems don't have /var/run, but some sites have added it.
|
||||
If you want to put dhcpd.pid in /var/run, define _PATH_DHCPD_PID
|
||||
in site.h. */
|
||||
#ifndef _PATH_DHCPD_PID
|
||||
#define _PATH_DHCPD_PID "/etc/dhcpd.pid"
|
||||
#endif
|
||||
|
||||
#if defined (__GNUC__) || defined (__SVR4)
|
||||
/* Varargs stuff: use stdarg.h instead ... */
|
||||
#include <stdarg.h>
|
||||
#define VA_DOTDOTDOT ...
|
||||
#define VA_start(list, last) va_start (list, last)
|
||||
#define va_dcl
|
||||
#else /* !__GNUC__*/
|
||||
/* Varargs stuff... */
|
||||
#include <varargs.h>
|
||||
#define VA_DOTDOTDOT va_alist
|
||||
#define VA_start(list, last) va_start (list)
|
||||
#endif /* !__GNUC__*/
|
||||
|
||||
/* Solaris doesn't support limited sprintfs. */
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
#define NO_SNPRINTF
|
||||
|
||||
/* By default, use BSD Socket API for receiving and sending packets.
|
||||
This actually works pretty well on Solaris, which doesn't censor
|
||||
the all-ones broadcast address. */
|
||||
#if defined (USE_DEFAULT_NETWORK)
|
||||
# define USE_SOCKETS
|
||||
#endif
|
||||
|
||||
#define USE_POLL
|
||||
|
||||
#define EOL '\n'
|
||||
#define VOIDPTR void *
|
||||
|
||||
/* Time stuff... */
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define TIME time_t
|
||||
#define GET_TIME(x) time ((x))
|
||||
|
||||
#define random() rand()
|
|
@ -1,100 +0,0 @@
|
|||
/* ultrix.h
|
||||
|
||||
System dependencies for Ultrix 4.2 (tested on 4.2a+multicast)... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 The Internet Software Consortium. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of The Internet Software Consortium nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
|
||||
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software was written for the Internet Software Consortium by Ted Lemon
|
||||
* under a contract with Vixie Laboratories.
|
||||
*/
|
||||
|
||||
/* Ultrix uses the old 4.2BSD-style syslog(). */
|
||||
#include <sys/syslog.h>
|
||||
#define SYSLOG_4_2
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
#include <limits.h>
|
||||
|
||||
extern int h_errno;
|
||||
|
||||
#include <net/if.h>
|
||||
|
||||
#ifndef _PATH_DHCPD_PID
|
||||
#define _PATH_DHCPD_PID "/etc/dhcpd.pid"
|
||||
#endif
|
||||
|
||||
#define int8_t char
|
||||
#define int16_t short
|
||||
#define int32_t long
|
||||
|
||||
#define u_int8_t unsigned char /* Not quite POSIX... */
|
||||
#define u_int16_t unsigned short
|
||||
#define u_int32_t unsigned long
|
||||
|
||||
/* The jmp_buf type is an array on ultrix, so we can't dereference it
|
||||
and must declare it differently. */
|
||||
#define jbp_decl(x) jmp_buf x
|
||||
#define jref(x) (x)
|
||||
#define jdref(x) (x)
|
||||
#define jrefproto jmp_buf
|
||||
|
||||
#define IPTOS_LOWDELAY 0x10
|
||||
/* IPTOS_LOWCOST 0x02 XXX */
|
||||
|
||||
/* Varargs stuff... */
|
||||
#include <varargs.h>
|
||||
#define VA_DOTDOTDOT va_alist
|
||||
#define VA_start(list, last) va_start (list)
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
#define NO_SNPRINTF
|
||||
|
||||
#define INADDR_LOOPBACK ((u_int32_t)0x7f000001)
|
||||
#define EOL '\n'
|
||||
#define VOIDPTR void *
|
||||
|
||||
/*
|
||||
* Time stuff...
|
||||
*
|
||||
* Definitions for an ISC DHCPD system that uses time_t
|
||||
* to represent time internally as opposed to, for example, struct timeval.)
|
||||
*/
|
||||
|
||||
#define TIME time_t
|
||||
#define GET_TIME(x) time ((x))
|
||||
|
||||
#if defined (USE_DEFAULT_NETWORK)
|
||||
# define USE_SOCKETS
|
||||
#endif
|
|
@ -1,10 +0,0 @@
|
|||
# $NetBSD: Makefile,v 1.1.1.1 1996/10/03 06:33:26 mrg Exp $
|
||||
|
||||
SRCS= dhclient.c options.c errwarn.c convert.c tree.c memory.c alloc.c \
|
||||
print.c hash.c tables.c inet.c dispatch.c bpf.c packet.c raw.c nit.c \
|
||||
socket.c
|
||||
PROG= dhclient
|
||||
NOMAN= 1
|
||||
.PATH: ${.CURDIR}/..
|
||||
|
||||
.include <bsd.prog.mk>
|
Loading…
Reference in New Issue