From: Jeff D. <jd...@ka...> - 2000-12-31 04:29:50
|
I've added support for specifying a variety of channel types for the serial line and console drivers to use to talk to the outside world. The overall command-line syntax is 'con[nn]=[channel]' and 'ssl[nn]=[channel]'. If the '[nn]' is present, the channel is associated with just the one device specified by 'nn', so you would attach console 2 to a pty with 'con2=pty'. If the '[nn]' isn't there, it applies to all devices of that type, so 'ssl=xterm' puts every serial line in an xterm. The channel is specified as follows: 'pty' - a host pty is allocated and the choice printed to the log. You connect to the corresponding tty to talk to that device. 'xterm' - an xterm is started and all I/O with the device goes through the it. 'tty:/dev/ttyxx' - you name the tty that you want the device to attach to. This is useful for attaching a uml device to an unused host console. Attaching a device in one uml to a pty and attaching a device in another uml to the corresponding tty also works. This simulates a serial line running between the two virtual machines. 'socket:port' - you name a port number on the host and this attaches the uml device to it, allowing it to be accessed from the net without needing to set up networking and not needing root privs for anything. You attach to it with 'telnet umlhost port'. This doesn't actually work very well. It works better if you do 'mode character' at the telnet command line. But you still can't log in. The reason is that telnet is sending telnet protocol across the port, but the getty on the other side is just interpretting it as you typing bogus usernames and passwords. So, what I need, and can't find, is a telnetd that's willing to attach to a device rather than a port. This would run inside UML in place of the current getty. A minicom-like proggie that doesn't do protocol won't work because the two sides need to talk about terminal modes and stuff. Does anyone know of such a beast? What I have planned for the future is support for already-setup file descriptors and files. Also, maybe support for specifying a specific pty. I'm also going to allow specifying of input and output separately, so you could do something like 'con1=pty,file:/tmp/log', which would cause console 1 to take input from a pty, but send its output to /tmp/log rather than the pty. You'd be typing blind in this case, but this sort of thing is needed for specifying file descriptors and I'd rather implement it for everything rather than special-case descriptors. Also, I'm planning on stacking channels, so 'con1=+file:/tmp/log' would log input and output on console 1 to /tmp/log as well as whatever other channel it is talking to. This patch is available from ftp.nl.linux.org:/pub/uml/uml-latest-2.4.0-test12. bz2 as well as from cvs. Jeff |
From: <da...@mo...> - 2001-01-08 02:25:45
|
Jeff Dike wrote: >'socket:port' - you name a port number on the host and this attaches the uml >device to it, allowing it to be accessed from the net without needing to set >up networking and not needing root privs for anything. You attach to it with >'telnet umlhost port'. This doesn't actually work very well. It works better >if you do 'mode character' at the telnet command line. But you still can't >log in. The reason is that telnet is sending telnet protocol across the port, >but the getty on the other side is just interpretting it as you typing bogus >usernames and passwords. If you just use a TCP client that doesn't send telnet protocol characters, such as netcat (/usr/bin/nc), this should work. >So, what I need, and can't find, is a telnetd that's willing to attach to a >device rather than a port. My telnetd is able to be run from inetd, which attaches fds 0,1,2 to the network socket before execing telnetd. Have you tried running telnetd with fds 0,1,2 attached to the device? It just might work. |