linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] Mapping con=pts to a port instead of con=port
@ 2004-01-24  5:04 Dan Shearer
  2004-01-24  8:26 ` [uml-devel] " Dan Shearer
  2004-01-28  4:39 ` [uml-devel] " Jeff Dike
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Shearer @ 2004-01-24  5:04 UTC (permalink / raw)
  To: user-mode-linux-devel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [uml-devel] Re: Mapping con=pts to a port instead of con=port
  2004-01-24  5:04 [uml-devel] Mapping con=pts to a port instead of con=port Dan Shearer
@ 2004-01-24  8:26 ` Dan Shearer
  2004-01-28  4:39 ` [uml-devel] " Jeff Dike
  1 sibling, 0 replies; 3+ messages in thread
From: Dan Shearer @ 2004-01-24  8:26 UTC (permalink / raw)
  To: user-mode-linux-devel

Let's get the versions right. Patch is actually:

--- tndCfgParse.l.orig
+++ tndCfgParse.l    
@@ -132,7 +132,8 @@
 [Oo][Nn]      { return(YY_ON); }
 [Oo][Ff][Ff]  { return(YY_OFF); }
  
-"/dev/"[.A-Za-z][.A-Za-z0-9_-]* { 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [uml-devel] Mapping con=pts to a port instead of con=port
  2004-01-24  5:04 [uml-devel] Mapping con=pts to a port instead of con=port Dan Shearer
  2004-01-24  8:26 ` [uml-devel] " Dan Shearer
@ 2004-01-28  4:39 ` Jeff Dike
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Dike @ 2004-01-28  4:39 UTC (permalink / raw)
  To: Dan Shearer; +Cc: user-mode-linux-devel

dan@shearer.org said:
> 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 :-) 

Yeah, but it has uncleanlinesses of its own (like the need to generate a config
file on the fly), but it's cleaner than what I have now.

My major problem with it is that attaching consoles to ports will stop working
for some number of users if I switch to termnetd, and I'm willing to put up
with some amount of nastiness inside UML if it increases the size of the 
userbase that UML works for out of the box.

That concern would be somewhat assuaged if UML were generally installed with
packages that could be made to depend on termpkg, but I think that's not the
case.

				Jeff



-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-01-28  4:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-24  5:04 [uml-devel] Mapping con=pts to a port instead of con=port Dan Shearer
2004-01-24  8:26 ` [uml-devel] " Dan Shearer
2004-01-28  4:39 ` [uml-devel] " Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox