Path: utzoo!attcan!uunet!snorkelwacker!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.programmer Subject: Re: binding sockets Message-ID: <1990Sep24.082942.10213@athena.mit.edu> Date: 24 Sep 90 08:29:42 GMT References: <1990Sep16.183730.18698@athena.mit.edu> <26618@mimsy.umd.edu> Sender: daemon@athena.mit.edu (Mr Background) Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Distribution: comp Organization: Massachusetts Institute of Technology Lines: 23 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@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8495 Home: 617-782-0710