2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 06:15:55 +00:00

Updating the dhcpd usage() message and the dhcpd man page so they match

the command-line arguments.

See RT ticket #16922 for more.
This commit is contained in:
Shane Kerr
2007-07-03 10:34:18 +00:00
parent 71765b5809
commit 2e13ba554c
2 changed files with 33 additions and 14 deletions

View File

@@ -28,7 +28,7 @@
.\" 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
@@ -59,6 +59,10 @@ dhcpd - Dynamic Host Configuration Protocol Server
.B -6
]
[
.B -s
.I server
]
[
.B -cf
.I config-file
]
@@ -84,6 +88,9 @@ dhcpd - Dynamic Host Configuration Protocol Server
.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
@@ -193,6 +200,12 @@ the
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
@@ -251,6 +264,10 @@ using the \fB-lf\fR switch, so that the DHCP server doesn't wipe out
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,

View File

@@ -34,7 +34,7 @@
#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[] =
@@ -49,7 +49,7 @@ static char url [] = "For info, please visit http://www.isc.org/sw/dhcp/";
#include <errno.h>
#include <limits.h>
static void usage PROTO ((void));
static void usage(void);
struct iaddr server_identifier;
int server_identifier_matched;
@@ -461,6 +461,10 @@ main(int argc, char **argv) {
}
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);
@@ -971,21 +975,19 @@ void postdb_startup (void)
/* 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)