*BSD News Article 28578


Return to BSD News archive

Xref: sserve comp.os.386bsd.questions:9365 comp.unix.bsd:13628
Newsgroups: comp.os.386bsd.questions,comp.unix.bsd
Path: sserve!newshost.anu.edu.au!munnari.oz.au!mel.dit.csiro.au!its.csiro.au!dmssyd.syd.dms.CSIRO.AU!metro!news.cs.su.oz.au!harbinger.cc.monash.edu.au!msuinfo!uwm.edu!vixen.cso.uiuc.edu!howland.reston.ans.net!pipex!uknet!festival!edcogsci!richard
From: richard@cogsci.ed.ac.uk (Richard Tobin)
Subject: Re: sockaddr change
Message-ID: <CMtALA.3xA@cogsci.ed.ac.uk>
Organization: HCRC, University of Edinburgh
References: <CMrE5K.JxL@cogsci.ed.ac.uk> <2m7n76$et1@GRAPEVINE.LCS.MIT.EDU>
Date: Thu, 17 Mar 1994 13:53:30 GMT
Lines: 20

In article <2m7n76$et1@GRAPEVINE.LCS.MIT.EDU> wollman@ginger.lcs.mit.edu (Garrett Wollman) writes:
>It should use the SUN_LEN macro to set sun_len.

Ok.  I hadn't noticed that macro.

BTW, SUN_LEN is defined as

   (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path)

whereas the definition of sockaddr_un has the comment:

	u_char	sun_len;		/* sockaddr len including null */

The SUN_LEN calculation appears not to include the null.

-- Richard
-- 
Richard Tobin, HCRC, Edinburgh University                 R.Tobin@ed.ac.uk

"Your monkey has got it right, sir."  - HHGTTG