[854] in linux-net channel archive

home help back first fref pref prev next nref lref last post

getsockname() and broadcasts.

daemon@ATHENA.MIT.EDU (Miquel van Smoorenburg)
Wed Aug 9 21:07:29 1995

To: submit-linux-dev-net@ratatosk.yggdrasil.com
From: miquels@cistron.nl (Miquel van Smoorenburg)
Date: 7 Aug 1995 17:31:21 +0200

Hello,
  I've tried adding slip support to bootpd-2.4.3. A SLIP client
can ask for it's IP number by "broadcasting" a request on it's
SLIP interface. I thought I could then do a getsockname() to
see on which interface the client is connected, and just reply
to the bootp request in the normal way.

The problem is that the socket name is not filled in for
broadcasts. So if I do a getsockname(), it just returns 0.0.0.0.

I've tried the same on FreeBSD - same results.

Is this standard behaviour? Should it behave like this? Should
I add a new socket option (SO_whatever) to get getsockname()
filled in?

Questions, questions...

Mike.
-- 
Miquel van Smoorenburg, miquels@cistron.nl      Cistron Internet Services
Mail info@cistron.nl               An independent Dutch Internet Provider
for more information           <A Href = "http://www.cistron.nl/">CIS</A>
   +31-1720-19445 (Voice) 30979 (Fax) 42580 (Data) - Alphen a/d Rijn

home help back first fref pref prev next nref lref last post