aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networking/udhcp/AUTHORS13
-rw-r--r--networking/udhcp/COPYING339
-rw-r--r--networking/udhcp/ChangeLog260
-rw-r--r--networking/udhcp/Makefile5
-rw-r--r--networking/udhcp/Makefile.udhcp110
-rw-r--r--networking/udhcp/README53
-rw-r--r--networking/udhcp/README.dumpleases17
-rw-r--r--networking/udhcp/README.udhcpc145
-rw-r--r--networking/udhcp/README.udhcpd59
-rw-r--r--networking/udhcp/TODO16
-rw-r--r--networking/udhcp/dumpleases.130
-rw-r--r--networking/udhcp/samples/README11
-rwxr-xr-xnetworking/udhcp/samples/sample.bound30
-rwxr-xr-xnetworking/udhcp/samples/sample.deconfig4
-rwxr-xr-xnetworking/udhcp/samples/sample.nak4
-rwxr-xr-xnetworking/udhcp/samples/sample.renew30
-rw-r--r--networking/udhcp/samples/sample.script7
-rw-r--r--networking/udhcp/samples/simple.script39
-rw-r--r--networking/udhcp/samples/udhcpd.conf116
-rw-r--r--networking/udhcp/udhcpc.8208
-rw-r--r--networking/udhcp/udhcpd.817
-rw-r--r--networking/udhcp/udhcpd.conf.5164
22 files changed, 0 insertions, 1677 deletions
diff --git a/networking/udhcp/AUTHORS b/networking/udhcp/AUTHORS
deleted file mode 100644
index f3f43364a..000000000
--- a/networking/udhcp/AUTHORS
+++ /dev/null
@@ -1,13 +0,0 @@
1udhcp server/client package
2-----------------------
3
4Russ Dill <Russ.Dill@asu.edu>
5Matthew Ramsay <matthewr@moreton.com.au>
6Chris Trew <christ@moreton.com.au>
7
8Other Credits:
9--------------
10Moreton Bay (http://www.moretonbay.com/)
11Vladimir Oleynik <dzo@simtrea.ru> Size optimizations
12
13
diff --git a/networking/udhcp/COPYING b/networking/udhcp/COPYING
deleted file mode 100644
index a43ea2126..000000000
--- a/networking/udhcp/COPYING
+++ /dev/null
@@ -1,339 +0,0 @@
1 GNU GENERAL PUBLIC LICENSE
2 Version 2, June 1991
3
4 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5 675 Mass Ave, Cambridge, MA 02139, USA
6 Everyone is permitted to copy and distribute verbatim copies
7 of this license document, but changing it is not allowed.
8
9 Preamble
10
11 The licenses for most software are designed to take away your
12freedom to share and change it. By contrast, the GNU General Public
13License is intended to guarantee your freedom to share and change free
14software--to make sure the software is free for all its users. This
15General Public License applies to most of the Free Software
16Foundation's software and to any other program whose authors commit to
17using it. (Some other Free Software Foundation software is covered by
18the GNU Library General Public License instead.) You can apply it to
19your programs, too.
20
21 When we speak of free software, we are referring to freedom, not
22price. Our General Public Licenses are designed to make sure that you
23have the freedom to distribute copies of free software (and charge for
24this service if you wish), that you receive source code or can get it
25if you want it, that you can change the software or use pieces of it
26in new free programs; and that you know you can do these things.
27
28 To protect your rights, we need to make restrictions that forbid
29anyone to deny you these rights or to ask you to surrender the rights.
30These restrictions translate to certain responsibilities for you if you
31distribute copies of the software, or if you modify it.
32
33 For example, if you distribute copies of such a program, whether
34gratis or for a fee, you must give the recipients all the rights that
35you have. You must make sure that they, too, receive or can get the
36source code. And you must show them these terms so they know their
37rights.
38
39 We protect your rights with two steps: (1) copyright the software, and
40(2) offer you this license which gives you legal permission to copy,
41distribute and/or modify the software.
42
43 Also, for each author's protection and ours, we want to make certain
44that everyone understands that there is no warranty for this free
45software. If the software is modified by someone else and passed on, we
46want its recipients to know that what they have is not the original, so
47that any problems introduced by others will not reflect on the original
48authors' reputations.
49
50 Finally, any free program is threatened constantly by software
51patents. We wish to avoid the danger that redistributors of a free
52program will individually obtain patent licenses, in effect making the
53program proprietary. To prevent this, we have made it clear that any
54patent must be licensed for everyone's free use or not licensed at all.
55
56 The precise terms and conditions for copying, distribution and
57modification follow.
58
59 GNU GENERAL PUBLIC LICENSE
60 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
62 0. This License applies to any program or other work which contains
63a notice placed by the copyright holder saying it may be distributed
64under the terms of this General Public License. The "Program", below,
65refers to any such program or work, and a "work based on the Program"
66means either the Program or any derivative work under copyright law:
67that is to say, a work containing the Program or a portion of it,
68either verbatim or with modifications and/or translated into another
69language. (Hereinafter, translation is included without limitation in
70the term "modification".) Each licensee is addressed as "you".
71
72Activities other than copying, distribution and modification are not
73covered by this License; they are outside its scope. The act of
74running the Program is not restricted, and the output from the Program
75is covered only if its contents constitute a work based on the
76Program (independent of having been made by running the Program).
77Whether that is true depends on what the Program does.
78
79 1. You may copy and distribute verbatim copies of the Program's
80source code as you receive it, in any medium, provided that you
81conspicuously and appropriately publish on each copy an appropriate
82copyright notice and disclaimer of warranty; keep intact all the
83notices that refer to this License and to the absence of any warranty;
84and give any other recipients of the Program a copy of this License
85along with the Program.
86
87You may charge a fee for the physical act of transferring a copy, and
88you may at your option offer warranty protection in exchange for a fee.
89
90 2. You may modify your copy or copies of the Program or any portion
91of it, thus forming a work based on the Program, and copy and
92distribute such modifications or work under the terms of Section 1
93above, provided that you also meet all of these conditions:
94
95 a) You must cause the modified files to carry prominent notices
96 stating that you changed the files and the date of any change.
97
98 b) You must cause any work that you distribute or publish, that in
99 whole or in part contains or is derived from the Program or any
100 part thereof, to be licensed as a whole at no charge to all third
101 parties under the terms of this License.
102
103 c) If the modified program normally reads commands interactively
104 when run, you must cause it, when started running for such
105 interactive use in the most ordinary way, to print or display an
106 announcement including an appropriate copyright notice and a
107 notice that there is no warranty (or else, saying that you provide
108 a warranty) and that users may redistribute the program under
109 these conditions, and telling the user how to view a copy of this
110 License. (Exception: if the Program itself is interactive but
111 does not normally print such an announcement, your work based on
112 the Program is not required to print an announcement.)
113
114These requirements apply to the modified work as a whole. If
115identifiable sections of that work are not derived from the Program,
116and can be reasonably considered independent and separate works in
117themselves, then this License, and its terms, do not apply to those
118sections when you distribute them as separate works. But when you
119distribute the same sections as part of a whole which is a work based
120on the Program, the distribution of the whole must be on the terms of
121this License, whose permissions for other licensees extend to the
122entire whole, and thus to each and every part regardless of who wrote it.
123
124Thus, it is not the intent of this section to claim rights or contest
125your rights to work written entirely by you; rather, the intent is to
126exercise the right to control the distribution of derivative or
127collective works based on the Program.
128
129In addition, mere aggregation of another work not based on the Program
130with the Program (or with a work based on the Program) on a volume of
131a storage or distribution medium does not bring the other work under
132the scope of this License.
133
134 3. You may copy and distribute the Program (or a work based on it,
135under Section 2) in object code or executable form under the terms of
136Sections 1 and 2 above provided that you also do one of the following:
137
138 a) Accompany it with the complete corresponding machine-readable
139 source code, which must be distributed under the terms of Sections
140 1 and 2 above on a medium customarily used for software interchange; or,
141
142 b) Accompany it with a written offer, valid for at least three
143 years, to give any third party, for a charge no more than your
144 cost of physically performing source distribution, a complete
145 machine-readable copy of the corresponding source code, to be
146 distributed under the terms of Sections 1 and 2 above on a medium
147 customarily used for software interchange; or,
148
149 c) Accompany it with the information you received as to the offer
150 to distribute corresponding source code. (This alternative is
151 allowed only for noncommercial distribution and only if you
152 received the program in object code or executable form with such
153 an offer, in accord with Subsection b above.)
154
155The source code for a work means the preferred form of the work for
156making modifications to it. For an executable work, complete source
157code means all the source code for all modules it contains, plus any
158associated interface definition files, plus the scripts used to
159control compilation and installation of the executable. However, as a
160special exception, the source code distributed need not include
161anything that is normally distributed (in either source or binary
162form) with the major components (compiler, kernel, and so on) of the
163operating system on which the executable runs, unless that component
164itself accompanies the executable.
165
166If distribution of executable or object code is made by offering
167access to copy from a designated place, then offering equivalent
168access to copy the source code from the same place counts as
169distribution of the source code, even though third parties are not
170compelled to copy the source along with the object code.
171
172 4. You may not copy, modify, sublicense, or distribute the Program
173except as expressly provided under this License. Any attempt
174otherwise to copy, modify, sublicense or distribute the Program is
175void, and will automatically terminate your rights under this License.
176However, parties who have received copies, or rights, from you under
177this License will not have their licenses terminated so long as such
178parties remain in full compliance.
179
180 5. You are not required to accept this License, since you have not
181signed it. However, nothing else grants you permission to modify or
182distribute the Program or its derivative works. These actions are
183prohibited by law if you do not accept this License. Therefore, by
184modifying or distributing the Program (or any work based on the
185Program), you indicate your acceptance of this License to do so, and
186all its terms and conditions for copying, distributing or modifying
187the Program or works based on it.
188
189 6. Each time you redistribute the Program (or any work based on the
190Program), the recipient automatically receives a license from the
191original licensor to copy, distribute or modify the Program subject to
192these terms and conditions. You may not impose any further
193restrictions on the recipients' exercise of the rights granted herein.
194You are not responsible for enforcing compliance by third parties to
195this License.
196
197 7. If, as a consequence of a court judgment or allegation of patent
198infringement or for any other reason (not limited to patent issues),
199conditions are imposed on you (whether by court order, agreement or
200otherwise) that contradict the conditions of this License, they do not
201excuse you from the conditions of this License. If you cannot
202distribute so as to satisfy simultaneously your obligations under this
203License and any other pertinent obligations, then as a consequence you
204may not distribute the Program at all. For example, if a patent
205license would not permit royalty-free redistribution of the Program by
206all those who receive copies directly or indirectly through you, then
207the only way you could satisfy both it and this License would be to
208refrain entirely from distribution of the Program.
209
210If any portion of this section is held invalid or unenforceable under
211any particular circumstance, the balance of the section is intended to
212apply and the section as a whole is intended to apply in other
213circumstances.
214
215It is not the purpose of this section to induce you to infringe any
216patents or other property right claims or to contest validity of any
217such claims; this section has the sole purpose of protecting the
218integrity of the free software distribution system, which is
219implemented by public license practices. Many people have made
220generous contributions to the wide range of software distributed
221through that system in reliance on consistent application of that
222system; it is up to the author/donor to decide if he or she is willing
223to distribute software through any other system and a licensee cannot
224impose that choice.
225
226This section is intended to make thoroughly clear what is believed to
227be a consequence of the rest of this License.
228
229 8. If the distribution and/or use of the Program is restricted in
230certain countries either by patents or by copyrighted interfaces, the
231original copyright holder who places the Program under this License
232may add an explicit geographical distribution limitation excluding
233those countries, so that distribution is permitted only in or among
234countries not thus excluded. In such case, this License incorporates
235the limitation as if written in the body of this License.
236
237 9. The Free Software Foundation may publish revised and/or new versions
238of the General Public License from time to time. Such new versions will
239be similar in spirit to the present version, but may differ in detail to
240address new problems or concerns.
241
242Each version is given a distinguishing version number. If the Program
243specifies a version number of this License which applies to it and "any
244later version", you have the option of following the terms and conditions
245either of that version or of any later version published by the Free
246Software Foundation. If the Program does not specify a version number of
247this License, you may choose any version ever published by the Free Software
248Foundation.
249
250 10. If you wish to incorporate parts of the Program into other free
251programs whose distribution conditions are different, write to the author
252to ask for permission. For software which is copyrighted by the Free
253Software Foundation, write to the Free Software Foundation; we sometimes
254make exceptions for this. Our decision will be guided by the two goals
255of preserving the free status of all derivatives of our free software and
256of promoting the sharing and reuse of software generally.
257
258 NO WARRANTY
259
260 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268REPAIR OR CORRECTION.
269
270 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278POSSIBILITY OF SUCH DAMAGES.
279
280 END OF TERMS AND CONDITIONS
281
282 Appendix: How to Apply These Terms to Your New Programs
283
284 If you develop a new program, and you want it to be of the greatest
285possible use to the public, the best way to achieve this is to make it
286free software which everyone can redistribute and change under these terms.
287
288 To do so, attach the following notices to the program. It is safest
289to attach them to the start of each source file to most effectively
290convey the exclusion of warranty; and each file should have at least
291the "copyright" line and a pointer to where the full notice is found.
292
293 <one line to give the program's name and a brief idea of what it does.>
294 Copyright (C) 19yy <name of author>
295
296 This program is free software; you can redistribute it and/or modify
297 it under the terms of the GNU General Public License as published by
298 the Free Software Foundation; either version 2 of the License, or
299 (at your option) any later version.
300
301 This program is distributed in the hope that it will be useful,
302 but WITHOUT ANY WARRANTY; without even the implied warranty of
303 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 GNU General Public License for more details.
305
306 You should have received a copy of the GNU General Public License
307 along with this program; if not, write to the Free Software
308 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
309
310Also add information on how to contact you by electronic and paper mail.
311
312If the program is interactive, make it output a short notice like this
313when it starts in an interactive mode:
314
315 Gnomovision version 69, Copyright (C) 19yy name of author
316 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 This is free software, and you are welcome to redistribute it
318 under certain conditions; type `show c' for details.
319
320The hypothetical commands `show w' and `show c' should show the appropriate
321parts of the General Public License. Of course, the commands you use may
322be called something other than `show w' and `show c'; they could even be
323mouse-clicks or menu items--whatever suits your program.
324
325You should also get your employer (if you work as a programmer) or your
326school, if any, to sign a "copyright disclaimer" for the program, if
327necessary. Here is a sample; alter the names:
328
329 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
332 <signature of Ty Coon>, 1 April 1989
333 Ty Coon, President of Vice
334
335This General Public License does not permit incorporating your program into
336proprietary programs. If your program is a subroutine library, you may
337consider it more useful to permit linking proprietary applications with the
338library. If this is what you want to do, use the GNU Library General
339Public License instead of this License.
diff --git a/networking/udhcp/ChangeLog b/networking/udhcp/ChangeLog
deleted file mode 100644
index bf2982f4b..000000000
--- a/networking/udhcp/ChangeLog
+++ /dev/null
@@ -1,260 +0,0 @@
10.9.9 (pending)
2+ Various other size optimizations (Vladimir)
3+ Change strerror(errno) to %m (Vladimir N. Oleynik <dzo@simtreas.ru>)
4+ Fixed a little endian problem in mton (Bastian Blank <waldi@debian.org>)
5+ Fixed a arpping alignment problem (Rui He <rhe@3eti.com>)
6+ Added sanity check for max_leases (udhcp bug #1285) (me)
7+ Finally got rid of the trailing space in enviromental vars (me)
8+ added an new enviromental variable: $mask. It contains the number
9 of subnet bits for tools like ip route that require it.
10 (Bastian Blank <waldi@debian.org>, me)
11
120.9.8 (021031)
13+ split up README files (me)
14+ use /dev/urandom to seed xid's (instead of time(0)) (me)
15+ fixed renew behavior (me)
16+ udhcp now fits nicely into busybox
17 (Glenn McGrath <bug1@iinet.net.au> as well as myself)
18+ updated client manpage (me)
19+ both client and server now use sockets for signal handling,
20 hopefully, this will be the last needed change in signal
21 handling, I'm fairly certain all the possible races are now
22 closed. (me)
23+ The server now restarts the auto_time timer when it receives
24 a SIGUSR1 (write out config file). (me)
25+ Improve signal handling (David Poole)
26+ Fix to config file parsing (Matt Kraai)
27+ Fix load lease logic (me)
28+ Fix clear_lease logic (me)
29+ -h is now an alias for -H (udhcp bug #1253)
30+ Shorter timeout on not receiving offers (me)
31+ Improved signal behavior by client (me)
32+ Would never assign end address (Keith Smith <keith@ksmith.com>)
33+ Was improperly reporting yiaddr as siaddr (ben-udhcp@bdlow.net)
34 udhcp bug#1256
35+ Fixed reading of client id (David Poole <davep@portsmith.com>)
36+ change sys_errlist[] to strerror() as it aparently doesn't exist
37 (Erik Andersen <andersee@codepoet.org>)
38+ fixed get_raw_packet so it returns -2 on non fatal errors
39 (Ted Lemon <Ted.Lemon@nominum.com>)
40+ Improved (hopefully) NAKing behavior (me)
41+ Added -b option (Jouni Malinen)
42+ Compute checksums correctly on big endian hosts
43 (Jouni Malinen <jkmaline@cc.hut.fi>)
44
450.9.7 (020526)
46+ Use add_lease in read_leases, sanitizes leases more, and clears out exprired
47 ones if there is no more room (me)
48+ Moved udhcpd.leases to /var/lib/misc/udhcpd.leases (Debian bug #147747)
49+ Change (obsolete) AF_INET in arping.c to PF_PACKET (Debian bug #127049)
50+ Added script hook for DHCPNAK (nak), as well as providing the message option
51 (me)
52+ Generate the paramaters request list by seeing what options in options.c are
53 ored with OPTION_REQ in options.c
54+ Fix dhcp renew forgetfullness on client (bug #1230)
55+ Fix dhcp release bug on client (bug #1231)
56+ Set option request list for DHCP renew (bug #1233)
57+ Set BOOTREQUEST/REPLY properly
58+ Change client-identifier field to popularly expected behavior (me)
59+ Only reopen port on errors (me)
60+ Change fork/close/setsid structures to daemon() (me)
61+ Allow user to specify udhcpd config file at run time (Steven, me)
62+ Write pidfile after changing it (Steven CTR Carr <Steven.CTR.Carr@tc.faa.gov>)
63+ Added env var docs to udhcpc man page (Matt)
64+ Standardized lowercase udhcp in documentation (me)
65+ Accept packets without a UDP checksum (me)
66+ Accept packets with extra garbage (me)
67+ Better error handling in files.c (me)
68+ Combined read_interface function to reduce COMBINED_BINARY size (me)
69+ Drop calc_length(), some servers choke on smaller packets (me)
70+ Try to clean some fat out (me)
71
720.9.6 (011001)
73+ Added bootp paramaters to server (me)
74+ Added bootp paramaters to client (me)
75+ Added vendor id to client (me)
76+ Better pidfile handling in client and server (me)
77+ Added man pages (Matt Kraai <kraai@alumni.carnegiemellon.edu>)
78
790.9.5 (010914)
80+ Fixed $HOME and $PATH env passing (me)
81+ Fixed client to only listen for raw packets on correct interface (me)
82+ added --quit,-q option to quit after a lease is obtained (me)
83+ Fixed 100% CPU utilization by client when interface is down (me)
84
850.9.4 (010827)
86+ Force broadcast to broken clients that request unicast (ie, MSFT 98)
87+ Make install rules (Adam J. Richter <adam@yggdrasil.com>)
88+ One scripts, instead of many (Adam)
89+ Removed script paramater info files (env vars only) (Adam)
90+ Controlling of forking behavior in client (Adam)
91+ General script.c/dhcpc.c cleanups (Adam)
92
930.9.3 (010820)
94+ Increased debugging verbosity (me)
95+ Cut trailing whitespace when reading config file (me)
96+ added hostname option to client (me)
97+ fixed a strncpy bug in script.c (me)
98+ fixed a leaky socket in dhcpc.c (me)
99+ fixed a leaky socket in dhcpd.c (me)
100
1010.9.2 (010810)
102+ Added raw sockets to client (me)
103+ alignment fixes (Mark Huang)
104+ compiler warning fixes (Mark Huang)
105+ client now sends parameter list (Mark Huang/me)
106+ added ipttl option
107+ Does now not request broadcast packets
108
1090.9.1 (010806)
110+ Added udhcpc client
111+ reorganized functions/files
112+ listening socket now only binds to one interface
113
1140.9.0 (010720) Major rewrite, current changes, goals:
115+ should not segfault on bogus packets.
116+ Options can be read from sname and file fields.
117+ supports all DHCP messages (release, decline, inform).
118+ IP block is now specified by a range of IP's.
119+ Leases file now contains lease time (relative, or absolute).
120+ Just about any DHCP option is now supported.
121+ DNS entries are no longer read from resolv.conf
122+ Lease file can be written periodically when the process receives a SIGUSR1
123+ arpping should be supported on all arches.
124+ support for DHCP relays.
125+ DHCP messages can be unicast if the client requests it.
126+ many, many, many other things.
127
1280.8.29 (000323)
129+ stable(?) release
130
131
1320.8.28 (000323)
133+ removed alarm as it was causing server to go down
134+ removed debugging
135+ break down dhcpd.c into manageable files
136
137
1380.8.27 (000221)
139+ OFFER also sends gateway/subnet (for picky dhcp clients)
140+ multiple DNS now handled from resolv.conf if available
141+ multiple WINS (from dhcpd.conf)
142
1430.8.25 (000120)
144+ now compiles *and* runs on a generic linux system
145 tested with a windows 98 client and the sample config
146 files in the samples directory.
147
1480.8.24 (000117)
149+ makeiplist tool has basic functionality in place
150+ new sample config files
151+ route add -host 255.255.255.255 dev eth0 added for generic linux
152
1530.8.23 (000117)
154+ NETtel specific fix for ignoring dhcp requests on 2nd interface
155
1560.8.22 (000113)
157+ minor changes to compile under a generic linux system
158+ minor config file location changes for a generic linux system
159+ makeiplist fixes.. still incomplete.. but etting closer
160
1610.8.21 (000113)
162+ now sends the correct server ip instead of hardcoded value
163+ minor debugging fixes for critical messages
164
1650.8.20 (000106)
166+ cut out dhcp server checking.. this was causing dialout ppp
167 sessions with idle time set to never time out.
168+ also removed the 10 second pause before launching.. as this
169 was originally to stop it replying to a dhcp client
170 on a NETtel which was really a bad way to do it in the
171 first place :-)
172
1730.8.19 (000104)
174+ fixes for route add -host on a machine that needs to run both
175 a DHCP client and server (dual eth box)
176
1770.8.18 (991220)
178
179+ Race conditions fixed by disabling alarm whilst the server is busy
180+ Fixed continous clearing of the offered array so that it is only cleared
181 when it is dirty - (could change the position of when dirty is set)
182
1830.8.17 (991212)
184
185- has problems clearing out the offered array
186
1870.8.16 (991203)
188+ Non blocking error is changes to informational as it is not really
189 an error
190
1910.8.15 (991129)
192+ Servs the dns field 3 times (Nettel only) so that windows servers
193 dont time out whilst nettel is booting
194
1950.8.14 (991126)
196+ added owner check for the offered array so clean out time may be
197 increased
198+ added new func to print out chadder/MAC
199
2000.8.13 (991125)
201+ added win95 support (w95 changed xid halfway through conversation)
202+ had to change the offered array to use hardware addresses instead of xid
203+ fixed re offered bug
204+ added more debugging
205
2060.8.12 (991111)
207+ debugging was real bad.. cleaned up a bit.. needs overhaul
208
209
2100.8.11 (991110)
211+ fixed up offeredAddr array to actually be used now!! offeredAddr is
212 used to see if another simultaneous connecting client was offered
213 an address that we are about to offer another client (multiple
214 client bug)
215+ removed re_offered variable as it breaks multiple client support
216+ added lease time to ACK -- doesn't work if in OFFER
217+ decreased internal array clear delay to 60 seconds
218+ minor findAddr bug (returning -1 instead of 0)
219+ if clients xid already in offeredAddr offer the same addr and don't add a
220 new addr to offered (caused by a client issuing multiple DISCOVERs)
221
2220.8.10 (991105)
223+ \n bug in arpping
224+ minor debugging changes (removed printfs etc)
225+ started browseiplist (not finished)
226
2270.8.9 (19991105)
228+ fixed options array size bug (options were cut off)
229
2300.8.8 (19991105)
231+ ignores requests from dhcpcd on the same machine
232
2330.8.7 (19991104)
234+ don't die if we can't bind to search for existing DHCP server
235+ slightly more verbose syslogging
236
2370.8.6 (19991103)
238+ added makeiplist (not finished -- core dumps)
239+ minor debug changes
240
2410.8.5 (19991029)
242+ exits if another DHCP server is already on the network
243+ added Linux Makefile
244
2450.8.4 (19991026)
246+ minor bug fix in findaddr preventing an addr being found
247
2480.8.3 (19991025)
249+ fixed up debugging
250+ minor hwaddr issues
251
2520.8.2 (19991022)
253+ free leases (new arpping code from dhcpcd)
254+ fixed bug where crashes if no leases/iplist file
255+ syslogging and debugging switch
256+ serve DNS from resolv.conf
257+ fixed bug where new lease added if same mac offered
258+ now checks the ip is free b4 offering
259+ now supports wins server
260
diff --git a/networking/udhcp/Makefile b/networking/udhcp/Makefile
deleted file mode 100644
index 469ac3dc1..000000000
--- a/networking/udhcp/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
1ifneq ($(wildcard ../../networking/Config.in),)
2include Makefile.busybox
3else
4include Makefile.udhcp
5endif
diff --git a/networking/udhcp/Makefile.udhcp b/networking/udhcp/Makefile.udhcp
deleted file mode 100644
index 1ba31c11c..000000000
--- a/networking/udhcp/Makefile.udhcp
+++ /dev/null
@@ -1,110 +0,0 @@
1# udhcp makefile
2
3DESTDIR =
4prefix = /usr
5SBINDIR = /sbin
6USRSBINDIR = $(DESTDIR)$(prefix)/sbin
7USRBINDIR = $(DESTDIR)$(prefix)/bin
8USRSHAREDIR = $(DESTDIR)$(prefix)/share
9
10# Uncomment this to get a shared binary. Call as udhcpd for the server,
11# and udhcpc for the client
12#COMBINED_BINARY=1
13
14# Uncomment this for extra output and to compile with debugging symbols
15#UDHCP_DEBUG=1
16
17# Uncomment this to output messages to syslog, otherwise, messages go to stdout
18#UDHCP_SYSLOG=1
19
20# Set to the prefix of your cross-compiler
21#CROSS_COMPILE=arm-uclibc-
22
23
24#---------------------------------------------------#
25# You should not have to change anything below here #
26#---------------------------------------------------#
27
28CC = $(CROSS_COMPILE)gcc
29LD = $(CROSS_COMPILE)gcc
30INSTALL = install
31
32OBJS_SHARED = common.o options.o packet.o pidfile.o signalpipe.o socket.o
33DHCPD_OBJS = dhcpd.o arpping.o files.o leases.o serverpacket.o static_leases.o
34DHCPC_OBJS = dhcpc.o clientpacket.o clientsocket.o script.o
35
36ifdef COMBINED_BINARY
37EXEC1 = udhcpd
38OBJS1 = $(DHCPD_OBJS) $(DHCPC_OBJS) $(OBJS_SHARED) frontend.o
39CFLAGS += -DCOMBINED_BINARY
40else
41EXEC1 = udhcpd
42OBJS1 = $(DHCPD_OBJS) $(OBJS_SHARED)
43
44EXEC2 = udhcpc
45OBJS2 = $(DHCPC_OBJS) $(OBJS_SHARED)
46endif
47
48EXEC3 = dumpleases
49OBJS3 = dumpleases.o
50
51BOOT_PROGRAM = udhcpc
52DAEMON = udhcpd
53COMMAND = dumpleases
54
55ifdef UDHCP_SYSLOG
56CFLAGS += -DUDHCP_SYSLOG
57endif
58
59CFLAGS += -W -Wall -Wstrict-prototypes -D_GNU_SOURCE
60
61ifdef UDHCP_DEBUG
62CFLAGS += -g -DUDHCP_DEBUG
63STRIP=true
64else
65CFLAGS += -Os -fomit-frame-pointer
66STRIP=$(CROSS_COMPILE)strip
67endif
68
69all: $(EXEC1) $(EXEC2) $(EXEC3)
70 $(STRIP) --remove-section=.note --remove-section=.comment $(EXEC1) $(EXEC2) $(EXEC3)
71
72$(OBJS1) $(OBJS2) $(OBJS3): *.h Makefile
73$(EXEC1) $(EXEC2) $(EXEC3): Makefile
74
75.c.o:
76 $(CC) -c $(CFLAGS) $<
77
78$(EXEC1): $(OBJS1)
79 $(LD) $(CFLAGS) $(LDFLAGS) $(OBJS1) -o $(EXEC1)
80
81$(EXEC2): $(OBJS2)
82 $(LD) $(CFLAGS) $(LDFLAGS) $(OBJS2) -o $(EXEC2)
83
84$(EXEC3): $(OBJS3)
85 $(LD) $(CFLAGS) $(LDFLAGS) $(OBJS3) -o $(EXEC3)
86
87
88install: all
89 mkdir -p $(USRSBINDIR) $(USRBINDIR)
90 $(INSTALL) -m 755 $(DAEMON) $(USRSBINDIR)
91 $(INSTALL) -m 755 $(COMMAND) $(USRBINDIR)
92ifdef COMBINED_BINARY
93 ln -sf $(DAEMON) $(USRSBINDIR)/$(BOOT_PROGRAM)
94else
95 $(INSTALL) -m 755 $(BOOT_PROGRAM) $(USRSBINDIR)
96endif
97 mkdir -p $(USRSHAREDIR)/udhcpc
98 for name in bound deconfig nak renew script ; do \
99 $(INSTALL) -m 755 samples/sample.$$name \
100 $(USRSHAREDIR)/udhcpc/default.$$name ; \
101 done
102 mkdir -p $(USRSHAREDIR)/man/man1
103 $(INSTALL) -m 644 dumpleases.1 $(USRSHAREDIR)/man/man1
104 mkdir -p $(USRSHAREDIR)/man/man5
105 $(INSTALL) -m 644 udhcpd.conf.5 $(USRSHAREDIR)/man/man5
106 mkdir -p $(USRSHAREDIR)/man/man8
107 $(INSTALL) -m 644 udhcpc.8 udhcpd.8 $(USRSHAREDIR)/man/man8
108
109clean:
110 -rm -f udhcpd udhcpc dumpleases *.o *.a core
diff --git a/networking/udhcp/README b/networking/udhcp/README
deleted file mode 100644
index dd992949a..000000000
--- a/networking/udhcp/README
+++ /dev/null
@@ -1,53 +0,0 @@
1udhcp server/client package readme
2-------------------------
3
4The udhcp server/client package is primarily geared towards embedded
5systems. It does however, strive to be fully functional, and RFC
6compliant.
7
8
9compile time options
10-------------------
11
12The Makefile contains three of the compile time options:
13
14 UDHCP_DEBUG: If UDHCP_DEBUG is defined, udhcpd will output extra
15 debugging output, compile with -g, and not fork to the background when
16 run.
17 UDHCP_SYSLOG: If UDHCP_SYSLOG is defined, udhcpd will log all its
18 messages syslog, otherwise, it will attempt to log them to stdout.
19
20 COMBINED_BINARY: If COMBINED_BINARY is define, one binary, udhcpd,
21 is created. If called as udhcpd, the dhcp server will be started.
22 If called as udhcpc, the dhcp client will be started.
23
24dhcpd.h contains the other three compile time options:
25
26 LEASE_TIME: The default lease time if not specified in the config
27 file.
28
29 LEASES_FILE: The default file for storing leases.
30
31 DHCPD_CONFIG_FILE: The defualt config file to use.
32
33options.c contains a set of dhcp options for the client:
34
35 name[10]: The name of the option as it will appear in scripts
36
37 flags: The type of option, as well as if it will be requested
38 by the client (OPTION_REQ)
39
40 code: The DHCP code for this option
41
42
43busybox drop-in
44--------------
45udhcp is now a drop-in component for busybox (http://busybox.net).
46To update busybox to the latest revision, simply do a:
47
48cp *.[ch] README AUTHORS COPYING ChangeLog TODO \
49 <busybox_source>/networking/udhcp
50
51The only two files udhcp does not provide are config.in and
52Makefile.in, so these may need to be updated from time to time.
53
diff --git a/networking/udhcp/README.dumpleases b/networking/udhcp/README.dumpleases
deleted file mode 100644
index 6367710c4..000000000
--- a/networking/udhcp/README.dumpleases
+++ /dev/null
@@ -1,17 +0,0 @@
1udhcp lease dump (dumpleases)
2----------------------------
3
4dumpleases displays the leases written out by the udhcpd server. Lease
5times are stored in the file by time remaining in lease (for systems
6without clock that works when there is no power), or by the absolute
7time that it expires in seconds from epoch. dumpleases accepts the
8following command line options:
9
10-a, --absolute Interpret lease times as expiration time.
11-r, --remaining Interpret lease times as remaining time.
12-f, --file=FILE Read lease information from FILE.
13-h, --help Display help.
14
15Note that if udhcpd has not written a leases file recently, the output
16of may not be up to date.
17
diff --git a/networking/udhcp/README.udhcpc b/networking/udhcp/README.udhcpc
deleted file mode 100644
index 46970a566..000000000
--- a/networking/udhcp/README.udhcpc
+++ /dev/null
@@ -1,145 +0,0 @@
1udhcp client (udhcpc)
2--------------------
3
4The udhcp client negotiates a lease with the DHCP server and notifies
5a set of scripts when a leases is obtained or lost.
6
7
8command line options
9-------------------
10
11The command line options for the udhcp client are:
12
13-c, --clientid=CLIENTID Set client identifier. Type is first char.
14-C, --clientid-none Suppress default client identifier
15-V, --vendorclass=CLASSID Set vendor class identifier
16-H, --hostname=HOSTNAME Client hostname
17-h, Alias for -H
18-F, --fqdn=FQDN Client fully qualified domain name
19-f, --foreground Do not fork after getting lease
20-b, --background Fork to background if lease cannot be
21 immediately negotiated.
22-i, --interface=INTERFACE Interface to use (default: eth0)
23-n, --now Exit with failure if lease cannot be
24 immediately negotiated.
25-p, --pidfile=file Store process ID of daemon in file
26-q, --quit Quit after obtaining lease
27-r, --request=IP IP address to request (default: none)
28-s, --script=file Run file at dhcp events (default:
29 /usr/share/udhcpc/default.script)
30-t, --retries=NUM Send up to NUM request packets
31-v, --version Display version
32
33
34If the requested IP address cannot be obtained, the client accepts the
35address that the server offers.
36
37
38udhcp client scripts
39-------------------
40
41When an event occurs, udhcpc calls the action script. udhcpc never does
42any configuration of the network interface itself, but instead relies on
43a set of scripts. The script by default is
44/usr/share/udhcpc/default.script but this can be changed via the command
45line arguments. The three possible arguments to the script are:
46
47 deconfig: This argument is used when udhcpc starts, and
48 when a leases is lost. The script must put the interface in an
49 up, but deconfigured state, ie: ifconfig $interface 0.0.0.0.
50
51 bound: This argument is used when udhcpc moves from an
52 unbound, to a bound state. All of the paramaters are set in
53 enviromental variables, The script should configure the interface,
54 and set any other relavent parameters (default gateway, dns server,
55 etc).
56
57 renew: This argument is used when a DHCP lease is renewed. All of
58 the paramaters are set in enviromental variables. This argument is
59 used when the interface is already configured, so the IP address,
60 will not change, however, the other DHCP paramaters, such as the
61 default gateway, subnet mask, and dns server may change.
62
63 nak: This argument is used with udhcpc receives a NAK message.
64 The script with the deconfig argument will be called directly
65 afterwards, so no changes to the network interface are neccessary.
66 This hook is provided for purely informational purposes (the
67 message option may contain a reason for the NAK).
68
69The paramaters for enviromental variables are as follows:
70
71 $HOME - The set $HOME env or "/"
72 $PATH - the set $PATH env or "/bin:/usr/bin:/sbin:/usr/sbin"
73 $1 - What action the script should perform
74 interface - The interface this was obtained on
75 ip - The obtained IP
76 mask - The number of bits in the netmask (ie: 24)
77 siaddr - The bootp next server option
78 sname - The bootp server name option
79 boot_file - The bootp boot file option
80 subnet - The assigend subnet mask
81 timezone - Offset in seconds from UTC
82 router - A list of routers
83 timesvr - A list of time servers
84 namesvr - A list of IEN 116 name servers
85 dns - A list of DNS server
86 logsvr - A list of MIT-LCS UDP log servers
87 cookiesvr - A list of RFC 865 cookie servers
88 lprsvr - A list of LPR servers
89 hostname - The assigned hostname
90 bootsize - The length in 512 octect blocks of the bootfile
91 domain - The domain name of the network
92 swapsvr - The IP address of the client's swap server
93 rootpath - The path name of the client's root disk
94 ipttl - The TTL to use for this network
95 mtu - The MTU to use for this network
96 broadcast - The broadcast address for this network
97 ntpsrv - A list of NTP servers
98 wins - A list of WINS servers
99 lease - The lease time, in seconds
100 dhcptype - DHCP message type (safely ignored)
101 serverid - The IP of the server
102 message - Reason for a DHCPNAK
103 tftp - The TFTP server name
104 bootfile - The bootfile name
105
106additional options are easily added in options.c.
107
108
109note on udhcpc's random seed
110---------------------------
111
112udhcpc will seed its random number generator (used for generating xid's)
113by reading /dev/urandom. If you have a lot of embedded systems on the same
114network, with no entropy, you can either seed /dev/urandom by a method of
115your own, or doing the following on startup:
116
117ifconfig eth0 > /dev/urandom
118
119in order to seed /dev/urandom with some data (mac address) unique to your
120system. If reading /dev/urandom fails, udhcpc will fall back to its old
121behavior of seeding with time(0).
122
123
124signals accepted by udhcpc
125-------------------------
126
127udhcpc also responds to SIGUSR1 and SIGUSR2. SIGUSR1 will force a renew state,
128and SIGUSR2 will force a release of the current lease, and cause udhcpc to
129go into an inactive state (until it is killed, or receives a SIGUSR1). You do
130not need to sleep between sending signals, as signals received are processed
131sequencially in the order they are received.
132
133
134compile time options
135-------------------
136
137options.c contains a set of dhcp options for the client:
138
139 name[10]: The name of the option as it will appear in scripts
140
141 flags: The type of option, as well as if it will be requested
142 by the client (OPTION_REQ)
143
144 code: The DHCP code for this option
145
diff --git a/networking/udhcp/README.udhcpd b/networking/udhcp/README.udhcpd
deleted file mode 100644
index 169de78ec..000000000
--- a/networking/udhcp/README.udhcpd
+++ /dev/null
@@ -1,59 +0,0 @@
1udhcp server (udhcpd)
2--------------------
3
4The only command line argument to udhcpd is an optional specifed
5config file. If no config file is specified, udhcpd uses the default
6config file, /etc/udhcpd.conf. Ex:
7
8udhcpd /etc/udhcpd.eth1.conf
9
10The udhcp server employs a number of simple config files:
11
12udhcpd.leases
13------------
14
15The udhcpd.leases behavior is designed for an embedded system. The
16file is written either every auto_time seconds, or when a SIGUSR1
17is received (the auto_time timer restarts if a SIGUSR1 is received).
18If you send a SIGTERM to udhcpd directly after a SIGUSR1, udhcpd will
19finish writing the leases file and wait for the aftermentioned script
20to be executed and finish before quiting, so you do not need to sleep
21between sending signals. When the file is written, a script can be
22optionally called to commit the file to flash. Lease times are stored
23in the file by time remaining in lease (for systems without clock
24that works when there is no power), or by the absolute time that it
25expires in seconds from epoch. In the remaining format, expired leases
26are stored as zero. The file is of the format:
27
2816 byte MAC
294 byte ip address
30u32 expire time
3116 byte MAC
324 byte ip address
33u32 expire time
34.
35etc.
36
37example: hexdump udhcpd.leases
38
390000000 1000 c95a 27d9 0000 0000 0000 0000 0000
400000010 a8c0 150a 0d00 2d29 5000 23fc 8566 0000
410000020 0000 0000 0000 0000 a8c0 140a 0d00 4e29
420000030
43
44
45udhcpd.conf
46----------
47
48The format is fairly simple, there is a sample file with all the
49available options and comments describing them in samples/udhcpd.conf
50
51compile time options
52-------------------
53
54dhcpd.h contains the other two compile time options:
55
56 LEASE_TIME: The default lease time if not specified in the config
57 file.
58
59 DHCPD_CONFIG_FILE: The defualt config file to use.
diff --git a/networking/udhcp/TODO b/networking/udhcp/TODO
deleted file mode 100644
index 6febe5ab4..000000000
--- a/networking/udhcp/TODO
+++ /dev/null
@@ -1,16 +0,0 @@
1TODO
2----
3+ Check for valid IP, netmask, hostname, paths, strings, etc
4+ Integrade README.*'s with manpages
5+ using time(0) breaks if the system clock changes, find a portable solution
6+ make failure of reading functions revert to previous value, not the default
7+ sanity code for option[OPT_LEN]
8+ fix aliasing (ie: eth0:0)
9+ better standard linux distro support
10+ make sure packet generation works on a wide varitey of arches
11+ Interoperability testing
12+ Hooks within the DHCP server
13 * Server notification when a lease is added/removed
14+ Additional bootp support in client/server
15+ Make serverid option in server configurable
16+ Possibly add failure message to DHCP NAK
diff --git a/networking/udhcp/dumpleases.1 b/networking/udhcp/dumpleases.1
deleted file mode 100644
index 04a04da15..000000000
--- a/networking/udhcp/dumpleases.1
+++ /dev/null
@@ -1,30 +0,0 @@
1.TH DUMPLEASES 1 2001-09-27 GNU/Linux "GNU/Linux Administrator's Manual"
2.SH NAME
3dumpleases \- display leases granted by udhcp server
4.SH SYNOPSIS
5.B dumpleases
6.RI [ OPTION ]...
7.SH DESCRIPTION
8Display the DHCP leases granted by
9.BR udhcpd (8).
10.SH OPTIONS
11.TP
12.BR \-a ,\ \-\-absolute
13Interpret lease times as expiration time.
14.TP
15.BI \-f\ FILE,\ \-\-file= FILE
16Read lease information from
17.IR FILE .
18.TP
19.BR \-h ,\ \-\-help
20Display help.
21.TP
22.BR \-r ,\ \-\-remaining
23Interpret lease times as remaining time.
24.SH FILES
25.TP
26.I /var/lib/misc/udhcpd.leases
27Lease information file.
28.SH SEE ALSO
29.BR udhcpd (8),
30.BR udhcpd.conf (5).
diff --git a/networking/udhcp/samples/README b/networking/udhcp/samples/README
deleted file mode 100644
index 51721ea3c..000000000
--- a/networking/udhcp/samples/README
+++ /dev/null
@@ -1,11 +0,0 @@
1The files in this dir are:
2
3 udhcpd.conf: A sample udhpcd configuration file.
4
5 sample.script
6 sample.nak
7 sample.deconfig
8 sample.bound
9 sample.renew : sample scripts for the udhcpc client.
10
11 simple.script : a simple sample script for the client.
diff --git a/networking/udhcp/samples/sample.bound b/networking/udhcp/samples/sample.bound
deleted file mode 100755
index 200352672..000000000
--- a/networking/udhcp/samples/sample.bound
+++ /dev/null
@@ -1,30 +0,0 @@
1#!/bin/sh
2# Sample udhcpc renew script
3
4RESOLV_CONF="/etc/udhcpc/resolv.conf"
5
6[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
7[ -n "$subnet" ] && NETMASK="netmask $subnet"
8
9/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
10
11if [ -n "$router" ]
12then
13 echo "deleting routers"
14 while /sbin/route del default gw 0.0.0.0 dev $interface
15 do :
16 done
17
18 for i in $router
19 do
20 /sbin/route add default gw $i dev $interface
21 done
22fi
23
24echo -n > $RESOLV_CONF
25[ -n "$domain" ] && echo domain $domain >> $RESOLV_CONF
26for i in $dns
27do
28 echo adding dns $i
29 echo nameserver $i >> $RESOLV_CONF
30done \ No newline at end of file
diff --git a/networking/udhcp/samples/sample.deconfig b/networking/udhcp/samples/sample.deconfig
deleted file mode 100755
index b221bcf12..000000000
--- a/networking/udhcp/samples/sample.deconfig
+++ /dev/null
@@ -1,4 +0,0 @@
1#!/bin/sh
2# Sample udhcpc deconfig script
3
4/sbin/ifconfig $interface 0.0.0.0
diff --git a/networking/udhcp/samples/sample.nak b/networking/udhcp/samples/sample.nak
deleted file mode 100755
index f4d08e669..000000000
--- a/networking/udhcp/samples/sample.nak
+++ /dev/null
@@ -1,4 +0,0 @@
1#!/bin/sh
2# Sample udhcpc nak script
3
4echo Received a NAK: $message
diff --git a/networking/udhcp/samples/sample.renew b/networking/udhcp/samples/sample.renew
deleted file mode 100755
index c953e9758..000000000
--- a/networking/udhcp/samples/sample.renew
+++ /dev/null
@@ -1,30 +0,0 @@
1#!/bin/sh
2# Sample udhcpc bound script
3
4RESOLV_CONF="/etc/udhcpc/resolv.conf"
5
6[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
7[ -n "$subnet" ] && NETMASK="netmask $subnet"
8
9/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
10
11if [ -n "$router" ]
12then
13 echo "deleting routers"
14 while /sbin/route del default gw 0.0.0.0 dev $interface
15 do :
16 done
17
18 for i in $router
19 do
20 /sbin/route add default gw $i dev $interface
21 done
22fi
23
24echo -n > $RESOLV_CONF
25[ -n "$domain" ] && echo domain $domain >> $RESOLV_CONF
26for i in $dns
27do
28 echo adding dns $i
29 echo nameserver $i >> $RESOLV_CONF
30done \ No newline at end of file
diff --git a/networking/udhcp/samples/sample.script b/networking/udhcp/samples/sample.script
deleted file mode 100644
index 9b717ac3c..000000000
--- a/networking/udhcp/samples/sample.script
+++ /dev/null
@@ -1,7 +0,0 @@
1#!/bin/sh
2# Currently, we only dispatch according to command. However, a more
3# elaborate system might dispatch by command and interface or do some
4# common initialization first, especially if more dhcp event notifications
5# are added.
6
7exec /usr/share/udhcpc/sample.$1
diff --git a/networking/udhcp/samples/simple.script b/networking/udhcp/samples/simple.script
deleted file mode 100644
index a52a7f812..000000000
--- a/networking/udhcp/samples/simple.script
+++ /dev/null
@@ -1,39 +0,0 @@
1#!/bin/sh
2
3# udhcpc script edited by Tim Riker <Tim@Rikers.org>
4
5[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
6
7RESOLV_CONF="/etc/resolv.conf"
8[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
9[ -n "$subnet" ] && NETMASK="netmask $subnet"
10
11case "$1" in
12 deconfig)
13 /sbin/ifconfig $interface 0.0.0.0
14 ;;
15
16 renew|bound)
17 /sbin/ifconfig $interface $ip $BROADCAST $NETMASK
18
19 if [ -n "$router" ] ; then
20 echo "deleting routers"
21 while route del default gw 0.0.0.0 dev $interface ; do
22 :
23 done
24
25 for i in $router ; do
26 route add default gw $i dev $interface
27 done
28 fi
29
30 echo -n > $RESOLV_CONF
31 [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
32 for i in $dns ; do
33 echo adding dns $i
34 echo nameserver $i >> $RESOLV_CONF
35 done
36 ;;
37esac
38
39exit 0
diff --git a/networking/udhcp/samples/udhcpd.conf b/networking/udhcp/samples/udhcpd.conf
deleted file mode 100644
index 00105b3e5..000000000
--- a/networking/udhcp/samples/udhcpd.conf
+++ /dev/null
@@ -1,116 +0,0 @@
1# Sample udhcpd configuration file (/etc/udhcpd.conf)
2
3# The start and end of the IP lease block
4
5start 192.168.0.20 #default: 192.168.0.20
6end 192.168.0.254 #default: 192.168.0.254
7
8
9# The interface that udhcpd will use
10
11interface eth0 #default: eth0
12
13
14# The maximim number of leases (includes addressesd reserved
15# by OFFER's, DECLINE's, and ARP conficts
16
17#max_leases 254 #default: 254
18
19
20# If remaining is true (default), udhcpd will store the time
21# remaining for each lease in the udhcpd leases file. This is
22# for embedded systems that cannot keep time between reboots.
23# If you set remaining to no, the absolute time that the lease
24# expires at will be stored in the dhcpd.leases file.
25
26#remaining yes #default: yes
27
28
29# The time period at which udhcpd will write out a dhcpd.leases
30# file. If this is 0, udhcpd will never automatically write a
31# lease file. (specified in seconds)
32
33#auto_time 7200 #default: 7200 (2 hours)
34
35
36# The amount of time that an IP will be reserved (leased) for if a
37# DHCP decline message is received (seconds).
38
39#decline_time 3600 #default: 3600 (1 hour)
40
41
42# The amount of time that an IP will be reserved (leased) for if an
43# ARP conflct occurs. (seconds
44
45#conflict_time 3600 #default: 3600 (1 hour)
46
47
48# How long an offered address is reserved (leased) in seconds
49
50#offer_time 60 #default: 60 (1 minute)
51
52# If a lease to be given is below this value, the full lease time is
53# instead used (seconds).
54
55#min_lease 60 #defult: 60
56
57
58# The location of the leases file
59
60#lease_file /var/lib/misc/udhcpd.leases #defualt: /var/lib/misc/udhcpd.leases
61
62# The location of the pid file
63#pidfile /var/run/udhcpd.pid #default: /var/run/udhcpd.pid
64
65# Everytime udhcpd writes a leases file, the below script will be called.
66# Useful for writing the lease file to flash every few hours.
67
68#notify_file #default: (no script)
69
70#notify_file dumpleases # <--- usefull for debugging
71
72# The following are bootp specific options, setable by udhcpd.
73
74#siaddr 192.168.0.22 #default: 0.0.0.0
75
76#sname zorak #default: (none)
77
78#boot_file /var/nfs_root #default: (none)
79
80# The remainer of options are DHCP options and can be specifed with the
81# keyword 'opt' or 'option'. If an option can take multiple items, such
82# as the dns option, they can be listed on the same line, or multiple
83# lines. The only option with a default is 'lease'.
84
85#Examles
86opt dns 192.168.10.2 192.168.10.10
87option subnet 255.255.255.0
88opt router 192.168.10.2
89opt wins 192.168.10.10
90option dns 129.219.13.81 # appened to above DNS servers for a total of 3
91option domain local
92option lease 864000 # 10 days of seconds
93
94
95# Currently supported options, for more info, see options.c
96#opt subnet
97#opt timezone
98#opt router
99#opt timesvr
100#opt namesvr
101#opt dns
102#opt logsvr
103#opt cookiesvr
104#opt lprsvr
105#opt bootsize
106#opt domain
107#opt swapsvr
108#opt rootpath
109#opt ipttl
110#opt mtu
111#opt broadcast
112#opt wins
113#opt lease
114#opt ntpsrv
115#opt tftp
116#opt bootfile
diff --git a/networking/udhcp/udhcpc.8 b/networking/udhcp/udhcpc.8
deleted file mode 100644
index 752a736c0..000000000
--- a/networking/udhcp/udhcpc.8
+++ /dev/null
@@ -1,208 +0,0 @@
1.TH UDHCPC 8 2001-09-26 GNU/Linux "GNU/Linux Administrator's Manual"
2.SH NAME
3udhcpc \- very small DHCP client
4.SH SYNOPSIS
5.B udhcpc
6.RI [ OPTION ]...
7.SH DESCRIPTION
8The udhcp client negotiates a lease with the DHCP server and
9executes a script when it is obtained or lost.
10.SH OPTIONS
11.TP
12.BI \-c\ CLIENTID ,\ \-\-clientid= CLIENTID
13Send the client identifier
14.IR CLIENTID .
15.TP
16.BR -f ,\ \-\-foreground
17Do not fork after obtaining a lease.
18.TP
19.BI \-H\ HOSTNAME ,\ \-\-hostname= HOSTNAME
20Send the client hostname
21.IR HOSTNAME .
22.TP
23.BI \-h\ HOSTNAME
24Alias for -H
25.IR HOSTNAME .
26.TP
27.BI \-i\ INTERFACE ,\ \-\-interface= INTERFACE
28Configure
29.IR INTERFACE .
30.TP
31.BR -n ,\ \-\-now
32Exit with failure if a lease cannot be obtained.
33.TP
34.BI \-p\ FILE ,\ \-\-pidfile= FILE
35Write the process ID of the daemon to
36.IR FILE .
37.TP
38.BR -q ,\ \-\-quit
39Exit after obtaining a lease.
40.TP
41.BI \-r\ ADDRESS ,\ \-\-request= ADDRESS
42Request IP address
43.IR ADDRESS .
44.TP
45.BI \-s\ FILE ,\ \-\-script= FILE
46Use script
47.IR FILE .
48.TP
49.BR -v ,\ \-\-version
50Display version.
51.SH USAGE
52When an event occurs,
53.B udhcpc
54executes a script. There are four possible arguments to this
55script:
56.TP
57.B deconfig
58.B deconfig
59is used when
60.B udhcpc
61starts, and when a lease is lost. The script should put the
62interface in an up, but deconfigured, state.
63.TP
64.B bound
65.B bound
66is used when
67.B udhcpc
68moves from an unbound to a bound state. The script should
69configure the interface and set any other relevant parameters
70(e.g., default gateway, dns server, etc.).
71.TP
72.B renew
73.B renew
74is used when
75.B udhcpc
76when a lease is renewed. The interface is already
77configured, so the IP address will not change. Other parameters
78(e.g., default gateway, subnet mask, dns server) may.
79.TP
80.B nak
81.B nak
82is used when
83.B udhcpc
84receieves a NAK packet from the server. The
85enviromental variable
86.B $message
87will contain the reason for the
88NAK message if the server included one. Processing this message
89is optional, as the script will also be called with deconfig if
90need be.
91.PP
92Parameters are passed to the script via the following environment
93variables:
94.TP
95.B HOME
96The inherited HOME, or "/" if it is unset.
97.TP
98.B PATH
99The inherited PATH, or "/bin:/usr/bin:/sbin:/usr/sbin" if it is
100unset.
101.TP
102.B interface
103The interface.
104.TP
105.B ip
106The client IP address.
107.TP
108.B siaddr
109The BOOTP next server option.
110.TP
111.B sname
112The BOOTP server name option.
113.TP
114.B boot_file
115The BOOTP boot file option.
116.TP
117.B subnet
118The subnet mask.
119.TP
120.B timezone
121The timezone offset from UTC in seconds.
122.TP
123.B router
124The list of routers.
125.TP
126.B timesvr
127The list of time servers.
128.TP
129.B namesvr
130The list of IEN 116 name servers.
131.TP
132.B dns
133The list of DNS servers.
134.TP
135.B logsvr
136The list of MIT-LCS UDP log servers.
137.TP
138.B cookiesvr
139The list of RFC 865 cookie servers.
140.TP
141.B lprsvr
142The list of LPR servers.
143.TP
144.B hostname
145The host name.
146.TP
147.B bootsize
148The length in 512-octet blocks of the bootfile.
149.TP
150.B domain
151The domain name of the network.
152.TP
153.B swapsvr
154The client's swap server.
155.TP
156.B rootpath
157The path of the client's root dist.
158.TP
159.B ipttl
160The TTL.
161.TP
162.B mtu
163The MTU.
164.TP
165.B broadcast
166The broadcast address.
167.TP
168.B ntpsrv
169The list of NTP servers.
170.TP
171.B wins
172The list of WINS servers.
173.TP
174.B lease
175The lease time in seconds.
176.TP
177.B dhcptype
178The DHCP message type (safely ignored).
179.TP
180.B serverid
181The server IP address.
182.TP
183.B message
184Reason for a DHCPNAK.
185.TP
186.B tftp
187The TFTP server name.
188.TP
189.B bootfile
190The bootfile name.
191.SH FILES
192.TP
193.I /usr/share/udhcpc/default.script
194Script run when leases are obtained or lost.
195.SH NOTES
196.B udhcpc
197responds to the following signals:
198.TP
199.B SIGUSR1
200This signal causes
201.B udhcpc
202to renew the current lease or, if it does not have one, obtain a
203new lease.
204.TP
205.B SIGUSR2
206This signal caused
207.B udhcpc
208to release the current lease.
diff --git a/networking/udhcp/udhcpd.8 b/networking/udhcp/udhcpd.8
deleted file mode 100644
index be8fac888..000000000
--- a/networking/udhcp/udhcpd.8
+++ /dev/null
@@ -1,17 +0,0 @@
1.TH UDHCPD 8 2001-09-27 GNU/Linux "GNU/Linux Administrator's Manual"
2.SH NAME
3udhcpd \- very small DHCP server
4.SH SYNOPSIS
5.B udhcpd
6.SH DESCRIPTION
7The udhcp server negotiates leases with DHCP clients.
8.SH FILES
9.TP
10.I /etc/udhcpd.conf
11Configuration file.
12.TP
13.I /var/lib/misc/udhcpd.leases
14Lease information file.
15.SH SEE ALSO
16.BR dumpleases (1),
17.BR udhcpd.conf (8).
diff --git a/networking/udhcp/udhcpd.conf.5 b/networking/udhcp/udhcpd.conf.5
deleted file mode 100644
index b86a9f51f..000000000
--- a/networking/udhcp/udhcpd.conf.5
+++ /dev/null
@@ -1,164 +0,0 @@
1.TH UDHCPD.CONF 5 2001-09-26 GNU/Linux "GNU/Linux Administrator's Manual"
2.SH NAME
3udhcpd.conf \- udhcp server configuration file
4.SH DESCRIPTION
5The file
6.I /etc/udhcpd.conf
7contains configuration information specific to the udhcp server.
8It should contain one configuration keyword per line, followed by
9appropriate configuration information.
10.SH OPTIONS
11.TP
12.BI start\ ADDRESS
13The starting address of the IP lease block is
14.IR ADDRESS .
15The default is
16.BR 192.168.0.20 .
17.TP
18.BI end\ ADDRESS
19The ending address of the IP lease block is
20.IR ADDRESS .
21The default is
22.BR 192.168.0.254 .
23.TP
24.BI interface\ INTERFACE
25The udhcp server should listen on
26.IR INTERFACE .
27The default is
28.BR eth0 .
29.TP
30.BI max_leases\ LEASES
31Offer at most
32.I LEASES
33leases (including those reserved by OFFERs, DECLINEs, and ARP
34conflicts). The default is
35.BR 254 .
36.TP
37.BI remaining\ REMAINING
38If
39.I REMAINING
40is
41.BR yes ,
42store the time remaining for each lease. If it is
43.BR no ,
44store the expiration time for each lease. The default is
45.BR yes .
46.TP
47.BI auto_time\ SECONDS
48Write the lease information to a file every
49.I SECONDS
50seconds. The default is
51.BR 7200 .
52.TP
53.BI decline_time\ SECONDS
54Reserve an IP for
55.I SECONDS
56seconds if a DHCP decline message is received. The default is
57.BR 3600 .
58.TP
59.BI conflict_time\ SECONDS
60Reserve an IP for
61.I SECONDS
62seconds if an ARP conflict occurs. The default is
63.BR 3600 .
64.TP
65.BI offer_time\ SECONDS
66Reserve an IP for
67.I SECONDS
68seconds if it is offered. The default is
69.BR 60 .
70.TP
71.BI min_lease\ SECONDS
72Reserve an IP for the full lease time if the lease to be given is less than
73.I SECONDS
74seconds. The default is
75.BR 60 .
76.TP
77.BI lease_file\ FILE
78Write the lease information to
79.IR FILE .
80The default is
81.BR /var/lib/misc/udhcpd.leases .
82.TP
83.BI pidfile\ FILE
84Write the process ID to
85.IR FILE .
86The default is
87.BR /var/run/udhcpd.pid .
88.TP
89.BI notify_file\ FILE
90Execute
91.I FILE
92after the lease information is written. By default, no file is executed.
93.TP
94.BI siaddr\ ADDRESS
95BOOTP specific option. The default is
96.BR 0.0.0.0 .
97.TP
98.BI sname\ NAME
99BOOTP specific option. There is no default.
100.TP
101.BI boot_file\ FILE
102BOOTP specific option. There is no default.
103.TP
104.BI option\ OPTION
105DHCP specific option.
106.RS
107.TP
108.BI subnet\ ADDRESS
109.TP
110.BI timezone\ OFFSET
111.TP
112.BI router\ ADDRESS...
113.TP
114.BI timesvr\ ADDRESS...
115.TP
116.BI namesvr\ ADDRESS...
117.TP
118.BI dns\ ADDRESS...
119.TP
120.BI logsvr\ ADDRESS...
121.TP
122.BI cookiesvr\ ADDRESS...
123.TP
124.BI lprsvr\ ADDRESS...
125.TP
126.BI hostname\ HOSTNAME
127.TP
128.BI bootsize\ SIZE
129.TP
130.BI domain\ DOMAIN
131.TP
132.BI swapsvr\ ADDRESS
133.TP
134.BI rootpath\ PATH
135.TP
136.BI ipttl\ TTL
137.TP
138.BI mtu\ MTU
139.TP
140.BI broadcast\ ADDRESS
141.TP
142.BI ntpsrv\ ADDRESS...
143.TP
144.BI wins\ ADDRESS...
145.TP
146.BI requestip\ ADDRESS
147.TP
148.BI lease\ SECONDS
149.TP
150.BI dhcptype\ TYPE
151.TP
152.BI serverid\ ADDRESS
153.TP
154.BI tftp\ FILE
155.TP
156.BI bootfile\ FILE
157The default for
158.B lease
159is
160.BR 864000 .
161There are no defaults for the other options.
162.RE
163.SH SEE ALSO
164.BR udhcpd (8).