Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ptem(7m) [opensolaris man page]

ptem(7M)							  STREAMS Modules							  ptem(7M)

NAME
ptem - STREAMS Pseudo Terminal Emulation module SYNOPSIS
int ioctl(fd, I_PUSH, "ptem"); DESCRIPTION
ptem is a STREAMS module that, when used in conjunction with a line discipline and pseudo terminal driver, emulates a terminal. The ptem module must be pushed (see I_PUSH, streamio(7I)) onto the slave side of a pseudo terminal STREAM, before the ldterm(7M) module is pushed. On the write-side, the TCSETA, TCSETAF, TCSETAW, TCGETA, TCSETS, TCSETSW, TCSETSF, TCGETS, TCSBRK, JWINSIZE, TIOCGWINSZ, and TIOCSWINSZ termio ioctl(2) messages are processed and acknowledged. If remote mode is not in effect, ptem handles the TIOCSTI ioctl by copying the argument bytes into an M_DATA message and passing it back up the read side. Regardless of the remote mode setting, ptem acknowledges the ioctl and passes a copy of it downstream for possible further processing. A hang up (that is, stty 0) is converted to a zero length M_DATA message and passed downstream. Termio cflags and window row and column information are stored locally one per stream. M_DELAY messages are discarded. All other messages are passed downstream unmodified. On the read-side all messages are passed upstream unmodified with the following exceptions. All M_READ and M_DELAY messages are freed in both directions. A TCSBRK ioctl is converted to an M_BREAK message and passed upstream and an acknowledgement is returned downstream. A TIOCSIGNAL ioctl is converted into an M_PCSIG message, and passed upstream and an acknowledgement is returned downstream. Finally a TIOCREMOTE ioctl is converted into an M_CTL message, acknowledged, and passed upstream; the resulting mode is retained for use in subse- quent TIOCSTI parsing. FILES
<sys/ptem.h> SEE ALSO
stty(1), ioctl(2), ldterm(7M), pckt(7M), streamio(7I), termio(7I) STREAMS Programming Guide SunOS 5.11 3 Jul 1990 ptem(7M)

Check Out this Related Man Page

pckt(7) 						 Miscellaneous Information Manual						   pckt(7)

NAME
pckt - Packet Mode module for STREAMS pty (pseudo-terminal) SYNOPSIS
DESCRIPTION
The feature for STREAMS pty devices allows the user process on the master side of the pty device to be informed of state changes in the pty. To enable in the STREAMS pty device, the user process must push the module onto the master side of the pty with a call to the STREAMS ioctl(2) system call. When the module is pushed onto a STREAMS pty master, certain STREAMS messages going upstream on the master side will get packetized so they can be subsequently retrieved by the master side with a function. When the user process writes data, the module passes the message unchanged downstream on to the next module or driver. When the user process reads data or when the module receives certain STREAMS message types, it constructs a packet out of the message for forwarding upstream. To construct a message packet, the module creates an message. This message contains the original message type in the first data block and the original message in as many data blocks as needed. The user process can then retrieve the message with a call to the func- tion. The module packetizes the following STREAMS message types: All other messages are passed unchanged upstream. If the message is an message, the module looks at the flag and takes the following actions: o If the flag is the module changes it to before creating the message and passing the message upstream. This prevents the stream head's read queue from being flushed by the original o If the flag is the module changes it to before creating the message and passing it upstream. To flush the write queues properly, the module also sends an message with the flag set. o If the flag is the module changes it to before creating the message and passing it upstream. To flush the write queues properly, the module also sends an message with the flag set. AUTHOR
was developed by HP and OSF. SEE ALSO
getmsg(2), ioctl(2), ptm(7), pts(7), ldterm(7), ptem(7), streamio(7). pckt(7)
Man Page