From owner-freebsd-hackers Sat Jun 29 12:40:16 2002 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 18ABA37B405 for ; Sat, 29 Jun 2002 12:40:09 -0700 (PDT) Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7CE043E06 for ; Sat, 29 Jun 2002 12:40:08 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020629194008.VXMN9178.rwcrmhc51.attbi.com@InterJet.elischer.org>; Sat, 29 Jun 2002 19:40:08 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id MAA80952; Sat, 29 Jun 2002 12:32:32 -0700 (PDT) Date: Sat, 29 Jun 2002 12:32:31 -0700 (PDT) From: Julian Elischer To: Lev Serebryakov Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Driver for device on serial (COM) port In-Reply-To: <178176166781.20020629230514@serebryakov.spb.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG in -current, we have a new netgraph node ng_device that gives a device interface to netgraph. We also have the ng_tty node that attaches to a tty as a 'line disciplin' adding a node between these to do you own stuff would give you what you want. (the ng_device node shuld be Merged from current soon and you could even do it yourself.. it shouldn't be hard) in any case you probably want to attach to the tty as a line disciplin of some kind.. for example there is a graphics-tablet disciplin around somewhere (but I don't know where). On Sat, 29 Jun 2002, Lev Serebryakov wrote: > Hello, freebsd-hackers! How are you? > > I want to write driver for some device, which is attached to > standard serial (COM, RS-232) port. > I want to make this driver full-featured -- with device node in > /dev, ioctl()s and other. But I don't want to re-implement all this > serial tty stuff, that is implemented in `sys/isa/sio.c' > In case of LPT we have `ppbus'. What should I do in case of COM > port? I want to `take' com port (any calls to corresponding /dev/ttydX, > /dev/cuaaX and other should failed after this), monitor com port > state (know about new bytes, etc) and after that detach from com > port (when device is shutdowned and switched off), so com port could > be used for other deviced (i.e. modem) without rebooting. > It looks like userland program, but I really NEED full-featured > driver, which is controlled via device node... > > Lev Serebryakov > /-----------------------------------------------\ > | FIDONet: 2:5030/661.0 | > | E-Mail: lev@serebryakov.spb.ru | > | Page: http://lev.serebryakov.spb.ru/ | > | ICQ UIN: 3670018 | > | Phone: You know, if you have world nodelist | > \===============================================/ > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message