From owner-freebsd-arch Tue Feb 27 20:19:39 2001 Delivered-To: freebsd-arch@freebsd.org Received: from urban.iinet.net.au (urban.iinet.net.au [203.59.24.231]) by hub.freebsd.org (Postfix) with ESMTP id 0E00A37B719 for ; Tue, 27 Feb 2001 20:19:37 -0800 (PST) (envelope-from julian@elischer.org) Received: from elischer.org (i003-146.nv.iinet.net.au [203.59.3.146]) by urban.iinet.net.au (8.8.7/8.8.7) with ESMTP id MAA07379; Wed, 28 Feb 2001 12:19:28 +0800 Message-ID: <3A9C7C27.D29A06A1@elischer.org> Date: Tue, 27 Feb 2001 20:18:47 -0800 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Kostas Magoutis Cc: freebsd-arch@freebsd.org Subject: Re: Logical device instances References: <200102280048.f1S0m9n09106@wally.eecs.harvard.edu> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Kostas Magoutis wrote: > > I am writing a device driver for a user-level networking card. User > level code interacts with it via open, close, mmap, and ioctl. A > separate logical instance of the device needs to be created each time > a process opens the device (as in when a file is created when a vnode > is opened). The device driver needs to have a way to find out on what > logical instance of the device a system call is performed. It seems > to me that at present (with either specfs or devfs), the device driver > has no way to find out on what opened instance of the device an > operation is performed. Am I missing something or the present device > driver interfaces just don't support such functionality? > Thanks, > > Kostas > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message device drivers for networking don't use the open/close/read/write interface. they use sockets, so that different processs open differnt sockets which are multiplexed onto the device using a protocol. -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000-2001 ---> X_.---._/ v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message