Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site qubix.UUCP Path: utzoo!linus!security!genrad!decvax!decwrl!sun!qubix!msc From: msc@qubix.UUCP (Mark Callow) Newsgroups: net.unix-wizards Subject: Re: UNIX domain addressing for 4.2bsd IPC Message-ID: <692@qubix.UUCP> Date: Fri, 9-Dec-83 14:20:21 EST Article-I.D.: qubix.692 Posted: Fri Dec 9 14:20:21 1983 Date-Received: Tue, 13-Dec-83 01:19:34 EST References: <170@ut-ngp.UUCP> Organization: Qubix Graphic Systems, Saratoga, CA Lines: 17 The "4.2 IPC Primer" is long out of date. The correct syntax for binding a name to a socket in the Unix domain is as follows: struct sockaddr socketname = { AF_UNIX, { "/dev/foo" } }; bind(s, &socketname, sizeof( socketname )); where struct sockaddr is declared as follows: struct sockaddr { u_short sa_family; /* address family */ char sa_data[14]; /* up to 14 bytes of direct address */ }; -- From the Tardis of Mark Callow msc@qubix.UUCP, decwrl!qubix!msc@Berkeley.ARPA ...{decvax,ucbvax,ihnp4}!decwrl!qubix!msc, ...{ittvax,amd70}!qubix!msc