Subject: RE: tty driver for reverse telnet (a better explanation)
To: Scott R. Burns <Scott.Burns@Netcontech.Com>
From: Greg A. Woods <woods@weird.com>
List: netbsd-users
Date: 02/24/2002 18:16:25
[ On Sunday, February 24, 2002 at 17:42:36 (-0500), Scott R. Burns wrote: ]
> Subject: RE: tty driver for reverse telnet (a better explanation)
>
> I don't think I really need a lot of control of the tty settings
> sent to the other end.

You think you don't but it seems you don't know for sure yet....

> We have done this numerous times using ip sockets directly
> on the application end, but this custom application cannot be
> modified and only talks to ttys. I thought this would be a good
> solution.
> 
> Is this conceivably possible ?

Once again it depends on what TTY settings your applications needs to
do.  If you don't have source (implied by "cannot be modified") then
you'll have to ktrace it and find out what you can of what ioctl() calls
it makes.

However if you don't have source then until you actually try to get the
application to talk to a non-tty device you won't know whether it needs
a true emulation of termios or not.

If it ignores error returns from the ioctl() calls it makes then Herb's
idea to use mount_portal might be all you need.

Maybe you can attach the application to a PTY and have a proxy program
on the master side manage the telnet connection to your termserver.
That way the application can do all the ioctl() calls it wants to the
PTY and your back-end program will simply copy the data back and forth.

Personally I'd try the latter first -- it'll probably only take a few
hours of work for anyone familiar with PTYs and the telnet client source
to modify it to suit.....

-- 
								Greg A. Woods

+1 416 218-0098;  <gwoods@acm.org>;  <g.a.woods@ieee.org>;  <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>