From owner-freebsd-hackers Mon Mar 2 19:25:41 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA20174 for freebsd-hackers-outgoing; Mon, 2 Mar 1998 19:25:41 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp02.primenet.com (smtp02.primenet.com [206.165.6.132]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA20161 for ; Mon, 2 Mar 1998 19:25:26 -0800 (PST) (envelope-from tlambert@usr06.primenet.com) Received: (from daemon@localhost) by smtp02.primenet.com (8.8.8/8.8.8) id UAA20524; Mon, 2 Mar 1998 20:25:25 -0700 (MST) Received: from usr06.primenet.com(206.165.6.206) via SMTP by smtp02.primenet.com, id smtpd020496; Mon Mar 2 20:25:16 1998 Received: (from tlambert@localhost) by usr06.primenet.com (8.8.5/8.8.5) id UAA11963; Mon, 2 Mar 1998 20:25:15 -0700 (MST) From: Terry Lambert Message-Id: <199803030325.UAA11963@usr06.primenet.com> Subject: Re: vnodes for sockets. To: avalon@coombs.anu.edu.au (Darren Reed) Date: Tue, 3 Mar 1998 03:25:15 +0000 (GMT) Cc: hackers@FreeBSD.ORG In-Reply-To: <199803022353.PAA21947@hub.freebsd.org> from "Darren Reed" at Mar 3, 98 10:53:52 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Is it possible to associate a vnode with a socket ? Yes, this happens. > if so, (or just for unix domain sockets), do the various VOP functions > such as VOP_WRITE work properly with them ? No, this is not currently possible. The vp is subverted out of the VFS architecture using a struct fileops pointer specific to the sockets. The pipe code and the IPC code use the same approach. If you look at the standard system calls, (like read, in sys_generic.c), you will see the indirection through the struct fileops. The code is an artifact at the system call level. This means that the kernel internal vn_* calls will not work against the code. You will need to indirect the same way (ie: use struct file and dereference out the f_ops ops member, and call the function from the struct, directly). We hope to clean this up in the future (struct fileops must die). PTY's are unusable from the kernel because of them being implemented as a device; perhaps you can use a pty, instead. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message