From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 26 09:39:09 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8226A16A4CE for ; Sat, 26 Feb 2005 09:39:09 +0000 (GMT) Received: from mail28.sea5.speakeasy.net (mail28.sea5.speakeasy.net [69.17.117.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3070943D5E for ; Sat, 26 Feb 2005 09:39:09 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 15845 invoked from network); 26 Feb 2005 09:39:08 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail28.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 26 Feb 2005 09:39:08 -0000 Received: from hydrogen.funkthat.com (yjgxwf@localhost.funkthat.com [127.0.0.1])j1Q9d8GH041252; Sat, 26 Feb 2005 01:39:08 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id j1Q9d7r3041251; Sat, 26 Feb 2005 01:39:07 -0800 (PST) Date: Sat, 26 Feb 2005 01:39:07 -0800 From: John-Mark Gurney To: Yan Yu Message-ID: <20050226093907.GM89312@funkthat.com> Mail-Followup-To: Yan Yu , freebsd-hackers@freebsd.org References: <20050226072645.76950.qmail@web26802.mail.ukl.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-hackers@freebsd.org Subject: Re: send file descriptor via ipc X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Feb 2005 09:39:09 -0000 Yan Yu wrote this message on Sat, Feb 26, 2005 at 00:58 -0800: > Hello, there, > I am looking for the function that handle send/recv file descriptors > through sendmsg/recvmsg? > by looking through source files, > unp_internalize/unp_externalize in kern/uipc-usrreq.c seems relevant.. > > but i am not sure since i could not guess the meaning of the function > name.. (btw, what is "unp", the prefix in the function name stands for?) > Can someone please confirm if it is the right function or point > me to the right one i should look at? I'd highly recommend that you get the book APUE (Advance Programming in the Unix Environment by the late Richard Stevens... It's a great book and covers this topic... You can also look at unix(4) which has a brief description.. You must use unix domain sockets in order to pass file descriptors, and so the unp probably refers to UNix Protocol... but I could be wrong about that... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."