Xref: utzoo comp.unix.ultrix:3645 comp.protocols.tcp-ip:11458 biz.dec.ip:5 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!deimos.cis.ksu.edu!dino!cs.iastate.edu!hascall From: hascall@cs.iastate.edu (John Hascall) Newsgroups: comp.unix.ultrix,comp.protocols.tcp-ip,biz.dec.ip Subject: Trying to write a bootp client for Ultrix Summary: Chicken & Egg (arg!) Keywords: bootp, client, ifconfig, ioctl, bind, help! Message-ID: <1758@dino.cs.iastate.edu> Date: 31 May 90 02:52:44 GMT Sender: usenet@dino.cs.iastate.edu Followup-To: comp.unix.ultrix Organization: Iowa State University Computation Center Lines: 25 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@atanasoff.cs.iastate.edu % according to man side effect of SIOCSIFADDR is to initialize the interface