Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tels(7) [hpux man page]

tels(7) 						 Miscellaneous Information Manual						   tels(7)

NAME
tels, telm - STREAMS Telnet slave (pseudo-terminal) driver, STREAMS Telnet master driver (used by telnetd only), respectively SYNOPSIS
DESCRIPTION
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 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, with (STREAMS pty emulation module) and (STREAMS line discipline module) pushed on top (not shown for simplicity), pro- vides 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 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 driver. The master driver is opened by telnetd using the open(2) system call with 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 and N number of Telnet slave devices must be installed. The number of slave devices is set by a kernel tunable parameter called This can be modified using SAM; its default and minimum value is 60. The value of is the upper limit of the number of telnet sessions that can be opened. 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 message is sent to the corresponding slave device which will render that slave device unusable. The process on the slave side gets the errno 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
and were developed by HP. FILES
Streams Telnet master clone device Streams slave devices where N is the minor number of the slave device and 0 < N < SEE ALSO
insf(1M), open(2), ioctl(2), streamio(7), ldterm(7), telnetd(1M), ptem(7). tels(7)

Check Out this Related Man Page

ptm(7D) 							      Devices								   ptm(7D)

NAME
ptm - STREAMS pseudo-tty master driver DESCRIPTION
The pseudo-tty subsystem simulates a terminal connection, where the master side represents the terminal and the slave represents the user process's special device end point. In order to use the pseudo-tty subsystem, a node for the master side driver /dev/ptmx and N number of nodes for the slave driver must be installed. See pts(7D). The master device is set up as a cloned device where its major device number is the major for the clone device and its minor device number is the major for the ptm driver. There are no nodes in the file system for mas- ter devices. The master pseudo driver is opened using the open(2) system call with /dev/ptmx as the device parameter. The clone open finds the next available minor device for the ptm major device. A master device is available only if it and its corresponding slave device are not already open. When the master device is opened, the cor- responding slave device is automatically locked out. Only one open is allowed on a master device. Multiple opens are allowed on the slave device. After both the master and slave have been opened, the user has two file descriptors which are the end points of a full duplex con- nection composed of two streams which are automatically connected at the master and slave drivers. The user may then push modules onto either side of the stream pair. The master and slave drivers pass all messages to their adjacent queues. Only the M_FLUSH needs some processing. Because the read queue of one side is connected to the write queue of the other, the FLUSHR flag is changed to the FLUSHW flag and vice versa. When the master device is closed an M_HANGUP message is sent to the slave device which will render the device unusable. The process on the slave side gets the errno EIO when attempting to write on that stream but it will be able to read any data remaining on the stream head read queue. When all the data has been read, read() returns 0 indicating that the stream can no longer be used. On the last close of the slave device, a 0-length message is sent to the master device. When the application on the master side issues a read() or getmsg() and 0 is returned, the user of the master device decides whether to issue a close() that dismantles the pseudo-terminal subsystem. If the master device is not closed, the pseudo-tty subsystem will be available to another user to open the slave device. If O_NONBLOCK or O_NDELAY is set, read on the master side returns -1 with errno set to EAGAIN if no data is available, and write returns -1 with errno set to EAGAIN if there is internal flow control. IOCTLS
The master driver supports the ISPTM and UNLKPT ioctls that are used by the functions grantpt(3C), unlockpt(3C) and ptsname(3C). The ioctl ISPTM determines whether the file descriptor is that of an open master device. On success, it returns the 0. The ioctl UNLKPT unlocks the master and slave devices. It returns 0 on success. On failure, the errno is set to EINVAL indicating that the master device is not open. FILES
/dev/ptmx master clone device /dev/pts/M slave devices (M = 0 -> N-1) SEE ALSO
grantpt(3C), ptsname(3C), unlockpt(3C), pckt(7M), pts(7D) STREAMS Programming Guide SunOS 5.11 5 Feb 1997 ptm(7D)
Man Page