Trying to write a bootp client for Ultrix
John Hascall
hascall at cs.iastate.edu
Thu May 31 12:52:44 AEST 1990
I am working on a bootp client which I hope to use as follows (in
/etc/rc.local):
ifconfig `bootp-client`
The aim of the program is to produce a string like the following:
se0 129.186.1.62 netmask 255.255.255.0 broadcast 129.186.1.255
The client program creates a datagram socket, but when it attempts
to bind (to addr=INADDR_ANY, port=BOOTP) it fails unless I preceed
the bind with a SIOCSIFADDR (set address) ioctl call%. Herein lies the
problem: the whole reason for this program is to discover the address!
If I just stick in a bogus address (say 129.186.0.0) I get the bootp
request sent fine, but I don't receive the reply. I have tried all
sorts of things but none have worked...
...does any one have any ideas on how to make this work?
Thanks again,
John Hascall hascall at atanasoff.cs.iastate.edu
% according to man side effect of SIOCSIFADDR is to initialize the interface
More information about the Comp.unix.ultrix
mailing list