Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Mar 1996 16:53:01 +1030 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        steve@icis.qut.edu.au (Steve Milliner)
Cc:        msmith@atrad.adelaide.edu.au, questions@FreeBSD.org
Subject:   Re: Domain sockets / passing fd
Message-ID:  <199603180623.QAA24260@genesis.atrad.adelaide.edu.au>
In-Reply-To: <199603180534.PAA11183@russell.icis.qut.edu.au> from "Steve Milliner" at Mar 18, 96 03:34:15 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Steve Milliner stands accused of saying:
> 
> > 
> > They're called 'msg_control' and 'msg_controllen', see recv(2).  I
> > don't know why they have different names to the SunOS versions; I suspect
> > it has a lot to do with SunOS being based on 4.2/4.3BSD, wheras
> > the version in FreeBSD is from 4.4.
> > 
> 
> Exactly, but the code in Steven's (well the version I have anyway) uses
> the older BSD style (ie. "msg_accrights" and "msg_accrightslen")
> -- so when you said you got Steven's code to work
> 'out of the box' didn't you have to change it to incorporate
> 'msg_control' and 'msg_controllen' to get it to compile on FreeBsd ? 

I played with that example ~6mths ago and didn't recall having to do
anything with it, hence my comments about it working.  I was wrong; 
lots had to be changed.  Sorry.

> because I've included msg_control and msg_controllen to get the program
> to compile (which it does) - but I can't get the dam thing to run
> ie. the "invalid parameter" error at run time.

You really need to read the recv(2) manpage; it all comes back now 8(
The name change was because the two _aren't_ at all compatible.

You need to fill in/unpack the cmsghdr struct for your FD.

> yep, that'd be nice :> 

Not possible, sorry.  I shouldn't have ranted without checking my original
archives.

> Regs Stephen Milliner

-- 
]] Mike Smith, Software Engineer        msmith@atrad.adelaide.edu.au    [[
]] Genesis Software                     genesis@atrad.adelaide.edu.au   [[
]] High-speed data acquisition and      (GSM mobile) 0411-222-496       [[
]] realtime instrument control          (ph/fax)  +61-8-267-3039        [[
]] Collector of old Unix hardware.      "Where are your PEZ?" The Tick  [[



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603180623.QAA24260>