🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #876

Re: binding sockets

#876
From: Peter Jeffe 512.823.4091
Date: Wed, 19 Sep 1990 18:26
16 lines
1376 bytes
In article <26618@mimsy.umd.edu> chris@mimsy.umd.edu (Chris Torek) writes:
>In article <1990Sep16.183730.18698@athena.mit.edu>
>jik@athena.mit.edu (Jonathan I. Kamens) writes:
>>  No, actually, the namelen parameter one passes to bind() should be the
>>sizeof the sockaddr structure being passed into it ...
>
>Well, it `should' be 2+strlen(path), or (in 4.3BSD-reno) SUN_LEN:

Not to quibble, but it `should' be "sizeof(name.sun_family)+strlen(path)";
or better yet, "sizeof(name)-sizeof(name.sun_path)+strlen(path)"; in any
case, assuming the 2 bytes is not a good idea.

-------------------------------------------------------------------------------
Peter Jeffe   ...uunet!cs.utexas.edu!ibmaus!auschs!sandino.austin.ibm.com!jeffe
        first they want a disclaimer, then they make you pee in a jar,
                   then they come for you in the night
Technical Details
Message-ID: <3580@awdprime.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!romp!auschs!d75!awdprime!sandino.austin.ibm.com!jeffe
References: <ERAN.90Sep14115242@elaine7.stanford.edu> <1990Sep16.183730.18698@athena.mit.edu> <26618@mimsy.umd.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!romp!auschs!d75!awdprime!sandino.austin.ibm.com!jeffe
From: jeffe@sandino.austin.ibm.com (Peter Jeffe 512.823.4091)
Newsgroups: comp.unix.programmer
Subject: Re: binding sockets
Message-ID: <3580@awdprime.UUCP>
Date: 19 Sep 90 18:26:29 GMT
References: <ERAN.90Sep14115242@elaine7.stanford.edu> <1990Sep16.183730.18698@athena.mit.edu> <26618@mimsy.umd.edu>
Sender: news@awdprime.UUCP
Organization: IBM AWD, Austin, TX
Lines: 16