OK, eventually this turned out to be a case of RTFM. (I took QSSL’s
golden silence as a hint
Although you have to “dereference” a few
times before you get to the note in the docs explaining how this works:
telnet → telnetd → Dev.pty → note → extended ptys / open_pty()
It turns out that you can take advantage of this “extended pty” feature:
You start separate Devs with special prefixes
Dev -n255 -N/dev/pty/0 &
Dev -n255 -N/dev/pty/1 &
…
etc.
And then you start up Dev.pty’s using these prefixes:
Dev.pty -N/dev/pty/0/p -n127 &
Dev.pty -N/dev/pty/1/p -n127 &
Yes, even my question about the -n option of Dev.pty was answered in a
note: It is possible to specify more than 16 devices, but not
recommended for UNIX compatibility reasons. The usage message of Dev.pty
is misleading, though.
regards,
rick
Rick Lake wrote:
255 actually. I found that out by trial and error. Starting multiple
Dev’s isn’t the problem. Getting telnetd to access it, is. Fooling
telnetd with overriding prefixes will probably work. However, if I
follow correctly, it will mean you need an extra prefix for each
/dev/pty* device, which unnecessarily wastes prefix space. I.e.:
Dev -n255 -N/DEV (as apposed to normal /dev)
Dev.pty -n16 -N/DEV/pty
.
prefix -A /DEV/ptyp0=/dev/ptyp0
prefix -A /DEV/ttyp0=/dev/ttyp0
.
etc
I’d rather use this as a last resort.
Could QSSL comment on telnetd? How does telnetd search for pty devices?
Can this be influenced? An extra option would be nice >
> For instance:
telnetd [-N/DEV]*
where -N is repeatable so you can do
telnetd -N/DEV -N/DEV1 -N/DEV2
to make it search for pty’s in those /DEV* directories.
Or perhaps there’s a more simple and obvious solution which I’ve
overlooked? And btw, what about the -n option of Dev.pty; is this a doc
bug? (see my previous post)
thanks stacks,
rick
“Richard R. Kramer” wrote:
Dev’s limit is at least 250 - maybe more. The “trick” in the docs
mentioned starting more than one Dev. The normal way of doing this would
give you sub directories under /dev. As I recall this can be worked
around with prefixes, however I don’t remember all the details.
Richard
Rick Lake wrote:
Ah, I was under the impression that telnetd specifically searched for
basename
ptyp/ttyp. I did a test with ptyq/ttyq and it worked >
> Thanks!
But the next limit you bump into is the maximum amount of devices Dev
supports. I can’t find the maximum number for the -n option in the docs.
OTOH, you can start a new Dev with a different prefix, but can you tel
telnetd to use a particular Dev/prefix? What exactly is the algorithm
telnetd uses to search for pty devices?
thanks again,
rick
“Richard R. Kramer” wrote:
Dev.pty -lq -n16 &
Dev.pty -lr -n16 &
etc.
Somewher in the docs there is mention of how to get hundreds of
these critters…
Richard
Rick Lake wrote:
Hi,
Is it possible to have more than 16 telnet sessions on one node. Reason
being that telnetd uses standard pty ports, but Dev.pty can only
register max 16 devices. And according to the usage message of telnetd,
it isn’t possible to specify a different base name than “pty”. (Thereby
taking advantage of the fact that you can start multiple Dev.pty drivers
with different base names).
Any solution for this?
Thanks stacks,
rick