.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
.\"
-.\" $Id: dhcpd.8,v 1.27 2007/05/19 19:16:26 dhankins Exp $
+.\" $Id: dhcpd.8,v 1.28 2007/07/03 10:34:18 shane Exp $
.\"
.TH dhcpd 8
.SH NAME
.B -6
]
[
+.B -s
+.I server
+]
+[
.B -cf
.I config-file
]
.I ...ifN
]
]
+
+.B dhcpd
+--version
.SH DESCRIPTION
The Internet Systems Consortium DHCP Server, dhcpd, implements the
Dynamic Host Configuration Protocol (DHCP) and the Internet Bootstrap
flag may used. It should be followed by the udp port number on which
dhcpd should listen. This is mostly useful for debugging purposes.
.PP
+If dhcpd should send replies to an address other than the broadcast
+address (255.255.255.255), the
+.B -s
+flag may be used. It is followed by either the IP address or the host
+name to send replies to. This option is only supported in IPv4.
+.PP
To run dhcpd as a foreground process, rather than allowing it to run
as a daemon in the background, the
.B -f
your existing lease file with its test data. The DHCP server will
refuse to operate in playback mode unless you specify an alternate
lease file.
+.PP
+To find the version of dhcpd that will run, use the
+.B --version
+argument. Instead of running, the version will be printed.
.SH CONFIGURATION
The syntax of the dhcpd.conf(5) file is discussed separately. This
section should be used as an overview of the configuration process,
#ifndef lint
static char ocopyright[] =
-"$Id: dhcpd.c,v 1.128 2007/06/15 15:02:05 shane Exp $ Copyright 2004-2007 Internet Systems Consortium.";
+"$Id: dhcpd.c,v 1.129 2007/07/03 10:34:18 shane Exp $ Copyright 2004-2007 Internet Systems Consortium.";
#endif
static char copyright[] =
#include <errno.h>
#include <limits.h>
-static void usage PROTO ((void));
+static void usage(void);
struct iaddr server_identifier;
int server_identifier_matched;
}
if (server) {
+ if (local_family != AF_INET) {
+ log_fatal("You can only specify address to send "
+ "replies to when running an IPv4 server.");
+ }
if (!inet_aton (server, &limited_broadcast)) {
struct hostent *he;
he = gethostbyname (server);
/* Print usage message. */
-static void usage ()
-{
+static void
+usage(void) {
log_info("%s %s", message, PACKAGE_VERSION);
- log_info (copyright);
- log_info (arr);
+ log_info(copyright);
+ log_info(arr);
- log_fatal ("Usage: dhcpd [-p <UDP port #>] [-d] [-f]%s%s%s%s",
- "\n [-cf config-file] [-lf lease-file]",
+ log_fatal("Usage: dhcpd [-p <UDP port #>] [-f] [-d] [-q] [-t|-T]\n"
+ " [-4|-6] [-cf config-file] [-lf lease-file]\n"
#if defined (TRACING)
- "\n [-tf trace-output-file]",
- "\n [-play trace-input-file]",
-#else
- "", "",
+ " [-tf trace-output-file]\n"
+ " [-play trace-input-file]\n"
#endif /* TRACING */
- "\n [-t] [-T] [-s server] [if0 [...ifN]]");
+ " [-pf pid-file] [-s server] [if0 [...ifN]]");
}
void lease_pinged (from, packet, length)