Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site well.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!ucbvax!ucdavis!lll-crg!well!jayr From: jayr@well.UUCP (Jay Roth) Newsgroups: net.unix Subject: bind(2) in bsd4.2 UNIX Message-ID: <422@well.UUCP> Date: Sat, 4-Jan-86 16:26:21 EST Article-I.D.: well.422 Posted: Sat Jan 4 16:26:21 1986 Date-Received: Mon, 6-Jan-86 03:11:07 EST Organization: Whole Earth Lectronic Link, Sausalito, CA Lines: 20 Keywords: bind I have created a socket as: s = socket(AF_UNIX, SOCK_DGRAM, 0) and now I'd like to name it. However, there is some discrepancy between the manual and the 4.2bsd Interprocess Communication Primer DRAFT (7/27/83). The manual indicates that bind should take these args: struct sockaddr *name; ... bind(s, name, namelen); And the Primer says: bind(s, "/dev/foo", sizeof("/dev/foo") - 1); This leads to 2 qns: 1) Which is right (I have tried both, and the manual seems to be right, at least in my implementation) and 2) If the manual is right, how can you specify socket names longer than the size specified in sa_data field of the sockaddr structure?