# Last updated : Mon Jun 20 13:13:35 1994
#
This code is based on the bootp client written by Charles Hawkins
<ceh@eng.cam.ac.uk> and tidied up a little by me.  I've added a few
things to make it conform to RFC1542 and it now parses RFC1497 BOOTP
magic cookies.  The Magic cookie parser is not complete, it ignores
the following TAGS:

	(2)  Time of Day,
	(13) BOOTP file size,
	(14) Merit dump filename
	(17) root pathname to mount
	(18) extentions, file to TFTP with more cookie in it.

Of there only (2) and (17) seem worth adding at this point.  (18) is a
real pain as it requires a TFTP client in the bootp setup.  I've not
had access to a bootpd which provides any of these so I can't easily
test them.

It does correctly parse the rest as far as I've been able to test with
the bootp servers I've got access to.  The script rc.bootp sets up the
IP layer from the bootp packet results, and is based loosely on the
startup script provided by Charles Hawkins <ceh@eng.cam.ac.uk>, but
with additions for the bootp cookies.  Hopefully now all the locations
of the binaries it uses are configurable at the top of rc.bootp saving
people the effort of trying to guess what needs changing for their
distribution.

The code is cleanly compiled by gcc -ansi -wall -pedantic, so should
be ok ;-)

The setting up of the resolv.conf file is done if enough info can be
got from the bootp reply and/or the inverse lookup of the IP address
we were allocated (for those servers which supply DNS server info but
not the DNS domain name.)  For the reverse lookup to work (and DNS in
general), you must of course already have the order line include the
"bind" keyword in your host.conf file.  If all the domain name lookups
fail, but you still have an existing resolv.conf file, the script will
update the nameservers lines, leaning the domain line alone.

This code is provided as-is, with no warrenty, share and enjoy.

Please report any bugs or problems and I'll try to fix them.

-- Jon Peatfield  (DAMTP unix network admin)

Jon Peatfield, Computer Officer, the DAMTP, University of Cambridge
Telephone: (+44 223) 3-37852     Mail: J.S.Peatfield@amtp.cam.ac.uk
