[lug] Repost: Can anyone give me a hand with pseudo-terminals?

D. Stimits stimits at idcomm.com
Mon Jan 14 17:41:41 MST 2002


Bryan Field-Elliot wrote:
> 
> I have an application which connects to a serial port... The default is
> "/dev/ttyS0", but you can specify a different device on the
> command-line.
> 
> What I want to do, is point it to a pseudo-terminal. On the "other side"
> of the pseudo-terminal, I want to attach a telnet daemon, or maybe just
> one account via telnet, so that one can telnet into it and connect to
> this application, which thinks its talking to a serial port.
> 
> Obviously, only one person at a time should be allowed to telnet in this
> way -- additional simultaneous attempts should tell the user "sorry,
> port is busy, try later" or something like that.
> 
> I don't know much about pseudo-terminals, they seem a little arcane to
> me. Can anyone point me in the right direction as far as utilities I can
> use, etc., or maybe just configuration tips?

I don't do serial port programming, but I imagine ioctl is used
extensively, and possible (depending on circumstances) termcap or
terminfo. In the case of ioctl, it is very dependent on the particular
driver, and you pretty much need to look at the module or source if the
particular driver is not documented. Then there is the assembler level
stuff with inb and outb for actual UART or other serial devices, I doubt
this is a level you are interested in.

D. Stimits, stimits at idcomm.com

> 
> Thank you,
> 
> Bryan
> 
> 
> 
> 
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug



More information about the LUG mailing list