binding sockets

Jonathan I. Kamens jik at athena.mit.edu
Mon Sep 24 18:29:42 AEST 1990


  Now I'm confused.

  First of all, I thought all of the sockaddr structures (in 4.3BSD, "all"
means sockaddr_in and sockaddr_un, unless I've forgotten something :-) are
padded so that they're the same length.  Is this not correct?

  Second, the documentation in /usr/doc/ps1/07.ipctut and /usr/doc/ps1/08.ipc
all uses sizeof() on the sockaddr structure to get the third argument to
bind().  Is that documentation all wrong, and if so, is it updated in 4.3-Reno?

  And finally, what do you mean when you say that the documentation "says that
the name length `should' be exactly right"?  I can't find any documentation
anywhere, including the bind(2) man page in 4.3, that even mentions the
namelen argument, let alone describes what it should be, and all the
documentation that *does* show calls to bind() shows them using sizeof(), as I
did.

-- 
Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8495			      Home: 617-782-0710



More information about the Comp.unix.programmer mailing list