From owner-freebsd-chat Sat May 24 22:39:29 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id WAA09322 for chat-outgoing; Sat, 24 May 1997 22:39:29 -0700 (PDT) Received: from ethanol.gnu.ai.mit.edu (devnull@ethanol.gnu.ai.mit.edu [128.52.46.64]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id WAA09317 for ; Sat, 24 May 1997 22:39:27 -0700 (PDT) Received: by ethanol.gnu.ai.mit.edu (8.6.12/8.6.12GNU) id BAA28601; Sun, 25 May 1997 01:39:24 -0400 Date: Sun, 25 May 1997 01:39:24 -0400 Message-Id: <199705250539.BAA28601@ethanol.gnu.ai.mit.edu> From: "Joel N. Weber II" To: joelh@gnu.ai.mit.edu CC: chat@FreeBSD.ORG In-reply-to: <199705250445.AAA28285@ethanol.gnu.ai.mit.edu> (message from Joel Ray Holveck on Sun, 25 May 1997 00:45:44 -0400) Subject: Re: Sending file descriptors over AF_UNIX sockets x-lossage: losing lossage losses lossfully x-x-headers: not enough x-url: http://www.cyclic.com/~nemo x-attribution: nemo x-foobar: Ask not for whom the bell tolls, and pay only station-to-station rates. Sender: owner-chat@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Date: Sun, 25 May 1997 00:45:44 -0400 From: Joel Ray Holveck Reply-to: joelh@gnu.ai.mit.edu Sender: owner-chat@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk I understand that it is possible to send an open file descriptor over an AF_UNIX datagram socket. I've been looking over the source for leads as to how this might be done; anybody care to help me? Well, now that you're asleep, I looked up sendmsg in w richard stevens and found that hte reason I can't grok the kernel source refering to msg_control is because you have to provide your own struct msghdr and pass that to the kernel. program 15.9 and 15.10 seem to be what you want to look at. it's around page 488. you can ftp the source from ftp.uu.net in published/books/stevens.advprog.tar.Z (assuming that the info in the book is actually accurate; I haven't tried it) happy hacking, joelw