*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> tels (7)              


 tels(7)                                                             tels(7)

 NAME    [Toc]    [Back]
      tels, telm - STREAMS Telnet slave (pseudo-terminal) driver, STREAMS
      Telnet master driver (used by telnetd only), respectively

 SYNOPSIS    [Toc]    [Back]
      #include <sys/termios.h>
      #include <sys/strtio.h>

      int open("/dev/pts/tN", O_RDWR);

 DESCRIPTION    [Toc]    [Back]
      A Telnet pseudo-terminal consists of a tightly-coupled pair of
      character devices, called the master device and slave device.  The
      master and slave device drivers work together to provide a Telnet
      connection on the server side where the master provides a connection
      to telnetd and the slave provides a terminal device special file
      access for the Telnet application processes, as depicted below:

                            | Pseudo terminal functions|
           Application <--> |--------------------------| <--> telnetd
            Processes       | Slave      |   Master    |
                            | (tels)     |   (telm)    |

      The slave driver, tels with ptem (STREAMS pty emulation module) and
      ldterm (STREAMS line discipline module) pushed on top (not shown for
      simplicity), provides a terminal interface as described in termio(7).
      Whereas devices that provide the terminal interface described in
      termio(7) have a hardware device behind them; in contrast, the slave
      device has telnetd manipulating it through the master side of the
      Telnet pseudo terminal.

      There are no nodes in the file system for each individual master
      device.  Rather, the master driver is set up as a STREAMS clone(7)
      driver with its major device number set to the major for the clone
      driver and its minor device number set to the major for the telm
      driver.  The master driver is opened by telnetd using the open(2)
      system call with /dev/telnetm as the device file parameter.  The clone
      open finds the next available minor number for the master device.  The
      master device is available only if it and its corresponding slave
      device are not already opened.

      In order to use the STREAMS Telnet subsystem, a node for the master
      driver /dev/telnetm and N number of Telnet slave devices must be

      The number of slave devices is set by a kernel tunable parameter
      called nstrtel.  This can be modified using SAM; its default and
      minimum value is 60. The value of nstrtel is the upper limit of the
      number of telnet sessions that can be opened.

 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003

 tels(7)                                                             tels(7)

      Multiple opens are allowed on the Telnet slave device.

      The master and slave drivers pass all STREAMS messages to their
      adjacent drivers. When the connection is closed from the Telnet client
      side, an M_HANGUP message is sent to the corresponding slave device
      which will render that slave device unusable.  The process on the
      slave side gets the errno ENXIO when attempting a write(2) system call
      to the slave device file but it will be able to read any data
      remaining in the slave stream.  Finally, when all the data has been
      read, the read(2) system call will return 0, indicating that the slave
      can no longer be used.

 AUTHOR    [Toc]    [Back]
      tels() and telm() were developed by HP.

 FILES    [Toc]    [Back]
      /dev/telnetm        Streams Telnet master clone device

      /dev/pts/tN         Streams slave devices where N is the minor number
                          of the slave device and 0 < N < nstrtel.

 SEE ALSO    [Toc]    [Back]
      insf(1M), open(2), ioctl(2), streamio(7), ldterm(7), telnetd(1M),

 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003
[ Back ]
 Similar pages
Name OS Title
pts HP-UX STREAMS slave pty (pseudo-terminal) driver
ptm HP-UX STREAMS master pty (pseudo-terminal) driver
tsd IRIX TELNET server protocol STREAMS device
unlockpt IRIX unlock a pseudo-terminal master/slave pair
dlpi Tru64 STREAMS pseudodevice driver for bridging BSD Drivers to STREAMS
dlb Tru64 STREAMS pseudodevice driver for bridging BSD Drivers to STREAMS
nstrtel HP-UX specifies the number of telnet device files the kernel can support for incoming telnet sessions
pckt HP-UX Packet Mode module for STREAMS pty (pseudo-terminal)
log Tru64 STREAMS log driver
strlog HP-UX STREAMS log driver
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service