Subject: Re: How to set up NetBSD client of bootp
To: John C. Hayward <>
From: Tobias Weingartner <>
List: current-users
Date: 08/11/1995 10:39:45
> 1) Aparently linux has a ioctl which allows you to ask the hardware address
>    associated with a socket:

This is no problem, I have code that does this quite nicely.

> 2) How does one get the default route associated with an interface without
>    configuring the interface with an IP number?
> 3) How does one get the bootp reply without having the interface 
>    configured with the actual IP you are getting from bootp server?

Well, BPF is one way to go.  However, I do not really want to put the work
into it.  (I have a job, and I am lazy! ;-) )  Why should I do all the work
of writing a filter, that parses the UDP/BOOTP packets, and also only accepts
packets for the local interfaces, or ether broadcast addresses.  Why should I
write all the packet stuffing code for stuffing a UDP/ether packet to be sent
on a raw interface, when I could have the IP stack to it?

I don't know if this is valid.  If you see a problem with this idea, please let
me know.  Could we change the IP stack (I have not looked at the code in question)
to behave in the following manner;  If the interface address is INADDR_NONE, to
send packets on the ethernet with a from-address of INADDR_NONE.  Also, the IP
stack should accept packets addressed to any IP address, as long as the HW
address either matches, or is the broadcast HW address.

This should make it easier to implement BOOTPCLIENTs on other networks, besides


(Note, the above INADDR_NONE might have to change to INADDR_ANY)

| Tobias Weingartner | Email: weingart@BrandonU.Ca | Need a Unix sys-admin?  |
| Box 27, Beulah, MB |-----------------------------| Send E-Mail for resume, |
| R0M 0B0, Canada    | Unix Guru, Admin, Sys-Prgmr | and other details...    |
|      %SYSTEM-F-ANARCHISM, The operating system has been overthrown         |