Subject: Early working version of bootpc for NetBSD using bpf
To: None <current-users@NetBSD.ORG>
From: John C. Hayward <johnh@david.wheaton.edu>
List: current-users
Date: 08/17/1995 17:13:50
Dear NetBSDers,
   On the issue of getting NetBSD version of bootpc up several people 
mentioned that "bpf" could be used to grab packets before the IP number
of an interface was known.
   Using this I have a working version of bootpc.  It is a bit of a hack in
that you have to know the network number your computer is on.  I first
configure the network interface to use the network address (with a host 
of 0) of that network then bootpc sends out a bootp request (using 
sendto).  It then waits for packets which are filtered by bpf.  Bootpc
then outputs the various parameters it picks up from the server.
   In /etc/hostname.dev I put in place of the hostname "bootp" and modified
/etc/netstart so when it sees the name bootp it calls rc.bootp passing in
the interface device and network number.
   Bootpc.rc will configure the interface to the correct IP and based on the
information served up can rewrite /etc/resolve and add a route for the 
default (gateway).

   I would like to do more work to possibly use bpf to write the broadcast
rather than doing sendto as the current code does which would result in less
of a hack relative to configuring the interface to network.0 address to get
the bootp request out.

People who are interested in my changes can e-mail me.

johnh...