home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / bsd / 5391 < prev    next >
Encoding:
Text File  |  1992-09-09  |  1.3 KB  |  36 lines

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