From owner-freebsd-questions Thu May 28 07:59:52 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA25265 for freebsd-questions-outgoing; Thu, 28 May 1998 07:59:52 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from localhost.zilker.net (jump-k56flex-0156.jumpnet.com [207.8.6.156]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA25260 for ; Thu, 28 May 1998 07:59:45 -0700 (PDT) (envelope-from marquard@zilker.net) Received: (from marquard@localhost) by localhost.zilker.net (8.8.8/8.8.3) id IAA02544; Thu, 28 May 1998 08:07:09 -0500 (CDT) To: freebsd-questions@FreeBSD.ORG Subject: Re: how to create virtual com port device ? References: <19980527234923.2142.qmail@hotmail.com> From: Dave Marquardt Date: 28 May 1998 08:07:09 -0500 In-Reply-To: "M.C Wong"'s message of "Thu, 28 May 1998 09:49:23 EST" Message-ID: <85af82a6iq.fsf@localhost.zilker.net> Lines: 27 X-Mailer: Quassia Gnus v0.22/XEmacs 19.16 - "Lille" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "M.C Wong" writes: > I am using Ascend MAX which as something called MAXDIAL, which > essentially is a way of telnet into the MAX on some port numbers and > get connected to the modem and one can do all sort of at commands. > > However, I prefer to create some kind of virtual com port device special > file under /dev so that one doesn't have to worrying about > telnet into the MAX etc and any other program that used to talk to > real com port would still work transparently. > > Can someone suggest how I can do that properly ?? Well, not in a traditiional sense of a device special file. That would imply having a pseudo-device driver that understands how to telnet into the MAX. That doesn't seem like a kernel task to me. You might grab one of the PTYs in /dev, make a symlink to the name you want, then create a daemon that waits for someone to open the PTY or TTY. Once the open happens, the daemon can telnet to the MAX. Once it's all set up, you can just start passing data back and forth between the user process, the daemon, and telnet. Another idea: Create an "expect" script that does the telnet and all, maybe even "invisibly", then passes control to the user once you're logged in to the MAX. -Dave To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message