Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!manuel!munnari.oz.au!uunet!haven.umd.edu!darwin.sura.net!Sirius.dfn.de!tubsibr!petri From: petri@ibr.cs.tu-bs.de (Stefan Petri) Subject: Re: A major BSD socket bug? Message-ID: <1992Sep9.161224.23194@ibr.cs.tu-bs.de> Summary: it is not a bug Reply-To: petri@ibr.cs.tu-bs.de (Stefan Petri) Organization: TU Braunschweig, Informatik, Bueltenweg, Germany References: <1992Sep9.053147.411@lmpsbbs.comm.mot.com> <1992Sep9.095942.12013@fwi.uva.nl> Date: Wed, 9 Sep 1992 16:12:24 GMT Lines: 23 In article <1992Sep9.053147.411@lmpsbbs.comm.mot.com> rittle@supra (Loren James Rittle) writes: [..] >/* It appears that whenever recvfrom() doesn't block and yet doesn't > return a packet (due to being in non-blocking mode), it hoses the > socket in some way. Any later call to recvfrom() that returns a > valid packet fails to write the sender's network address in the > sockaddr stucture that was passed to recvfrom(). [sample program deleted] > It seems to me that the correct output (for my machine) should be: > 676331921 hello1 # 676331921 is 145.1.80.40 - my machine's IP address BTW. Printing the address in hex would surely have helped you : ra 11> cc -target sun4 -o t t.c ra 12 > ./t 7f000001 hello1 It's the address of the loopback interface, since that is where the packet is routed through :-) Stefan