From: Dan Shearer <dan@shearer.org>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] Mapping con=pts to a port instead of con=port
Date: Sat, 24 Jan 2004 15:34:40 +1030 [thread overview]
Message-ID: <20040124050440.GF4203@erizo.shearer.org> (raw)
Jeff,
You just said:
> I never heard of termnetd. I think it's less likely to be installed on
> a given system than telnetd though :-)
True. And it isn't a replacement for the port console, but a different
approach to solving the same problem. In researching how the port
console stuff works, I saw your original post from 31/12/2000 where you
said:
> 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?
The same effect can be achieved with termnetd, with the advantage of
your in.telnetd solution that you aren't building in complexity that
doesn't belong to UML, but without the clomp-clomp finesse telnetd
achieves :-)
I run uml with con1=pts etc and then expose those ptys using termnetd. The
dynamic nature of /dev/ptmx results means you need to use mconsole's config
commmand to work out what port to attach to.
termnetd is part of termpkg, the poor man's terminal server. "Good for
simulations" it says on the homepage so it has to be a winner. See
http://www.linuxlots.com/~termpkg. Only thing it doesn't do is Unix98 ptys, fix
follows. It listens on INADDR_ANY, which is a bad thing I should fix too.
Look for tndCfgParse.l within termnetd within termpkg 3.3. It is is a flex (as
in the lexical analyser) definition for parsing the config file for termnetd (a
nice approach given that he's implemented lots of termios stuff there with
potential for a very complicated parser.)
--- tndCfgParse.l.orig 2004-01-24 15:09:17.000000000 +1030
+++ tndCfgParse.l 2004-01-24 15:09:53.000000000 +1030
@@ -132,7 +132,7 @@
[Oo][Nn] { return(YY_ON); }
[Oo][Ff][Ff] { return(YY_OFF); }
-"/dev/pts/"[0-9]{1,5} { strcpy(yylval.s, yytext); return(YY_DEVICE); }
+"/dev/"[.A-Za-z][.A-Za-z0-9_-]*|"/dev/pts/"[0-9]{1,5} { strcpy(yylval.s, yytext); return(YY_DEVICE); }
[0-9A-Za-z_-]+ { strcpy(yylval.s, yytext); return(YY_IDENT); }
. { return(yytext[0]); }
--
Dan Shearer
dan@shearer.org
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next reply other threads:[~2004-01-24 10:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-24 5:04 Dan Shearer [this message]
2004-01-24 8:26 ` [uml-devel] Re: Mapping con=pts to a port instead of con=port Dan Shearer
2004-01-28 4:39 ` [uml-devel] " Jeff Dike
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040124050440.GF4203@erizo.shearer.org \
--to=dan@shearer.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.