summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2004-04-15 08:34:21 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2004-04-15 08:34:21 +0000
commita0294e2372c9e893cdbde3eed2b82426cb15d052 (patch)
tree169f6bfa8225b18f8d43ea4c74cb6d29e1d1ef60
parent896f5e439204d9c898a22c51b16419ebee54e4d7 (diff)
- trim/update AUTHORS
- standard options list and correct SYNOPSIS for dhcpd(8) - sync usage() ok henning@
-rw-r--r--usr.sbin/dhcpd/dhcpd.8128
-rw-r--r--usr.sbin/dhcpd/dhcpd.c6
-rw-r--r--usr.sbin/dhcpd/dhcpd.conf.58
-rw-r--r--usr.sbin/dhcpd/dhcpd.leases.58
4 files changed, 73 insertions, 77 deletions
diff --git a/usr.sbin/dhcpd/dhcpd.8 b/usr.sbin/dhcpd/dhcpd.8
index 80c648c0391..23311072f85 100644
--- a/usr.sbin/dhcpd/dhcpd.8
+++ b/usr.sbin/dhcpd/dhcpd.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: dhcpd.8,v 1.1 2004/04/13 23:41:48 henning Exp $
+.\" $OpenBSD: dhcpd.8,v 1.2 2004/04/15 08:34:20 jmc Exp $
.\"
.\" Copyright (c) 1995, 1996 The Internet Software Consortium.
.\" All rights reserved.
@@ -44,15 +44,11 @@
.Nd Dynamic Host Configuration Protocol Server
.Sh SYNOPSIS
.Nm dhcpd
+.Op Fl df
+.Op Fl c Ar config-file
+.Op Fl l Ar lease-file
.Op Fl p Ar port
-.Op Fl f
-.Op Fl d
-.Op Fl q
-.Op Fl cf Ar config-file
-.Op Fl lf Ar lease-file
-.Bk -words
.Op Ar if0 Op Ar ... ifN
-.Ek
.Sh DESCRIPTION
The Internet Software Consortium DHCP Server,
.Nm dhcpd ,
@@ -61,7 +57,7 @@ Internet Bootstrap Protocol (BOOTP).
DHCP allows hosts on a TCP/IP network to request and be assigned IP addresses,
and also to discover information about the network to which they are attached.
BOOTP provides similar functionality, with certain restrictions.
-.Sh OPERATION
+.Pp
The DHCP protocol allows a host which is unknown to the network
administrator to be automatically assigned a new IP address out of a
pool of IP addresses for its network.
@@ -144,7 +140,9 @@ file,
must be restarted.
To restart
.Nm dhcpd ,
-send a SIGTERM (signal 15) to the process ID contained in
+send a
+.Dv SIGTERM
+(signal 15) to the process ID contained in
.Pa /var/run/dhcpd.pid ,
and then re-invoke
.Nm dhcpd .
@@ -171,46 +169,22 @@ If no interface names are specified on the command line,
will identify all network interfaces which are up, eliminating non-broadcast
interfaces if possible, and listen for DHCP broadcasts on each interface.
.Pp
-If
-.Nm
-should listen on a port other than the standard (port 67), the
-.Fl p
-flag may used.
-It should be followed by the UDP port number on which
-.Nm
-should listen.
-This is mostly useful for debugging purposes.
-If the
-.Fl p
-flag is specified, the server will transmit responses to clients at a
-port number that is one greater than the one specified \- i.e., if you
-specify
-.Fl p
-67, then the server will listen on port 67 and transmit to port 68.
-Datagrams that must go through relay agents are sent to the port
-number specified with the
-.Fl p
-flag.
-If you wish to use alternate port numbers, you must configure
-any relay agents you are using to use the same alternate port numbers.
-.Pp
-To run
-.Nm
-as a foreground process, rather than allowing it to run as a daemon in the
-background, the
-.Fl f
-flag should be specified.
-This is useful when running
+The options are as follows:
+.Bl -tag -width Ds
+.It Fl c Ar config-file
+Use an alternate configuration file,
+.Ar config-file .
+Because of the importance of using the same lease database at all times when
+running
.Nm
-under a debugger, or when running it out of inittab on System V systems.
-.Pp
-To have
+in production, this option should be used
+.Em only
+for testing database files in a non-production environment.
+.It Fl d
+Force
.Nm
-log to
-.Ar stderr ,
-the
-.Fl d
-flag should be specified.
+to log to
+.Ar stderr .
This can be useful for debugging, and also at sites where a complete log of
all dhcp activity must be kept, but
.Xr syslogd 8
@@ -219,24 +193,45 @@ Normally,
.Nm
will log all output using the
.Xr syslog 3
-function with the log facility set to LOG_DAEMON.
-.Pp
+function with the log facility set to
+.Dv LOG_DAEMON .
+.It Fl f
+Run
.Nm
-can be made to use an alternate configuration file with the
-.Fl cf
-flag, or an alternate lease file with the
-.Fl lf
-flag.
+as a foreground process, rather than allowing it to run as a daemon in the
+background.
+This is useful when running
+.Nm
+under a debugger, or when running it out of inittab on System V systems.
+.It Fl l Ar lease-file
+Use an alternate lease file,
+.Ar lease-file .
Because of the importance of using the same lease database at all times when
running
.Nm
-in production, these options should be used
+in production, this option should be used
.Em only
-for testing lease files or database files in a non-production environment.
-.Pp
-To avoid printing out the entire copyright message on start-up, the
-.Fl q
-flag should be specified.
+for testing lease files in a non-production environment.
+.It Fl p Ar port
+Tell
+.Nm
+to listen on a port other than the standard (port 67).
+It should be followed by the UDP port number on which
+.Nm
+should listen.
+This is mostly useful for debugging purposes.
+The server will transmit responses to clients at a
+port number that is one greater than the one specified \- i.e., if you
+specify
+.Fl p
+67, then the server will listen on port 67 and transmit to port 68.
+Datagrams that must go through relay agents are sent to the port
+number specified with the
+.Fl p
+flag.
+If you wish to use alternate port numbers, you must configure
+any relay agents you are using to use the same alternate port numbers.
+.El
.Sh CONFIGURATION
The syntax of the
.Xr dhcpd.conf 5
@@ -387,12 +382,13 @@ DHCPD PID.
was written by
.An Ted Lemon Aq mellon@vix.com
under a contract with Vixie Labs.
-Funding for this project was provided by the Internet Software Corporation.
-Information about the Internet Software Consortium can be found at
-.Pa http://www.isc.org/ .
+.Pp
+The current implementation was reworked by
+.An Henning Brauer Aq henning@openbsd.org .
.Sh BUGS
-We realize that it would be nice if one could send a SIGHUP to the server
-and have it reload the database.
+We realize that it would be nice if one could send a
+.Dv SIGHUP
+to the server and have it reload the database.
This is not technically impossible, but it would require a great deal of work,
our resources are extremely limited, and they can be better spent elsewhere.
So please don't complain about this on the mailing list unless you're prepared
diff --git a/usr.sbin/dhcpd/dhcpd.c b/usr.sbin/dhcpd/dhcpd.c
index c22d0641591..5a0b3bf4a0a 100644
--- a/usr.sbin/dhcpd/dhcpd.c
+++ b/usr.sbin/dhcpd/dhcpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhcpd.c,v 1.9 2004/04/14 04:34:19 deraadt Exp $ */
+/* $OpenBSD: dhcpd.c,v 1.10 2004/04/15 08:34:20 jmc Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@cvs.openbsd.org>
@@ -162,9 +162,9 @@ usage(void)
{
extern char *__progname;
- fprintf(stderr, "usage: %s [-df] [-p <port>] [-c config-file]",
+ fprintf(stderr, "usage: %s [-df] [-c config-file] [-l lease-file]",
__progname);
- fprintf(stderr, " [-l lease-file] [if0 [...ifN]]\n");
+ fprintf(stderr, " [-p port] [if0 [...ifN]]\n");
exit(1);
}
diff --git a/usr.sbin/dhcpd/dhcpd.conf.5 b/usr.sbin/dhcpd/dhcpd.conf.5
index 8bccb3249ad..0c4d219e0a5 100644
--- a/usr.sbin/dhcpd/dhcpd.conf.5
+++ b/usr.sbin/dhcpd/dhcpd.conf.5
@@ -1,4 +1,4 @@
-.\" $OpenBSD: dhcpd.conf.5,v 1.1 2004/04/13 23:41:48 henning Exp $
+.\" $OpenBSD: dhcpd.conf.5,v 1.2 2004/04/15 08:34:20 jmc Exp $
.\"
.\" Copyright (c) 1995, 1996, 1997, 1998, 1998, 1999
.\" The Internet Software Consortium. All rights reserved.
@@ -932,6 +932,6 @@ RFC 2132, RFC 2131.
was written by
.An Ted Lemon Aq mellon@vix.com
under a contract with Vixie Labs.
-Funding for this project was provided by the Internet Software Corporation.
-Information about the Internet Software Consortium can be found at
-.Pa http://www.isc.org/isc .
+.Pp
+The current implementation was reworked by
+.An Henning Brauer Aq henning@openbsd.org .
diff --git a/usr.sbin/dhcpd/dhcpd.leases.5 b/usr.sbin/dhcpd/dhcpd.leases.5
index 968f2437f44..106e7956a29 100644
--- a/usr.sbin/dhcpd/dhcpd.leases.5
+++ b/usr.sbin/dhcpd/dhcpd.leases.5
@@ -1,4 +1,4 @@
-.\" $OpenBSD: dhcpd.leases.5,v 1.1 2004/04/13 23:41:48 henning Exp $
+.\" $OpenBSD: dhcpd.leases.5,v 1.2 2004/04/15 08:34:20 jmc Exp $
.\"
.\" Copyright (c) 1997, 1998 The Internet Software Consortium.
.\" All rights reserved.
@@ -217,6 +217,6 @@ RFC 2132, RFC 2131.
was written by
.An Ted Lemon Aq mellon@vix.com
under a contract with Vixie Labs.
-Funding for this project was provided by the Internet Software Corporation.
-Information about the Internet Software Consortium can be found at
-.Pa http://www.isc.org/isc .
+.Pp
+The current implementation was reworked by
+.An Henning Brauer Aq henning@openbsd.org .